249 Commits

Author SHA1 Message Date
Jamie Lennox
226fc6c80a Change Credentials header to Blob from data
The payload data of credentials is the unfortunately named blob.
Currently when listing credentials the payload is excluded as OSC is
looking for a column called data which does not exist.

Change-Id: I6fa4579d7ec9ba393ede550191dbd8aa29767bf4
2015-06-02 17:10:48 -04:00
Juan Antonio Osorio Robles
3ca96ef93c Enable specifing domains in "role add"
If users, projects or groups are provided by name, there is a
possibility of the existence other users/projects/groups with the same
name in other domain.  Even though this is not a problem if the actual
ID is given instead of a name; this is mostly a usability enhancement.

So, three options were added, one for specifying the domain where the
user belongs, another one to specify the project's domain, and finally
one to specify the group's domain.

Change-Id: Iab04b0e04fa75ea5aa3723b8ea42a45f58a6cdb2
Closes-Bug: #1421328
2015-05-12 11:48:01 +03:00
Jenkins
c6c1098d2e Merge "Add docs for service provider CRUD" 2015-05-06 15:40:48 +00:00
Jenkins
ec6fbe1abf Merge "Federation Service Providers CRUD operations" 2015-05-06 15:40:15 +00:00
Jenkins
634004f33e Merge "Add parent field to project creation" 2015-04-30 03:16:20 +00:00
Steve Martinelli
d733e457e3 Refactor utility to find identity resources
Based on the comments made in this patch:
  https://review.openstack.org/#/c/174908/2/

We should simplify and refactor the way we handle finding identity
resources.

Change-Id: I77db2e3564faa90a917082a6c6cb87269e93aebe
2015-04-20 12:40:33 -04:00
Jenkins
3f84731637 Merge "remove unnecessary conditionals" 2015-04-19 14:23:05 +00:00
Steve Martinelli
00eeb3593c remove unnecessary conditionals
In several places we had else branches where a reasonable default
would do the job. This makes the code a mean cleaer and easier to
read.

Change-Id: I231e09aab85fd32b8300bc33c48d0899b728b96e
2015-04-19 02:41:04 -04:00
Nathan Kinder
4c107e6f1b Role operations should not require list object permission
When using Keystone's policy.v3cloudsample.json policy file, a project admin is
supposed to be able to manage role assignments.  Unfortunately, a project admin
isn't allowed to perform these operations using python-openstackclient, as we
attempt to perform list operations for any of the object types specified (users,
groups, projects). This is done in an attempt to lookup the id of the object by
name, but we perform this list operation even when the user specifies everything
by id. This causes 403 errors.

This patch still attempts to look up the object id by name, but we catch the 403
and assume that the user specified an id if the list operation is not allowed.
This is similar to what we do with the --domain option for other commands.

Closes-bug: #1445528
Change-Id: Id95a8520e935c1092d5a22ecd8ea01f572334ac8
2015-04-17 10:14:57 -07:00
Steve Martinelli
caf91e69ba Add docs for service provider CRUD
This patch adds service providers to command-objects, and makes
a few changes to the help text, to align it more with the
already established identity provider resource.

Change-Id: Ibf3d2bc04bf5588d1fc9c37b8ca28c007496c021
2015-04-15 05:09:48 +00:00
Marek Denis
ba7ad20942 Federation Service Providers CRUD operations
Adds CRUD support for service providers as it's now available through
keystoneclient

Closes-Bug: 1435962
Depends-On: If802e8a47e45ae00112de3739334b4b5482d0500
Change-Id: Ic55101e50209070aa49ca2adc91c89ba754c8c68
2015-04-15 05:09:15 +00:00
Marco Fargetta
6a9d6af225 Add support to remote_id
The federation APIs for the identity providers introduce a new parameter
for every identity provider, named remote_ids, which contains a list of
entity ID associated with. This parameter can be provided during the creation
of the identity provider and can be updated at any time. For more information
look at the blueprint:

https://blueprints.launchpad.net/keystone/+spec/idp-id-registration

This patch add the support to this new parameter in the command line by
inserting the option "--remote-id" in the following commands:

- "identity provider create"
- "identity provider set"

Additionally, the values can be read from a file, specified by
"--remote-id-file", containing an entity id per line.

Change-Id: Ie93340ee57e54128daa70d8a7bd0a9975ff7eef4
Depends-On: I12a262c55b5f6b5cc7007865edf30f14269da537
Implements: blueprint idp-id-registration
2015-03-30 11:53:17 -04:00
Rodrigo Duarte
2ed0e22049 Add parent field to project creation
Adding the possibility to create projects hierarchies by adding
the parent field in the create project call.

Co-Authored-By: Victor Silva <victor@lsd.ufcg.edu.br>

Implements: bp hierarchical-multitenancy
Change-Id: I4eac4f5bc067634cc38c305dacc59ab1da63c153
2015-03-23 15:45:09 -03:00
Jenkins
706c51bf96 Merge "Add identity v3 catalog show" 2015-03-10 04:52:14 +00:00
Jenkins
3da6e47e5e Merge "Add identity v3 catalog list" 2015-03-10 04:07:44 +00:00
TerryHowe
fa5f02eb22 Add identity v3 catalog show
Change-Id: Ia6b6c25eded43b899b3aa026227ad2859f1c67dd
2015-03-09 23:08:15 -04:00
Jenkins
8f7e0ef35e Merge "Fix catalog list when region name is absent" 2015-03-08 17:59:16 +00:00
Jenkins
0efc8668bf Merge "Fix identity v2 catalog list" 2015-03-08 17:59:09 +00:00
TerryHowe
a216746627 Add identity v3 catalog list
Change-Id: Id4c1371ca28b9fd884ec75061edca700fd69886c
2015-03-07 05:57:46 -07:00
Dean Troyer
ee2ba48aa4 Fix catalog list when region name is absent
Some service catalogs in the wild have services without region names defined.
Let's be nice and stuff in a default value indicating this state.

Closes-Bug: #1429211
Change-Id: I3ebe2534dc6e3438aaeddc7757fb2db4117eae4b
2015-03-06 11:28:11 -06:00
Jamie Lennox
47977fcc32 Raise AttributeError for unknown attributes
Not returning a value is the same as returning None. In the event that
someone asks ClientManager for an attribute that doesn't exist it should
raise AttributeError in the same way as other python objects rather
than return an empty value.

Change-Id: Id0ee825e6527c831c38e3a671958ded362fb96e1
2015-03-05 23:40:26 -08:00
TerryHowe
d05b5e14f1 Fix identity v2 catalog list
The v2 catalog list was only printing the last endpoint in
the catalog.

Change-Id: I5401a11eedb3be1513c86261329de50c8ad82720
2015-03-04 10:14:40 -07:00
Jenkins
9400effd4b Merge "Restrict groups and users from changing domains" 2015-02-10 07:34:02 +00:00
Jenkins
b317c2442b Merge "Do not allow user to change domain of a project" 2015-02-10 07:17:33 +00:00
Steve Martinelli
07c4fa9d4b Restrict groups and users from changing domains
Similar to projects, we shouldn't allow users and groups to
change domains. The server side tosses up an error but osc
should restrict that behaviour in the first place.

Related-Bug: #1418384

Change-Id: I860291a5859c576021b18e35d1a12c32abfb6ca5
2015-02-09 15:19:11 +00:00
Steve Martinelli
dca9978205 Do not allow user to change domain of a project
Keystone Server already surfaces an error for this operation, but
we should restrict the user, and not offer --domain to be changed
for a project.

Change-Id: I48317e8accfea3c285e6ad213e75b783de8070ac
Closes-Bug: #1418384
2015-02-09 15:18:51 +00:00
Steve Martinelli
cf23fd5cf6 Implement trust in identity v3 api
Added new module in identity v3 api to handle create, read, and delete
operations of trust resources.

Co-Authored-By: Lance Bragstad <lbragstad@gmail.com>
Co-Authored-By: Steve Martinelli <stevemar@ca.ibm.com>

Closes-Bug: #1413718
Change-Id: I2b360b141ff70d4f396466abede859a3db6644f4
2015-02-08 20:49:43 -05:00
Steve Martinelli
5e43120d43 Add region name for identity and volume clients
We do not take into account region names for identity and volume
clients.

Change-Id: I4263e9013226b0adc6b9ad7540d6ad3efb42e809
Co-Authored-By: Eric Helgeson <erichelgeson@gmail.com>
Related-Bug: #1405416
2015-01-21 01:52:20 -05:00
Dean Troyer
c2c3f2e0f2 Update service clist commands for v2 and v3
Changes to the 'service list' commands for Identity v2 and v3:
* Document support for --long
* Add Description to v3 output with --long
* v3 output is now (ID, Name, Type), with (Description, Enabled) added with --long
* Change v2 output to match v3 output, with the absense of Enabled.
* Update doc to match

Closes-Bug: #1411337
Change-Id: I999e3df22f61350cdeba63bbb7d01145c2ffeeaf
2015-01-16 12:59:14 -06:00
Jenkins
8dd8cdcdfe Merge "Check if service.name available before access" 2015-01-15 07:34:36 +00:00
Jenkins
4a8a2fb27d Merge "Rework role list v2 for --user and --project" 2015-01-13 22:35:21 +00:00
Jenkins
dee071528d Merge "Command doc: policy" 2015-01-13 07:45:22 +00:00
Jenkins
872e509ca5 Merge "Tweaks to the catalog doc and show command" 2015-01-13 07:45:15 +00:00
Jenkins
2525ec4e52 Merge "Fine tune some of the helps commands" 2015-01-13 07:41:47 +00:00
Steve Martinelli
c04b49ef07 Tweaks to the catalog doc and show command
Looks like providing a service id isn't working, so it the help
message was reduced to just type and name.
Added a bit more to the docs, too.

Change-Id: Id7f8b48bdf99773ad55ca7f204f3c779f84633d5
2015-01-13 05:59:38 +00:00
Steve Martinelli
019c155e9b Fine tune some of the helps commands
try and add some consistency with the show and delete commands.

replace 'show x' with 'display x'
change 'delete a y' with just 'delete y'

Change-Id: I47dfa8ee23ac5c41b355796415eb515155832f65
2015-01-13 00:58:57 -05:00
Steve Martinelli
673e0d88ff Command doc: policy
Also tweaked a bunch of the code to not show 'blob', but 'rules'
instead.

Change-Id: I6db798d272ff416a77f169c0e912d2096fa02504
2015-01-12 21:59:44 -05:00
Jenkins
a7a1a576e0 Merge "fix some small issues in catalog show" 2015-01-12 18:14:44 +00:00
Dean Troyer
6ebbd278cf Command docs: add service
Co-Authored-By: Lin Hua Cheng <os.lcheng@gmail.com>

Change-Id: Icd39e6d769fd4c4797fcf4ef9eb97c71ed166b3b
Closes-Bug: #1404434
2015-01-12 05:22:52 +00:00
wanghong
a8f60a8aa1 fix some small issues in catalog show
I think there are three issues we should fix:
1. wrong indentation of 'continue'
2. currently, name is optional for service, but according to the
   currrent logic, if a service doesn't have name attribute we will
   select it anyway
3. we always loop all catalogs

Change-Id: I9fce66677affa396b6a12afea76e87cab9215a58
2015-01-12 12:08:43 +08:00
Steve Martinelli
ffb7832159 Rework role list v2 for --user and --project
`os user role list` does the same as v3's `os role list`.
We should rework v2's `role list` to basically call `os user role list`
under the covers.

Closes-Bug: #1409179
Change-Id: I9839f6be139d6a6a3f6bbf79957e218dd8e03fe3
2015-01-10 01:02:33 +00:00
Steve Martinelli
d2943d2592 Command doc: access token
Change-Id: I1b7103e28273f0a63c7d6b6003317b9e69702b05
2015-01-09 09:20:29 +00:00
Steve Martinelli
d9c217e5bc Request token authorize
Command doc and tweaks to the code

Change-Id: I8f251bf9ca77f16b01a509844e79ddde82048b0d
2015-01-09 09:20:24 +00:00
Jenkins
32c933528b Merge "Request token creation docs + tweaks" 2015-01-09 08:38:46 +00:00
Jenkins
bf964810b7 Merge "Command doc: consumer" 2015-01-09 08:38:39 +00:00
Jenkins
f38d6e7aee Merge "Allow user list to filter by project" 2015-01-08 23:07:12 +00:00
Steve Martinelli
6025fa83f1 Request token creation docs + tweaks
Added command docs, and changed request token to take in name or
id of a project, and also support a domain option.

Change-Id: I87363274e5b7a0c687e234f5a4bcaaf166d28840
2015-01-08 22:28:26 +00:00
Steve Martinelli
c885c72cba Command doc: consumer
Change-Id: Ie687e1d7f80810106a64204828299f9d143b8d7c
2015-01-08 17:28:09 -05:00
Steve Martinelli
0ff28d5251 Allow user list to filter by project
Adds a --project filter to `os user list`, which really
calls the role assignment manager behind the scenes.

Change-Id: I57a75018f12ed3acdf8f6611b6b58bd974f91da2
Closes-Bug: #1397251
2015-01-08 16:49:17 -05:00
Steve Martinelli
a0c63dedf4 Command doc: federation protocol
Change-Id: I1289eb0caf31fca21c5c377cf13aebd1434a00ee
2015-01-08 21:41:43 +00:00