• Scalable File Service

sfs
  1. Help Center
  2. Scalable File Service
  3. API Reference(cli)
  4. API Description
  5. File Sharing
  6. Querying Details About All Shared File Systems

Querying Details About All Shared File Systems

Function

This interface is used to list the basic information of all shared file systems.

Command

  • Usage
    manila list [--all-tenants [<0|1>]] [--name <name>] [--status <status>]
                [--share-server-id <share_server_id>]
                [--metadata [<key=value> [<key=value> ...]]]
                [--extra-specs [<key=value> [<key=value> ...]]]
                [--share-type <share_type>] [--limit <limit>]
                [--offset <offset>] [--sort-key <sort_key>]
                [--sort-dir <sort_dir>] [--snapshot <snapshot>]
                [--host <host>] [--share-network <share_network>]
                [--project-id <project_id>] [--public]
                [--consistency-group <consistency_group>]
                [--columns <columns>]

  • Parameter description

    Name

    Mandatory

    Type

    Description

    all-tenants

    No (query parameter)

    boolean

    (Administrators only) Defines whether to list shared file systems of all tenants. This parameter is available only to Administrator and cannot be used by common tenants. To list shared file systems of all tenants, set it to 1. To list shared file systems of the current tenant, set it to 0. When Administrator uses this parameter and sets the value to 1, the shares created by all tenants (including Administrator and all common tenants) can be queried.

    name

    No (query parameter)

    string

    Specifies the name of the shared file system. The value contains 0 to 255 characters.

    status

    No (query parameter)

    string

    Filters shared file systems by status. Possible values are creating, error, available, deleting, error_deleting, manage_starting, manage_error, unmanage_starting, unmanage_error, unmanaged, extending, extending_error, shrinking, shrinking_error, and shrinking_possible_data_loss_error.

    share-server-id

    No (query parameter)

    string

    Specifies the UUID for managing share services. This parameter is currently invalid because the SFS service does not use this feature.

    metadata

    No (query parameter)

    object

    Sets that one or more metadata key and value pairs as a dictionary of strings.

    extra-specs

    No (query parameter)

    object

    Specifies the extra-specs key and value pair of the share type. This parameter is reserved and cannot be used as a filter criterion.

    NOTE:

    Currently, SFS provides only one share type whose value is default. This parameter cannot be used as a filter criterion because SFS does not provide the interface for querying the share type.

    share-type

    No (query parameter)

    string

    Specifies the name of a share type. A share type is used to specify the type of the storage service to be allocated. The default value of this parameter is default.

    NOTICE:

    Currently, SFS provides only one share type whose value is default. This parameter cannot be used as a filter criterion because SFS does not provide the interface for querying the share type.

    limit

    No (query parameter)

    integer

    Specifies the maximum number of shared file systems that can be returned. The default value is None.

    offset

    No (query parameter)

    integer

    Shared offset to define the start point of shared file system listing. The default value is None.

    sort-key

    No (query parameter)

    string

    Specifies the keyword for sorting query results. The default value is None. Possible values are id, status, size, host, share_proto, export_location, availability_zone, user_id, project_id, created_at, updated_at, display_name, name, share_type_id, share_type, share_network_id, share_network, snapshot_id, and snapshot.

    NOTICE:

    Currently, python-manilaclient (including version 1.23.0 and earlier versions) on the official website do not support using the sort-key and sort-dir parameters to sort the query results. Therefore, this parameter does not take effect.

    sort-dir

    No (query parameter)

    string

    Specifies the sorting direction of the share list. The default value is None. Possible values are asc (ascending) and desc (descending).

    NOTICE:

    Currently, python-manilaclient (including version 1.23.0 and earlier versions) on the official website do not support using the sort-key and sort-dir parameters to sort the query results. Therefore, this parameter does not take effect.

    snapshot

    No (query parameter)

    string

    Specifies the UUID or name of the source snapshot that was used to create the shared file system. This parameter is reserved, because snapshots are not supported currently.

    host

    No (query parameter)

    string

    Specifies the host name of the shared file system.

    share-network

    No (query parameter)

    string

    Specifies the UUID or name of the share network. This parameter is reserved, because share network management is not supported currently.

    project_id

    No (query parameter)

    string

    Specifies the UUID of the project in which the shared file system was created. This parameter is used together with all_tenants.

    public

    No (query parameter)

    boolean

    (Since API v2.8) Specifies the level of visibility for the shared file system. If this parameter is set to true, the share can be queried by other tenants using interfaces such as the one in Querying Details About a Shared File System. If this parameter is set to false, the share is visible only to the tenant who creates it. The default value is false.

    NOTE:

    Share access rules added for different tenants are isolated from each other. Therefore, even if a share is set to be visible to other tenants, the share can only be queried by other tenants using the interface in Querying Details About a Shared File System. Other tenants are not allowed to mount or use the share.

    consistency-group

    No (query parameter)

    string

    Specifies the UUID or name of the consistency group. This parameter is reserved, because consistency groups are not supported currently.

    columns

    No (query parameter)

    string

    Specifies the queried columns, which are separated by commas (,). For example, --columns "ID, Size, Is Public".

    NOTE:

    Different versions may have different column names. Run the manila list command to obtain all column names.

  • Example command
    manila list
  • Example command (filtering using the name parameter)
    manila list --name sample
  • Example command (filtering using the status parameter)
    manila list --status error
  • Example command (using the limit and offset parameters for paging)
    manila list --limit 2 --offset 1
  • Example command (filtering using the columns parameter)
    manila list  --columns "ID,Size,Is Public"
  • Example command (filtering using a parameter combination)
    manila list --name sample_share_name --status error --columns "ID,Size,Is Public"

Response

  • Parameter description

    Name

    Mandatory

    Type

    Description

    ID

    Yes

    string

    Specifies the UUID of the shared file system.

    Name

    Yes

    string

    Specifies the name of the shared file system.

    Size

    Yes

    integer

    Specifies the size of the shared file system in GB.

    Share Proto

    Yes

    string

    Specifies the protocol for sharing file systems. Only NFS is supported at present.

    Status

    Yes

    string

    Specifies the status of the shared file system. Possible values are creating, error, available, deleting, error_deleting, manage_starting, manage_error, unmanage_starting, unmanage_error, unmanaged, extending, extending_error, shrinking, shrinking_error, and shrinking_possible_data_loss_error.

    Is Public

    Yes

    bool

    (Since API v2.8) Specifies the level of visibility for the shared file system. If this parameter is set to true, the share can be queried by other tenants using interfaces such as the one in Querying Details About a Shared File System. If this parameter is set to false, the share is visible only to the tenant who creates it. The default value is false.

    NOTE:

    Share access rules added for different tenants are isolated from each other. Therefore, even if a share is set to be visible to other tenants, the share can only be queried by other tenants using the interface in Querying Details About a Shared File System. Other tenants are not allowed to mount or use the share.

    Share Type Name

    Yes

    string

    Specifies the name of a share type. A share type is used to specify the type of the storage service to be allocated. Currently, only one share type is provided for SFS and the value is fixed to default.

    Host

    Yes

    string

    Specifies the host name of the shared file system.

    Availability Zone

    Yes

    string

    Specifies the availability zone.

  • Example response
    root@n-version-client:~/ca# manila list
    +--------------------------------------+-------------------+------+-------------+-----------+-----------+-----------------+-------------------------------------------------------------------------------+-------------------+
    | ID                                   | Name              | Size | Share Proto | Status    | Is Public | Share Type Name | Host                                                                          | Availability Zone |
    +--------------------------------------+-------------------+------+-------------+-----------+-----------+-----------------+-------------------------------------------------------------------------------+-------------------+
    | 43e6f55c-b15a-40be-99ad-d77d7558d737 | sample1           | 1    | NFS         | available | False     | default         | DJ1@28281404-884d-4eda-8240-c54903a178fe#28281404-884d-4eda-8240-c54903a178fe | eu-de-01          |
    | 53a08631-b108-47d1-acb2-2cfa6c4f9efe | sample_share_name | 1    | NFS         | error     | False     | default         | DJ1@28281404-884d-4eda-8240-c54903a178fe#28281404-884d-4eda-8240-c54903a178fe | eu-de-01          |
    | bd012a04-c645-484a-bcf5-ea3bb792f354 | sample            | 10   | NFS         | available | False     | default         | DJ1@28281404-884d-4eda-8240-c54903a178fe#28281404-884d-4eda-8240-c54903a178fe | eu-de-01          |
    | e289e6cc-db04-435f-9149-94baf1108400 | 234               | 10   | NFS         | available | False     | default         | DJ1@28281404-884d-4eda-8240-c54903a178fe#28281404-884d-4eda-8240-c54903a178fe | eu-de-01          |
    +--------------------------------------+-------------------+------+-------------+-----------+-----------+-----------------+-------------------------------------------------------------------------------+-------------------+
  • Example response (filtering using the name parameter)
    root@n-version-client:~/ca# manila list --name sample
    +--------------------------------------+--------+------+-------------+-----------+-----------+-----------------+-------------------------------------------------------------------------------+-------------------+
    | ID                                   | Name   | Size | Share Proto | Status    | Is Public | Share Type Name | Host                                                                          | Availability Zone |
    +--------------------------------------+--------+------+-------------+-----------+-----------+-----------------+-------------------------------------------------------------------------------+-------------------+
    | bd012a04-c645-484a-bcf5-ea3bb792f354 | sample | 10   | NFS         | available | False     | default         | DJ1@28281404-884d-4eda-8240-c54903a178fe#28281404-884d-4eda-8240-c54903a178fe | eu-de-01          |
    +--------------------------------------+--------+------+-------------+-----------+-----------+-----------------+-------------------------------------------------------------------------------+-------------------+
  • Example response (filtering using the status parameter)
    root@n-version-client:~/ca# manila list --status error
    +--------------------------------------+-------------------+------+-------------+--------+-----------+-----------------+-------------------------------------------------------------------------------+-------------------+
    | ID                                   | Name              | Size | Share Proto | Status | Is Public | Share Type Name | Host                                                                          | Availability Zone |
    +--------------------------------------+-------------------+------+-------------+--------+-----------+-----------------+-------------------------------------------------------------------------------+-------------------+
    | 53a08631-b108-47d1-acb2-2cfa6c4f9efe | sample_share_name | 1    | NFS         | error  | False     | default         | DJ1@28281404-884d-4eda-8240-c54903a178fe#28281404-884d-4eda-8240-c54903a178fe | eu-de-01          |
    +--------------------------------------+-------------------+------+-------------+--------+-----------+-----------------+--------------
    -----------------------------------------------------------------+-------------------+
  • Example response (using the limit and offset parameters for paging)
    root@n-version-client:~/ca# manila list --limit 2 --offset 1
    +--------------------------------------+---------+------+-------------+-----------+-----------+-----------------+-------------------------------------------------------------------------------+-------------------+
    | ID                                   | Name    | Size | Share Proto | Status    | Is Public | Share Type Name | Host                                                                          | Availability Zone |
    +--------------------------------------+---------+------+-------------+-----------+-----------+-----------------+-------------------------------------------------------------------------------+-------------------+
    | 43e6f55c-b15a-40be-99ad-d77d7558d737 | sample1 | 1    | NFS         | available | False     | default         | DJ1@28281404-884d-4eda-8240-c54903a178fe#28281404-884d-4eda-8240-c54903a178fe | eu-de-01          |
    | bd012a04-c645-484a-bcf5-ea3bb792f354 | sample  | 10   | NFS         | available | False     | default         | DJ1@28281404-884d-4eda-8240-c54903a178fe#28281404-884d-4eda-8240-c54903a178fe | eu-de-01          |
    +--------------------------------------+---------+------+-------------+-----------+-----------+-----------------+-------------------------------------------------------------------------------+-------------------+
  • Example response (filtering using the columns parameter)
    root@n-version-client:~/ca# manila list --columns "ID,Size,Is Public"
    +--------------------------------------+------+-----------+
    | Id                                   | Size | Is Public |
    +--------------------------------------+------+-----------+
    | 43e6f55c-b15a-40be-99ad-d77d7558d737 | 1    | False     |
    | 53a08631-b108-47d1-acb2-2cfa6c4f9efe | 1    | False     |
    | bd012a04-c645-484a-bcf5-ea3bb792f354 | 10   | False     |
    | e289e6cc-db04-435f-9149-94baf1108400 | 10   | False     |
    +--------------------------------------+------+-----------+
  • Example response (filtering using a parameter combination)
    root@n-version-client:~/ca# manila list --name sample_share_name --status error --columns "ID,Size,Is Public"
    +--------------------------------------+------+-----------+
    | Id                                   | Size | Is Public |
    +--------------------------------------+------+-----------+
    | 53a08631-b108-47d1-acb2-2cfa6c4f9efe | 1    | False     |
    +--------------------------------------+------+-----------+