otcextensions.sdk.dws.v1.flavor¶
The DWS Flavor Class¶
The Flavor
class inherits from
Resource
.
- class otcextensions.sdk.dws.v1.flavor.Flavor(_synchronized=False, connection=None, **attrs)¶
The base resource
- Parameters:
_synchronized (bool) – This is not intended to be used directly. See
new()
andexisting()
.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.
- base_path: str = '/node-types'¶
The base part of the URI for this resource.
- resources_key: ty.Optional[str] = 'node_types'¶
Plural form of key for resource.
- allow_list = True¶
Allow list operation for this resource.
- availability_zones¶
Availability Zones
- detail¶
Node type details
- disk_size¶
Disk Size Type: int
- disk_type¶
Disk Type Type: str
- name: ty.Union[Body, URI]¶
Name of a node type
- ram¶
ram. Type: int
- spec_name¶
Name of a node type
- vcpu¶
cpu count. Type: int
- classmethod list(session, paginated=True, base_path=None, **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:
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, orFalse
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
.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 toget()
. They are additionally checked against thebase_path
format string to see if any path fragments need to be filled in by the contents of this argument.
- Returns:
A generator of
Resource
objects.- Raises:
MethodNotSupported
ifResource.allow_list
is not set toTrue
.- Raises:
InvalidResourceQuery
if query contains invalid params.