42 Commits

Author SHA1 Message Date
Valeriy Ponomaryov
3b8f24ea81 Fix share-server-delete command
and add functional tests for it.
Which can be enabled/disabled using
'run_share_servers_tests' config option.

Change-Id: I07c5b03d576b41a61867a90d828a112c8a3f4f4b
Closes-Bug: #1629317
2016-10-06 15:05:29 +03: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
Valeriy Ponomaryov
44ae492fed Add support of Availability Zones API
Change-Id: Ie7ff8234b5cd4a20d94148c7512b2d5cd621e190
Closes-Bug: #1622540
2016-09-12 14:14:39 +03:00
Jenkins
c67f7d56d4 Merge "Allow deletion of multiple resources for some manila commands" 2016-09-08 13:17:51 +00:00
Faiz Abidi
9af0818cc5 Allow deletion of multiple resources for some manila commands
Commands like
 - security-service-delete
 - share-network-delete
 - share-server-delete
 - snapshot-delete
 - snapshot-force-delete
 - type-delete

do not allow specifying more than one resource for deletion.

Add support to allow deletion of multiple resources, and add
unit tests for that.

Change-Id: I3c484bcc1fb8d5a2c31680889863403f8e58ee74
Closes-bug: #1611506
2016-09-07 23:43:35 -04:00
Jenkins
ca9bd141d8 Merge "type-create should support specifying extra-specs" 2016-09-01 18:06:08 +00:00
nidhimittalhada
efeb9dba99 type-create should support specifying extra-specs
The share-types POST API in Manila accepts a dictionary of extra-specs.
However, the CLI only accepts values for DHSS and snapshot_support.
Fix is to make provision of specifying more extra-specs in type_create.

Change-Id: I4a0fbf572653d331f6351bc07bfdd58bbc5a74b5
Closes-Bug: #1561171
2016-09-01 17:06:18 +05:30
Rodrigo Barbieri
b5b1ebed62 Add share type change to Share Migration CLI
This patch adds '--new_share_type' to 'migration-start' CLI
command, allowing a user to change the share type during migration.

Depends-On: I3200eaaa5b66d9b8ce1cbd16c1658db8516c70fb
Partially implements: blueprint newton-migration-improvements
Change-Id: Ib0a43369bad5a72eef619cb73c417a8dde153b56
2016-08-31 21:11:32 -03: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
33ed63a8fc Merge "Add columns support for share-replica-list" 2016-08-16 20:40:00 +00:00
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
Faiz Abidi
49bffc48a1 Add columns support for share-replica-list
The share-replica-list command does not allow specifying
the required columns to format the output of the command.

Add parameter "--columns" and add a unit test for that.

Change-Id: I5d266572cb6efb1b2771e6b61e57a4aebc12ad89
Closes-bug: #1608664
2016-08-12 11:42:55 -04:00
dineshbhor
093a2e69f6 Replace OpenStack LLC with OpenStack Foundation
TrivialFix
Change-Id: I336952baacf55e36ad0a56ac98b95977fc0d593a
Closes-Bug: #1214176
2016-07-26 12:21:45 +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
Valeriy Ponomaryov
ea5c3e7b28 Fix "single_alias" action for CLI commands
For the moment if default value for CLI option with
"single_alias" action is different than None we cannot redefine it.
Fix it and cover with unit tests.

Also, fix existing aliases and add some where good to have.

Change-Id: Ic61426d9bd894b01f9b035d6d19bb7bd113f96ad
Closes-Bug: #1552771
2016-05-16 13:24:37 +03:00
daiki kato
a0d6189997 Fix typos
This patch fixes several typos.

TrivialFix

Change-Id: Ifc2b151785b69e784819d2742f57c7f406f433ae
2016-03-22 10:20:48 +09:00
Jenkins
eb1fde5058 Merge "Add 'cephx' authentication type" 2016-03-03 21:04:01 +00:00
Jenkins
e4c9f49864 Merge "Added new CLI commands for Share migration" 2016-03-03 20:34:15 +00:00
John Spray
6bad71c9e6 Add 'cephx' authentication type
This duplicates the validation that is
done server side, as is the case for
the existing auth types. This auth type
is supported for cephfs protocol.

Also a unit test that was unnecessarily
testing a helper text was removed.

Co-Authored-By: Ramana Raja <rraja@redhat.com>

Change-Id: If33e6d847d3c1e6a72ce334b645b45538576058d
2016-03-04 01:05:14 +05:30
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
Christian Berendt
32c9bebf24 Use 'example' instead of 'foo' or 'bar' in help outputs
Change-Id: I0ec1b00178d417b0487f5e86d8e569dfd070965e
2016-03-03 15:27:28 +00:00
yogesh
127d0d8f9e Annotate CLI commands for experimental features
Tag CLI commands for experimental features as experimental

Closes-Bug: #1552366
Change-Id: I6c4e3e3a576c86f2fce47570bd3b2cb522e1df5e
2016-03-03 05:50:48 +00:00
Jenkins
1b35a002f9 Merge "CLI for manage/unmanage snapshot" 2016-03-03 05:39:52 +00:00
Xing Yang
7ec5856cc2 CLI for manage/unmanage snapshot
This patch adds CLI commands to manage/unmanage snapshot.

Change-Id: I3a74dcca46396a7161be69d181b1566652ea5b32
Implements: blueprint manage-unmanage-snapshot
2016-03-02 20:50:27 -05:00
Jenkins
b76e51c9ce Merge "Support preferred export locations in Manila CLI" 2016-03-03 00:07:50 +00: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
Jenkins
37f2e50bd4 Merge "To tag all the Admin-only APIs as Admin only" 2016-03-02 04:31:34 +00: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
nidhimittalhada
bb8d54a6f6 To tag all the Admin-only APIs as Admin only
Currently, issuing manila help command, lists all APIs.
Therefore, there is no way to identify which is admin-only
and which is not. Fixed by tagging the admin-only api
as (Admin only) in help text.

Change-Id: I0f676901675b8d57e16c4275c5b579fcfa0ca2ae
Closes-Bug: #1457155
2016-02-24 11:16:20 +05:30
Jenkins
9b42063693 Merge "Updated typos" 2016-02-13 09:35:23 +00:00
Jenkins
f8e4108870 Merge "Set default access_level to rw in help" 2016-02-04 08:02:19 +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
Tom Patzig
b2079d4f6a Set default access_level to rw in help
Changed the help of access-create to reflect the correct
default value for argument access_level, which is 'rw' not None.

Change-Id: I45463a9ef34c8320da15f2c2a9422c0c64d4ac3c
Closes-Bug: #1539632
2016-01-29 15:55:11 +01:00
Swapnil Kulkarni (coolsvap)
fd77a8e01c Updated typos
Found some typos in manuals patch [1] which were auto
generated since they were present in manilaclient.
Submitting a change to update those typos

[1] https://review.openstack.org/#/c/266619/1/doc/cli-ref-rst/source/manila.rst

Change-Id: I7b204137c9f4c6a0c04ae0bc49c10ca6722bb29d
2016-01-21 03:24:59 +00:00
nidhimittalhada
007e1f982b Show selected columns in list commands of manila
Mechanism to show selected columns in all list
commands.All list commands are worked except those
which just return two columns, Property & Value.
Any listing that is just a list of key/value pairs
would seem to not benefit from this change.

Change-Id: I173d588238b2f9f8956143b6228dc1ccf67aa465
Implements: blueprint manila-show-selected-columns-list-command
2015-12-21 17:09:36 +05:30
nidhimittalhada
9868257a78 Fix share size units to match the API
Similar issue has been handled in CinderClient in
bug/1511167.
The API docs list the size units as gibibytes(GiBs).
Client should request/report share size in GiB instead
of gigabyes(GB). Hence made the corrections.

Change-Id: I25465e68a713613646e2350a443660fc4b3850a2
Closes-bug: 1516841
2015-12-11 13:32:09 +05:30
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
nidhimittalhada
5b315ec85a Allows type-create to return dict instead of list
CLI output for command "type-create *" used to return list of one element
But should return info as dictionary as it is for all other resources.
Hence made the changes.

Change-Id: I5da7a97b116873aebc7d8746c216da3c5bfc84da
Closes-Bug: #1446700
2015-12-04 13:17:05 +05:30
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