700 Commits

Author SHA1 Message Date
obutenko
5b76ebbada Add functional tests: backup creation and deletion
This patch adds functional tests for cinder volume
backup creation and deletion for python-cinderclient.

Change-Id: I5aaa84c014d1147e9415392d52241ca4819589f6
2015-11-23 17:13:22 +00:00
Eric Harney
6fe9f20663 Use oslo_utils encodeutils and strutils
With oslo-incubator being deprecated, move
our use of strutils to oslo_utils.

This leaves in place the use of oslo-incubator's
strutils by other oslo-incubator modules for now.

Change-Id: Ic4e50060b42aeca9d1e54424a8a3a123140fbf2a
2015-11-23 10:44:12 -05:00
Xing Yang
8fbbf7be94 CLI for backup snapshots
This adds CLI support for backup snapshots.

Server side change is here:
https://review.openstack.org/#/c/243406/

Depends-on: Ib4ab9ca9dc72b30151154f3f96037f9ce3c9c540
Change-Id: I5b58d872c9b4842fae5f2e7a4ddfc6662a6c8d7a
Implements: blueprint backup-snapshots
2015-11-20 13:47:46 -05:00
Jenkins
e2a64f361d Merge "Adding backup-reset-state to CLI" 2015-11-18 22:58:06 +00:00
Jenkins
5f436b6a6d Merge "Update help message for cinder migrate" 2015-11-15 03:50:38 +00:00
Jenkins
2ca2b96723 Merge "Implement cinder type-show" 2015-11-11 19:37:39 +00:00
Nate Potter
1a3dbfaabb Update help message for cinder migrate
As per the doc bug https://bugs.launchpad.net/openstack-manuals/+bug/1363830
documentation for the cinder CLI should be updated to reflect that the host
needs to be given in the form host@backend#pool, and the docs for the
cli-reference are auto-generated from the client.

Change-Id: I66d41e05436782c3acd24f9633c4b67ca5c56b15
2015-11-06 21:56:10 +00:00
Kurt Martin
cb08ce33eb Fix volume size units to match the API
Both Horizon and the cinder client documents the size paramater in
gigabyes(GBs) but the API docs(both v1 and v2) list the size units as
gibibytes(GiBs). The correct unit should be gibibytes(GiBs). This
should help in clearing up any confusion on what units are used in
Cinder.

Closes-bug: 1511167
Change-Id: I42e15c18d1f084d435a2be9b343fb2f6c3cf377f
2015-11-03 15:24:29 -08:00
Yuriy Nesenenko
349eb96052 Add the version attribute to the Client class
There is a way to get the version of the API being used. We need such
feature to work correct with different versions of the Cinder API
from third-party tools.

Change-Id: Ifde689df08644f9452138a9cd22052bc57fcb5d5
2015-10-28 09:50:02 +00:00
Jenkins
9ad10ab8a3 Merge "Remove unused code from cinderclient.utils module" 2015-10-21 16:00:58 +00:00
Nate Potter
8690e41c22 Adding backup-reset-state to CLI
This patch adds the ability to reset the state of
a backup with the command backup-reset-state.

DocImpact

Change-Id: I5851bb21c62252f61ad6a09f01859582e774a9db
Closes-Bug: #1279764
2015-10-20 19:17:55 +00:00
Nate Potter
428d2ebb7f Implement cinder type-show
This patch adds the type-show command to the
cinder CLI for viewing information on volume
types.

Change-Id: I7b283b120727f2fbd186e6f07a6450795bdf03c3
Closes-Bug: #1505806
2015-10-16 19:58:06 +00:00
Jenkins
92f3d35d5b Merge "Adding pagination to snapshots and backups lists" 2015-10-10 13:09:54 +00:00
Jenkins
2f4a9b793d Merge "Fix three resources not being deleted by using name" 2015-10-08 21:28:28 +00:00
Jenkins
497264e8e9 Merge "Add commands to show image metadata" 2015-10-08 15:04:09 +00:00
Jenkins
8c056ce44f Merge "Remove duplicate code in functional tests" 2015-10-08 13:16:00 +00:00
Yuriy Nesenenko
a17aa53f68 Remove duplicate code in functional tests
This patch allows to use a standard approach to volumes, snapshots
and backups to avoid duplicating code.

Change-Id: I0059fcb3bb8823105a7f960a30e70036bcbded8b
2015-10-07 20:12:11 +03:00
Sergey Gotliv
e707c7aa9f Adding pagination to snapshots and backups lists
Snapshot and backups pagination was recently implemented in the Cinder
backend. This patch is implementing a pagination for the snapshots and
backups on the client side in the same way that volume pagination works
using limit, marker and sort parameters.

Partial-Implements: blueprint extend-limit-implementations
Change-Id: Ie3660854407a947f7470b4dc0911704c0a31c1b4
2015-10-05 10:38:37 +03:00
Jenkins
3ccd5b878a Merge "No longer ignores CINDER_SERVICE_NAME" 2015-10-03 04:21:23 +00:00
Jenkins
9ae9ac0c5f Merge "Updating volume type 'is_public' status support" 2015-10-01 02:13:29 +00:00
Dave Chen
64bf39e93f Add commands to show image metadata
- cinder image-metadata-show volume_id
This command can be used to show the image metadata associated
with the specific volume.

Partially implements: bp support-modify-volume-image-metadata

Change-Id: I960af66038b47c1206619b99a2bb5ae561a59c4f
2015-09-30 13:57:37 +08:00
Tom Hancock
a3610f045d Fully support os-endpoint-type
Fix Change-Id: I98a8507f2369deff6a6f7f8f08271b169fe651ad for bug #1454436
doesnt allow OS_ENDPOINT_TYPE environment variable to be used as a default
for --os-endpoint-type as argparse takes the first definition of the
default expression for dest=os_endpoint_type

Closes-bug: 1500489
Change-Id: I76cc963b10bc7a549fe5a0cd2c73dfc6a30bb759
2015-09-28 16:36:09 +01:00
chenying
62aa713a1b Fix three resources not being deleted by using name
There are three resources: VolumeBackup, Snapshot, VolumeTransfer.
None of them can be deleted by using their names on V2.

For example, Snapshot client side filtering fails in the function
findall. The reason is that snapshot object
<class 'cinderclient.v2.volume_snapshots.Snapshot'> does not have
a attribute 'display_name'.

The response of /v2/{tenant_id}/backups/detail does not have
a parameter 'display_name', but have a parameter 'name'.
So class Snapshot does not need to define NAME_ATTR = 'display_name'.
The superclass of Snapshot 'Resource' has defined NAME_ATTR = 'name'.

Closes-Bug: #1497873
Closes-Bug: #1495428
Change-Id: I3c89fd9a82918e8a02385cfccb32dc9c3f4c4095
2015-09-28 02:36:04 +00:00
Ankit Agrawal
029b51d378 Use dictionary literal for dictionary creation
Dictionary creation could be rewritten as a dictionary literal.
for example:

body = {}
body['provider'] = args.provider

could be rewritten as

body = {'provider': args.provider}

TrivialFix

Change-Id: Ieae7b33332eca31754cbfe91288ef3001c573eb3
2015-09-24 00:06:30 -07:00
liyingjun
806fa65d84 Updating volume type 'is_public' status support
Cinder supports updating volume type 'is_public' status, it should
be added in cinderclient also. New option 'is_public' will be introduced
for 'cinder type-update'.

DocImpact
Change-Id: Ibfa9ba16c0775e401f6eda0729fcf34a99a14697
Closes-bug: #1493612
2015-09-16 08:53:01 +08:00
Jenkins
9ac2975363 Merge "Add a period for the description string of a argument" 2015-09-15 03:07:11 +00:00
Derrick J. Wippler
e8274fa57d No longer ignores CINDER_SERVICE_NAME
Cinderclient now utilizes the CINDER_SERVICE_NAME when deciding what
endpoint to choose.

Closes-Bug: #1486256
Change-Id: I494a34afe5799e7832b1359b9c24c31ead68b6d1
UpgradeImpact: Existing configurations may select a different endpoint
after this patch.
2015-09-14 08:49:14 -05:00
Jenkins
19ba5e8cf9 Merge "Fix incorrect exception message in cinderclient" 2015-09-13 07:59:33 +00:00
Jenkins
c167dda40c Merge "Implement reset-state for attach_status and migration_status" 2015-09-09 21:48:59 +00:00
Yusuke Hayashi
32f7dde401 Fix incorrect exception message in cinderclient
Incorrect exception message was output
from get_volume_api_from_url(url) in cinderclient.client.

Here is example:

<Invalid input>
"http://fakeurl/v9/tenants"

<Exception message>
cinderclient.exceptions.UnsupportedVersion:
Invalid client version 'v2'. must be one of: v1, v2

=> Although input does not include 'v2',
   exception message reports that invalid version v2 is included.

Change-Id: I73ff1581b1ce609b3c64a8a6d88d41a2cc2ed56f
Closes-Bug: #1482988
2015-09-09 10:52:16 -07:00
Ivan Kolodyazhny
df2883e040 Remove unused code from cinderclient.utils module
_format_servers_list_networks method is not used anywhere.
It's safe to delete it.

We'ge got the same cinderclient.openstack.common.apiclient.HookableMixin
class so we don't need to duplicate it in the utils

Change-Id: Ifa7f5c1d00c1673811af48575460e6563d2d3180
2015-09-08 18:12:32 +03:00
chenying
dba302e1dd Add a period for the description string of a argument
This change add a period for the description string of
a argument that gets dropped.

Closes-Bug: #1489317
Change-Id: Ica1a74625a640f8d664f5ca183ada14ef63be077
2015-09-06 02:28:07 +00:00
Matt Riedemann
1c82825c41 Update path to subunit2html in post_test_hook
Per:

http://lists.openstack.org/pipermail/openstack-dev/2015-August/072982.html

The location of subunit2html changed on the images in the gate
so update the path used in the post_test_hook.

Long-term we should just use what's in devstack-gate.

Change-Id: I5e50e7d7ad845aba26403df1df412c0a139a6dc7
Closes-Bug: #1491646
2015-09-02 17:18:28 -07:00
Jenkins
8e162a0764 Merge "Volume status management for volume migration" 2015-09-02 09:27:45 +00:00
Mitsuhiro Tanino
471aea8e9f Adds command to fetch specified backend capabilities
This change adds a new admin-api to allow admin to fetch
specified backend capabilities which includes volume stats and
vendor unique properties.
With this command, admin can obtain what the current deployed
backend in Cinder is able to do from the endpoint.

DocImpact
Implements: blueprint get-volume-type-extra-specs

Change-Id: I355a5b57994d1407a088c86530d7ef362ecd31ed
2015-09-02 00:53:40 +00:00
Vincent Hou
2d979dc19d Volume status management for volume migration
This patch proposes the following changes
to the 'available' volume:
* Add the --lock-volume flag to cinder migrate
The default value is False, which means the migration is aborted
if the owner of the volume issues commands like attach
or detach during the volume migration. The volume will be in
'available' during migration.
If it is set to True, the migration of this volume will not be
aborted by other commands. The volume will be in 'maintenance'
during migration.

* List migration status for all the volumes
The attribute migration_status will be listed, if the request
is issued by an admin. Otherwise, the migration_status will not
be listed. The option migration_status is added for the admin
to filter the volumes returned via 'cinder list' command.

DocImpact
APIImpact

Partial-implements: blueprint migration-improvement
Change-Id: I5a1a717d1d08f550b45836d958a51f1f3fba5ced
Depends-On: Ia86421f2d6fce61dcfeb073f8e7b9c9dde517373
2015-09-01 22:35:28 +08:00
Jenkins
5dbac012e2 Merge "CLI: Non-disruptive backup" 2015-08-29 01:05:06 +00:00
Jenkins
d2c0b70b79 Merge "Fix help message for reset-state commands" 2015-08-28 15:00:38 +00:00
Derrick J. Wippler
50758ba475 Fixed test_password_prompted
test_password_prompted no longer makes DNS lookups on the network.

Change-Id: If310f52e829b09b01c76d02deae4aec74f00870d
Closes-Bug: 1486647
2015-08-27 09:39:58 -05:00
Rajesh Tailor
dc6e82328f Fix help message for reset-state commands
Fixed help messages for reset-state and snapshot-reset-state
commands for v1 as well as v2 api.

Change-Id: I06ca6e33f4e4b486ed29f258325550b89f6dc930
Closes-Bug: 1489285
2015-08-26 23:04:16 -07:00
Jenkins
1d71a6d138 Merge "Add functional tests for python-cinderclient" 2015-08-26 16:00:31 +00:00
Yuriy Nesenenko
f805f5ac19 Add functional tests for python-cinderclient
Add functional tests for cinder volume snapshot creation and deletion.

Change-Id: I60f3a880102461f107a7f2d06c0b97f0bbe0c2e4
Partial-Implements: blueprint cinderclient-functional-tests
2015-08-25 15:15:20 +03:00
Jenkins
8b4a5bf6f4 Merge "Show backup and volume info in backup_restore" 2015-08-24 12:13:40 +00:00
Jenkins
6a79c35a6a Merge "Set default OS_VOLUME_API_VERSION to '2'" 2015-08-23 15:34:47 +00:00
Jenkins
5909943cdc Merge "CLI: Clone CG" 2015-08-20 00:32:59 +00:00
Jenkins
b573e90d67 Merge "Add support '--all-tenants' for cinder backup-list" 2015-08-19 17:34:26 +00:00
Jenkins
c086c828a8 Merge "Add tests for python-cinderclient" 2015-08-19 15:18:05 +00:00
Yuriy Nesenenko
8cc3ee2782 Add support '--all-tenants' for cinder backup-list
Also added support '--name', '--status', '--volume-id' arguments
for cinder backup-list.

DocImpact
Closes-Bug: #1422046
Depends On: I73f6377c7d6fd92d0464d13f9c8dd6682fef78e3
Change-Id: I5f2ab6370a8333a9ee498c6158037b0433f36a23
2015-08-19 18:05:34 +03:00
Jenkins
ac68490260 Merge "Fixes table when there are multiline in result data" 2015-08-16 06:40:50 +00:00
Jenkins
af1f153b65 Merge "Replace assertEqual(None, *) with assertIsNone in tests" 2015-08-16 06:23:40 +00:00