FlavorsΒΆ

Flavor interface.

class novaclient.v1_1.flavors.Flavor(manager, info, loaded=False)

Bases: novaclient.openstack.common.apiclient.base.Resource

A flavor is an available hardware configuration for a server.

Flavor.HUMAN_ID = True
Flavor.delete()

Delete this flavor.

Flavor.ephemeral

Provide a user-friendly accessor to OS-FLV-EXT-DATA:ephemeral

Flavor.get_keys()

Get extra specs from a flavor.

Parameters:flavor – The Flavor to get extra specs from
Flavor.is_public

Provide a user-friendly accessor to os-flavor-access:is_public

Flavor.set_keys(metadata)

Set extra specs on a flavor.

Parameters:
  • flavor – The Flavor to set extra spec on
  • metadata – A dict of key/value pairs to be set
Flavor.unset_keys(keys)

Unset extra specs on a flavor.

Parameters:
  • flavor – The Flavor to unset extra spec on
  • keys – A list of keys to be unset
class novaclient.v1_1.flavors.FlavorManager(api)

Bases: novaclient.base.ManagerWithFind

Manage Flavor resources.

FlavorManager.create(name, ram, vcpus, disk, flavorid='auto', ephemeral=0, swap=0, rxtx_factor=1.0, is_public=True)

Create a flavor.

Parameters:
  • name – Descriptive name of the flavor
  • ram – Memory in MB for the flavor
  • vcpus – Number of VCPUs for the flavor
  • disk – Size of local disk in GB
  • flavorid – ID for the flavor (optional). You can use the reserved value "auto" to have Nova generate a UUID for the flavor in cases where you cannot simply pass None.
  • swap – Swap space in MB
  • rxtx_factor – RX/TX factor
Return type:

Flavor

FlavorManager.delete(flavor)

Delete a specific flavor.

Parameters:flavor – The ID of the Flavor to get.
FlavorManager.get(flavor)

Get a specific flavor.

Parameters:flavor – The ID of the Flavor to get.
Return type:Flavor
FlavorManager.is_alphanum_id_allowed = True
FlavorManager.list(detailed=True, is_public=True)

Get a list of all flavors.

Return type:list of Flavor.
FlavorManager.resource_class

alias of Flavor

Previous topic

Version 1.1, Version 2 API Reference

Next topic

Images

This Page