182 Commits

Author SHA1 Message Date
Dean Troyer
44c97cc099 Add Identity v2 role and service tests
* Add current auth info (auth_ref) to ClientManager
* Fix identity.v2_0.role.ListUserRole to get default user/project
  from ClientManager.auth_ref
* Fix identity.v2_0.role.AddRole call to roles.add_user_role()

Change-Id: Ie8bf41c491d97b0292a2b86bdc9b7580989a7f97
2013-09-04 21:37:45 +00:00
Dean Troyer
eb405a88c4 Refactor fake data for projects and users
* Move fake data structures into tests/identity/fakes.py
* Use fake clients correctly and support multiple client versions

Change-Id: Icacbb2ca740b63937bd2c4442af61b620638b53e
2013-09-04 14:48:24 -05:00
Dean Troyer
725e2543ef Object API commands using our REST API layer
* Add object-store API to ClientManager
* Add object-store client
* Add Object API library in openstackclient.object.v1.lib
* Add Object API {container,object} list commands
* Add library tests
* Add command tests

This should complete the Object v1 container and object list commands

Change-Id: Ib1770d45efa8871959826b85faafa1e0bcef0a03
2013-08-28 22:16:34 -05:00
Dean Troyer
17f13f7bf4 Create a new base REST API interface
* restapi module provides basic REST API support
  * uses dicts rather than Resource classes
  * JSON serialization/deserialization
  * log requests in 'curl' format
  * basic API boilerplate for create/delete/list/set/show verbs
* ignore H302 due to urllib import

Change-Id: I3cb91e44e631ee19e9f5dea19b6bac5d599d19ce
2013-08-23 12:08:32 -05:00
Jenkins
b440986e6e Merge "Re-order oauth commands and sync with keystoneclient" 2013-08-23 16:24:20 +00:00
Steve Martinelli
880323e91d Re-order oauth commands and sync with keystoneclient
1) split out token and consumer
2) sync parameters with keystoneclient

Change-Id: I2d529f0f9087f9939101e963af3d801497fc1171
2013-08-21 15:24:50 -05:00
Dean Troyer
22a6e8891e Add Identity v2 user tests
* implement Identity command tests for v2 user

Also re-work the user create and set commands for exclusive options
(--enable|--disable) to actually behave properly.  Yay tests!

Change-Id: Ie1ec2569b3d85a9d556ee70f2e8f69fd2a3c03c8
2013-08-19 15:26:51 -05:00
Dean Troyer
493339d4da Add Identity v2 project tests
* establish the the form of cliff command classes
* implement some common fake objects
* implement Identity command tests for v2 project
* fix stdout/stderr capture

Also re-work the project create and set commands for exclusive options
(--enable|--disable) to actually behave properly.  Yay tests!

Change-Id: Icbb313db544c1f8dd3c9af7709971838b5a4d115
2013-08-16 14:35:46 -05:00
Dean Troyer
af87489022 Change version reporting to use pbr
Gets rid of the hard-coded version string in shell.py

Change-Id: I8b818c9a8f1224669079141e7a7caf614e588d20
2013-08-02 12:11:49 -05:00
Jenkins
0cc5811122 Merge "Prep for 0.2 release (0.2.rc1)" 2013-08-01 22:51:30 +00:00
Dean Troyer
6f9dcc13f6 Prep for 0.2 release (0.2.rc1)
* rename HACKING to HACKING.rst and refer to the common OpenStack HACKING file
* add the barest of pointers to the wiki, etc. to the source docs
* add a bare-bones man page

Change-Id: I80e5b972af645f14ef17ae87f182ab09cb08dabe
2013-08-01 16:21:22 -05:00
Jenkins
f293027815 Merge "Remove tenant round 3 - other commands" 2013-07-31 22:30:12 +00:00
Jenkins
0f63f46a07 Merge "Remove tenant round 2 - Identity API" 2013-07-31 22:29:03 +00:00
Jenkins
cd0f34b2d6 Merge "Remove tenant round 1 - global options" 2013-07-31 22:29:03 +00:00
Steve Martinelli
ce17a0b588 Remove 'oauth authorization show' function from identity v3
Remove the mentioned function since I removed it in the client.

Change-Id: I45e713a1cdad92d257b895adfaa269404be6e6d8
2013-07-31 13:54:39 -05:00
Jenkins
661da45f58 Merge "Add security group commands" 2013-07-31 15:16:48 +00: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
c385180df2 Remove tenant round 2 - Identity API
Rename everything in the Identity v2 code including the file and classes.
* role, tenant, user

Change-Id: I0b99c60a24f5875120136d2f216aa3b6bce1c641
2013-07-31 10:10:45 -05:00
Dean Troyer
0aa3c206a3 Remove tenant round 1 - global options
Change the global auth options to use 'project', leave the original
tenant options in place but silent for compatability with the existing
project CLI auth options.  This is the only compatibility for tenant
usage in this changeover.

Change-Id: I3cce6e552f18822cc9f445ec5f301b0f5d9003f8
2013-07-31 10:07:50 -05:00
Jenkins
9ec1cf385e Merge "Begin Python 3 compatability" 2013-07-31 15:05:01 +00:00
Dean Troyer
978c2e7dec Add server ssh command
Change-Id: I9317ad6a47818d5479a046b4be8c5adbbce613ef
2013-07-29 19:18:00 -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
Dean Troyer
c94e262df8 Add security group commands
* Add security group: create, delete, list, set, show
* Add server: add secgroup, remove secgroup
* Add security group rule: create, delete, list
* Add Oslo's strutils and gettextutils

* Adds parseractions.RangeAction() to handle option arguments of either a single number
  or a range of numbers: '--port 25'  or '--port 1024:65535'

Blueprint: nova-client

Change-Id: Iad2de1b273ba29197709fc4c6a1036b4ae99725f
2013-07-29 19:07:22 -05:00
Dean Troyer
65d2a14e3e Add server resize command
* add server resize
* update --wait handling for server create, reboot, rebuild
* move _wait_for_status to utils

Blueprint: nova-client

Rebased after https://review.openstack.org/38162 was committed

Change-Id: I7a43b996feecadc7628fcfe20cd5b17333762739
2013-07-29 18:57:02 -05:00
Dean Troyer
3cc313a60d Add server migrate command
Blueprint: nova-client

Note: I've tested that the API calls are made correctly but do not have an
environment with migration proerly enabled to watch it complete...

Change-Id: Ideaf0985d43aa2be22390cf0d2850124c549632d
2013-07-29 18:43:16 -05:00
Dean Troyer
3ff6378c23 Add server commands: (un)lock, (un)rescue, (un)set, add/remove volume
* server lock/unlock, rescue/unrescue, set/unset
* add/remove volume

Blueprint: nova-client

Change-Id: I3709ecdb297ab15ad44df09d89af840164271a66
2013-07-29 18:21:21 -05:00
Jenkins
22386eb9e6 Merge "Add usage command for compute api" 2013-07-26 19:55:52 +00:00
Jenkins
ec9b907e78 Merge "Fix --password in server rebuild" 2013-07-26 18:12:33 +00:00
Steve Martinelli
fcc34652ec Add usage command for compute api
As per the blueprint: nova-client, adding usage command for
compute

Change-Id: Ib694b0b1ebf56b2a62b6f09c67ffaa6959911605
2013-07-26 00:12:04 -05:00
Steve Martinelli
3789cdfebe Add server diagnose for compute api
Add server diagnose for compute api as per blueprint: nova-client

Change-Id: I0a2c13e36e1e13f61ef4ba00ec146634f9644648
2013-07-23 23:06: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
e313afb9f0 Merge "Add password field to set user" 2013-07-23 15:26:29 +00:00
Jenkins
f175d12247 Merge "Clean up properties (metadata) formatting" 2013-07-23 15:25:26 +00:00
Dean Troyer
61beeb7e20 Fix --password in server rebuild
Use correct attribute to get password in server rebuild command.

Fixes bug 1190722

Change-Id: Ibe2ccb8840a385319781885b8aadca6e1ba4cc43
2013-07-22 10:23:58 -05: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
Steve Martinelli
b4904b0a4a Add password field to set user
Noticed this was missing in set user, the password from parsed
args wasn't being passed in.

Change-Id: I0eb748444b86b374265b6e1dd02f69a922a9b043
2013-07-20 16:20:48 -05:00
Jenkins
7b47579dad Merge "Complete Image v1" 2013-07-20 20:17:00 +00:00
Jenkins
5d1d738968 Merge "Add aggregate commands" 2013-07-19 20:39:44 +00:00
Dean Troyer
2cc996356c Add aggregate commands
* Add aggregate: add host, create, delete, list, remove host, set, show

* Add list --long option
* Filter 'availability_zone' from the metadata fields
* Rename 'metadata' column to 'properties' in all output

Bug: 1172032
Blueprint: nova-client

Change-Id: Icd408c2b34af07f5102f53d3778d8546952a12c5
2013-07-19 15:37:10 -05:00
Jenkins
93eadf6eb1 Merge "Add quota commands" 2013-07-19 20:20:17 +00:00
Jenkins
a243b1afd7 Merge "Add list and delete authorizations for oauth commands" 2013-07-19 20:19:45 +00:00
Dean Troyer
cdaee1b71e Complete Image v1
* Add v1 versions of image delete, list, save, set, show
* Change default Image API to v1

Rebased for https://review.openstack.org/#/c/36772/

Change-Id: Ie2bfe660aac8a0fcf651c67fd1ea4842e76ce377
2013-07-18 14:14:14 -05:00
Jenkins
ce72256929 Merge "Add --catalog to service show" 2013-07-17 20:11:00 +00: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
Jenkins
aa81b8b8d5 Merge "Add show limits command" 2013-07-17 20:07:43 +00:00
Steve Martinelli
6146213e32 Add list and delete authorizations for oauth commands
* List user authorizations
* Delete user authorization
* Grouped the commands with oauth prefix

Change-Id: I032ffa25181aad0fb4689f69cdca5a7adc6e29f1
2013-07-16 15:06:47 -05:00
Dean Troyer
bbb71e7ce2 Add --catalog to service show
Shows endpoints from the service catalog rather than the system services.

Change-Id: I842916af9f7c0a76c4d3e27e419bf0fec059ec78
2013-07-16 11:31:28 -05:00
Jenkins
6cb58fa16b Merge "Add authenticate method to oauth code" 2013-07-15 13:08:34 +00:00
Dean Troyer
75dcdb0c66 Add show limits command
* This is a combination of the compute and volume API limits as they are
  very similar.  As such, the command lives in a new command group
  'openstack.common' that is unversioned.
* Implements 'limits show [--absolute|--rate]

Updated for https://review.openstack.org/#/c/36772/

Bug: 1172057

Change-Id: I2bd181cd0d098f7143360ae67944c2f221379af5
2013-07-12 12:13:27 -05:00