The Flavor
class inherits from Resource
.
The base resource
_synchronized (bool) – This is not intended to be used directly. See
new()
and
existing()
.
connection (openstack.connection.Connection) – Reference to the Connection being used. Defaults to None to allow
Resource objects to be used without an active Connection, such as
in unit tests. Use of self._connection
in Resource code should
protect itself with a check for None.
Singular form of key for resource.
Plural form of key for resource.
The base part of the URI for this resource.
Allow create operation for this resource.
Allow get operation for this resource.
Allow delete operation for this resource.
Allow list operation for this resource.
Allow update operation for this resource.
The name of this flavor.
The name of this flavor when returned by server list/show
The description of the flavor.
Size of the disk this flavor offers. Type: int
True
if this is a publicly visible flavor. False
if this is
a private image. Type: bool
The amount of RAM (in MB) this flavor offers. Type: int
The number of virtual CPUs this flavor offers. Type: int
Size of the swap partitions.
Size of the ephemeral data disk attached to this server. Type: int
True
if this flavor is disabled, False
if not. Type: bool
The bandwidth scaling factor this flavor receives on the network.
A dictionary of the flavor’s extra-specs key-and-value pairs.
This method is a generator which yields resource objects.
This resource object list generator handles pagination and takes query params for response filtering.
session (Adapter
) – The session to use for making this request.
paginated (bool) – True
if a GET to this resource returns
a paginated series of responses, or False
if a GET returns only
one page of data. When paginated is False only one page of data
will be returned regardless of the API’s support of pagination.
base_path (str) – Base part of the URI for listing resources, if
different from base_path
.
allow_unknown_params (bool) – True
to accept, but discard
unknown query parameters. This allows getting list of ‘filters’ and
passing everything known to the server. False
will result in
validation exception when unknown query parameters are passed.
microversion (str) – API version to override the negotiated one.
params (dict) – These keyword arguments are passed through the
_transpose()
method
to find if any of them match expected query parameters to be sent
in the params argument to
get()
. They are additionally
checked against the base_path
format string to see if any path fragments need to be filled in by
the contents of this argument.
Parameters supported as filters by the server side are passed in
the API call, remaining parameters are applied as filters to the
retrieved results.
A generator of Resource
objects.
MethodNotSupported
if
Resource.allow_list
is not set to True
.
InvalidResourceQuery
if query
contains invalid params.
Adds flavor access to a tenant and flavor.
session – The session to use for making this request.
tenant –
None
Removes flavor access to a tenant and flavor.
session – The session to use for making this request.
tenant –
None
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.
session – The session to use for making this request.
List of dicts with flavor_id and tenant_id attributes
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.
session – The session to use for making this request.
The updated flavor.
Creates extra specs for a flavor.
session – The session to use for making this request.
specs –
The updated flavor.
Get an individual extra spec property.
session – The session to use for making this request.
prop – The property to fetch.
The value of the property if it exists, else None
.
Update an extra spec for a flavor.
session – The session to use for making this request.
prop – The property to update.
val – The value to update with.
The updated value of the property.
Delete an extra spec for a flavor.
session – The session to use for making this request.
prop – The property to delete.
None
The FlavorDetail
class inherits from
Flavor
.
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.