octavia.compute.drivers package

octavia.compute.drivers package


octavia.compute.drivers.nova_driver module

class VirtualMachineManager[source]

Bases: octavia.compute.compute_base.ComputeBase

Compute implementation of virtual machines via nova.

build(name='amphora_name', amphora_flavor=None, image_id=None, image_tag=None, image_owner=None, key_name=None, sec_groups=None, network_ids=None, port_ids=None, config_drive_files=None, user_data=None, server_group_id=None)[source]

Create a new virtual machine.

  • name – optional name for amphora
  • amphora_flavor – image flavor for virtual machine
  • image_id – image ID for virtual machine
  • image_tag – image tag for virtual machine
  • key_name – keypair to add to the virtual machine
  • sec_groups – Security group IDs for virtual machine
  • network_ids – Network IDs to include on virtual machine
  • port_ids – Port IDs to include on virtual machine
  • 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

ComputeBuildException – if nova failed to build virtual machine


UUID of amphora

create_server_group(name, policy)[source]

Create a server group object

  • name – the name of the server group
  • policy – the policy of the server group

Generic exception if the server group is not created


the server group object


Delete a virtual machine.

Parameters:compute_id – virtual machine UUID

Delete a server group object

Raises:Generic exception if the server group is not deleted
Parameters:server_group_id – the uuid of a server group

Retrieve the information in nova of a virtual machine.

Parameters:amphora_id – virtual machine UUID
Returns:an amphora object
Returns:fault message or None

Retrieve the status of a virtual machine.

Parameters:compute_id – virtual machine UUID
Returns:constant of amphora status

Module contents

Creative Commons Attribution 3.0 License

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