openstack.block_storage.v2.consistency_group¶
The ConsistencyGroup Class¶
The ConsistencyGroup class inherits from
Resource.
- class openstack.block_storage.v2.consistency_group.ConsistencyGroup(_synchronized=False, connection=None, **attrs)¶
The base resource
- Parameters:
_synchronized – This is not intended to be used directly. See
new()andexisting().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._connectionin Resource code should protect itself with a check for None.
- resource_key = 'consistencygroup'¶
Singular form of key for resource.
- resources_key = 'consistencygroups'¶
Plural form of key for resource.
- base_path = '/consistencygroups'¶
The base part of the URI for this resource.
- allow_fetch = True¶
Allow get operation for this resource.
- allow_create = True¶
Allow create operation for this resource.
- allow_delete = True¶
Allow delete operation for this resource.
- allow_commit = True¶
Allow update operation for this resource.
- allow_list = True¶
Allow list operation for this resource.
- availability_zone¶
The availability zone.
- created_at¶
The date and time when this resource was created.
- description¶
The description.
- name¶
The name.
- status¶
The status.
- volume_types¶
The volume types.
- add_volumes¶
Comma-separated list of volume UUIDs to add to the consistency group. Used in update requests only.
- remove_volumes¶
Comma-separated list of volume UUIDs to remove from the consistency group. Used in update requests only.
- classmethod create_from_source(session, *, consistency_group_snapshot_id=None, consistency_group_id=None, name=None, description=None)¶
Creates a new group from source.
- Parameters:
session – The session to use for making this request
consistency_group_snapshot_id – The ID of a consistency group snapshot to create the new consistency group from. Either this or consistency_group_id must be provided
consistency_group_id – The ID of a consistency group to create the new consistency group from. Either this or consistency_group_snapshot_id must be provided
name – The name to assign to the new consistency group
description – The description to set on the new consistency group
- Returns:
The created consistency group
- delete(session, error_message=None, *, microversion=None, base_path=None, params=None)¶
Delete the remote resource based on this instance.
- Parameters:
session – The session to use for making this request.
microversion – API version to override the negotiated one.
base_path – Base part of the URI for modifying resources, if different from
base_path.params – Query string parameters to include in the request URL.
- Returns:
This
Resourceinstance.- Raises:
MethodNotSupportedifResource.allow_commitis not set toTrue.- Raises:
NotFoundExceptionif the resource was not found.