API Overview

API Overview

This section describes the most commonly used Manila API calls and their corresponding CLI commands. It is not a comprehensive list of all Manila functionality. For additional details, refer to the help text by running openstack help share.

Share API

Table 6.1, “Manila API Overview – Share,” lists the valid operations for Manila shares. Manila shares are identified in CLI commands by either their name or UUID.

Operation

CLI Command

Description

Create

openstack share create

Create a Manila share of specified size. Optional parameters include name, availability zone, share type, share network, and source snapshot. The create_share_from_snapshot_support extra spec must be set to true for the share type to allow a snapshot as the source.

Delete

openstack share delete

Delete an existing Manila share. Use openstack share delete --force if the share is in an error state.

Edit

openstack share set

Set or unset metadata on a Manila share using openstack share set --property and openstack share unset --property.

Extend

openstack share resize

Increase the size of a Manila share.

List

openstack share list

List all Manila shares.

Manage

openstack share adopt

Bring an existing storage object under Manila management as a file share.

Show

openstack share show

Show details about a Manila share.

Shrink

openstack share resize

Decrease the size of a Manila share.

Unmanage

openstack share abandon

Remove a Manila share from management without deleting the underlying storage object.

Table 6.1. Manila API Overview – Share

Share Access API

Table 6.2, “Manila API Overview – Share Access,” lists the valid access operations for Manila shares. Shares are identified by name or UUID.

Warning

For important caveats, see “Share Access Rules”.

Operation

CLI Command

Description

Allow

openstack share access create

Allow access to the specified share for the specified access type and value (IP address, CIDR, or Windows user name).

Deny

openstack share access delete

Deny access to the specified share for the specified access type and value.

List

openstack share access list

List all access rules for Manila shares.

Table 6.2. Manila API Overview – Share Access

Share Export Location API

Table 6.3, “Manila API Overview – Share Export Location,” lists the operations for retrieving export locations of Manila shares. Shares are identified by name or UUID. A share may have multiple export locations; at least one is marked as preferred. Clients should use the preferred path for optimal performance.

Operation

CLI Command

Description

List

openstack share export location list

List export locations for the specified share.

Show

openstack share export location show

Show details for a specific export location.

Table 6.3. Manila API Overview – Share Export Location

Snapshot API

Table 6.4, “Manila API Overview – Snapshot,” lists the valid operations for Manila snapshots. Snapshots are identified by display name or UUID.

Important

In the Mitaka and Newton releases, snapshot support is enabled by default for new share types. Starting with the Ocata release, the snapshot_support extra spec must be set to True to allow snapshots for a share type. If snapshot_support is omitted or set to False, users cannot create snapshots for that share type.

Additional snapshot-related extra specs (Ocata and later):

  • create_share_from_snapshot_support: Allow creation of a new share from a snapshot.

  • revert_to_snapshot_support: Allow a share to be reverted to the most recent snapshot.

If an extra spec is unset, it defaults to False. A newly created share may or may not be placed on a backend with the associated capability. Set the extra spec explicitly to False to ensure shares are created only on backends that do not support the capability. For NetApp-supported extra specs, see Table 6.10, “NetApp supported Extra Specs for use with Manila Share Types”.

Operation

CLI Command

Description

Create

openstack share snapshot create

Create a snapshot of a specific Manila share.

Delete

openstack share snapshot delete

Delete a Manila snapshot.

List

openstack share snapshot list

List all Manila snapshots.

Manage

openstack share snapshot adopt

Bring an existing storage object snapshot under Manila management, specifying the snapshot name as the provider location.

Rename

openstack share snapshot set

Change the display name of a Manila snapshot using openstack share snapshot set --name.

Reset State

openstack share snapshot set

Reset the state of a Manila snapshot using openstack share snapshot set --status.

Show

openstack share snapshot show

Show details about a Manila snapshot.

Unmanage

openstack share snapshot abandon

Remove a Manila snapshot from management without deleting the underlying storage object snapshot.

Revert to Snapshot

openstack share revert

Revert a Manila share to the latest snapshot. The snapshot_support and revert_to_snapshot_support extra specs must be set to True for the share type.

Table 6.4. Manila API Overview – Snapshot

Share Type API

Table 6.5, “Manila API Overview – Share Type,” lists the valid operations for Manila share types. Share types are identified by display name or UUID. Creating or deleting share types typically requires administrative privileges.

Operation

CLI Command

Description

Create

openstack share type create

Create a Manila share type.

Delete

openstack share type delete

Delete a Manila share type.

List

openstack share type list

List existing Manila share types.

Table 6.5. Manila API Overview – Share Type

Share Type Extra Specs API

Table 6.6, “Manila API Overview – Share Type Extra Specs,” lists the valid operations for share type extra specs. Extra specs are properties of share types and are identified by their parent object. Modifying or viewing extra specs typically requires administrative privileges.

Operation

CLI Command

Description

List extra specs

openstack share type show

Display extra specs assigned to a share type (one at a time).

Set extra specs

openstack share type set

Assign extra specs to a share type using --extra-specs.

Unset extra specs

openstack share type unset

Remove extra specs from a share type.

Table 6.6. Manila API Overview – Share Type Extra Specs

Share Group API

Operation

CLI Command

Description

Create

openstack share group create

Create a Manila share group.

Delete

openstack share group delete

Delete one or more Manila share groups.

List

openstack share group list

List Manila share groups.

Reset state

openstack share group set

Update the state of a share group.

Show

openstack share group show

Show details about a share group.

Update

openstack share group set

Update details of a share group.

Create SG Snapshot

openstack share group snapshot create

Create a snapshot of a share group.

Delete SG Snapshot

openstack share group snapshot delete

Delete a snapshot of a share group.

List SG Snapshot

openstack share group snapshot list

List share group snapshots.

Show SG Snapshot members

openstack share group snapshot members list

Get member details for a share group snapshot.

Reset SG Snapshot state

openstack share group snapshot set

Update the state of a share group snapshot using --status.

Show SG Snapshot

openstack share group snapshot show

Show details about a share group snapshot.

Update SG Snapshot

openstack share group snapshot set

Update details of a share group snapshot.

Table 6.7. Manila API Overview – Share Groups

Share Replication API

Table 6.8, “Manila API Overview – Share Replication,” lists the valid operations for share replicas.

Operation

CLI Command

Description

Create Share Replica

openstack share replica create

Create a share replica.

Delete

openstack share replica delete

Delete a share replica.

List

openstack share replica list

List all share replicas.

Show

openstack share replica show

Show detailed information for a replica.

Promote

openstack share replica promote

Promote the specified replica to ACTIVE for the share.

Resync

openstack share replica resync

Initiate an update for the replica.

Reset Replica Status

openstack share replica set

Update the status attribute of a replica using --status.

Reset Replication State

openstack share replica set

Update the replica_state attribute of a replica using --replica-state.

Table 6.8. Manila API Overview – Share Replication

Share Migration API

Table 6.9, “Manila API Overview – Share Migration,” lists the valid operations for migrating shares.

Operation

CLI Command

Description

Start

openstack share migration start

Start the share migration process.

Get Progress

openstack share migration show

Show migration progress for a share.

Complete

openstack share migration complete

Complete migration by removing the source share and setting the destination share to available.

Cancel

openstack share migration cancel

Cancel the migration of a share.

Table 6.9. Manila API Overview – Share Migration

Note

Several parameters must be specified when starting migration for a share. For a list of supported parameters, refer to the help text from openstack help share migration start. For example, the NetApp driver supports preserving snapshots and file system metadata, and can perform in-SVM migrations non-disruptively. To do so, set preserve_metadata, preserve_snapshots, and nondisruptive to True.

Share Server Migration API

Operation

CLI Command

Description

Check

openstack share server migration start

Check if the destination host is compatible with the requested migration parameters (use --check-only).

Start

openstack share server migration start

Start the share server migration process to the specified destination.

Get Progress

openstack share server migration show

Show migration progress for a share server.

Complete

openstack share server migration complete

Complete migration by updating all export locations, disconnecting all clients, and setting the destination share server to active and the source to inactive.

Cancel

openstack share server migration cancel

Cancel the migration of a share server.

Table 6.10. Manila API Overview – Share Server Migration

Note

Several parameters must be specified when starting migration for a share server. For a list of supported parameters, refer to the help text from openstack help share server migration start. For example, the NetApp driver does not support non-disruptive share server migration until the Wallaby release. In such cases, set nondisruptive to False and preserve_snapshots and writable to True for the migration to be accepted.

Important

Starting with the Xena release, the NetApp ONTAP driver supports non-disruptive share server migrations when the ONTAP cluster version is 9.10 or later. For a non-disruptive migration to be accepted, you cannot specify a new share network with a different Neutron network ID or subnet ID.

Note

Starting with the Bobcat release, the “Get Progress” operation provides the current progress percentage of the data being copied. The command output includes the percentage of total share size (GB) transferred, the current migration state, and the destination share server ID.