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, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None, *args, **kwargs)
availability_zones()

Retrieve shared file system availability zones

Returns:

A generator of availability zone resources

Return type:

AvailabilityZone

Shared File System Shares

Interact with Shares supported by the Shared File Systems service.

class openstack.shared_file_system.v2._proxy.Proxy(session, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None, *args, **kwargs)
shares(details=True, **query)

Lists all shares with details

Parameters:

query (kwargs) –

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

Return type:

Share

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 (bool) – When set to False NotFoundException will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource.

  • query (dict) – Any additional parameters to be passed into underlying methods. such as query filters.

Returns:

One Share or None

get_share(share_id)

Lists details of a single share

Parameters:

share – The ID of the share to get

Returns:

Details of the identified share

Return type:

Share

delete_share(share, ignore_missing=True)

Deletes a single share

Parameters:

share – The ID of the share to delete

Returns:

Result of the delete

Return type:

None

update_share(share_id, **attrs)

Updates details of a single share.

Parameters:
  • share – The ID of the share to update

  • attrs (dict) – The attributes to update on the share

Returns:

the updated share

Return type:

Share

create_share(**attrs)

Creates a share from attributes

Returns:

Details of the new share

Parameters:

attrs (dict) – 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.

Return type:

Share

revert_share_to_snapshot(share_id, snapshot_id)
Reverts a share to the specified snapshot, which must be

the most recent one known to manila.

Parameters:
  • share_id – The ID of the share to revert

  • snapshot_id – The ID of the snapshot to revert to

Returns:

Result of the revert

Return type:

None

manage_share(protocol, export_path, service_host, **params)

Manage a share.

Parameters:
  • 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_share(share_id)

Unmanage the share with the given share ID.

Parameters:

share_id – The ID of the share to unmanage.

Returns:

None

resize_share(share_id, new_size, no_shrink=False, no_extend=False, force=False)

Resizes a share, extending/shrinking the share as needed.

Parameters:
  • share_id – 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 (bool) – 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 (bool) – 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 (bool) – 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, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None, *args, **kwargs)
storage_pools(details=True, **query)

Lists all back-end storage pools with details

Parameters:

query (kwargs) –

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

Return type:

StoragePool

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, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None, *args, **kwargs)
user_messages(**query)

List shared file system user messages

Parameters:

query (kwargs) –

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

Return type:

UserMessage

get_user_message(message_id)

List details of a single user message

Parameters:

message_id – The ID of the user message

Returns:

Details of the identified user message

Return type:

UserMessage

delete_user_message(message_id, ignore_missing=True)

Deletes a single user message

Parameters:

message_id – The ID of the user message

Returns:

Result of the “delete” on the user message

Return type:

UserMessage

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, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None, *args, **kwargs)
limits(**query)

Lists all share limits.

Parameters:

query (kwargs) – Optional query parameters to be sent to limit the share limits being returned.

Returns:

A generator of manila share limits resources

Return type:

Limit

Shared File System Snapshots

Interact with Share Snapshots supported by the Shared File Systems service.

class openstack.shared_file_system.v2._proxy.Proxy(session, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None, *args, **kwargs)
share_snapshots(details=True, **query)

Lists all share snapshots with details.

Parameters:

query (kwargs) –

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

Return type:

ShareSnapshot

get_share_snapshot(snapshot_id)

Lists details of a single share snapshot

Parameters:

snapshot_id – The ID of the snapshot to get

Returns:

Details of the identified share snapshot

Return type:

ShareSnapshot

create_share_snapshot(**attrs)

Creates a share snapshot from attributes

Returns:

Details of the new share snapshot

Return type:

ShareSnapshot

update_share_snapshot(snapshot_id, **attrs)

Updates details of a single share.

Parameters:

snapshot_id – The ID of the snapshot to update

Pram dict attrs:

The attributes to update on the snapshot

Returns:

the updated share snapshot

Return type:

ShareSnapshot

delete_share_snapshot(snapshot_id, ignore_missing=True)

Deletes a single share snapshot

Parameters:

snapshot_id – The ID of the snapshot to delete

Returns:

Result of the delete

Return type:

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, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None, *args, **kwargs)
share_snapshot_instances(details=True, **query)

Lists all share snapshot instances with details.

Parameters:
  • details (bool) – Whether to fetch detailed resource descriptions. Defaults to True.

  • query (kwargs) –

    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

Return type:

ShareSnapshotInstance

get_share_snapshot_instance(snapshot_instance_id)

Lists details of a single share snapshot instance

Parameters:

snapshot_instance_id – The ID of the snapshot instance to get

Returns:

Details of the identified snapshot instance

Return type:

ShareSnapshotInstance

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, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None, *args, **kwargs)
share_networks(details=True, **query)

Lists all share networks with details.

Parameters:

query (dict) –

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

Return type:

ShareNetwork

get_share_network(share_network_id)

Lists details of a single share network

Parameters:

share_network – The ID of the share network to get

Returns:

Details of the identified share network

Return type:

ShareNetwork

delete_share_network(share_network_id, ignore_missing=True)

Deletes a single share network

Parameters:

share_network_id – The ID of the share network to delete

Return type:

None

update_share_network(share_network_id, **attrs)

Updates details of a single share network.

Parameters:

share_network_id – The ID of the share network to update

Pram dict attrs:

The attributes to update on the share network

Returns:

the updated share network

Return type:

ShareNetwork

create_share_network(**attrs)

Creates a share network from attributes

Returns:

Details of the new share network

Parameters:

attrs (dict) – Attributes which will be used to create a ShareNetwork,comprised of the properties on the ShareNetwork class.

Return type:

ShareNetwork

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, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None, *args, **kwargs)
share_instances(**query)

Lists all share instances.

Parameters:

query (kwargs) – 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

Return type:

ShareInstance

get_share_instance(share_instance_id)

Shows details for a single share instance

Parameters:

share_instance_id – The UUID of the share instance to get

Returns:

Details of the identified share instance

Return type:

ShareInstance

reset_share_instance_status(share_instance_id, status)

Explicitly updates the state of a share instance.

Parameters:
  • share_instance_id – 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_id)

Force-deletes a share instance

Parameters:

share_instance – The ID of the share instance to delete

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, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None, *args, **kwargs)
share_network_subnets(share_network_id)

Lists all share network subnets with details.

Parameters:

share_network_id – The id of the share network for which Share Network Subnets should be listed.

Returns:

A generator of manila share network subnets

Return type:

ShareNetworkSubnet

get_share_network_subnet(share_network_id, share_network_subnet_id)

Lists details of a single share network subnet.

Parameters:
  • share_network_id – The id of the share network associated with the Share Network Subnet.

  • share_network_subnet_id – The id of the Share Network Subnet to retrieve.

Returns:

Details of the identified share network subnet

Return type:

ShareNetworkSubnet

create_share_network_subnet(share_network_id, **attrs)

Creates a share network subnet from attributes

Parameters:
  • share_network_id – The id of the share network wthin which the the Share Network Subnet should be created.

  • attrs (dict) – Attributes which will be used to create a share network subnet.

Returns:

Details of the new share network subnet.

Return type:

ShareNetworkSubnet

delete_share_network_subnet(share_network_id, share_network_subnet, ignore_missing=True)

Deletes a share network subnet.

Parameters:
  • share_network_id – The id of the Share Network associated with the Share Network Subnet.

  • share_network_subnet – The id of the Share Network Subnet which should be deleted.

Returns:

Result of the delete

Return type:

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, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None, *args, **kwargs)
access_rules(share, **query)

Lists the access rules on a share.

Returns:

A generator of the share access rules.

Return type:

ShareAccessRules

get_access_rule(access_id)

List details of an access rule.

Parameters:

access_id – The id of the access rule to get

Returns:

Details of the identified access rule.

Return type:

ShareAccessRules

create_access_rule(share_id, **attrs)

Creates an access rule from attributes

Returns:

Details of the new access rule

Parameters:
  • share_id – The ID of the share

  • attrs (dict) – Attributes which will be used to create a ShareAccessRules, comprised of the properties on the ShareAccessRules class.

Return type:

ShareAccessRules

delete_access_rule(access_id, share_id, ignore_missing=True, *, unrestrict=False)

Deletes an access rule

Parameters:
  • access_id – The id of the access rule to get

  • share_id – The ID of the share

  • unrestrict – If Manila must attempt removing locks while deleting

Return type:

requests.models.Response HTTP 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, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None, *args, **kwargs)
share_groups(**query)

Lists all share groups.

Parameters:

query (kwargs) –

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

Return type:

ShareGroup

get_share_group(share_group_id)

Lists details for a share group.

Parameters:

share – The ID of the share group to get

Returns:

Details of the identified share group

Return type:

ShareGroup

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 (bool) – When set to False NotFoundException will be raised when the resource does not exist. When set to True, None will be returned when attempting to find a nonexistent resource.

Returns:

One ShareGroup or None

create_share_group(**attrs)

Creates a share group from attributes

Returns:

Details of the new share group

Return type:

ShareGroup

update_share_group(share_group_id, **kwargs)

Updates details of a single share group

Parameters:

share – The ID of the share group

Returns:

Updated details of the identified share group

Return type:

ShareGroup

delete_share_group(share_group_id, ignore_missing=True)

Deletes a single share group

Parameters:

share – The ID of the share group

Returns:

Result of the “delete” on share group

Return type:

ShareGroup

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, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None, *args, **kwargs)
share_group_snapshots(details=True, **query)

Lists all share group snapshots.

Parameters:

query (kwargs) –

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

Return type:

ShareGroupSnapshot

get_share_group_snapshot(group_snapshot_id)

Show share group snapshot details

Parameters:

group_snapshot_id – The ID of the group snapshot to get

Returns:

Details of the group snapshot

Return type:

ShareGroupSnapshot

create_share_group_snapshot(share_group_id, **attrs)

Creates a point-in-time snapshot copy of a share group.

Returns:

Details of the new snapshot

Parameters:
  • attrs (dict) – Attributes which will be used to create a ShareGroupSnapshots,

  • 'share_group_id' – ID of the share group to have the snapshot taken.

Return type:

ShareGroupSnapshot

reset_share_group_snapshot_status(group_snapshot_id, status)

Reset share group snapshot state.

Parameters:
  • group_snapshot_id – 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”.

Return type:

None

update_share_group_snapshot(group_snapshot_id, **attrs)

Updates a share group snapshot.

Parameters:
  • group_snapshot_id – The ID of the share group snapshot to update

  • attrs (dict) – The attributes to update on the share group snapshot

Returns:

the updated share group snapshot

Return type:

ShareGroupSnapshot

delete_share_group_snapshot(group_snapshot_id, ignore_missing=True)

Deletes a share group snapshot.

Parameters:

group_snapshot_id – The ID of the share group snapshot to delete

Return type:

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, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None, *args, **kwargs)
get_share_metadata(share_id)

Lists all metadata for a share.

Parameters:

share_id – The ID of the share

Returns:

A Share with the share’s metadata.

Return type:

Share

get_share_metadata_item(share_id, key)

Retrieves a specific metadata item from a share by its key.

Parameters:
  • share_id – The ID of the share

  • key – The key of the share metadata

Returns:

A Share with the share’s metadata.

Return type:

Share

create_share_metadata(share_id, **metadata)

Creates share metadata as key-value pairs.

Parameters:
  • share_id – The ID of the share

  • metadata – The metadata to be created

Returns:

A Share with the share’s metadata.

Return type:

Share

update_share_metadata(share_id, metadata, replace=False)

Updates metadata of given share.

Parameters:
  • share_id – The ID of the share

  • metadata – The metadata to be created

  • replace – Boolean for whether the preexisting metadata should be replaced

Returns:

A Share with the share’s updated metadata.

Return type:

Share

delete_share_metadata(share_id, keys, ignore_missing=True)

Deletes a single metadata item on a share, idetified by its key.

Parameters:
  • share_id – The ID of the share

  • keys – The list of share metadata keys to be deleted

  • ignore_missing – Boolean indicating if missing keys should be ignored.

Returns:

None

Return type:

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, statsd_client=None, statsd_prefix=None, prometheus_counter=None, prometheus_histogram=None, influxdb_config=None, influxdb_client=None, *args, **kwargs)
resource_locks(**query)

Lists all resource locks.

Parameters:

query (kwargs) –

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

Return type:

ResourceLock

get_resource_lock(resource_lock)

Show details of a resource lock.

Parameters:

resource_lock – The ID of a resource lock or a ResourceLock instance.

Returns:

Details of the identified resource lock.

Return type:

ResourceLock

update_resource_lock(resource_lock, **attrs)

Updates details of a single resource lock.

Parameters:
  • resource_lock – The ID of a resource lock or a ResourceLock instance.

  • attrs (dict) – The attributes to update on the resource lock

Returns:

the updated resource lock

Return type:

ResourceLock

delete_resource_lock(resource_lock, ignore_missing=True)

Deletes a single resource lock

Parameters:

resource_lock – The ID of a resource lock or a ResourceLock instance.

Returns:

Result of the delete

Return type:

None

create_resource_lock(**attrs)

Locks a resource.

Parameters:

attrs (dict) –

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

Return type:

ResourceLock