32 Commits

Author SHA1 Message Date
zhongjun
6e8b3deef9 Add 'count' in list command
Add 'count' parameter in list share command.

Change-Id: I2b7b41b3579c24703a1a67ab5dc6f920a3ccbdc3
Partial-Implements: bp add-amount-info-in-list-api
2018-01-22 02:25:10 +00:00
Valeriy Ponomaryov
6964524f4c Add share group quotas
Add support for share group quotas implemented on server side [1].

[1] I397a8e886226cb22fa50abdf2a4a938bb04c655d

Change-Id: Ib2b12d906c54c05faf8a72ac851d100e25023d50
Implements Blueprint add-share-groups-quota
2017-07-27 12:19:39 +03:00
Valeriy Ponomaryov
8045f4d24e Add quotas per share type
Following CLI interface changes are implemented:

1) update share type quotas:
   $ manila quota-update ... --share-type %share_type_name_or_id% ...

2) get share type quotas:
   $ manila quota-show ... --share-type %share_type_name_or_id% ...

3) delete/reset share type quotas:
   $ manila quota-delete ... --share-type %share_type_name_or_id% ...

'quota-defaults' stays unchanged as it is the same for all kinds of
quotas - project, user or share type.

Implements BluePrint support-quotas-per-share-type

Change-Id: I0cd2bc41193e50b330456b14c5f66134a513cc32
2017-07-26 19:31:30 +03:00
Jan Provaznik
8bf5f9b7e0 Add commands for user messages
Allows listing, showing and deleting of user messages.

Change-Id: I5ffb840a271c518f62ee1accfd8e20a97f45594d
Partially-implements: blueprint user-messages
Depends-On: Ia0cc524e0bfb2ca5e495e575e17e9911c746690b
2017-07-25 05:20:31 -04:00
zhongjun
c95a58d65e Change to share access list API
When we do manila access-list, the 'created_at' and 'updated_at' time
should be shown to the user. And then the user could determine which
is the recent access rule. As designed, the recent access-allow
rule caused the error access-status of share instance.
The API change [1] has been merged.

[1] Iad6070d60ec77b7de9cc9679cfa7478876084da1

Change-Id: I4b10faa18a5e4d7394083cd36851fd0260df86a2
Closes-Bug: #1682795
2017-06-01 14:49:43 +00:00
tpsilva
c0fdf827b9 Add mountable snapshots support to manila client
This patch adds support to manila client for the mountable snapshots
feature.

Co-Authored-By: Miriam Yumi <miriam.peixoto@fit-tecnologia.org.br>
Co-Authored-By: Alyson Rosa <alyson.rosa@fit-tecnologia.org.br>

Implements: blueprint manila-mountable-snapshots
Change-Id: I785a784bcae7cf3bcef4fa6c64ba28ee58328389
Depends-On: I65f398a05f82eef31ec317d70dfa101483b44b30
2017-01-24 20:30:57 -02:00
Clinton Knight
b4250866ea Add share group support to Manila client
Manila needs a grouping construct that, like shares, is a 1st-class
atomic data type. Our experience with CGs has demonstrated the
complexity of adding a grouping capability, yet there are other use
cases such as migration, replication, and backup in which some
storage controllers could only offer such features on share groups.
CGs also highlighted the poor optics of an advanced feature with
comparatively little potential for vendor support. And adding new
grouping constructs for each new feature is not technically
feasible. All of the above may be addressed by generic groups,
which we think is a clean extension to the original architecture of
Manila.

Implements: blueprint manila-share-groups
Change-Id: I8e29baed62355fc31caeec9c7a66eaebfcbdf184
2017-01-24 18:16:42 +02:00
Rodrigo Barbieri
ff9963a712 Implement Share Migration Ocata improvements
- Added 'preserve-snapshots' parameter
- Driver-assisted parameters are now mandatory (thus
compatibility with previous versions is broken)
- Updated parameter descriptions

Change-Id: Icfdefdee88040464d19ab95dba50b88c8f90a1d3
Depends-On: I764b389816319ed0ac5178cadbf809cb632035b4
Implements: blueprint ocata-migration-improvements
2017-01-21 16:36:20 +00:00
Goutham Pacha Ravi
2b80ef89ac Support changes to access rules APIs
The API semantics have not changed on the server.
However, state transitions are more granular. [1]

Bump the request version to parse these changes

[1] Ic25e63215b5ba723cbc8cab7c51789c698e76f28

Partially-implements bp: fix-and-improve-access-rules
Change-Id: I6bbb7eea59ee817f69fc60068c471cdb66e3b9dc
2017-01-20 10:13:17 -05:00
Clinton Knight
d736acc442 Support share revert to snapshot in Manila client
This commit adds support to Manila client for the
share-revert-to-snapshot feature.

Implements: blueprint manila-share-revert-to-snapshot
Depends-On: Id497e13070e0003db2db951526a52de6c2182cca
Change-Id: Ia9c63ac416db47baae78b02ffcab5a60892cbf5c
2017-01-18 14:30:47 -05:00
Tom Barron
41505d0f89 Remove Nova Net option for share networks
Nova network was deprecated in Newton and is no longer supported for
regular deployments in Ocata [1].  In manila itself, changes [2] and
[3] remove nova network plugin support in manila services and remove
the nova-network-id field from the database model for share networks.

Add a new micro-version in which nova-network-id options are no longer
allowed when creating or modifying share networks.

[1] http://docs.openstack.org/releasenotes/nova/unreleased.html
[2] I846b760fa7c01f7f86768399a2bfad9ced7e57cd
[3] I8b9a559fbea61979f01737ed1dc272276c4f1269

Partially-implements: bp remove-nova-net-plugin

Closes-Bug: #1656756

Change-Id: Ic27b7d26a5a7d1100e57ee8a857fc45fc3b0a909
2017-01-16 12:11:14 -05:00
Clinton Knight
1525c74b20 Add create_share_from_snapshot_support extra spec
The snapshot_support extra spec has always meant two things: a driver
can take snapshots and create shares from snapshots. As we add alternate
snapshot semantics, it is likely that some drivers will want to support
snapshots and some of the new semantics while being unable to create new
shares from snapshots.

This work adds support to manila client for the new extra spec in manila
server, create_share_from_snapshot_support.

Depends-On: Ib0ad5fbfdf6297665c208149b08c8d21b3c232be
Implements: blueprint add-create-share-from-snapshot-extra-spec

Change-Id: I07b70f04e6fb2b5797557c4f4796c6883680eff3
2017-01-03 12:59:41 -05:00
zhongjun
ca50782ebc Add share_type filter to pool_list
Administrators intend to get the pool's information filtered by share
type more directly. The blueprint aims to cover this situation:

1. add '--detail' to support retrieving pool list in detail or not
2. add '--share_type' to filter pools by share_type name or id

Implements: blueprint pool-list-by-share-type
Change-Id: Ia100eb6b4b83c8e2cc91f6fc86f01caa9bce87d4
2016-12-22 11:38:25 +08:00
ChangBo Guo(gcb)
c8bb1a2755 Remove copy of incubated Oslo code
The Oslo team has moved all previously incubated code from the
openstack/oslo-incubator repository into separate library repositories
and released those libraries to the Python Package Index. Many of our
big tent project teams are still using the old, unsupported, incubated
versions of the code. The Oslo team has been working to remove that
incubated code from projects, and the time has come to finish that work.

As one of community-wide goals in Ocata, please see:
https://github.com/openstack/governance/blob/master/goals/ocata/remove-incubated-oslo-code.rst

Note: This commit also fix pep8 violations.
Change-Id: I03288adb94c702d1d63df88ef9ba33a2ff59eaa3
2016-09-28 10:06:45 +08:00
Rodrigo Barbieri
800b8003b1 Update Share Migration CLI
Implemented new parameters:
- Added 'Writable' API parameter: user chooses whether share must
remain writable during migration.
- Added 'Preserve Metadata' API parameter: user chooses whether
share must preserve all file metadata on migration.
- Added 'Non-disruptive' API parameter: user chooses whether
migration of share must be performed non-disruptively.
- Removed 'Notify' parameter.
- Renamed existing 'Force Host Copy' parameter to
'Skip Optimized Migration'.
- Added 'New Share Network' API parameter: user chooses new
share network to migrate to if desired.

Implements: blueprint newton-migration-improvements

Depends-On: Ief49a46c86ed3c22d3b31021aff86a9ce0ecbe3b
Change-Id: I6e7a1d854d9a09f10511c5d47715b1979813f947
2016-08-30 22:30:44 -03:00
Ramana Raja
c1643f8d22 add access_key to access_list API's response
Expose access credentials/keys returned by storage
backends (e.g. Ceph) with an internal authentication
system for client identities that are granted share
access.

Partially implements bp auth-access-keys
Depends-On: I486064f117cf3001dba7735ca92a7d89aee3ce5b
Change-Id: I312dd311fcee74a7c62bfc62823e5e3cbf2371ec
2016-08-23 10:07:41 +05:30
Jenkins
a2d2faf0b9 Merge "Add snapshot instances admin CLIs" 2016-08-16 00:44:15 +00:00
zhongjun
5de1ef3844 Add snapshot instances admin CLIs
Support new API entry points for share snapshot instances:
- share-snapshot-instance-list
- share-snapshot-instance-show
- share-snapshot-instance-reset-status

Implements: blueprint snapshot-instances
Change-Id: Ica1e81012f19926e0f1ba9cd6d8eecc5fbbf40b5
2016-08-14 06:16:58 +00:00
Valeriy Ponomaryov
8c2f3c3a9b Define experimental API header on python client level instead of CLI
For the moment we cannot use experimental APIs using "python" client.
It is possible only if we use shell client (CLI).
It means, we cannot use "share replication", "share migration" and
"consistency groups" APIs of python manilaclient from other apps
such as Manila UI. So, add special experimental header on python
client level instead of CLI.

Change-Id: I6eed5dcfd1cb309817e083856b40e10cc6f970f6
Closes-Bug: #1599586
2016-07-13 18:42:39 +03:00
nidhimittalhada
3a7609d8fa manila list --all-tenants should display projectID
Both 'manila list --all-tenants' and 'manila list --public'
should show column Project ID. Project/Tenant ownership of
shares is vital information, e.g. when working with project
quota allocations.

'manila list' doesn't show public shares of other projects.
Without '--all-tenants' and without '--public' the result
is scoped to the project/tenant of the user issuing the command.
So, it would be redundant to display a column for this.

Same fix has been put for snapshot-list --all-tenants too.

DocImpact
Change-Id: I7afae542c391041d48c28e268ab59c83447bb940
Closes-Bug: #1570085
2016-06-23 13:30:04 +00:00
Daniel Gonzalez
0cf64700c3 Handle error for missing minor api version
Change the api version regex to forbid empty minor versions,
thereby ensuring that manilaclient raises an UnsupportedVersion
exception as one would expect in this case.

Change-Id: I93268b15ec0b5ee95ea3599bb75bf6fa364e0b91
Closes-Bug: #1590409
2016-06-10 13:51:49 +02:00
Chuck Fouts
8143f7aa1c UnsupportedVersion Thrown for Supported Version
If the maximum client version is higher than the maximum server version,
but the server version is otherwise valid, an UnsupportedVersion
exception is thrown. This bug fixes this issue by downgrading the
requested version, during API version discovery, from the maximum
client version to the maximum server version. The maximum server version
must be supported by the client. If all conditions are properly met the
client will continue to use the maximum server version for the remainder
of the request.

In order to log that the client version is being downgraded to match
the server version, when using the --debug flag, it was necessary to
update the logging configuration. Logging can now be used anywhere in
manilaclient as needed.

Change-Id: I96d273071966d2dc63de40c6f1b777fbb34a50fa
Closes-Bug: 1559290
2016-03-30 17:59:23 +00:00
Rodrigo Barbieri
110c505e11 Added new CLI commands for Share migration
- Notify parameter on Migrate Share (for 1-phase migration)
- Cancel migration (only during copying)
- Reset Task State field
- Get Migration Progress (only during copying)
- Complete Migration (2nd phase migration)

Implements: blueprint data-service-migration-api
Depends-On: I1d65aac2f36942cd70eb214be561d59a15a4ba26
Change-Id: I468c866b563598871692d25acfd98751c76d46f9
2016-03-03 15:53:39 -03:00
Clinton Knight
00e359f953 Support preferred export locations in Manila CLI
This patch displays the preferred flag for share export
locations, adjusts the other values displayed for export
locations to match the updated summary views from the server,
and updates the minimum microversion to match the server.

Change-Id: I40b236b38a97146dfb6aa2b7f20648c5e1ffa81c
Implements: blueprint update-export-location-retrieval-apis
2016-03-02 13:59:05 -05:00
cFouts
e4b4296083 Client Support for Manila Share Replication
Add a new resource class called ShareReplicas
to support the new Manila API calls.

Add commands to create, delete, list, show,
promote, resync, reset-state, reset-replica-state
and force-delete share replicas.

Co-Authored-By: Goutham Pacha Ravi <gouthamr@netapp.com>

Implements: blueprint manilaclient-share-replication

Change-Id: Ibb9802a80ffd78ef5c80782396b14bea11a6282a
2016-02-29 00:57:41 +00:00
Valeriy Ponomaryov
17f9908ce2 Add support of export location metadata feature
Add support of new Manila APIs for listing share and share instance
export locations. CLI looks like following:

$ manila share-export-location-list %share_id%
$ manila share-export-location-show %share_id% %el_uuid%

$ manila share-instance-export-location-list %si_id%
$ manila share-instance-export-location-show %si_id% %el_uuid%

Change-Id: I6ae57cb1fc1551e4d87658a16550f052d14641a0
Depends-On: I36d1aa8d9302e097ffb08d239cf7a81101d2c1cb
2016-02-02 12:45:31 +02:00
devin
ca9e0ab060 Replace deprecated LOG.warn with warning
Change-Id: I3bbc6cedf5e3de02b90f94317f30f5c8705990ce
2016-01-08 09:21:03 +08:00
nidhimittalhada
5f8ac35f99 API 'manage' can set share attr 'is_public'
This fix allows manila-manage command to explicitly
set visibility (key '--public') similar to using API
"create".
Depends-On: I8725719b8c7ff5557fa20ebbb5314f3e770ffcc0

Change-Id: I4e9be0a9c2168ab6c89a0d0e1c281e4a05a05c6b
Closes-Bug: #1436865
2015-12-10 11:12:35 +05:30
Valeriy Ponomaryov
28263b936d Add support of new API URLs after port of extensions to core API
Make manilaclient support API URLs and actions rename after port of
extensions to core API.

Depends-on: I82f00114db985b4b3bf4db0a64191559508ac600

Implements bp ext-to-core

Change-Id: I44f71ca094f230f3c22ade241884a1b23865c81a
2015-11-17 19:37:56 +02:00
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
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
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