The manila shell utility

The manila shell utility interacts with the OpenStack Manila API from the command line. It supports the entirety of the OpenStack Manila API.

You’ll need to provide manila with your OpenStack username and API key. You can do this with the –os-username, –os-password and –os-tenant-name options, but it’s easier to just set them as environment variables by setting two environment variables:

OS_USERNAME or MANILA_USERNAME

Your OpenStack Manila username.

OS_PASSWORD or MANILA_PASSWORD

Your password.

OS_TENANT_NAME or MANILA_PROJECT_ID

Project for work.

OS_AUTH_URL or MANILA_URL

The OpenStack API server URL.

OS_SHARE_API_VERSION

The OpenStack Shared Filesystems API version.

For example, in Bash you’d use:

export OS_USERNAME=foo
export OS_PASSWORD=bar
export OS_TENANT_NAME=foobarproject
export OS_AUTH_URL=http://...
export OS_SHARE_API_VERSION=2

From there, all shell commands take the form:

manila <command> [arguments...]

Run manila help to get a full list of all possible commands, and run manila help <command> to get detailed help for that command.

usage: manila [--version] [-d] [--os-cache] [--os-reset-cache]
              [--os-user-id <auth-user-id>] [--os-username <auth-user-name>]
              [--os-password <auth-password>]
              [--os-tenant-name <auth-tenant-name>]
              [--os-project-name <auth-project-name>]
              [--os-tenant-id <auth-tenant-id>]
              [--os-project-id <auth-project-id>]
              [--os-user-domain-id <auth-user-domain-id>]
              [--os-user-domain-name <auth-user-domain-name>]
              [--os-project-domain-id <auth-project-domain-id>]
              [--os-project-domain-name <auth-project-domain-name>]
              [--os-auth-url <auth-url>] [--os-region-name <region-name>]
              [--os-token <token>] [--bypass-url <bypass-url>]
              [--service-type <service-type>] [--service-name <service-name>]
              [--share-service-name <share-service-name>]
              [--endpoint-type <endpoint-type>]
              [--os-share-api-version <share-api-ver>]
              [--os-cacert <ca-certificate>] [--retries <retries>]
              [--os-cert <certificate>] [--os-key <key>]
              <subcommand> ...

Command-line interface to the OpenStack Manila API.

Positional arguments:
  <subcommand>
    absolute-limits     Print a list of absolute limits for a user.
    access-allow        Allow access to a given share.
    access-deny         Deny access to a share.
    access-list         Show access list for share.
    access-metadata     Set or delete metadata on a share access rule.
    access-show         Show details about a NAS share access rule.
    api-version         Display the API version information.
    availability-zone-list
                        List all availability zones.
    create              Creates a new share (NFS, CIFS, CephFS, GlusterFS,
                        HDFS or MAPRFS).
    credentials         Show user credentials returned from auth.
    delete              Remove one or more shares.
    endpoints           Discover endpoints that get returned from the
                        authenticate services.
    extend              Increases the size of an existing share.
    extra-specs-list    Print a list of current 'share types and extra specs'
                        (Admin Only).
    force-delete        Attempt force-delete of share, regardless of state
                        (Admin only).
    list                List NAS shares with filters.
    manage              Manage share not handled by Manila (Admin only).
    message-delete      Remove one or more messages.
    message-list        Lists all messages.
    message-show        Show details about a message.
    metadata            Set or delete metadata on a share.
    metadata-show       Show metadata of given share.
    metadata-update-all
                        Update all metadata of a share.
    migration-cancel    Cancels migration of a given share when copying (Admin
                        only, Experimental).
    migration-complete  Completes migration for a given share (Admin only,
                        Experimental).
    migration-get-progress
                        Gets migration progress of a given share when copying
                        (Admin only, Experimental).
    migration-start     Migrates share to a new host (Admin only,
                        Experimental).
    pool-list           List all backend storage pools known to the scheduler
                        (Admin only).
    quota-class-show    List the quotas for a quota class.
    quota-class-update  Update the quotas for a quota class (Admin only).
    quota-defaults      List the default quotas for a project.
    quota-delete        Delete quota for a project, or project/user or
                        project/share-type. The quota will revert back to
                        default (Admin only).
    quota-show          List the quotas for a project, user or share type.
    quota-update        Update the quotas for a project/user and/or share type
                        (Admin only).
    rate-limits         Print a list of rate limits for a user.
    reset-state         Explicitly update the state of a share (Admin only).
    reset-task-state    Explicitly update the task state of a share (Admin
                        only, Experimental).
    restore             Restore one or more shares from recycle bin.
    revert-to-snapshot  Revert a share to the specified snapshot.
    security-service-create
                        Create security service used by project.
    security-service-delete
                        Delete one or more security services.
    security-service-list
                        Get a list of security services.
    security-service-show
                        Show security service.
    security-service-update
                        Update security service.
    service-disable     Disables 'manila-share' or 'manila-scheduler' services
                        (Admin only).
    service-enable      Enables 'manila-share' or 'manila-scheduler' services
                        (Admin only).
    service-list        List all services (Admin only).
    share-export-location-list
                        List export locations of a given share.
    share-export-location-show
                        Show export location of the share.
    share-group-create  Creates a new share group.
    share-group-delete  Delete one or more share groups.
    share-group-list    List share groups with filters.
    share-group-reset-state
                        Explicitly update the state of a share group (Admin
                        only).
    share-group-show    Show details about a share group.
    share-group-snapshot-create
                        Creates a new share group snapshot.
    share-group-snapshot-delete
                        Remove one or more share group snapshots.
    share-group-snapshot-list
                        List share group snapshots with filters.
    share-group-snapshot-list-members
                        List members of a share group snapshot.
    share-group-snapshot-reset-state
                        Explicitly update the state of a share group snapshot
                        (Admin only).
    share-group-snapshot-show
                        Show details about a share group snapshot.
    share-group-snapshot-update
                        Update a share group snapshot.
    share-group-type-access-add
                        Adds share group type access for the given project
                        (Admin only).
    share-group-type-access-list
                        Print access information about a share group type
                        (Admin only).
    share-group-type-access-remove
                        Removes share group type access for the given project
                        (Admin only).
    share-group-type-create
                        Create a new share group type (Admin only).
    share-group-type-delete
                        Delete a specific share group type (Admin only).
    share-group-type-key
                        Set or unset group_spec for a share group type (Admin
                        only).
    share-group-type-list
                        Print a list of available 'share group types'.
    share-group-type-specs-list
                        Print a list of 'share group types specs' (Admin
                        Only).
    share-group-update  Update a share group.
    share-instance-export-location-list
                        List export locations of a given share instance.
    share-instance-export-location-show
                        Show export location for the share instance.
    share-instance-force-delete
                        Force-delete the share instance, regardless of state
                        (Admin only).
    share-instance-list
                        List share instances (Admin only).
    share-instance-reset-state
                        Explicitly update the state of a share instance (Admin
                        only).
    share-instance-show
                        Show details about a share instance (Admin only).
    share-network-create
                        Create a share network to export shares to.
    share-network-delete
                        Delete one or more share networks.
    share-network-list  Get a list of share networks
    share-network-reset-state
                        Explicitly update the state of a share network (Admin
                        only).
    share-network-security-service-add
                        Associate security service with share network.
    share-network-security-service-add-check
                        Associate security service with share network.
    share-network-security-service-list
                        Get list of security services associated with a given
                        share network.
    share-network-security-service-remove
                        Dissociate security service from share network.
    share-network-security-service-update
                        Update a current security service to a new security
                        service.
    share-network-security-service-update-check
                        Check if a security service update on the share
                        network is supported. This call can be repeated until
                        a successful result is obtained.
    share-network-show  Retrieve details for a share network.
    share-network-subnet-create
                        Add a new subnet into a share network.
    share-network-subnet-create-check
                        Check if a new subnet can be added to a share network.
    share-network-subnet-delete
                        Delete one or more share network subnets.
    share-network-subnet-show
                        Show share network subnet.
    share-network-update
                        Update share network data.
    share-replica-create
                        Create a share replica.
    share-replica-delete
                        Remove one or more share replicas.
    share-replica-export-location-list
                        List export locations of a share replica.
    share-replica-export-location-show
                        Show details of a share replica's export location.
    share-replica-list  List share replicas.
    share-replica-promote
                        Promote specified replica to 'active' replica_state.
    share-replica-reset-replica-state
                        Explicitly update the 'replica_state' of a share
                        replica.
    share-replica-reset-state
                        Explicitly update the 'status' of a share replica.
    share-replica-resync
                        Attempt to update the share replica with its 'active'
                        mirror.
    share-replica-show  Show details about a replica.
    share-server-delete
                        Delete one or more share servers (Admin only).
    share-server-details
                        Show share server details (Admin only).
    share-server-list   List all share servers (Admin only).
    share-server-manage
                        Manage share server not handled by Manila (Admin
                        only).
    share-server-migration-cancel
                        Cancels migration of a given share server when copying
                        (Admin only, Experimental).
    share-server-migration-check
                        Check migration compatibility for a share server with
                        desired properties (Admin only, Experimental).
    share-server-migration-complete
                        Completes migration for a given share server (Admin
                        only, Experimental).
    share-server-migration-get-progress
                        Gets migration progress of a given share server when
                        copying (Admin only, Experimental).
    share-server-migration-start
                        Migrates share server to a new host (Admin only,
                        Experimental).
    share-server-reset-state
                        Explicitly update the state of a share server (Admin
                        only).
    share-server-reset-task-state
                        Explicitly update the task state of a share (Admin
                        only, Experimental).
    share-server-show   Show share server info (Admin only).
    share-server-unmanage
                        Unmanage share server (Admin only).
    show                Show details about a NAS share.
    shrink              Decreases the size of an existing share.
    snapshot-access-allow
                        Allow read only access to a snapshot.
    snapshot-access-deny
                        Deny access to a snapshot.
    snapshot-access-list
                        Show access list for a snapshot.
    snapshot-create     Add a new snapshot.
    snapshot-delete     Remove one or more snapshots.
    snapshot-export-location-list
                        List export locations of a given snapshot.
    snapshot-export-location-show
                        Show export location of the share snapshot.
    snapshot-force-delete
                        Attempt force-deletion of one or more snapshots.
                        Regardless of the state (Admin only).
    snapshot-instance-export-location-list
                        List export locations of a given snapshot instance.
    snapshot-instance-export-location-show
                        Show export location of the share instance snapshot.
    snapshot-instance-list
                        List share snapshot instances.
    snapshot-instance-reset-state
                        Explicitly update the state of a share snapshot
                        instance.
    snapshot-instance-show
                        Show details about a share snapshot instance.
    snapshot-list       List all the snapshots.
    snapshot-manage     Manage share snapshot not handled by Manila (Admin
                        only).
    snapshot-rename     Rename a snapshot.
    snapshot-reset-state
                        Explicitly update the state of a snapshot (Admin
                        only).
    snapshot-show       Show details about a snapshot.
    snapshot-unmanage   Unmanage one or more share snapshots (Admin only).
    soft-delete         Soft delete one or more shares.
    type-access-add     Adds share type access for the given project (Admin
                        only).
    type-access-list    Print access information about the given share type
                        (Admin only).
    type-access-remove  Removes share type access for the given project (Admin
                        only).
    type-create         Create a new share type (Admin only).
    type-delete         Delete one or more specific share types (Admin only).
    type-key            Set or unset extra_spec for a share type (Admin only).
    type-list           Print a list of available 'share types'.
    type-show           Show share type details.
    type-update         Update share type name, description, and/or
                        visibility. (Admin only).
    unmanage            Unmanage share (Admin only).
    update              Rename a share.
    bash-completion     Print arguments for bash_completion. Prints all of the
                        commands and options to stdout so that the
                        manila.bash_completion script doesn't have to hard
                        code them.
    help                Display help about this program or one of its
                        subcommands.
    list-extensions     List all the os-api extensions that are available.

Optional arguments:
  --version             show program's version number and exit
  -d, --debug           Print debugging output.
  --os-cache            Use the auth token cache. Defaults to env[OS_CACHE].
  --os-reset-cache      Delete cached password and auth token.
  --os-user-id <auth-user-id>
                        Defaults to env [OS_USER_ID].
  --os-username <auth-user-name>
                        Defaults to env[OS_USERNAME].
  --os-password <auth-password>
                        Defaults to env[OS_PASSWORD].
  --os-tenant-name <auth-tenant-name>
                        Defaults to env[OS_TENANT_NAME].
  --os-project-name <auth-project-name>
                        Another way to specify tenant name. This option is
                        mutually exclusive with --os-tenant-name. Defaults to
                        env[OS_PROJECT_NAME].
  --os-tenant-id <auth-tenant-id>
                        Defaults to env[OS_TENANT_ID].
  --os-project-id <auth-project-id>
                        Another way to specify tenant ID. This option is
                        mutually exclusive with --os-tenant-id. Defaults to
                        env[OS_PROJECT_ID].
  --os-user-domain-id <auth-user-domain-id>
                        OpenStack user domain ID. Defaults to
                        env[OS_USER_DOMAIN_ID].
  --os-user-domain-name <auth-user-domain-name>
                        OpenStack user domain name. Defaults to
                        env[OS_USER_DOMAIN_NAME].
  --os-project-domain-id <auth-project-domain-id>
                        Defaults to env[OS_PROJECT_DOMAIN_ID].
  --os-project-domain-name <auth-project-domain-name>
                        Defaults to env[OS_PROJECT_DOMAIN_NAME].
  --os-auth-url <auth-url>
                        Defaults to env[OS_AUTH_URL].
  --os-region-name <region-name>
                        Defaults to env[OS_REGION_NAME].
  --os-token <token>    Defaults to env[OS_TOKEN].
  --bypass-url <bypass-url>
                        Use this API endpoint instead of the Service Catalog.
                        Defaults to env[OS_MANILA_BYPASS_URL].
  --service-type <service-type>
                        Defaults to compute for most actions.
  --service-name <service-name>
                        Defaults to env[OS_MANILA_SERVICE_NAME].
  --share-service-name <share-service-name>
                        Defaults to env[OS_MANILA_SHARE_SERVICE_NAME].
  --endpoint-type <endpoint-type>
                        Defaults to env[OS_MANILA_ENDPOINT_TYPE] or publicURL.
  --os-share-api-version <share-api-ver>
                        Accepts 1.x to override default to
                        env[OS_SHARE_API_VERSION].
  --os-cacert <ca-certificate>
                        Specify a CA bundle file to use in verifying a TLS
                        (https) server certificate. Defaults to
                        env[OS_CACERT].
  --retries <retries>   Number of retries.
  --os-cert <certificate>
                        Defaults to env[OS_CERT].
  --os-key <key>        Defaults to env[OS_KEY].

See "manila help COMMAND" for help on a specific command.