10 Commits

Author SHA1 Message Date
cFouts
c34e3b7d2c Nova Style API Version Support for Client
The Manila client needs the following changes to support microversions:

*   Maintain backwards compatibility with Kilo. When the client detects
    that the server doesn't support microversions it will fall back to
    using the v1 API.
*   The --os-share-api-version option supports overriding the version.
*   If 1.0 is specified as the version the client will load the v1
    client and use the server's v1 API.
*   The client will send a request for the server's API version and
    determine if the client's supported versions and the server's
    supported versions overlap. If not the client will display an error
    and quit. See diagram 1 below.
*   The client supports the @wraps annotation. The annotation is used
    with the v2/shell.py commands and any class that inherits from
    the Manager class in manilaclient/base.py.
*   If an appropriate command version isn't found for commands using
    @wraps then the client will display an error and quit.

following commit: ab49d645befd04c84272f0d24e1b604012d191dd.

Diagram 1:
  Client:
         2.5           2.8
          |-------------|

  Server1:
     2.0           2.5
      |-------------|
     Client uses version 2.5

  Server2:
               2.7           2.10
                |-------------|
               Client uses version 2.8

  Server3:
                  2.9           2.12
                   |-------------|
                  Client displays error and quits

  Server4:
     1.0 (Kilo Server)
      |-|
     Client detects pre-microversion server and loads v1 client

Example usage of wraps annotation:
*   Support 2.0 - 2.4: @api_versions.wraps("2.0", "2.4")
*   Support 2.5 - latest: @api_versions.wraps("2.5")

Implements: blueprint manila-client-advanced-microversion-support

Change-Id: I3733fe85424e39566addc070d42609e508259f19
2015-11-16 19:03:55 +00:00
Jenkins
cbe94c3855 Merge "Bump latest supported version to 2.6" 2015-09-16 12:41:03 +00:00
vponomaryov
e82576f938 Bump latest supported version to 2.6
Manila's latest supported microversion is 2.6
So, make client be able to make requests with it.
It does not require changes to manilaclient methods.
Only manila response differs.

Change-Id: I456b8d79cbb683c28ee5cc6ace22a751683388de
2015-09-15 21:22:32 +03:00
cFouts
556b5a65e9 Add consistency group support to manila client
Adds support for recently implemented Manila features:
    * consistency groups
    * consistency group snapshots

Enables the client to support newly available APIs which support create,
update, read, and delete operations for consistency groups and
consistency group snapshots.

Implements bp: manila-client-consistency-groups

Change-Id: Ia2760156ab289f127fd7411a7b9a13a371f5129c
2015-09-15 15:12:18 +00:00
cFouts
3cd57eb32e Fix client API version to support Manila API
The Manila client's API version is now '2.5' so that it matches the
Manila server's API version.

The client also supports the Manila V2 Keystone endpoint such that it
will only communicate with the Manila V2 API.

Closes-bug: 1494360

Change-Id: I3d011046bbe4f9223d93341f3d3ac09074f52990
2015-09-14 01:07:07 +00:00
Rodrigo Barbieri
e3e5eb6d7b Add Share Migration support to Manila Client
Added Share Migration CLI entry point to Manila Client,
use the following command:

"manila migrate <share> <host#pool> [--force-host-copy]"

The force-host-copy parameter forces Generic Migration approach,
bypassing driver optimization migration if present.

Please note that the above command is an admin only command.

Implements: blueprint share-migration-client
Change-Id: I00b51106b1736559b40d101d6d3609db84f8635d
Depends-On: I8dde892cb7c0180b2b56d8c7d680dfe2320c2ec7
2015-09-06 22:25:24 -03:00
cFouts
36384fa190 Manila REST API Microversion Support for Client
Manila client needs to provide 'X-Openstack-Manila-Api-Version' in the
HTTP request header along with the appropriate version. Manila client
also needs to provide 'X-OpenStack-Manila-API-Experimental' in the HTTP
request header for APIs that are marked as experimental. This is a
temporary fix until Manila client can support Nova style microversions.

Closes-bug: #1489450

Change-Id: I6344dfa6d272f0e813a4873c015be614ebeb4e7e
2015-09-01 21:01:18 +00:00
Bob Callaway
f4ddf3626c Rename volume_type to share_type
This change renames support for volume_type to share_type.
The manila client will send data to Manila API using share_type, but
passes both share_type and volume_type values returned from API call to users
of the python binding; however, CLI output will only print the value of
share_type. This change ensures that --volume-type (and its other
permutations) are aliases of --share-type, thus providing backwards
compatibility for command line arguments of the shell.

Change-Id: Id40eea27c2c5b44e1d01c061a48e1658ba800f43
2015-02-18 19:14:05 +00:00
Your Name
7ecdbde6b3 Improve snapshots list API filtering
1) Added new params for filtering by:
- source share
- usage of snapshot*
- limit and offset a la pagination
- direction (asc, desc)*
- key of snapshot*

* requires server-side update

2) Added aliases for params, mostly in perspective to avoid mess of underscore
and dash symbols.

Implements blueprint improve-snapshot-list-filtering

Change-Id: I3727911f179ea01dd4cb68149fa7f4d79ca75a5c
2014-10-23 11:25:14 +03:00
Your Name
c7456c675f Improve share list API filtering
1) Added new params for filtering by:
- share network
- snapshot
- volume type
- host
- limit and offset a la pagination
- project id (useful with '--all-tenants')
- metadata*
- extra-specs*
- direction (asc, desc)*
- key of share*

* requires server-side update

2) Added aliases for params, mostly in perspective to avoid mess of underscore
and dash symbols.

3) Updated utils.print_list func to print results as is without reordering.

Implements  blueprint improve-share-list-filtering

Change-Id: I6fe92c5242f18c900e109271f9182bd5ed287b25
2014-10-09 19:02:04 +00:00