92 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
Jenkins
a93851d6af Merge "Implement CRUD operations for Identity Providers" 2014-05-09 21:38:20 +00:00
Marek Denis
ef9496a4fc Implement CRUD operations for Identity Providers
Operations for:
    * adding Identity Provider
    * listing Identity Providers
    * showing Identity Provider
    * updating Identity Provider
    * deleting Identity Provider

Change-Id: I4557168309f93e4670116b5c3c0e29252ff0c40f
Implements: bp/add-openstackclient-federation-crud
2014-04-24 14:55:54 +02:00
Jenkins
2643df7405 Merge "Make endpoint commands more consistent" 2014-04-23 23:11:49 +00:00
Jenkins
845f6705bf Merge "Fix the project option to user list so it filters" 2014-04-23 23:11:48 +00:00
Jenkins
8ec78a10f8 Merge "Pass arguments to v3 keystoneclient by kwarg" 2014-04-17 02:40:36 +00:00
Steve Martinelli
01db6d977f move read_blob_file_contents to utils
Thinking ahead, a few other upcoming keystone features could
benefit from reading contents from a file. Thus, moving the
function from policy to utils.

Change-Id: I713ab0e5a00c949ad996daf83b775a7c19044888
2014-04-14 22:16:59 -05:00
Jamie Lennox
022b6d95d1 Pass arguments to v3 keystoneclient by kwarg
Keystoneclient has added the positional decorator which emits a warning
if arguments aren't passed by keyword. This means we are getting
warnings in certain places in openstackclient.

Change-Id: Ic5446cd6f122cbb56fce543011386d53bc31fe18
Closes-Bug: #1302199
2014-04-04 08:09:43 +10:00
Terry Howe
e72072adc3 Fix the project option to user list so it filters
The --project option to the user list command was not implemented
* Allow users to be filted by project
* Support id or name of project with the find_resource command
* Make sure the report does not contain duplicates

Change-Id: Ic0e10cccd7749d38a7d4b80bbdc68e61a660084b
Closes-Bug: #1177255
2014-04-01 09:03:45 -06:00
Terry Howe
bea6e6ac23 Make endpoint commands more consistent
Make endpoints more consistent across create, show, etc
* Make the name option required for create
* Use a common function to fetch services by id, name or type
* Have show work by endpoint id or by service id, type or name
* Have show display all the fields by default
* Remove capability to filter queries by attribute value pairs

Change-Id: Idaa4b8d930ba859fd62de777e44a10b1ed58c79b
Partial-Bug: #1184012
2014-03-28 12:33:58 -06:00
Chris Johnson
8117256d7d Correct display of project/tenant id on display of credentials
This change corrects the display of ec2 credentails within the
ListEC2Creds method. Added explicit headers and corrected data listt o
specify tenant_id instead of project id.

Change-Id: I2ea579082bee800d774f202bdc38e2d546e57e77
Closes-Bug: #1292337
2014-03-21 11:22:22 -04:00
Steven Hardy
0c0803d363 identity v3 allow project list filtering by domain
The underlying keystoneclient interface allows filtering by domain,
so support it in the cli interface because it makes project list
much nicer to use in a multi-domain deployment.

Change-Id: If3f5cf1205c1e9cf314f8286a3ae81bda4456b8f
Closes-Bug: #1289513
2014-03-13 09:32:21 +00:00
Jenkins
ce63fa0121 Merge "Add ability to set key value pairs in projects" 2014-03-13 06:33:24 +00:00
Dolph Mathews
3435f188a4 add interface and url to endpoint list
endpoint list is not terribly useful without these details

Change-Id: I65b0bdf7667d73ceaad5856171678cabcde003f3
2014-03-07 11:51:15 -07:00
Terry Howe
70e6333e7d Add ability to set key value pairs in projects
Add supporto of extra key value pairs for projects (aka tenants)
* Added option --property key=value to create and set commands
* Support for versions v2 and v3

Change-Id: I84064b8b308579d1b66c83b1ed3d1a37614ec087
Closes-Bug: #1220280
2014-03-06 14:22:17 -07:00
Jamie Lennox
8be3e249b6 Use cacert values when creating identity client
These were ignored when the client was created with a username and
password.

Change-Id: Id7557a5b07a41c7f79ab1a05ede385da31889940
Closes-Bug: #1284957
2014-02-26 13:29:19 +10:00
Jenkins
8fe50fc75d Merge "Fix some help strings" 2014-02-23 06:17:49 +00:00
Terry Howe
033f27fe4d Add ability to prompt for passwords for user create and set
* Add get_password method to the utilities
* Add --password-prompt option
* Call the get_password method if a prompt is requested
* Various tests

Change-Id: I1786ad531e2a2fbcc21b8bc86aac0ccd7985995a
Closes-Bug: 1100116
2014-02-21 14:42:22 -07: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
Cyril Roelandt
eaa4c3e1a6 Python 3: fix a syntax error
"raise AttributeError, name" is invalid in Python 3.

Change-Id: Id61bd3747f49c2bd810cbfeae56506e7ed9d2bd0
2014-02-11 15:44:54 +01:00
Qiu Yu
a8d828f330 Add token create subcommand for identity v3 api
Implements token create subcommand which is an equivalent of keystone
token-get command. Original "wrap" parameter for keystone token-get is
not implemented yet due to cliff Bug #1269299

This is a part of: blueprint add-identity-token-support

Change-Id: I2255021c9d1f10f757686583b1ebe40b5f3a9ecb
2014-01-29 15:59:12 +08:00
Jenkins
cb2fd0af83 Merge "Remove copyright from empty files" 2014-01-23 17:38:15 +00: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
Qiu Yu
4848d3ca3a Add token create subcommand for identity v2 api
Implements token create subcommand which is an equivalent of keystone
token-get command. Original "wrap" parameter for keystone token-get is
not implemented yet due to cliff Bug #1269299

This is a part of: blueprint add-identity-token-support

Change-Id: I9e4de93306f2f5959717b5219621da03961524d8
2014-01-17 17:42:01 +08:00
Paul Belanger
420b10ee6d Add support for specifying custom domains
Add the ability to pass user_domain_id / user_domain_name, domain_id
/ domain_name, and project_domain_id / project_domain_name to keystone.
These parameters are the first step needed to getting multi-domain
support working via the CLI.

Closes-Bug: #1198171
Change-Id: I81a8534913978ff1cce01ec02741ae477e8c5fa4
Signed-off-by: Paul Belanger <paul.belanger@polybeacon.com>
Signed-off-by: Bo Tang <btang@cs.utsa.edu>
2014-01-07 16:50:20 -06:00
Dean Troyer
9062811d10 Expand support for command extensions
Allows client libraries to have complete access to the rest of the
OSC ClientManager.  In addition, extension libraries can define
global options (for API version options/env vars) and define
versioned API entry points similar to the in-repo commands.

The changes to ClientManager exposed some issues in the existing
object api tests that needed to be cleaned up.

Change-Id: Ic9662edf34c5dd130a2f1a69d2454adefc1f8a95
2013-11-21 01:27:10 -06:00
Dean Troyer
3f9c68f1c6 Add options to support TLS certificate verification
Add --os-cacert and --verify|--insecure options using the same
sematics as the other project CLIs.  --verify is included for
completeness.

Bug: 1236608

Change-Id: I8a116d790db5aa4cb17a2207efedce7cb229eba3
2013-10-07 18:17:48 -05:00
Dean Troyer
8898e020fb Identity v3 tests
* Add project, user, role and service v3 tests
* Fix issues in commands with enable/disable
* Make commands and tests more consistent between versions
* Make formatting and comments more consistent

Change-Id: Id21e7a5abd7e421a7742f937861ec46b53095fc7
2013-09-09 14:58:28 -05:00
Dean Troyer
7a0a7d67ed Prepare for Identity v3 tests
* Split identity/fakes.py for v2_0 and v3
* Split identity/test_identity.py for v2_0 and v3
* Fix issues in commands with enable/disable
* Clean up v2 commands

Change-Id: I6e536b6a130fc556dbd7dcf9f2e76d939ca1bc1c
2013-09-09 14:52:50 -05:00
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
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