939 Commits

Author SHA1 Message Date
Mitsuhiro Tanino
c38b35cb61 Add optional argument to list subcommand
Cinder list command was intended to show summary of
volumes, but currently the command shows many entries
than we expected.

This patch adds these two fixes to show volume list
more simply.

- Remove 'migration status' and 'multiattach' from
  default list view.

- Add '--field' optional argument to 'list' subcommand.
  This argument allows users to show only specified
  entries. Unavailable fields will be ignored from
  the list result.

DocImpact
Change-Id: Iad4bf76e87f84b6e57ec59d134b9413fcad16ce8
Closes-Bug: #1502639
2015-12-04 11:43:06 -05:00
shu-mutou
98b4a3d32f Remove py26 support
as of mitaka, the infra team won't have the resources available to
reasonably test py26, also the oslo team is dropping py26 support
from their libraries. sine we rely on oslo for a lot of our work,
and depend on infra for our CI, we should drop py26 support too.

Change-Id: Icf1b13b044de03705688df929ed74429879c6dd8
Closes-Bug: 1519510
2015-12-02 16:45:02 +09:00
shu-mutou
b9bd8c6a03 Delete python bytecode before every test run
Because python creates pyc files during tox runs, certain
changes in the tree, like deletes of files, or switching
branches, can create spurious errors.

Change-Id: Ib5cbd375b208dbea1f18ada00b44ba76dcdda9c5
Closes-Bug: #1368661
2015-12-02 12:57:24 +09:00
wanghao
948e90010f support for snapshot management
Add support to manage/unmanage snapshot

cinder snapshot-manage volume identifier
option args is --id-type, --name, --description,
--metadata.

cinder snapshot-unmanage snapshot

DocImpact

Implements: blueprint support-for-snapshot-management
Change-Id: Id4d73fa0ff0c0c05c0c69924968aa2154da64118
2015-12-02 10:07:11 +08:00
Atsushi SAKAI
a2ccc85a73 Fix comma location in comment
comment message effects to CLI-reference message.

Change-Id: I6d76d6bc6077b4915aaa74968e294abbc3f72f30
2015-12-02 10:15:56 +09:00
Jenkins
7f9a81bb1b Merge "Adds v2 replication support" 2015-11-30 20:33:11 +00:00
Jenkins
37ea6acad7 Merge "Use oslo_utils encodeutils and strutils" 2015-11-27 22:58:42 +00:00
abhishekkekane
5626d8af58 Remove ureachable code in fakes.py
TrivialFix
Closes-Bug: #1520078

Change-Id: Ie406dc5f6a66db48e85ba9d0327fcf7ea73bc1f3
2015-11-25 22:38:46 -08:00
OpenStack Proposal Bot
1429d10537 Updated from global requirements
Change-Id: I3134ab048335d9b3d95801a62c0b5cef9307dc8e
2015-11-25 22:28:07 +00:00
Alex O'Rourke
b8e118f5c2 Adds v2 replication support
v2 replication has been merged in cinder, but there is no way to call
the api methods. This patch allows the following methods to be called
in order to fully support v2 replication:
  - os-enable_replication
  - os-disable_replication
  - os-list_replication_targets
  - os-failover_replication

Change-Id: Ic3cf082916bdf089de05eebce456dff8cdc11f7c
Implements: blueprint replication-v2
2015-11-24 13:13:23 -08:00
Ryan McNair
294acfd5c4 Fix v2 qos-key command
As part of commit 0d2bf657ae5271a01e9ec84d379d17910b263b7e,
qos-key command's v2 support got broken again reintroducing
bug #1284321.

Change-Id: I30d60b060bd1b161bc96c4a529f4732b9ceef90d
Closes-Bug: 1284321
2015-11-24 17:01:54 +00:00
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
2be44d51e9 Merge "Update CONTRIBUTING.md to CONTRIBUTING.rst" 2015-11-16 15:08:25 +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
zhu.rong
d50c8345b8 Update CONTRIBUTING.md to CONTRIBUTING.rst
Almost all of the openstack project use CONTRIBUTING.rst,
We should consistent with the most of the project.

Change-Id: Ieefbf50ed9ed1ab83f0f6158ce8e7ccb9825bc62
2015-11-10 15:09:36 +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
6e860e6e18 Fix functional tests fail on the env with https
The OS_CACERT environment variable should be passed to the test
environments to specify a CA bundle file to use in verifying a
TLS (https) server certificate.

Change-Id: Iee50946b34b7e285ebb7924cd5ac6cd83b355e48
Closes-Bug: #1511023
2015-10-29 11:39:45 +02: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
Jenkins
b989a2e68a Merge "Update release notes for 1.3.1 and 1.4.0 releases" 2015-10-21 16:00:47 +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
malei
450f0eea96 Put py34 first in the env order of tox
To solve the problem of "db type could
not be determined" on py34 we have to run first the py34 env to, then, run
py27. This patch puts py34 first on the tox.ini list of envs to avoid this
problem to happen.

"Closes-Bug: #1533919"
Change-Id: Ib247b4000d9c1d906ef55fa2b5cc990cf1120850
2015-10-19 23:53:29 +08: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
OpenStack Proposal Bot
947d8d6a96 Updated from global requirements
Change-Id: I1ea3b05cd7e0a9ef4318b177772f96d860764f00
2015-10-16 00:45:45 +00:00
Jenkins
cfecd8ebe0 Merge "Add note for broken cinderclient versions 1.2.?" 2015-10-14 01:57:43 +00:00
Jenkins
92f3d35d5b Merge "Adding pagination to snapshots and backups lists" 2015-10-10 13:09:54 +00:00
Sean McGinnis
9dc05b3cb6 Update release notes for 1.3.1 and 1.4.0 releases
We've had a couple releases of the client but missed updating
the docs with any release note information. Added summary of
changes for each release.

Change-Id: I47edb5199182ca0c952cf60e6b923e6d2edd80ff
Closes-Bug: #1503705
2015-10-09 19:53:44 -05: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
scottda
a8930cee75 Add note for broken cinderclient versions 1.2.?
Version discovery was found to break deployments using proxies, so it was
reverted. This was introduced in python-cinderclient 1.2.0, persisted in
1.2.1 and 1.2.2, and reverted in 1.3.0 . The 1.2.? versions make note of this
in the release notes, and docs generated from release notes will now warn the
user of this.

Change-Id: Ia866dbf5f5d1c8afd7ff62b31758229f7b09bc99
Closes-Bug: #1503691
2015-10-07 13:48:33 +00:00
Jenkins
e4c580f628 Merge "Change ignore-errors to ignore_errors" 2015-10-05 22:15:45 +00: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
OpenStack Proposal Bot
d615cc8b47 Updated from global requirements
Change-Id: I239373fa9d141fd33648720eddf87a2e84b327b3
2015-10-04 22:44:41 +00: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
Jenkins
51d4ad09bf Merge "Fully support os-endpoint-type" 2015-09-30 08:09:50 +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
Jenkins
6d440d2e94 Merge "Updated from global requirements" 2015-09-29 02:56:51 +00: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
Monty Taylor
f7ba7fb5ea Change ignore-errors to ignore_errors
Needed for coverage 4.0

Change-Id: I5dc460cf919c7c4f47cc2b63517d005b44127c58
2015-09-21 14:44:20 +00:00
OpenStack Proposal Bot
4e03d4bfe1 Updated from global requirements
Change-Id: Ibbdd38541a7ef45367c7458cb9b588d179a4f180
2015-09-18 16:42:02 +00:00