62 Commits

Author SHA1 Message Date
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
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
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
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
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
a243b1afd7 Merge "Add list and delete authorizations for oauth commands" 2013-07-19 20:19:45 +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
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
Steve Martinelli
713908385a Add authenticate method to oauth code
Forgot to add one last method when I initially checked in
the first set of code; the authenticate method will return an
actual keystone token that the user may now use.

Also, I added some changes to other methods because the client
has been updated.

Change-Id: Ie2707689e0df1fb1bc92177f932baf23fe1ca920
2013-07-10 20:21:58 -05:00
Jenkins
d756975614 Merge "Add EC2 credentials CRUD" 2013-07-08 18:45:50 +00:00
Jenkins
bf3ee1e9a5 Merge "Finish up v3 role commands" 2013-07-05 17:10:22 +00:00
Dean Troyer
7298dd5e72 Add EC2 credentials CRUD
ec2 credentials: create, delete, list, show

Change-Id: I82ff84ed433cd9a2da9534bf5f584a2e1a3fe68c
2013-07-03 12:11:44 -05:00
Steve Martinelli
f29a849ffc Finish up v3 role commands
* Add remove role
* Add --role to group list
* Add --role to user list
* Fix groups in AddRole()
* Remove the tweaks to utils.find_resource for domains; will address
  that across domains, projects, users and groups in another patch.
  I want to nail down the structure of these commands and get that into place

Change-Id: I8673dd8221ef88978dada5a2833c187026bdb31a
2013-07-03 11:51:23 -05:00
Steve Martinelli
9dbf46b837 Add methods for user and group interactions
* Add user to group
* Contains user in group
* Remove user from group

Change-Id: If5219fa9d4761d7b97950c39556b3e1b8aab6517
2013-07-02 08:58:55 -05:00
Steve Martinelli
dd3aa0b671 Add OAuth support for Identity V3
Added client side support for:
* consumer CRUD
* create request token
* create access token
* authroize request token

blueprint: delegated-auth-via-oauth

Change-Id: I8d325fcab07ac4dfd124a6e55053ded8d6bf662e
2013-06-26 11:40:30 -05:00
Steve Martinelli
02a4f16f16 Add domain and description to user for v3 identity
* splitting the changes seen in 27142 to a few new patches
* this one will just update v3 user to have description and domain

Change-Id: I9b4c365703da27e26ddc702f37cf5928e19cebdc
2013-05-17 06:42:48 -05:00
Monty Taylor
016a0b301e Fix flake8 errors in anticipation of flake8 patch.
Change-Id: Ifdc4322b699f2bd91a6900e55695acd3d736568e
2013-05-14 08:28:48 -07:00
Steve Martinelli
76e06d144e Add policy to identity v3
use file for data blobs
add create/set/delete/show/list policy for v3

Change-Id: I5f68ef89dfb2241ea1aca00736ee6df5f6f03a9b
2013-03-26 08:50:21 -05:00
Steve Martinelli
95c6e5f11d Add endpoint v3 functionality
simple rebase
integrated dolphm and dtroyer comments
Added create,list,delete,set,show endpoints
modified setup.py

Change-Id: Id6153db16db44130beb3b44a8e3e2f72e9a01e5f
2013-03-19 14:25:54 -05:00
Steve Martinelli
907dbdb897 Add service v3 support for identity
simple rebase
rewrite help for create, remove choices
Added create/delete/list/show/set for service
Modified setup.py

Change-Id: I5ced0e214cc2f7fc70493c66b4381040ce8122fe
2013-03-19 13:43:32 -05:00
Steve Martinelli
b26bbae598 Add functionality for add-role commands
keep the functions sorted
Please review carefully as I intend to mimic this logic with
list and remove, I'm open to suggestions about handling thigs
differently

Change-Id: Ia6359134c44447f3b758870c4dc306ec1f970852
2013-03-15 16:03:01 -05:00
Steve Martinelli
e5d9ba5491 Add role v3 support to identity in openstack client
Added create/delete/set/list/show support for roles
Broken up to make reviewing easier.
Will add more functionality (add/remove) later

Change-Id: I95bddd27d8d9d251ad2fd60c3e3ee1e2cbcd7d4b
2013-03-12 16:29:47 -05:00
Steve Martinelli
55462e8f56 add domain, credential to identity v3 api
moved policy.py to it's own patch
minor changes based on comments
reworked it now that the domain specs have changed
added credential - create, delete, update, show, list
added domain - create, delete, update, show, list
update setup.py entry points

Change-Id: I6bbbb8fdfbc3e76ba75374e9579eb92c96c928fe
2013-03-08 11:11:58 -06:00
Dean Troyer
fbc412e533 Multiple API version support
* Use multiple entry point groups to represent each API+version
  combination supported
* Add some tests

Try it out:
* Right now only '* user' commands have multiple overlapping versions;
  you can see the selection between v2.0 and v3 by looking at the
  command help output for 'tenant' vs 'project':

  os --os-identity-api-version=2.0 help set user
  os --os-identity-api-version=3 help set user

Change-Id: I7114fd246843df0243d354a7cce697810bb7de62
2013-02-06 11:36:28 -06:00
Josh Kearney
b26cb5bf68 Upgraded to PEP8 1.3.3 to stay aligned with Nova, etc.
Made all the necessary changes to pass new PEP8 standards.

Also cleaned up docstrings to conform to the HACKING stanards.

Change-Id: Ib8df3030da7a7885655689ab5da0717748c9edbe
2013-01-31 13:31:41 -06:00
Jenkins
d8225be7ce Merge "Standardize on a copyright header and ensure all files have them." 2013-01-28 23:49:13 +00:00
Steve Martinelli
b253534348 v3 identity - group and project api
updated with latest comments
modified entry points in setup.py
added group.py (v3)
added project.py (v3)
fixed indentation
updated to include new headers

Change-Id: Ice68b6c5bacb68d2e95321d903043056a9b8e810
2013-01-28 15:28:32 -06:00
Josh Kearney
0a4912f9fb Standardize on a copyright header and ensure all files have them.
Change-Id: I64812bca01ca655c9cf9239a0daea84907082a29
2013-01-24 12:02:23 -06:00
Josh Kearney
df34db8afb Remove incorrect 'raise'.
Fixes bug 1096102.

Change-Id: Ibcdccd949566f47bb516c7562149d6b0100fce18
2013-01-22 20:22:40 -06:00
Josh Kearney
c1ea298904 Clean up test environment and remove unused imports.
First round of adding more complete unit test coverage.

Change-Id: Ic1979c499ca6fcb784892a95954a3527539c4e53
2013-01-22 11:44:18 -06:00
Dean Troyer
697a5ac6cb Refactor cliff.Command.run()
* All commands now perform their action in take_action().  Those producing
  output are derived from DisplayCommandBase.

Change-Id: Ic93ba9a2ad449d84242b6aa8624b41379c4fb79a
2012-06-20 10:03:01 -05:00
Clark Boylan
6a8302b532 Fix pep8 issues.
Fix several pep8 issues and pin the pep8 test to pep8 version 1.1.
This should prevent future changes from being unmergable by the pep8
gate after a pep8 upgrade.

Change-Id: I4678a9179579fb5c7afe795fb43a8a89a99ad717
2012-06-13 10:49:43 -07:00
Matt Joyce
8d089518f0 removing print call in roles get_data
Change-Id: I2aebf6099821212d4bd4b4b6d78b9752085168b2
2012-05-23 12:18:53 -07:00
Jenkins
3acb1c6a85 Merge "Fix 'set user' command" 2012-05-22 13:59:31 +00:00
Dean Troyer
ec586a75f4 Fix 'set user' command
* missing --name arguemnt in parser for SetUser()
* correct Identity api call for SetUser()

Fix bug 1001384

Change-Id: I51169a0585c1bfe106ddd2e390269f69fc32852c
2012-05-18 17:19:16 -05:00
Dean Troyer
a4aaac78a9 Add role CRUD commands
* add {add|create|delete|list|remove|show|user-list} role commands

Change-Id: I27129168a9f58154fcdb062a533fa926737f822f
2012-05-18 13:57:16 -05:00
Dean Troyer
0c4e131c6e Add endpoint CRUD commands
* add {create|delete|list|show} endpoint commands

Change-Id: Ife9fa789d5818d63288b09687b43d802b1b97858
2012-05-18 10:35:20 -05:00
Dean Troyer
90f9f1dfa0 Clean up tenant and server
* remove '_' from class names
* add class name to log instances
* some cleanups to HACKING

Change-Id: I1f6334318ee0d7d83cd3cea0e71ba4f05dd2b5c5
2012-05-16 11:44:18 -05:00
Jenkins
d6a2762746 Merge "Add user CRUD commands" 2012-05-16 14:29:23 +00:00
Dean Troyer
d6a4fb836f Update service commands
* add {create|delete} service
* allow 'service' arg to also search type attribute in show command

Change-Id: I992359dc95fab1fbdab0666d5cbb75e44ba6e0f3
2012-05-15 15:48:11 -05:00