28 Commits

Author SHA1 Message Date
Christian Berendt
3b485de6b0 replace string format arguments with function parameters
There are files containing string format arguments inside
logging messages. Using logging function parameters should
be preferred.

Change-Id: Ic749ac9eb55564ed631d57055a5a4dfc3aebd169
2014-05-20 13:49:56 +02:00
Dean Troyer
870e7ddbcc Change volume create --volume-type to --type
This makes it consistent with the other --type options in OSC.  Also
add a few more volume_create tests.

Change-Id: I50ef927932cabf157ecdfd6c4faa1914b4fdf413
2014-05-15 09:25:07 -05:00
Terry Howe
37231b5801 volume type create should display properties
The volume type create command should properly output the
properties.  The code was doing a create on the volume type and
then setting the properties, but it was printing out the volume
object from the create.

Change-Id: I23c8a0182e77bb71903ad87c1b01ba2b62405f3b
Closes-Bug: #1303978
2014-05-05 14:21:50 -06:00
Andreas Jaeger
5043293156 Fix some help strings
This fixes some errors and inconsistencies I found reviewing the
help strings:
* Capitalize help strings
* Add missing space between words (in multi-line strings)
* Improve wording

Change-Id: I2fb31ab4191c330146e31c1a9651115a6657769a
2014-02-21 19:40:41 +01:00
Alexander Ignatov
ad4367839f Remove copyright from empty files
According to policy change in HACKING:
http://docs.openstack.org/developer/hacking/#openstack-licensing
empty files should no longer contain copyright notices.

Change-Id: Iba09a00f24dfbd1cd03c1c9f70ea216788e64d93
Closes-Bug: #1262424
2014-01-20 17:28:13 +04:00
Dean Troyer
9137cc304d Do lookups for user, project in volume create
This required https://review.openstack.org/26323 in keystoneclient,
merged long ago...

Also adds some tests for 'volume create'

Change-Id: I55bededbc20b5dcf2833c59eb2b6b069703d8a9a
2013-10-25 12:21:41 -05:00
Dean Troyer
7d138b94ec Remove tenant round 3 - other commands
Mostly options and help strings:
* image, server, project usage, volume

Change-Id: I788b0660f8c2daacde53c20a72dd1afc60cf5159
2013-07-31 10:12:20 -05:00
Dean Troyer
dfb0e3e3c1 Begin Python 3 compatability
* use six.iteritems()
* replace basestring with six.string_types
* convert print statements to functions (they're all debugging and should
  be removed eventually anyway)

* clean up OpenStack copyright: LLC -> Foundation

Change-Id: Icb14212bcb408e63816bfec3922a697bc1a6c946
2013-07-29 19:12:29 -05:00
Jenkins
e351991d74 Merge "Change volume manager to volume type, unset property for type" 2013-07-23 15:26:29 +00:00
Jenkins
f175d12247 Merge "Clean up properties (metadata) formatting" 2013-07-23 15:25:26 +00:00
Steve Martinelli
8dd9feb643 Change volume manager to volume type, unset property for type
In the unset method in volume_type, it was calling the volume
manager, instead of the volume_type.

Bug: 1203561
Change-Id: Iea1a9214db90f15815a456955040c0c5a795ff3d
2013-07-21 14:45:22 -05:00
Dean Troyer
818c948752 Clean up properties (metadata) formatting
* Reformat default dict output to key='value' using utils.format_dict()
* Changes utils.get_item_properties() to pass the specific field to
  the formatter function rather than the entire resource object, this
  allows the formatter to handle multiple attributes.
* Updates server, volume, volume type commands

Change-Id: I90eebf6b84ae200532f09cd925f371598ea54a64
2013-07-21 13:59:11 -05:00
Dean Troyer
87104a28d7 Add quota commands
* Add quota set and quota show commands; these work on both
  the compute and volume APIs
* Add the --class variation on the above commands

Note: this replaces the existing volume-only quota commands and eliminates quota list

Blueprint: cinder-client
Bug: 1172064

Change-Id: I766d40e410e48f05e36e17e567a4f01a9411b40e
2013-07-17 15:10:22 -05:00
Steve Martinelli
1a0d5ccc68 Remove api = apiName calls from each method
As discussed in https://review.openstack.org/#/c/36352/ for each
command, we were setting api = identity or volume... etc,
this was for an old way of calling commands that are is no longer
used.

Also removed openstackclient/common/command.py

Change-Id: I2705f35d343f2ae729dc22d6aed0b852b2f8ca19
2013-07-12 11:07:33 -05:00
Hugh Saunders
ea31333c49 Add volume backup commands
Change-Id: Iedccd329ff6fb3155eb29649cd0bc84cfc5ebedf
Implements: blueprint volume-backup
2013-06-03 16:40:59 +01:00
Dean Troyer
ea9ec1c6bc Tweak volume commands and add k=v argparse action
Basic cleanups:
* change metadata to property
* add new KeyValueAction to parse the property options
* multiple properties can be set using multiple --property args
* consistent formatting
* do lookups for volume args

Change-Id: Ib6c43f01ad46b395aee8c61e886f42e2a5f5573e
2013-05-24 15:02:52 -05:00
Monty Taylor
016a0b301e Fix flake8 errors in anticipation of flake8 patch.
Change-Id: Ifdc4322b699f2bd91a6900e55695acd3d736568e
2013-05-14 08:28:48 -07:00
Josh Kearney
a2e3a16221 Rename all instances of 'metadata' to 'property'.
Change-Id: I454cbe685dc5afa0a09ecc976a90d6eb6bc57d14
2013-05-07 11:18:38 -05:00
Steve Martinelli
04af8fa8f1 Add metadata support for volume
Now able to pass metadata to the create method,
as well as update it with set, and remove it with unset.
I'm currently passing it as an optional param like the following:
--meta-data=key1=value1
which seems weird, what about
--meta-data=key1:value1
I'd have to update type too if that is the case.

Change-Id: I0fc8398768da015c1f53c5c564c68a2cfb53e778
2013-03-22 23:36:13 -05:00
Steve Martinelli
b175184f23 Add extra-specs support for volume-type
changed to volume-type
changed command to --long, added a formatter for key=value
Just noticed there is an option in cinder for a command called
extra-specs-list, only relates to volume-types, to list the
meta-data key/value pair. Added that functionality.
Also made minor changes so delete/set/unset can be called by name.

Change-Id: If534ccd1d8a3abc6d235c60ec9a964b88e3fa66d
2013-03-21 10:12:10 -05:00
Jenkins
866a0eb044 Merge "Add snapshot support for v1 volume" 2013-03-15 16:03:54 +00:00
Steve Martinelli
211a4bcbf2 Add optional arguments to volume list command
Added --name, --all-tenants, and --status as search params

Change-Id: Ibaa2a7f6862c2ff7dbe24f6bea971db3e70bc120
2013-03-11 15:12:01 -05:00
Steve Martinelli
1ddc30100f Add force-delete option for volumes
Again, looking thorouhgly through cinders commands, i noticed
an force-delete command, which was for volumes only.
Decided it would work best as an optional argument for the
regular delete case

Change-Id: I9de6040ea0ad71c2a9c8edc7be18779d39e7ede0
2013-03-09 00:25:06 -06:00
Steve Martinelli
0c4929373e Add snapshot support for v1 volume
rebase again, and change util to look for display_name too
minor changes and rebase
add create/delete/list/set/show support for snapshot

Change-Id: I80261653fa919555a44ddda07b0a827ccd16e5e0
2013-03-08 15:03:07 -06:00
Steve Martinelli
abbbed534d Add volume support for openstack client
fix with dtroyer's comments
rebase
fix with dhellmann's comments
create/list/delete/show/set for volume commands

Change-Id: Id8236685d815dbf73873bab2363d82274a9aa556
2013-03-07 14:18:18 -06:00
Steve Martinelli
5377da3406 Add metadata support for volume type
rebase
added set and unset metadata

Change-Id: I8d969e1de305975d7c71a0bad3a62b15f423c3e0
2013-03-05 14:38:06 -06:00
Steve Martinelli
ed809e059a Add quota v1 support for volume
added dhellmann's suggestions
created entry points in setup.py
added show/set/list quotas for v1 volume

Change-Id: I8ed6a9518007b31cafeaa70a54d5bf54a549195b
2013-03-04 15:53:48 -06:00
Steve Martinelli
7072b4f802 Add Cinder API V1 Support
made the changes suggested by dtroyer
added client
modified setup.py entry points
updated pip required
added support for create/delete/list volume types
openstack list type
openstack create type typeName
openstack delete type typeNameOrId

Change-Id: I43655de151582e37f14dc9550151a66db7a009ab
2013-02-08 10:22:01 -06:00