otcextensions.sdk.deh.v1.host¶
The DeH Host Class¶
The Host
class inherits from
Resource
.
- class otcextensions.sdk.deh.v1.host.Host(_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.
- resource_key: ty.Optional[str] = 'dedicated_host'¶
Singular form of key for resource.
- resources_key: ty.Optional[str] = 'dedicated_hosts'¶
Plural form of key for resource.
- base_path: str = '/dedicated-hosts'¶
The base part of the URI for this resource.
- allow_create = True¶
Allow create operation for this resource.
- allow_list = True¶
Allow list operation for this resource.
- allow_fetch = True¶
Allow get operation for this resource.
- allow_delete = True¶
Allow delete operation for this resource.
- allow_commit = True¶
Allow update operation for this resource.
- id¶
Properties Specifies DeH ID
- allocated_at¶
Time at which the DeH has been allocated
- auto_placement¶
Specifies whether to allow a VM to be placed on this available host if its DeH ID is not specified during its creation value: [‘on’, ‘off’]
- available_vcpus¶
Specifies the number of available vCPUs for the DeH
- available_memory¶
Specifies the number of available memory for the DeH
- availability_zone¶
Specifies the AZ to which the DeH belongs
- dedicated_host_ids¶
list of created DeH hosts (during create)
- host_properties¶
Specifies the property of host
- host_type¶
Specifies the DeH type (for creation)
- instance_total¶
Specifies the number of the placed VMs
- instance_uuids¶
Specifies the VMs started on the DeH. The “Querying DeHs” intercace does not display this parameter.
- project_id¶
Specifies the tenant who owns the DeH
- quantity¶
Specifies the number of allocated DeHs (during creation).
- released_at¶
Time at which the DeH has been released
- status¶
Specifies the DeH status. The value can be available, fault or released
- tags¶
Tag.
- fetch_tags(session)¶
Lists tags set on the entity.
- Parameters:
session – The session to use for making this request.
- Returns:
The list with tags attached to the entity
- add_tags(session, tags=[])¶
Sets/Replaces all tags on the resource.
- Parameters:
session – The session to use for making this request.
tags (list) – List with tags to be set on the resource
- remove_tags(session, tags=[])¶
Sets/Replaces all tags on the resource.
- Parameters:
session – The session to use for making this request.
tags (list) – List with tags to be removed on the resource
- create(session, prepend_key=False, base_path=None, **params)¶
Create a remote resource based on this instance.
- Parameters:
session (
Adapter
) – The session to use for making this request.prepend_key – A boolean indicating whether the resource_key should be prepended in a resource creation request. Default to True.
base_path (str) – Base part of the URI for creating resources, if different from
base_path
.resource_request_key (str) – Overrides the usage of self.resource_key when prepending a key to the request body. Ignored if prepend_key is false.
resource_response_key (str) – Overrides the usage of self.resource_key when processing response bodies. Ignored if prepend_key is false.
microversion (str) – API version to override the negotiated one.
params (dict) – Additional params to pass.
- Returns:
This
Resource
instance.- Raises:
MethodNotSupported
ifResource.allow_create
is not set toTrue
.