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.
Availability Zone Operation¶
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
Limit Operations¶
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
Quota Class Set Operations¶
- 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_quota_class_set(quota_class_set)
Get quota class set.
- Parameters:
quota_class_set – The name of the quota class or a
QuotaClassSetinstance.- Returns:
A
QuotaClassSet
- update_quota_class_set(quota_class_set, **attrs)
Update quota class set.
- Parameters:
quota_class_set – The name of the quota class
attrs – The attributes to update on the quota class set
- Returns:
the updated quota class set
Quota Set Operations¶
- 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_quota_set(project, **query)
Retrieves a specific metadata item for the Quota Set.
- Returns:
A
QuotaSets
- update_quota_set(project, **attrs)
Updates details of a quota set.
- Parameters:
project – ID or instance of
Projectof the project for which the quota should be updated.attrs – The attributes to update on the quota set.
- Returns:
The updated quota set
- revert_quota_set(project)
Reset quota set for a project
- Parameters:
project – ID or instance of
Projectof the project for which the quota should be reset.- Returns:
None
Service Operations¶
Interact with services 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)
- services(**query)
Lists all services
- Parameters:
query –
Optional query parameters to be sent to limit the services being returned. Available parameters include:
host: The service host name.
binary: The service binary name.
zone: The availability zone.
- state: The current state of the service.A valid value is
up or down.
status: The service status, which is enabled or disabled.
- Returns:
A generator of manila service resources.
- disable_service(service, host, binary)
Disable a service
- Parameters:
service – Either the ID of a service or a
Serviceinstance.host – The host where service runs.
binary – The name of service.
- Returns:
Updated service instance
- enable_service(service, host, binary)
Enable a service
- Parameters:
service – Either the ID of a service or a
Serviceinstance.host – The host where service runs.
binary – The name of service.
- Returns:
Updated service instance
Share Operations¶
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, *, force=False)
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.force – When set to
True, the share deletion will be forced immediately.
- 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
- soft_delete_share(share)
Soft delete a share.
- Parameters:
share – The value can be either the ID of a share or a
Shareinstance.- Returns:
None
- restore_share(share)
Restore the share with the given share ID.
- Parameters:
share – The value can be either the ID of a share or a
Shareinstance.- Returns:
None
- reset_share_status(share, status)
Resets a share to the specified status
- Parameters:
share – The ID of the share or the share object to reset
status – The status of the share to reset to. Possible values include: available, error, and invalid.
- Returns:
None
Share Access Rule Operations¶
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
Share Group Operations¶
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.
Share Group Snapshot Operations¶
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
Share Instance Operations¶
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
Share Metadata Operations¶
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
Share Network Operations¶
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.
Share Network Subnet Operations¶
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
- fetch_share_network_subnet_metadata(share_network, share_network_subnet)
Lists all metadata of a given 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, including its metadata.
- fetch_share_network_subnet_metadata_item(share_network, share_network_subnet, key)
Retrieve specific subnet metadata item by key.
- 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.key – The key of the Share Network Subnet Metadata.
- Returns:
A single metadata key and value pair.
- set_share_network_subnet_metadata(share_network, share_network_subnet, *, replace=False, **metadata)
Updates metadata of given 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.metadata – The metadata to be created.
- Returns:
Details of the identified share network subnet.
- delete_share_network_subnet_metadata(share_network, share_network_subnet, keys, ignore_missing=True)
Deletes one or more subnet metadata items identified by their keys.
- 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.keys – The keys of the metadata items to be deleted.
- Returns:
None
Share Replica Operations¶
Interact with share replicas 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)
- create_share_replica(share, **attrs)
Creates a share replica from attributes
- Parameters:
share – Id of the share for which share replica is to be created
attrs –
Optional attributes which will be used to create. Available parameters include:
availability_zone: Availability zone in which replica should be created.
- Returns:
Details of the new share replica
- share_replicas(**attrs)
List all share replicas with all details
- Parameters:
attrs –
Optional parameters to limit the share replicas being returned. Available parameters include:
share_id: id of the share for which share replicas are wanted
columns: list of columns to be displayed in the returned list
- Returns:
A generator of share replicas
- get_share_replica(share_replica)
List details of a single share replica
- Parameters:
share_replica – Id of the share replica
- Returns:
Details of the identified share replica
- delete_share_replica(share_replica, ignore_missing=True, force=False)
Delete a share replica
- Parameters:
share_replica – Id of the share replica
- Returns:
Result of delete on share replica
- reset_share_replica_status(share_replica, status)
Reset status of the share replica
- Parameters:
share_replica – Id of the share replica
status – set the status to the share replica. Possible values include: available, error, creating, deleting, or error_deleting.
- Returns:
None
- reset_share_replica_state(share_replica, replica_state)
Reset replica_state of the share replica
- Parameters:
share_replica – Id of the share replica
replica_state – The replica state of a share replica. Possible values include: active, in_sync, out_of_sync, and error.
- Returns:
None
- promote_share_replica(share_replica)
Promote share replica
- Parameters:
share_replica – Id of the share replica
- Returns:
None
- resync_share_replica(share_replica)
Resync share replica
- Parameters:
share_replica – Id of the share replica
- Returns:
None
Share Snapshot Operations¶
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, *, force=False)
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.force – When set to
True, the share snapshot deletion will be forced immediately.
- Returns:
None
- reset_share_snapshot_status(snapshot, status)
Reset status of share snapshot
- Parameters:
snapshot – The ID of the snapshot or the snapshot object to reset
status – The status of the snapshot to reset to.
- Returns:
None
- manage_share_snapshot(share, provider_location, **params)
Manage a share snapshot.
- Parameters:
share – The ID of the share that has snapshot which should be managed.
provider_location – Provider location of the snapshot on the backend.
params –
Optional parameters to be sent. Available parameters include:
name: The user defined name of the resource.
display_name: The user defined name of the resource. This field sets the name parameter.
description: The user defined description of the resource.
display_description: The user defined description of the resource. This field sets the description parameter.
driver_options: A set of one or more key and value pairs, as a dictionary of strings, that describe driver options.
- Returns:
The share snapshot that was managed.
- unmanage_share_snapshot(snapshot)
Unmanage the share snapshot with the given snapshot ID.
- Parameters:
snapshot – The ID of the share snapshot to unmanage.
- Returns:
None
- fetch_share_snapshot_metadata(snapshot)
Lists all metadata for a given snapshot.
- Parameters:
snapshot – The value can be the ID of a share snapshot or a
ShareSnapshotinstance.- Returns:
One or more metadata key and value pairs as a dictionary of strings.
- fetch_share_snapshot_metadata_item(snapshot, key)
- Retrieves a specific metadata item from a snapshot’s metadata
by its key.
- Parameters:
snapshot – The value can be the ID of a share snapshot or a
ShareSnapshotinstance.key – The key of the snapshot metadata.
- Returns:
A single metadata key and value pair.
- set_share_snapshot_metadata(snapshot, *, replace=False, **metadata)
Updates metadata of given share snapshot.
- Parameters:
snapshot – The value can be the ID of a share snapshot or a
ShareSnapshotinstance.replace – Boolean for whether the preexisting metadata should be replaced
metadata – The metadata to be created.
- Returns:
One or more metadata key and value pairs as a dictionary of strings.
- delete_share_snapshot_metadata(snapshot, keys)
Deletes metadata for a snapshot,
- Parameters:
snapshot – The value can be the ID of a share snapshot or a
ShareSnapshotinstance.keys – The keys of the metadata items to be deleted.
- Returns:
None
Share Snapshot Instance Operations¶
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
Share Type Operations¶
Interact with Share Types 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_types(**query)
List shared file system share types
- Parameters:
query –
Optional query parameters to be sent to limit the share types being returned. Available parameters include:
extra_specs: The extra specifications as a set of one or more key-value pairs.
is_public: A boolean query parameter that, when set to true, allows retrieving public resources that belong to all projects.
- Returns:
A generator of share type resources
- get_share_type(share_type)
List details of a single share type
- Parameters:
share_type – The ID of the share type
- Returns:
Details of identified share type
- create_share_type(name, **attrs)
Creates a share from attributes
- Returns:
Details of the new share type
- Parameters:
name – Name of the new share type
attrs – Attributes which will be used to create a
ShareType, comprised of the properties on the ShareType class. Currently “description” and “extra_specs” are allowed attributes.
- delete_share_type(share_type, ignore_missing=True)
Deletes a single share type
- Parameters:
share_type – The ID of the share type
- Returns:
None
- update_share_type(share_type, **attrs)
Updates details of a single share type
- Parameters:
share_type – The ID of the share type to update.
attrs – The attributes to update on the share type
- Returns:
Updated details of the identified share type
- update_share_type_extra_specs(share_type, **attrs)
Update the extra_specs for a type.
- Parameters:
share_type – The ID of the share type.
extra_specs – The extra specs to update on the share type.
- Returns:
The updated share type.
- delete_share_type_extra_spec_property(share_type, prop, ignore_missing=False)
Delete the extra_specs for a share type
- Parameters:
share_type_id – The ID of the share type.
prop – The extra spec to delete
ignore_missing – When set to
FalseNotFoundExceptionwill be raised when the flavor or extra spec does not exist. When set toTrue, no exception will be set when attempting to delete a nonexistent flavor extra spec.
- Returns:
None
Storage Pool Operations¶
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
Resource Lock Operations¶
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
User Message Operations¶
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.