The Flavor class inherits from Resource.
openstack.compute.v2.flavor.Flavor(_synchronized=False, connection=None, **attrs)¶The base resource
| Parameters: |
|
|---|
links¶Links pertaining to this flavor. This is a list of dictionaries,
each including keys href and rel.
name¶The name of this flavor.
description¶The description of the flavor.
disk¶Size of the disk this flavor offers. Type: int
is_public¶True if this is a publicly visible flavor. False if this is
a private image. Type: bool
ram¶The amount of RAM (in MB) this flavor offers. Type: int
vcpus¶The number of virtual CPUs this flavor offers. Type: int
swap¶Size of the swap partitions.
ephemeral¶Size of the ephemeral data disk attached to this server. Type: int
is_disabled¶True if this flavor is disabled, False if not. Type: bool
rxtx_factor¶The bandwidth scaling factor this flavor receives on the network.
extra_specs¶A dictionary of the flavor’s extra-specs key-and-value pairs.
list(session, paginated=True, base_path='/flavors/detail', allow_unknown_params=False, **params)¶This method is a generator which yields resource objects.
This resource object list generator handles pagination and takes query params for response filtering.
| Parameters: |
|
|---|---|
| Returns: | A generator of |
| Raises: |
|
| Raises: |
|
add_tenant_access(session, tenant)¶Adds flavor access to a tenant and flavor.
remove_tenant_access(session, tenant)¶Removes flavor access to a tenant and flavor.
get_access(session)¶Lists tenants who have access to a private flavor
By default, only administrators can manage private flavor access. A private flavor has is_public set to false while a public flavor has is_public set to true.
| Returns: | List of dicts with flavor_id and tenant_id attributes |
|---|
fetch_extra_specs(session)¶Fetch extra_specs of the flavor
Starting with 2.61 extra_specs are returned with the flavor details, before that a separate call is required.
create_extra_specs(session, specs)¶Creates extra specs for a flavor
get_extra_specs_property(session, prop)¶Get individual extra_spec property
update_extra_specs_property(session, prop, val)¶Update An Extra Spec For A Flavor
delete_extra_specs_property(session, prop)¶Delete An Extra Spec For A Flavor
The FlavorDetail class inherits from
Flavor.
openstack.compute.v2.flavor.FlavorDetail¶alias of openstack.compute.v2.flavor.Flavor
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.