# octavia.compute package

## Subpackages

- octavia.compute.drivers package
  - Subpackages
    - octavia.compute.drivers.noop_driver package
      - Submodules
      - octavia.compute.drivers.noop_driver.driver module
      - Module contents
  - Submodules
  - octavia.compute.drivers.nova_driver module
    - `VirtualMachineManager`
      - `VirtualMachineManager.attach_network_or_port()`
      - `VirtualMachineManager.build()`
      - `VirtualMachineManager.create_server_group()`
      - `VirtualMachineManager.delete()`
      - `VirtualMachineManager.delete_server_group()`
      - `VirtualMachineManager.detach_port()`
      - `VirtualMachineManager.get_amphora()`
      - `VirtualMachineManager.status()`
      - `VirtualMachineManager.validate_availability_zone()`
      - `VirtualMachineManager.validate_flavor()`
  - Module contents

## Submodules

## octavia.compute.compute_base module

class ComputeBase

  Bases: `object`

  abstractmethod attach_network_or_port(compute_id, network_id=None, ip_address=None, port_id=None)

    Connects an existing amphora to an existing network.

    Parameters:

      - compute_id – id of an amphora in the compute service

      - network_id – id of a network

      - ip_address – ip address to attempt to be assigned to interface

      - port_id – id of the neutron port

    Returns:

      nova interface

    Raises:

      Exception

  abstractmethod build(name='amphora_name', amphora_flavor=None, image_tag=None, image_owner=None, key_name=None, sec_groups=None, network_ids=None, config_drive_files=None, user_data=None, server_group_id=None, availability_zone=None)

    Build a new amphora.

    Parameters:

      - name – Optional name for Amphora

      - amphora_flavor – Optionally specify a flavor

      - image_tag – tag of the base image for the amphora instance

      - key_name – Optionally specify a keypair

      - sec_groups – Optionally specify list of security groups

      - network_ids – A list of network IDs to attach to the amphora

      - config_drive_files – An optional dict of files to overwrite on the server upon boot. Keys are file names (i.e. /etc/passwd) and values are the file contents (either as a string or as a file-like object). A maximum of five entries is allowed, and each file must be 10k or less.

      - user_data – Optional user data to pass to be exposed by the metadata server this can be a file type object as well or a string

      - server_group_id – Optional server group id(uuid) which is used for anti_affinity feature

      - availability_zone – Availability zone data dict

    Raises:

      ComputeBuildException – if compute failed to build amphora

    Returns:

      UUID of amphora

  abstractmethod create_server_group(name, policy)

    Create a server group object

    Parameters:

      - name – the name of the server group

      - policy – the policy of the server group

    Returns:

      the server group object

  abstractmethod delete(compute_id)

    Delete the specified amphora

    Parameters:

      compute_id – The id of the amphora to delete

  abstractmethod delete_server_group(server_group_id)

    Delete a server group object

    Parameters:

      server_group_id – the uuid of a server group

  abstractmethod detach_port(compute_id, port_id)

    Disconnects an existing amphora from an existing port.

    Parameters:

      - compute_id – id of an amphora in the compute service

      - port_id – id of the port

    Returns:

      None

    Raises:

      Exception

  abstractmethod get_amphora(compute_id, management_network_id=None)

    Retrieve an amphora object

    Parameters:

      - compute_id – the compute id of the desired amphora

      - management_network_id – ID of the management network

    Returns:

      the amphora object

    Returns:

      fault message or None

  abstractmethod status(compute_id)

    Check whether the specified amphora is up

    Parameters:

      compute_id – the ID of the desired amphora

    Returns:

      The compute “status” response (“ONLINE” or “OFFLINE”)

  abstractmethod validate_availability_zone(availability_zone)

    Validates that a compute availability zone exists.

    Parameters:

      availability_zone – Name of the compute availability zone.

    Returns:

      None

    Raises:

      NotFound

    Raises:

      NotImplementedError

  abstractmethod validate_flavor(flavor_id)

    Validates that a compute flavor exists.

    Parameters:

      flavor_id – ID of the compute flavor.

    Returns:

      None

    Raises:

      NotFound

    Raises:

      NotImplementedError

## Module contents

this page last updated: 2026-04-13 15:26:39

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.

found an error? report a bug