openstack.shared_file_system.v2.share¶
The Share Class¶
The Share class inherits from
Resource.
- class openstack.shared_file_system.v2.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._connectionin Resource code should protect itself with a check for None.
- resource_key = 'share'¶
 Singular form of key for resource.
- resources_key = 'shares'¶
 Plural form of key for resource.
- base_path = '/shares'¶
 The base part of the URI for this resource.
- allow_create = True¶
 Allow create operation for this resource.
- allow_fetch = True¶
 Allow get operation for this resource.
- allow_commit = True¶
 Allow update operation for this resource.
- allow_list = True¶
 Allow list operation for this resource.
- allow_head = False¶
 Allow head operation for this resource.
- allow_delete = True¶
 Allow delete operation for this resource.
- access_rules_status¶
 Properties The share instance access rules status. A valid value is active, error, or syncing.
- availability_zone¶
 The availability zone.
- created_at¶
 The date and time stamp when the resource was created within the service’s database.
- description¶
 The user defined description of the resource.
- host¶
 The share host name.
- is_public¶
 The level of visibility for the share.
- is_creating_new_share_from_snapshot_supported¶
 Whether or not this share supports snapshots that can be cloned into new shares.
- is_mounting_snapshot_supported¶
 Whether the share’s snapshots can be mounted directly and access controlled independently or not.
- is_reverting_to_snapshot_supported¶
 Whether the share can be reverted to its latest snapshot or not.
- is_snapshot_supported¶
 An extra specification that filters back ends by whether the share supports snapshots or not.
- is_replicated¶
 Indicates whether the share has replicas or not.
- metadata¶
 One or more metadata key and value pairs as a dictionary of strings.
- progress¶
 The progress of the share creation.
- project_id¶
 The ID of the project that owns the resource.
- replication_type¶
 The share replication type. Valid values are none, readable, writable and dr.
- share_group_id¶
 The UUID of the share group that this shares belongs to.
- share_network_id¶
 The share network ID.
- share_protocol¶
 The Shared File Systems protocol. A valid value is NFS, CIFS, GlusterFS, HDFS, CephFS, MAPRFS
- share_server_id¶
 The UUID of the share server.
- share_type¶
 The UUID of the share type. In minor versions, this parameter is a share type name, as a string.
- share_type_name¶
 Name of the share type.
- size¶
 The share size, in GiBs.
- snapshot_id¶
 The UUID of the snapshot that was used to create the share.
- source_share_group_snapshot_member_id¶
 The ID of the group snapshot instance that was used to create this share.
- status¶
 The share status
- task_state¶
 For the share migration, the migration task state.
- user_id¶
 ID of the user that the share was created by.
- display_name¶
 Display name for updating name
- display_description¶
 Display description for updating description
- extend_share(session, new_size, force=False)¶
 Extend the share size.
- Parameters:
 new_size (float) – The new size of the share in GiB.
force (bool) – Whether or not to use force, bypassing the scheduler. Requires admin privileges. Defaults to False.
- Returns:
 The result of the action.
- Return type:
 None
- shrink_share(session, new_size)¶
 Shrink the share size.
- Parameters:
 new_size (float) – The new size of the share in GiB.
- Returns:
 None
- revert_to_snapshot(session, snapshot_id)¶
 Revert the share to the given snapshot.
- Parameters:
 snapshot_id (str) – The id of the snapshot to revert to.
- Returns:
 None
- manage(session, protocol, export_path, service_host, **params)¶
 Manage a share.
- Parameters:
 session – A session object used for sending request.
protocol (str) – The shared file systems protocol of this share.
export_path (str) – The export path formatted according to the protocol.
service_host (str) – The manage-share service host.
params (kwargs) –
Optional parameters to be sent. Available parameters include:
name: The user defined name of the resource.
share_type: The name or ID of the share type to be used to create the resource.
driver_options: A set of one or more key and value pairs, as a dictionary of strings, that describe driver options.
is_public: The level of visibility for the share.
description: The user defiend description of the resource.
share_server_id: The UUID of the share server.
- Returns:
 The share that was managed.
- unmanage(session)¶
 Unmanage a share.
- Parameters:
 session – A session object used for sending request.
- Returns:
 None