Shared File System API¶
The Shared File System Class¶
The high-level interface for accessing the shared file systems service API is
available through the shared_file_system member of a Connection object. The shared_file_system member will only
be added if the service is detected. share is an alias of the
shared_file_system member.
Shared File System Availability Zones¶
Interact with Availability Zones supported by the Shared File Systems service.
- class openstack.shared_file_system.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)
- availability_zones()
Retrieve shared file system availability zones
- Returns:
A generator of availability zone resources
Shared File System Shares¶
Interact with Shares supported by the Shared File Systems service.
- class openstack.shared_file_system.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)
- shares(details=True, **query)
Lists all shares with details
- Parameters:
query –
Optional query parameters to be sent to limit the shares being returned. Available parameters include:
status: Filters by a share status
share_server_id: The UUID of the share server.
metadata: One or more metadata key and value pairs as a url encoded dictionary of strings.
extra_specs: The extra specifications as a set of one or more key-value pairs.
share_type_id: The UUID of a share type to query resources by.
name: The user defined name of the resource to filter resources by.
snapshot_id: The UUID of the share’s base snapshot to filter the request based on.
host: The host name of the resource to query with.
share_network_id: The UUID of the share network to filter resources by.
project_id: The ID of the project that owns the resource.
is_public: A boolean query parameter that, when set to true, allows retrieving public resources that belong to all projects.
share_group_id: The UUID of a share group to filter resource.
export_location_id: The export location UUID that can be used to filter shares or share instances.
export_location_path: The export location path that can be used to filter shares or share instances.
name~: The name pattern that can be used to filter shares, share snapshots, share networks or share groups.
description~: The description pattern that can be used to filter shares, share snapshots, share networks or share groups.
with_count: Whether to show count in API response or not, default is False.
limit: The maximum number of shares to return.
offset: The offset to define start point of share or share group listing.
sort_key: The key to sort a list of shares.
sort_dir: The direction to sort a list of shares. A valid value is asc, or desc.
- Returns:
Details of shares resources
- find_share(name_or_id, ignore_missing=True, **query)
Find a single share
- Parameters:
name_or_id – The name or ID of a share.
ignore_missing – When set to
FalseNotFoundExceptionwill be raised when the resource does not exist. When set toTrue, None will be returned when attempting to find a nonexistent resource.query – Any additional parameters to be passed into underlying methods. such as query filters.
- Returns:
One
Shareor None
- get_share(share)
Lists details of a single share
- Parameters:
share – The value can be the ID of a share or a
Shareinstance.- Returns:
Details of the identified share
- delete_share(share, ignore_missing=True)
Deletes a single share
- Parameters:
share – The value can be either the ID of a share or a
Shareinstance.ignore_missing – When set to
FalseNotFoundExceptionwill be raised when the share does not exist. When set toTrue, no exception will be set when attempting to delete a nonexistent share.
- Returns:
None
- update_share(share, **attrs)
Updates details of a single share.
- Parameters:
share – The ID of the share to update
attrs – The attributes to update on the share
- Returns:
The updated share
- create_share(**attrs)
Creates a share from attributes
- Parameters:
attrs – Attributes which will be used to create a
Shares, comprised of the properties on the Shares class. ‘size’ and ‘share’ are required to create a share.- Returns:
Details of the new share
- revert_share_to_snapshot(share, snapshot)
- Reverts a share to the specified snapshot, which must be
the most recent one known to manila.
- Parameters:
share – The ID of the share to revert
snapshot – The ID of the snapshot to revert to
- Returns:
Result of the
revert
- manage_share(protocol, export_path, service_host, **params)
Manage a share.
- Parameters:
protocol – The shared file systems protocol of this share.
export_path – The export path formatted according to the protocol.
service_host – The manage-share service host.
params –
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_share(share)
Unmanage the share with the given share ID.
- Parameters:
share – The ID of the share to unmanage.
- Returns:
None
- resize_share(share, new_size, no_shrink=False, no_extend=False, force=False)
Resizes a share, extending/shrinking the share as needed.
- Parameters:
share – The ID of the share to resize
new_size – The new size of the share in GiBs. If new_size is the same as the current size, then nothing is done.
no_shrink – If set to True, the given share is not shrunk, even if shrinking the share is required to get the share to the given size. This could be useful for extending shares to a minimum size, while not shrinking shares to the given size. This defaults to False.
no_extend – If set to True, the given share is not extended, even if extending the share is required to get the share to the given size. This could be useful for shrinking shares to a maximum size, while not extending smaller shares to that maximum size. This defaults to False.
force – Whether or not force should be used, in the case where the share should be extended.
- Returns:
None
Shared File System Storage Pools¶
Interact with the storage pool statistics exposed by the Shared File Systems Service.
- class openstack.shared_file_system.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)
- storage_pools(details=True, **query)
Lists all back-end storage pools with details
- Parameters:
query –
Optional query parameters to be sent to limit the storage pools being returned. Available parameters include:
pool_name: The pool name for the back end.
host_name: The host name for the back end.
backend_name: The name of the back end.
capabilities: The capabilities for the storage back end.
share_type: The share type name or UUID.
- Returns:
A generator of manila storage pool resources
Shared File System User Messages¶
View and manipulate asynchronous user messages emitted by the Shared File Systems service.
- class openstack.shared_file_system.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)
- user_messages(**query)
List shared file system user messages
- Parameters:
query –
Optional query parameters to be sent to limit the messages being returned. Available parameters include:
action_id: The ID of the action during which the message was created.
detail_id: The ID of the message detail.
limit: The maximum number of shares to return.
message_level: The message level.
offset: The offset to define start point of share or share group listing.
sort_key: The key to sort a list of messages.
sort_dir: The direction to sort a list of shares.
project_id: The ID of the project for which the message was created.
request_id: The ID of the request during which the message was created.
resource_id: The UUID of the resource for which the message was created.
resource_type: The type of the resource for which the message was created.
- Returns:
A generator of user message resources
- get_user_message(message)
List details of a single user message
- Parameters:
message – The value can be the ID of a user message or a
UserMessageinstance.- Returns:
Details of the identified user message
- delete_user_message(message, ignore_missing=True)
Deletes a single user message
- Parameters:
message – The value can be either the ID of a user message or a
UserMessageinstance.ignore_missing – When set to
FalseNotFoundExceptionwill be raised when the user message does not exist. When set toTrue, no exception will be set when attempting to delete a nonexistent user message.
- Returns:
The deleted user message.
Shared File System Limits¶
Get absolute limits of resources supported by the Shared File Systems service.
- class openstack.shared_file_system.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)
- limits(**query)
Lists all share limits.
- Parameters:
query – Optional query parameters to be sent to limit the share limits being returned.
- Returns:
A generator of manila share limits resources
Shared File System Snapshots¶
Interact with Share Snapshots supported by the Shared File Systems service.
- class openstack.shared_file_system.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)
- share_snapshots(details=True, **query)
Lists all share snapshots with details.
- Parameters:
query –
Optional query parameters to be sent to limit the snapshots being returned. Available parameters include:
project_id: The ID of the user or service making the API request.
- Returns:
A generator of manila share snapshot resources
- get_share_snapshot(snapshot)
Lists details of a single share snapshot
- Parameters:
snapshot – The value can be the ID of a share snapshot or a
ShareSnapshotinstance.- Returns:
Details of the identified share snapshot
- create_share_snapshot(**attrs)
Creates a share snapshot from attributes
- Returns:
Details of the new share snapshot
- update_share_snapshot(snapshot, **attrs)
Updates details of a single share.
- Parameters:
snapshot – The ID of the snapshot to update
attrs – The attributes to update on the snapshot
- Returns:
the updated share snapshot
- delete_share_snapshot(snapshot, ignore_missing=True)
Deletes a single share snapshot
- Parameters:
snapshot – The value can be either the ID of a share snapshot or a
ShareSnapshotinstance.ignore_missing – When set to
FalseNotFoundExceptionwill be raised when the share snapshot does not exist. When set toTrue, no exception will be set when attempting to delete a nonexistent share snapshot.
- Returns:
None
Shared File System Share Snapshot Instances¶
Interact with Share Snapshot Instances supported by the Shared File Systems service.
- class openstack.shared_file_system.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)
- share_snapshot_instances(details=True, **query)
Lists all share snapshot instances with details.
- Parameters:
details – Whether to fetch detailed resource descriptions. Defaults to True.
query –
Optional query parameters to be sent to limit the share snapshot instance being returned. Available parameters include:
- snapshot_id: The UUID of the share’s base snapshot to filter
the request based on.
- project_id: The project ID of the user or service making the
request.
- Returns:
A generator of share snapshot instance resources
- get_share_snapshot_instance(share_snapshot_instance)
Lists details of a single share snapshot instance
- Parameters:
share_snapshot_instance – The value can be the ID of a share snapshot instance or a
ShareSnapshotInstanceinstance.- Returns:
Details of the identified snapshot instance
Shared File System Share Networks¶
Create and manipulate Share Networks with the Shared File Systems service.
- class openstack.shared_file_system.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)
- share_networks(details=True, **query)
Lists all share networks with details.
- Parameters:
query –
Optional query parameters to be sent to limit the resources being returned. Available parameters include:
name~: The user defined name of the resource to filter resources by.
project_id: The ID of the user or service making the request.
description~: The description pattern that can be used to filter shares, share snapshots, share networks or share groups.
all_projects: (Admin only). Defines whether to list the requested resources for all projects.
- Returns:
Details of shares networks
- get_share_network(share_network)
Lists details of a single share network
- Parameters:
share_network – The value can be the ID of a share network or a
ShareNetworkinstance.- Returns:
Details of the identified share network
- delete_share_network(share_network, ignore_missing=True)
Deletes a single share network
- Parameters:
share_network – The value can be either the ID of a share network or a
ShareNetworkinstance.ignore_missing – When set to
FalseNotFoundExceptionwill be raised when the share network does not exist. When set toTrue, no exception will be set when attempting to delete a nonexistent share network.
- Returns:
None
- update_share_network(share_network, **attrs)
Updates details of a single share network.
- Parameters:
share_network – The ID of the share network to update
attrs – The attributes to update on the share network
- Returns:
the updated share network
- create_share_network(**attrs)
Creates a share network from attributes
- Returns:
Details of the new share network
- Parameters:
attrs – Attributes which will be used to create a
ShareNetwork,comprised of the properties on the ShareNetwork class.
Shared File System Share Instances¶
Administrators can list, show information for, explicitly set the state of, and force-delete share instances within the Shared File Systems Service.
- class openstack.shared_file_system.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)
- share_instances(**query)
Lists all share instances.
- Parameters:
query –
Optional query parameters to be sent to limit the share instances being returned. Available parameters include:
export_location_id: The export location UUID that can be used to filter share instances.
export_location_path: The export location path that can be used to filter share instances.
- Returns:
Details of share instances resources
- get_share_instance(share_instance)
Shows details for a single share instance
- Parameters:
share_instance – The value can be the UUID of a share instance or a
ShareInstanceinstance.- Returns:
Details of the identified share instance
- reset_share_instance_status(share_instance, status)
Explicitly updates the state of a share instance.
- Parameters:
share_instance – The UUID of the share instance to reset.
status – The share or share instance status to be set.
- Returns:
None
- delete_share_instance(share_instance, ignore_missing=True)
Force-deletes a share instance
- Parameters:
share_instance – The value can be either the ID of a share instance or a
ShareInstanceinstance.ignore_missing – When set to
FalseNotFoundExceptionwill be raised when the share instance does not exist. When set toTrue, no exception will be set when attempting to delete a nonexistent share instance.
- Returns:
None
Shared File System Share Network Subnets¶
Create and manipulate Share Network Subnets with the Shared File Systems service.
- class openstack.shared_file_system.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)
- share_network_subnets(share_network)
Lists all share network subnets with details.
- Parameters:
share_network – The id of the share network for which Share Network Subnets should be listed.
- Returns:
A generator of manila share network subnets
- get_share_network_subnet(share_network, share_network_subnet)
Lists details of a single share network subnet.
- Parameters:
share_network – The value can be the ID of a share network or a
ShareNetworkinstance.share_network_subnet – The value can be the ID of a share network subnet or a
ShareNetworkSubnetinstance.
- Returns:
Details of the identified share network subnet
- create_share_network_subnet(share_network, **attrs)
Creates a share network subnet from attributes
- Parameters:
share_network – The id of the share network wthin which the the Share Network Subnet should be created.
attrs – Attributes which will be used to create a share network subnet.
- Returns:
Details of the new share network subnet.
- delete_share_network_subnet(share_network, share_network_subnet, ignore_missing=True)
Deletes a share network subnet.
- Parameters:
share_network – The value can be either the ID of a share network or a
ShareNetworkinstance.share_network_subnet – The value can be either the ID of a share network subnet or a
ShareNetworkSubnetinstance.ignore_missing – When set to
FalseNotFoundExceptionwill be raised when the share network subnet does not exist. When set toTrue, no exception will be set when attempting to delete a nonexistent share network subnet.
- Returns:
None
Shared File System Share Access Rules¶
Create, View, and Delete access rules for shares from the Shared File Systems service. Access rules can also have their deletion and visibility restricted during creation. A lock reason can also be specified. The deletion restriction can be removed during the access removal.
- class openstack.shared_file_system.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)
- access_rules(share, **query)
Lists the access rules on a share.
- Returns:
A generator of the share access rules.
- get_access_rule(access_rule)
List details of an access rule.
- Parameters:
access_rule – The value can be the ID of an access rule or a
ShareAccessRuleinstance.- Returns:
Details of the identified access rule.
- create_access_rule(share, **attrs)
Creates an access rule from attributes
- Parameters:
share – The ID of the share
attrs – Attributes which will be used to create a
ShareAccessRules, comprised of the properties on the ShareAccessRules class.
- Returns:
Details of the new access rule
- delete_access_rule(access_rule, share, ignore_missing=True, *, unrestrict=False)
Deletes an access rule
- Parameters:
access_rule – The value can be either the ID of an access rule or a
ShareAccessRuleinstance.share – The ID of the share.
ignore_missing – When set to
FalseNotFoundExceptionwill be raised when the access rule does not exist. When set toTrue, no exception will be set when attempting to delete a nonexistent access rule.unrestrict – If Manila must attempt removing locks while deleting.
- Returns:
requests.models.ResponseHTTP response from internal requests client
Shared File System Share Groups¶
Interact with Share groups supported by the Shared File Systems service.
- class openstack.shared_file_system.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)
- share_groups(**query)
Lists all share groups.
- Parameters:
query –
Optional query parameters to be sent to limit the share groups being returned. Available parameters include:
status: Filters by a share group status.
name: The user defined name of the resource to filter resources by.
description: The user defined description text that can be used to filter resources.
project_id: The project ID of the user or service.
share_server_id: The UUID of the share server.
snapshot_id: The UUID of the share’s base snapshot to filter the request based on.
host: The host name for the back end.
share_network_id: The UUID of the share network to filter resources by.
share_group_type_id: The share group type ID to filter share groups.
share_group_snapshot_id: The source share group snapshot ID to list the share group.
share_types: A list of one or more share type IDs. Allows filtering share groups.
limit: The maximum number of share groups members to return.
offset: The offset to define start point of share or share group listing.
sort_key: The key to sort a list of shares.
sort_dir: The direction to sort a list of shares
name~: The name pattern that can be used to filter shares, share snapshots, share networks or share groups.
description~: The description pattern that can be used to filter shares, share snapshots, share networks or share groups.
- Returns:
A generator of manila share group resources
- get_share_group(share_group)
Lists details for a share group.
- Parameters:
share_group – The value can be the ID of a share group or a
ShareGroupinstance.- Returns:
Details of the identified share group
- find_share_group(name_or_id, ignore_missing=True)
Finds a single share group
- Parameters:
name_or_id – The name or ID of a share group.
ignore_missing – When set to
FalseNotFoundExceptionwill be raised when the resource does not exist. When set toTrue, None will be returned when attempting to find a nonexistent resource.
- Returns:
One
ShareGroupor None
- create_share_group(**attrs)
Creates a share group from attributes
- Returns:
Details of the new share group
- update_share_group(share_group, **attrs)
Updates details of a single share group
- Parameters:
share_group – The ID of the share group
- Returns:
Updated details of the identified share group
- delete_share_group(share_group, ignore_missing=True)
Deletes a single share group
- Parameters:
share_group – The value can be either the ID of a share group or a
ShareGroupinstance.ignore_missing – When set to
FalseNotFoundExceptionwill be raised when the share group does not exist. When set toTrue, no exception will be set when attempting to delete a nonexistent share group.
- Returns:
The deleted share group.
Shared File System Share Group Snapshots¶
Interact with Share Group Snapshots by the Shared File Systems service.
- class openstack.shared_file_system.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)
- share_group_snapshots(details=True, **query)
Lists all share group snapshots.
- Parameters:
query –
Optional query parameters to be sent to limit the share group snapshots being returned. Available parameters include:
project_id: The ID of the project that owns the resource.
name: The user defined name of the resource to filter resources.
description: The user defined description text that can be used to filter resources.
status: Filters by a share status
share_group_id: The UUID of a share group to filter resource.
limit: The maximum number of share group snapshot members to return.
offset: The offset to define start point of share or share group listing.
sort_key: The key to sort a list of shares.
sort_dir: The direction to sort a list of shares. A valid value is asc, or desc.
- Returns:
Details of share group snapshots resources
- get_share_group_snapshot(group_snapshot)
Show share group snapshot details
- Parameters:
group_snapshot – The value can be the ID of a share group snapshot or a
ShareGroupSnapshotinstance.- Returns:
Details of the group snapshot
- create_share_group_snapshot(share_group, **attrs)
Creates a point-in-time snapshot copy of a share group.
- Parameters:
share_group – ID of the share group to have the snapshot taken.
attrs – Attributes which will be used to create a
ShareGroupSnapshots,
- Returns:
Details of the new snapshot
- reset_share_group_snapshot_status(group_snapshot, status)
Reset share group snapshot state.
- Parameters:
group_snapshot – The ID of the share group snapshot to reset
status – The state of the share group snapshot to be set, A valid value is “creating”, “error”, “available”, “deleting”, “error_deleting”.
- update_share_group_snapshot(group_snapshot, **attrs)
Updates a share group snapshot.
- Parameters:
group_snapshot – The ID of the share group snapshot to update
attrs – The attributes to update on the share group snapshot
- Returns:
the updated share group snapshot
- delete_share_group_snapshot(group_snapshot, ignore_missing=True)
Deletes a share group snapshot.
- Parameters:
group_snapshot – The value can be either the ID of a share group snapshot or a
ShareGroupSnapshotinstance.ignore_missing – When set to
FalseNotFoundExceptionwill be raised when the share group snapshot does not exist. When set toTrue, no exception will be set when attempting to delete a nonexistent share group snapshot.
- Returns:
None
Shared File System Share Metadata¶
List, Get, Create, Update, and Delete metadata for shares from the Shared File Systems service.
- class openstack.shared_file_system.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)
- get_share_metadata(share)
Lists all metadata for a share.
Deprecated since version 4.14.0: Use
fetch_share_metadata()instead.
- get_share_metadata_item(share, key)
Retrieves a specific metadata item from a share by its key.
Deprecated since version 4.14.0: Use
fetch_share_metadata_item()instead.
- create_share_metadata(share, **metadata)
Creates share metadata as key-value pairs.
Deprecated since version 4.14.0: Use
set_share_metadata()instead.
- update_share_metadata(share, metadata, replace=False)
Updates metadata of given share.
Deprecated since version 4.14.0: Use
set_share_metadata()instead.
- delete_share_metadata(share, keys, ignore_missing=True)
Deletes metadata for a share.
- Parameters:
share – The value can be either the ID of a share or a
Shareinstance.keys – The list of share metadata keys to be deleted.
ignore_missing – When set to
True, missing keys will be logged but not cause a failure. When set toFalse, missing keys will be included in the failure list.
- Returns:
None
Shared File System Resource Locks¶
Create, list, update and delete locks for resources. When a resource is locked, it means that it can be deleted only by services, admins or the user that created the lock.
- class openstack.shared_file_system.v2._proxy.Proxy(session, *, service_type=None, service_name=None, interface=None, region_name=None, endpoint_override=None, version=None, auth=None, user_agent=None, connect_retries=None, logger=None, allow=None, additional_headers=None, client_name=None, client_version=None, allow_version_hack=None, global_request_id=None, min_version=None, max_version=None, default_microversion=None, status_code_retries=None, retriable_status_codes=None, raise_exc=None, rate_limit=None, concurrency=None, connect_retry_delay=None, status_code_retry_delay=None, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None)
- resource_locks(**query)
Lists all resource locks.
- Parameters:
query –
Optional query parameters to be sent to limit the resource locks being returned. Available parameters include:
- project_id: The project ID of the user that the lock is
created for.
user_id: The ID of a user to filter resource locks by.
all_projects: list locks from all projects (Admin Only)
- resource_id: The ID of the resource that the locks pertain to
filter resource locks by.
- resource_action: The action prevented by the filtered resource
locks.
- resource_type: The type of the resource that the locks pertain
to filter resource locks by.
lock_context: The lock creator’s context to filter locks by.
- lock_reason: The lock reason that can be used to filter resource
locks. (Inexact search is also available with lock_reason~)
- created_since: Search for the list of resources that were created
after the specified date. The date is in ‘yyyy-mm-dd’ format.
- created_before: Search for the list of resources that were
created prior to the specified date. The date is in ‘yyyy-mm-dd’ format.
limit: The maximum number of resource locks to return.
- offset: The offset to define start point of resource lock
listing.
sort_key: The key to sort a list of shares.
sort_dir: The direction to sort a list of shares
- with_count: Whether to show count in API response or not,
default is False. This query parameter is useful with pagination.
- Returns:
A generator of manila resource locks
- get_resource_lock(resource_lock)
Show details of a resource lock.
- Parameters:
resource_lock – The ID of a resource lock or a
ResourceLockinstance.- Returns:
Details of the identified resource lock.
- update_resource_lock(resource_lock, **attrs)
Updates details of a single resource lock.
- Parameters:
resource_lock – The ID of a resource lock or a
ResourceLockinstance.attrs – The attributes to update on the resource lock
- Returns:
the updated resource lock
- delete_resource_lock(resource_lock, ignore_missing=True)
Deletes a single resource lock
- Parameters:
resource_lock – The ID of a resource lock or a
ResourceLockinstance.ignore_missing – When set to
FalseNotFoundExceptionwill be raised when the resource lock does not exist. When set toTrue, no exception will be set when attempting to delete a nonexistent resource lock.
- Returns:
The deleted resource lock.
- create_resource_lock(**attrs)
Locks a resource.
- Parameters:
attrs –
Attributes which will be used to create a
ResourceLock, comprised of the properties on the ResourceLock class. Available parameters include:resource_id: ID of the resource to be locked.resource_type: type of the resource (share, access_rule).resource_action: action to be locked (delete, show).lock_reason: reason why you’re locking the resource(Optional).
- Returns:
Details of the lock