The nova.compute.flavors Module

Built-in instance properties.

create(name, memory, vcpus, root_gb, ephemeral_gb=0, flavorid=None, swap=0, rxtx_factor=1.0, is_public=True)

Creates flavors.

delete_flavor_info(metadata, *prefixes)

Delete flavor instance_type information from instance’s system_metadata by prefix.

destroy(name)

Marks flavor as deleted.

extract_flavor(instance, prefix='')

Create a Flavor object from instance’s system_metadata information.

get_all_flavors(ctxt=None, inactive=False, filters=None)

Get all non-deleted flavors as a dict.

Pass inactive=True if you want deleted flavors returned also.

get_all_flavors_sorted_list(ctxt=None, filters=None, sort_key='flavorid', sort_dir='asc', limit=None, marker=None)

Get all non-deleted flavors as a sorted list.

get_default_flavor()

Get the default flavor.

get_flavor(instance_type_id, ctxt=None, inactive=False)

Retrieves single flavor by id.

get_flavor_access_by_flavor_id(flavorid, ctxt=None)

Retrieve flavor access list by flavor id.

get_flavor_by_flavor_id(flavorid, ctxt=None, read_deleted='yes')

Retrieve flavor by flavorid.

Raises:FlavorNotFound
get_flavor_by_name(name, ctxt=None)

Retrieves single flavor by name.

save_flavor_info(metadata, instance_type, prefix='')

Save properties from instance_type into instance’s system_metadata, in the format of:

[prefix]instance_type_[key]

This can be used to update system_metadata in place from a type, as well as stash information about another instance_type for later use (such as during resize).

validate_extra_spec_keys(key_names_list)

Previous topic

The nova.compute.cpumodel Module

Next topic

The nova.compute.hv_type Module

Project Source

This Page