openstack.compute.v2.flavor

The Flavor Class

The Flavor class inherits from Resource.

class openstack.compute.v2.flavor.Flavor(attrs=None, loaded=False)

Construct a Resource to interact with a service’s REST API.

The Resource class offers two class methods to construct resource objects, which are preferrable to entering through this initializer. See Resource.new() and Resource.existing().

Parameters:
  • attrs (dict) – The attributes to set when constructing this Resource.
  • loaded (bool) – True if this Resource exists on the server, False if it does not.

Links pertaining to this flavor. This is a list of dictionaries, each including keys href and rel.

name = None

The name of this flavor.

disk = None

Size of the disk this flavor offers. Type: int

is_public = None

True if this is a publicly visible flavor. False if this is a private image. Type: bool

ram = None

The amount of RAM (in MB) this flavor offers. Type: int

vcpus = None

The number of virtual CPUs this flavor offers. Type: int

swap = None

Size of the swap partitions.

ephemeral = None

Size of the ephemeral data disk attached to this server. Type: int

disabled = None

True if this flavor is disabled, False if not.

rxtx_factor = None

The bandwidth scaling factor this flavor receives on the network.

The FlavorDetail Class

The FlavorDetail class inherits from Flavor.

class openstack.compute.v2.flavor.FlavorDetail(attrs=None, loaded=False)

Construct a Resource to interact with a service’s REST API.

The Resource class offers two class methods to construct resource objects, which are preferrable to entering through this initializer. See Resource.new() and Resource.existing().

Parameters:
  • attrs (dict) – The attributes to set when constructing this Resource.
  • loaded (bool) – True if this Resource exists on the server, False if it does not.