109 Commits

Author SHA1 Message Date
Tang Chen
f552302b61 Trivial: Remove useless return from files in image and volume
Change-Id: I3526ecd202d0908d91305a066ad72d03cee794b5
2015-12-18 23:25:05 +08:00
Jenkins
74283637ce Merge "Fix exception when doing volume set operation" 2015-12-03 16:15:56 +00:00
Xi Yang
197d86dffa Fix exception when doing volume set operation
The v2 SetVolume extends from show.ShowOne and returns None
after setting volume operation. It will raise an exception.
This patch is going to fix the issue by changing the parent
class of SetVolume to command.Command.

Change-Id: Iefa453fe4adad06f2a0601a052c01e74004be5b7
Closes-bug: 1521896
2015-12-03 15:25:12 +08:00
Jean-Philippe Evrard
9168373b3d Consistency of the --all argument for snapshots
This change is inspired by the volume.py.
It allow the user to use openstack snapshot list --all.

Closes-Bug: #1517386

Change-Id: I72a53fcd0c5c5af539cd88b37e71b4331fa67473
2015-11-30 12:54:19 +00:00
Jenkins
12cc6347e5 Merge "Use is_public to set access of volume type" 2015-11-30 10:39:16 +00:00
xiexs
c27f9e3c6c Fix a bug of "openstack volume delete"
While multi volumes specified for the osc "openstack volume delete",
only the last volume is deleted.
This patch tries to fix it.

Change-Id: I171b2869f85b29c88fda16eaf5bf163c55795df0
Closes-Bug: #1520541
2015-11-27 11:17:22 +00:00
Xi Yang
d1a58653ab Use is_public to set access of volume type
Currently the 'public' and 'private' keys does not work
when creating volume type, 'is_public' should be used.

Change-Id: If34a66053ea6c192882a1b9d8bbb1d3666be3f83
Closes-bug: 1520115
2015-11-26 16:30:05 +08:00
Tang Chen
ed82312bcb Trivial: Fix wrong param name in comment.
"volume" should be "attachments".

Change-Id: Id1e9a733e18db595d8981b5b3a7735313a346787
2015-11-13 11:44:14 +08:00
Tang Chen
c396b69d37 Trivial: Fix wrong param name in comment.
"volume" should be "attachments".

Change-Id: I41c797f0c7cccb2727e9e6cd6424ea2f740624b7
2015-11-12 17:02:24 +08:00
xiexs
176735f4aa Change method to get the user_id
Instead of "find_project", using "find_user" to get the user_id
while the option --user is specified for "openstack volume list"

Change-Id: Iea8472b7b8e709a8792a56575e00003a9cbdaa39
Closes-Bug: #1514145
2015-11-08 03:57:23 +00:00
Dean Troyer
195a0edeb7 Follow-on for volume list - add tests, clean help
* Add volume list tests for v1 (a copy of the v2 tests)
* Converts volume v2 tests to use Identity v3 so domains can be tested
* Add volume list (v2) tests for new options
* Re-orders volume list options (both v1 and v2) to match
* MArks the new volume list (v2) options as v2-only in doc

Change-Id: I2181b2c48cfde2147d7d0ef135322df8a81e7ce8
2015-10-16 16:08:27 -05:00
kafka
9f51ccdf8c Add filtering by project/user for 'openstack volume list'
added project, user and domain options for filtering results,
also cleaned up the order to match the docs.

Co-Authored-By: Steve Martinelli <stevemar@ca.ibm.com>

Closed-bug: #1483976
Change-Id: I9d955094d31d4a28e215d24f7521a11c62bee8db
2015-10-15 15:51:01 -04:00
Atsushi SAKAI
a2786fa88b Add one parenthesis
In the following help message, last parenthesis is missing.

 $ openstack --os-volume-api-version 2 help volume delete
usage: openstack volume delete [-h] [--force] <volume> [<volume> ...]

Delete volume(s)

positional arguments:
  <volume>    Volume(s) to delete (name or ID)

optional arguments:
  -h, --help  show this help message and exit
  --force     Attempt forced removal of volume(s), regardless of state
              (defaults to False

Change-Id: I45c4030abf076cba14450019c379d333eb6530d6
2015-10-02 11:56:22 +09:00
Jenkins
0daa096939 Merge "Use a common decorator to log 'take_action' activation" 2015-09-11 02:43:54 +00:00
Joshua Harlow
e3c46ece4a Use a common decorator to log 'take_action' activation
Instead of duplicating the same log statement throughout
the code, the same logic can be provided by a shared decorator
that abstracts away the logging capability and unifies it behind
a common function instead.

Change-Id: Icc63bced7347c8bbf0299a4c5821425a10892a79
2015-09-01 16:49:54 -07:00
TerryHowe
14a714f2a2 Volume v2 list does not show server name
The volume v2 list was using the volume id rather than
the server id.

Change-Id: Ibe03d34b5b503af2d00202dabd640f796449cf9a
Closes-Bug: #1489954
2015-08-28 11:11:37 -06:00
Steve Martinelli
f14251669f default OS_VOLUME_API_VERSION to v2
Cinder is trying to deprecate/remove support for v1, so we should,
as a client library default to v2 and keep support for v1.

Related-Bug: 1467589

Change-Id: I732448a57fc3fd06a8d82ec0f0d2ace671036ca2
2015-08-24 10:38:43 -05:00
Jenkins
35833c94ef Merge "Add set feature to volume type v2" 2015-08-07 05:00:18 +00:00
heha
429ceef0c6 Add set feature to volume type v2
"volume type set" and "volume type unset" is not in the v2.

Co-Authored-By: Lin Hua Cheng <os.lcheng@gmail.com>

implements bp: volume-v2

Change-Id: Ia804787d76d2029726c030b43c61eac3b411f66a
2015-08-06 19:35:01 -07:00
heha
dc6fe04895 Add list feature to volume v2
"volume list" is not in the v2.

Co-Authored-By: Lin Hua Cheng <os.lcheng@gmail.com>

implements bp: volume-v2

Change-Id: I9f4585202f5f9ec5f4c091278fc6c4036efb1290
2015-08-06 17:02:46 -07:00
Jenkins
cc6c4e5c39 Merge "Add support for volume v2 commands" 2015-07-25 03:25:57 +00:00
Amey Bhide
96afb8b1b7 Add support for volume v2 commands
Adds the following commands:
openstack volume create
openstack volume set
openstack volume unset

Implements: blueprint volume-v2
Change-Id: Icb7404815763aa88550112fb42f5200ce05c2486
2015-07-24 13:16:38 -07:00
Jenkins
55d9eba093 Merge "Do not set default versions in parsed args" 2015-07-24 19:51:30 +00:00
Jenkins
26ea98b30e Merge "Add create and list for volume type v2" 2015-07-20 22:28:10 +00:00
Jenkins
7442c018d2 Merge "Format volume type properties when showing" 2015-07-20 21:03:29 +00:00
chengkunye
659abf4928 Add create and list for volume type v2
Volume API v2 is missing create and list features.

implements bp: volume-v2

Change-Id: I34a1ae440e9620b1c65546f4f43b369c8661250d
2015-07-20 12:59:57 -07:00
Steve Martinelli
a6d5f3f94c Format volume type properties when showing
Currently, the properties of a volume type are unformatted.
Use the formatter to keep things consistent with the way
properties are represented in OSC.

Change-Id: I81c6bd3fdbc30568c269e501c740473b2a1ffb4e
2015-07-19 17:36:34 -07:00
Steve Martinelli
11c9695e5e Rename type.py to volume_type.py
For Volume V1, we have a type.py file which should be renamed to
volume_type.py (as it's named for V2).

Change-Id: If860bbafe4a801d8b4fa06938eef20658c4fcc2c
Closes-Bug: 1475958
2015-07-19 17:02:43 -07:00
Jenkins
6dc136f2d7 Merge "Add volume type show for volume v1" 2015-07-19 21:26:12 +00:00
jiaxi
e30ebfeb17 Add volume type show for volume v1
volume type show is missing for volume V1 API.

Closes-Bug: #1475879
Change-Id: Ic8a0845ecec04146d536412463175f57ef6511ae
2015-07-19 16:17:40 +00:00
jiaxi
9c95b37832 --property should be required in os unset commands
The three commands below
  openstack volume unset
  openstack snapshot unset
  openstack volume type unset

Should have --property as a required argument,
not optional. The reason is the command will not work
without --property.

Closes-Bug: #1475872
Change-Id: Ib9e29392472db38982cc2817af2dd5055f5a01ca
2015-07-19 15:46:14 +00:00
TerryHowe
b3335b3474 Do not set default versions in parsed args
Setting default versions in parsed args makes it so OCC
cannot tell if the argument was parsed, an environment
variable was set or it is just defaulted.  In order to
set api versions from OCC, it will have to be defaulted
after processing OCC.

Closes-Bug: #1453229
Change-Id: I4d065919397b783f3bdd4022c986c0234a7a16e6
2015-07-18 06:28:09 -06:00
TerryHowe
abfb011527 Support multiple volume qos delete
Also make sure that we are using the singular qos_spec when
we should and the plural qos_specs otherwise.

Change-Id: If4bbeb6fc245d7d80dc3d7dccfe9f949e802653c
2015-07-17 14:14:56 +00:00
TerryHowe
36391a81a3 Rename endpoint type to interface
Change-Id: I4e21d09bc747e8210f4f79a1d6c4c7ccf2f25d1c
Closes-Bug: #1454392
2015-07-15 10:11:59 -06:00
Jenkins
ee64c2fa6b Merge "Add --os-endpoint-type cli optional argument" 2015-07-03 02:48:47 +00:00
Roxana Gherle
5521e4c504 Add --os-endpoint-type cli optional argument
User should be able to specify the endpoint type through
a CLI optional argument/ENV variable setting. We will name this new
optional argument: --os-endpoint-type (Env: OS_ENDPOINT_TYPE) and
based on the value given, the service API will use that specific
endpoint type. Possible values: public, admin, internal.

DocImpact
Closes-Bug: #1454392
Change-Id: Ife3d4e46b44c0ddcd712b1130e27e362545a9a29
2015-07-02 10:10:46 -07:00
Jenkins
730b26e349 Merge "Add support for volume API v2 QoS commands" 2015-06-30 20:43:15 +00:00
David Moreau Simard
974c9d5793 Add support for volume API v2 QoS commands
This commit adds the following commands:
  volume qos associate
  volume qos create
  volume qos delete
  volume qos disassociate
  volume qos list
  volume qos set
  volume qos show
  volume qos unset

Change-Id: If3c679557ac9abb0dfc75d290b96fb9c8d46c7b7
Partial-Bug: #1467967
2015-06-29 17:24:35 -04:00
Steve Martinelli
36613f9f53 No need for get_parser on QoS list
There are no arguments so there's no need to define the
get_parser function.

Change-Id: Icfa8accf6dbb7f8d1a0472926403b405da3cc611
2015-06-28 23:43:39 -04:00
Steve Martinelli
1d51eb82d0 Alphabetize QoS specs
setup.cfg and the implementation had some functions that were
not in alphabetical order. Since the rest of OSC is alphabetized,
let's stick to that.

Change-Id: Ief5d4694c7b6bc20a0898437b96305885104d45c
2015-06-28 23:42:55 -04:00
David Moreau Simard
7bb038c4a7 Add support for volume API v1 QoS commands
This commit adds the following commands:
  volume qos associate
  volume qos create
  volume qos delete
  volume qos disassociate
  volume qos list
  volume qos set
  volume qos show
  volume qos unset

Change-Id: I72ea1b9a4d0bd0e35eda03071ea438b75439fce9
Partial-Bug: #1467967
2015-06-26 23:19:08 -04:00
Jenkins
6147409c7d Merge "Add support for volume backup v2 command" 2015-06-18 19:53:06 +00:00
Amey Bhide
2fce863411 Add support for volume backup v2 command
openstack backup create
openstack backup list
openstack backup restore

Implements: blueprint volume-v2
Change-Id: I77965730065dd44f256c46bcc43c1e6a03b63145
2015-06-04 17:34:50 -07:00
Amey Bhide
c88b433abb Add support for volume snapshot v2 command
openstack snapshot create
openstack snapshot set
openstack snapshot unset
openstack snapshot list

Implements: blueprint volume-v2
Change-Id: Ia1d9f4426baa0099281a9931f4eec99ebe1969b1
2015-06-04 20:13:19 +00:00
Amey Bhide
5361652d8f Add support for volume v2 API
Added following commands for volume V2 API:
volume show
volume delete
volume type show
volume type delete
snapshot show
snapshot delete
backup show
backup delete

Implements: blueprint volume-v2
Change-Id: I68bd303c194f304ad15f899d335b72a8bf3ebe10
2015-05-30 11:26:14 -07:00
Dag Stenstad
2ee904cb2d Adds support for container selection for backup
Changed argument from parsed_args.volume to parsed_args.container as per what
is expected in python-cinderclient.

If not defined, defaults to "backup_swift_container" in cinder.conf.

Stops there being a container for every volume you take backups off.

Change-Id: I4a34894222f71b0f207d007c32427040589406aa
Closes-Bug: 1446751
2015-04-21 18:45:54 +02:00
Dean Troyer
f43c1f7655 Defer client imports
So we really weren't deferring the loading of client libs dadgummit,
do that for real where possible.  This shaves a couple of tenths off
the static import times.

Also defer as much import-time procesing as possible.  This is a little
ugly in api.auth but this also eliminates import of the auth plugins
until they are needed.

Change-Id: Ia11d4b9cf98231d37449103fc29101dc17afb009
2015-04-15 22:40:52 -05:00
lin-hua-cheng
60ef8b08fe Change volume create --snapshot-id to --snapshot
Keeping the option --snapshot-id hidden for backward compatibility.

Change-Id: Iefa0aed9be255a5626a9bbb7db77911ef5ca8595
Closes-Bug: #1418742
2015-02-06 16:45:08 -08:00
lin-hua-cheng
8968bc0979 Check volume status before extending size
Added test for Volume Set as well.

Change-Id: I8e6794f67b160ca328fcafa8f1d67138b4f3becd
Closes-Bug: #1415182
2015-02-06 09:05:41 -08:00
Steve Martinelli
4ff020006e Add the ability to extend volumes in osc volume set
Create a --size option for volume set, so the user may extend
a volume's size.

Change-Id: Ic8d3396d788a14ea1e10bf1da73edfd7f5d85070
Closes-Bug: #1413954
2015-01-27 14:16:03 -05:00