- 4. Using the OpenStack SDK
- Resources and Attributes
- SFSTurbo Resources
- otcextensions.sdk.sfsturbo.v1.share
otcextensions.sdk.sfsturbo.v1.share¶
The Share Class¶
The Share
class inherits from
Resource
.
- class otcextensions.sdk.sfsturbo.v1.share.Share(_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 = '/sfs-turbo/shares'¶
The base part of the URI for this resource.
- resource_key: ty.Optional[str] = 'share'¶
Singular form of key for resource.
- resources_key: ty.Optional[str] = 'shares'¶
Plural form of key for resource.
- allow_create = True¶
Allow create operation for this resource.
- allow_fetch = True¶
Allow get operation for this resource.
- allow_delete = True¶
Allow delete operation for this resource.
- allow_list = True¶
Allow list operation for this resource.
- action_progress¶
Specifies the creation progress of the SFS Turbo file system. Type: dict
- az_name¶
Specifies the name of the AZ where the SFS Turbo file system is located. Type: str
- avail_capacity¶
Type: str
- availability_zone¶
Specifies the code of the AZ where the SFS Turbo file system is located. Type: str
- created_at¶
Specifies the creation time. Type: str
- crypt_key_id¶
Type: str
- expand_type¶
For an enhanced file system, bandwidth is returned for this field. Type: str
- export_location¶
Specifies the mount point of the SFS Turbo file system. Type: str
- name: ty.Union[Body, URI]¶
Specifies the name of the SFS Turbo file system. Type: str
- status¶
Specifies the status of the SFS Turbo file system. Type: str
- sub_status¶
Specifies the sub-status of the SFS Turbo file system. Type:str
- share_type¶
Specifies the type of the SFS Turbo file system. Type: str
- region¶
Specifies the region of the SFS Turbo file system. Type: str
- subnet_id¶
Specifies the network ID of the subnet specified by the user. Type: str
- security_group_id¶
Specifies the ID of a security group specified by the user. Type: str
- size¶
Type: str
- share_proto¶
Type: str
- pay_model¶
Billing mode of the SFS Turbo file system. Type: str
- project_id¶
Project id. Type: str
- version¶
Specifies the version ID of the SFS Turbo file system. Type:str
- vpc_id¶
Specifies the VPC ID specified by the user. Type: str
- extend_capacity(session, extend)¶
Method to extend the capacity of the file system
- Parameters:
session (
Adapter
) – The session to use for making this request.extend (dict) – Specifies the extend object.
- change_security_group(session, change_security_group)¶
Method to change the security group bound to the file system.
- Parameters:
session (
Adapter
) – The session to use for making this request.change_security_group (dict) – Specifies the change_security_group object.
- wait_for_substatus(session, desired_substatus, interval=5, wait=350, failure=None, callback=None)¶
Wait for sub_status to reach desired state.
- Parameters:
session (
Adapter
) – The session to use for making this request.interval (int) – Number of seconds to wait between checks. Set to
None
to use the default interval.wait (int) – Maximum number of seconds to wait for transition. Set to
None
to wait forever.failure (list) – Sub status which means failure.
callback – A callback function. This will be called with a single value, progress. This is API specific but is generally a percentage value from 0-100.
- Returns:
The share object.
- Raises:
ResourceTimeout
transition to status failed to occur in wait seconds.- Raises:
ResourceFailure
if the resource has transited to one of the failure statuses.