266 Commits

Author SHA1 Message Date
Dean Troyer
2c5405ed5e Fix volume qos spec list
This has been sporadically failing in functional tests due to the way
the volume qos spec list command calls get_associations() for each spec.
When tests run in parallel occasionally a spec from another test is present
in the list returned and is deleted before the get_associations() call is
made, causing a NotFound exception.  We should just keep going when this
occurs.

* make v1 match v2
* add tests to ensure the exception is being caught and handled

Closes-Bug: #1687083
Change-Id: If2d17c1deb53d293fc2c7f0c527a4e4ef6f69976
2017-04-28 16:06:00 -05:00
Huanxuan Ao
1c49a1f01d Fix NoneType error for volume snapshot create command
In volume snapshot command, <volume> is the same
as <snapshot-name> when --volume is not specified,
but <volume> cannot be None, so when <snapshot-name>
is not specified (<snapshot-name> is None), a NoneType
error appears.
So make <snapshot-name> no longer optional, it should
be always present.

Change-Id: I3d9f10753a8ef601e70816421c160598e2cc811f
Closes-bug: #1659894
2017-04-26 11:07:08 -05:00
Dean Troyer
1686dc54f0 Help/docs cleanups: marker, limit, ip-address metavars
Cleanup help strings and docs for clarity and to keep things consistent:
* --limit metavar should be <num-resource> to indicate what is being counted
* --marker metavar should be <resource> or <resource-id> to indicate the
  type of value being specified
* <*-ip-address> metavars should be just <ip-address> as there is no difference
  in format between fixed and floating IPs
* Move all occurances of '(name or ID)' to end of help text

Change-Id: I2c31746ed6ded3845244e03e57d809f8bc0e6b9d
2017-04-04 03:56:19 +00:00
Dean Troyer
709eac73fb Fix volume transfers request commands
* Fix volume transfer request accept to actually not crash when
  trying to call Volume API.
* Fix volume transfer request accept syntax to have only one
  positional argument, which is the ID of the resource in the command
* Change the output column order in volume transfer request list to
  have ID followed by Name then the remaining columns.

Closes-bug: 1633582
Change-Id: I5cc005f039d171cc70859f60e7fe649b09ead229
2017-03-27 12:31:42 -05:00
Jenkins
69b7b9b059 Merge "Support --no-property in "volume set" command" 2017-03-06 03:47:49 +00:00
Jenkins
3ec0bc9179 Merge "Add Cinder v3 client support for volumes" 2017-03-01 19:10:48 +00:00
zhiyong.dai
40ec7a9c96 Support --no-property in "volume set" command
Add "--no-property" option to "volume set" command in v1 and v2
and update the test cases.

Change-Id: Id5660f23b3b2d9aa72f4c16b19ce83f3f7ed2fa4
2017-02-23 21:49:11 +08:00
Huanxuan Ao
1be6c2d92f Fix properties format for volume qos in volume v1
Notice that patch [1] fixed the error of properties
format for volume qos in volume v2, but there is the
same bug in volume v1, and the patch missed that, so
fix the problem in v1 as well

[1] https://review.openstack.org/#/c/421065/

Partial-Bug: #1656767
Change-Id: I156bf13d164dbd0d0a7ce394964176718c4ff0e5
2017-02-21 19:34:15 +08:00
Justin A Wilson
4d5f2c3925 Add Cinder v3 client support for volumes
Initial Cinder v3 support

Change-Id: Idd5074832e80697ed0671f06d3291dfd92dbfb08
2017-02-20 20:37:36 +00:00
Jenkins
1b4605e4ad Merge "Add "volume host failover" command" 2017-02-18 06:25:10 +00:00
Jenkins
c88975136d Merge "Add "encryption-*" options in volume type commands" 2017-02-18 03:36:06 +00:00
Jenkins
da2a820d2f Merge "Support "--no-property" option in volume snapshot set" 2017-01-26 06:38:31 +00:00
zhiyong.dai
26d50be79a Support "--no-property" option in volume snapshot set
Supporting "--no-property" option will apply user a convenient
way to clean all properties of volume snapshot in a short command,
and this kind of behavior is the recommended way to devref.
The patch adds "--no-property" option in "volume snapshot set" command,
and update related test cases and devref document.

Change-Id: I5f10cc2b5814553699920c4343995b2e11416e4e
Implements: blueprint allow-overwrite-set-options
2017-01-25 17:32:58 -06:00
Jenkins
f14027867f Merge "Add --project and --project-domain option to "volume snapshot list"" 2017-01-25 22:27:39 +00:00
jiahui.qiang
f353253122 Error in the return of command 'volume qos create'
This patch fixed a 'volume qos create' display mistake in argument
of 'specs'[1]. For command such as:

 $ openstack volume qos create hello

 [1]https://bugs.launchpad.net/python-openstackclient/+bug/1656767
Closes-bug:#1656767

Change-Id: Ia9fce833d318d9b52b97c12cfb89e2d3c5465fbe
2017-01-17 15:19:22 +08:00
Huanxuan Ao
b2fd8ba869 Add "encryption-*" options in volume type commands
Add "--encryption-provider", "--encryption-cipher",
"--encryption-key-size" and "--encryption-control-location"
options to "volume type set" and "volume type create" commands.
Add "--encryption-type" option to "volume type unset",
"volume type list" and "volume type show" commands.

Change-Id: I3572635d5913d971a723a62d7790ffe0f20ec39a
Implements: bp cinder-command-support
Closes-Bug: #1651117
2017-01-14 21:58:33 +08:00
Jenkins
3c031bbb68 Merge "Add two consistency group commands" 2017-01-11 23:12:38 +00:00
jiahui.qiang
51ea68ae94 Fix filter error in os volume list
This patch fixed a bug of unable to filter volume list by '--project',
'--user' in "openstack volume list".
Modify uint test for 'volume list' to check parameter of list method.

Change-Id: I1fc4296c4c7eca0f7a803dbfd5e15e3bc0d6403f
2017-01-09 00:03:11 +08:00
jiahui.qiang
27e0be0517 Add --project and --project-domain option to "volume snapshot list"
Add "--project" and "--project-domain" option to volume v2's
"volume snapshot list" command, it will filter list result by different project.

Change-Id: I7dccd6d8d9f1889fa9cb0c2d04a42d77975c645b
2017-01-07 22:21:11 +08:00
zhiyong.dai
be9e60be4b Update the description format
In network_qos_rule_type.py, network_service_provider.py, server.py and
volume_snapshot.py, the description format is using """ """.
In this patch, the former format is replaced with "_description = _( )".

Change-Id: I6863b01d3534e033df745070037ee45286745c92
2017-01-03 21:31:54 +08:00
zhiyong.dai
25c563d0d8 Tivial:update the description format in volume_snapshot.py
Replace the old description format with "_description = _( )"

Change-Id: I36d61621309cfceefbd1ab1b930fa94b4bad2036
2016-12-18 02:43:27 +08:00
Jenkins
cc4ede88e9 Merge "Add --default option to "volume type list"" 2016-12-18 12:20:28 +00:00
Jenkins
3ff713fd57 Merge "Add some options to "volume create" command" 2016-12-16 08:20:03 +00:00
zhiyong.dai
2f2603d908 Add two consistency group commands
Add commands:
    consistency group add volume
    consistency group remove volume
in volume v2 (v2 only)

Change-Id: I70ff287d3b5df78196b8f4b9e50402c471aef284
Implements: bp cinder-command-support
Closes-Bug: #1613964
2016-12-13 15:32:04 +08:00
Huanxuan Ao
7357b24d3a Add "--remote-source" option to "volume snapshot create" command
Add "--remote-source" option to "volume snapshot create" command
to support creating snapshot from an existing remote snapshot in
volume v2 (v2 only), also add the doc, unit tests and release note.

Change-Id: I9e5fad4f0db5b44d528eb6b930edbc816e392c3a
Implements: bp cinder-command-support
Closes-Bug: #1618676
Co-Authored-By: Sheel Rana <ranasheel2000@gmail.com>
2016-12-12 23:06:00 +08:00
Jenkins
d09fd7d832 Merge "Add '--force' option to 'volume snapshot delete' command" 2016-12-08 17:46:30 +00:00
Jenkins
1925a9e5b3 Merge "Add "consistency group set" command" 2016-12-08 17:45:14 +00:00
Jenkins
6bd1135036 Merge "Add options to "volume snapshot list" command" 2016-12-08 17:44:58 +00:00
Jenkins
b22af88a19 Merge "Adjust the code sequence in consistency_group.py" 2016-12-08 17:44:50 +00:00
Jenkins
b18dcfc4cb Merge "Add "consistency-group-snapshot" option to consistency group create" 2016-12-08 17:44:42 +00:00
Huanxuan Ao
bbfd8cb46b Add '--force' option to 'volume snapshot delete' command
Add '--force' option to 'volume snapshot delete' command in
volume v2 (v2 only) to allow delete in state other than error
or available.

Change-Id: Ie8991e9a630d7c7e9ac6c6870aed787bbcebacf2
Closes-Bug: #1597195
2016-12-08 17:08:58 +08:00
Huanxuan Ao
3e9109bc7c Add "consistency-group-snapshot" option to consistency group create
Add "consistency-group-snapshot" option to
"consistency group create" command to support
for creating consistency group from existing
consistency group snapshot

Implements: bp cinder-command-support
Partial-Bug: #1613964
Change-Id: I54c265d38299f4973945ba99e30042bcf47859c0
2016-12-07 12:41:17 +08:00
zhiyong.dai
4dc78e4265 Add "consistency group set" command
Add "consistency group set" command in volume v2 (v2 only).

Change-Id: I53116015388b7a4b0e15813f52c1246166bb0fc1
Implements: bp cinder-command-support
Partial-Bug: #1613964
2016-12-06 17:36:25 +08:00
jiahui.qiang
d083ddb12f Add --default option to "volume type list"
Add "--default" option to volume v2's "type list"
command, it will show which volume type the volume
service has set as default.

Implements: bp cinder-command-support
Change-Id: Iae7ebc633ebe5554cc88390a84361887ec211fb2
2016-12-06 06:44:16 +08:00
jiahui.qiang
7e5a98bca9 Add some options to "volume create" command
Add "--bootable", "--non-bootable", "--read-only" and "--read-write" options
to "volume create" command for setting some attributes at the time of crration.

Change-Id: I71b4e9fccb4ee0ab1a90e7179d6d2d34dbbae909
Implements: bp cinder-command-support
2016-12-06 00:17:36 +08:00
zhiyong.dai
99ba4f86b0 Adjust the code sequence in consistency_group.py
Place "CreateConsistencyGroup" above "DeleteConsistencyGroup"

Change-Id: I554a8e445fee0760450b2da3b5c4a4f3b2434d60
2016-12-04 18:21:06 +08:00
Jenkins
e05c8d7bb0 Merge "Refactor "snapshot" commands" 2016-12-03 04:30:51 +00:00
daizhiyong
1907220113 Add "consistency group show" command
Add "consistency group show" command in volume v2 (v2 only).

Change-Id: If496eba2955c0aacd52600bb6fba39690ddd90cb
Implements: bp cinder-command-support
Partial-Bug: #1613964
2016-12-02 20:45:13 +00:00
zhiyong.dai
094e5189b7 Add "consistency group delete" command
Add "consistency group delete" command in volume v2 (v2 only).

Change-Id: Ieebc2417df0d45a578d5617bad245d7863f09190
Implements: bp cinder-command-support
Partial-Bug: #1613964
2016-12-02 13:21:18 -06:00
Jenkins
d1f1f092c4 Merge "Add "--type" and "--retype-policy" options to "volume set" command" 2016-12-02 18:49:37 +00:00
Jenkins
2daeb30296 Merge "Add "Is Public" column in volume type list" 2016-12-02 18:32:49 +00:00
Jenkins
5ec4290e27 Merge "Add commands for "consistency group snapshot"" 2016-12-02 18:29:01 +00:00
Jenkins
1c2b0c6b73 Merge "Add "consistency group create" command" 2016-12-02 18:28:22 +00:00
zhiyong.dai
fca81526ff Trivial:modify one parameter
This patch modifies a wrong parameter to make the metavar
consistent with the optional argument.
Change-Id: I27ed30fdbc3adbc19d2f5662d6952cfe15dc52b1
2016-11-28 20:27:03 +08:00
jiahui.qiang
6ca4dc3533 Add options to "volume snapshot list" command
Add "--name", "--status" and "--volume" options
to "volume snapshot list" command for filtering results.

Change-Id: I72db1abce7701f31598deec34801a4d1f5713870
Closes-Bug:#1645252
2016-11-26 23:13:50 +08:00
jiahui.qiang
71e6d44476 Add "volume host set" command
Add "volume host set" command in volume v2 to support freeze(disable)
and thaw(enable) the specified cinder-volume host

Change-Id: Iee1604d72f9eccd9e327b0ef8d345909a733a647
Implements: bp cinder-command-support
2016-11-25 05:21:00 +08:00
Huanxuan Ao
4b14f3d0cb Add "--type" and "--retype-policy" options to "volume set" command
Add "--type" and "--retype-policy" options to
"volume set" command in volume v2 (v2 only) to
support changing the volume type for a volume

Change-Id: I0153abdb967aee790586a57cef31930e32005c1b
Implements: bp cinder-command-support
2016-11-23 10:34:31 +08:00
Huanxuan Ao
5e070c36a1 Add "Is Public" column in volume type list
I think admin users will like to see the "Is Public" column
in volume type list since they can know the volume type
is public or private, so add "Is Public" column in volume
type list

Change-Id: I3f6e297a7adf82a275debbd87d2c4da415aa1360
Closes-Bug: #1643861
2016-11-22 14:58:55 +00:00
zhiyong.dai
55195cec46 Add "volume host failover" command
Add "volume host failover" command in volume v2 (v2 only).

Change-Id: Ia39e6d20bf5c9d3096e46f3432804a240827548d
Implements: bp cinder-command-support
2016-11-21 22:56:41 +08:00
Huanxuan Ao
3907137f58 Add commands for "consistency group snapshot"
Add commands:
    consistency group snapshot create
    consistency group snapshot delete
    consistency group snapshot list
    consistency group snapshot show
in volume v2 (v2 only)

Change-Id: Ib4115f8ff00fb5aa8194588223032657eb1346b5
Closes-Bug: #1642238
Implements: bp cinder-command-support
2016-11-19 09:20:15 +08:00