377 Commits

Author SHA1 Message Date
TerryHowe
b3335b3474 Do not set default versions in parsed args
Setting default versions in parsed args makes it so OCC
cannot tell if the argument was parsed, an environment
variable was set or it is just defaulted.  In order to
set api versions from OCC, it will have to be defaulted
after processing OCC.

Closes-Bug: #1453229
Change-Id: I4d065919397b783f3bdd4022c986c0234a7a16e6
2015-07-18 06:28:09 -06:00
Jenkins
bbe71eb9a3 Merge "Rename endpoint type to interface" 2015-07-17 13:55:47 +00:00
Jenkins
ff3af9f9d5 Merge "only return endpoints that have url" 2015-07-17 03:57:45 +00:00
Guojian Shao
7b32ec003b add --project-domain option for user v3
user v3 create/set only support --project option,
we need --project-domain to prevent collisions between
project names exist.

Change-Id: I2d62e5b9bb6df4c5c5a9542514faf2e4365bb18b
Closes-Bug: #1475357
2015-07-16 23:26:11 +08:00
Guojian Shao
7829aca704 only return endpoints that have url
Change-Id: I97a502252c0c377fce573e92b83c0122812f6f80
Closes-Bug: #1474656
2015-07-16 07:25:51 +00:00
Steve Martinelli
37c83e6231 Fix the way we call find_resource when only using ID
Change-Id: I6fb08edd5499767863e0e67f363bcd9fff3aea60
Closes-Bug: 1475127
2015-07-16 06:31:46 +00:00
TerryHowe
36391a81a3 Rename endpoint type to interface
Change-Id: I4e21d09bc747e8210f4f79a1d6c4c7ccf2f25d1c
Closes-Bug: #1454392
2015-07-15 10:11:59 -06:00
Martin Schuppert
7af00f833f openstack catalog list always returns publicURL for internalURL and adminURL
With this change 'openstack catalog list' returns the correspoding URL for
publicURL, internalURL and adminURL in _format_endpoints .

Change-Id: I5d946c9d70a2d3c22a7cc77067fec8e2e9aa4940
Closes-Bug: 1472629
2015-07-08 21:40:44 +02:00
Jenkins
ee64c2fa6b Merge "Add --os-endpoint-type cli optional argument" 2015-07-03 02:48:47 +00:00
Roxana Gherle
5521e4c504 Add --os-endpoint-type cli optional argument
User should be able to specify the endpoint type through
a CLI optional argument/ENV variable setting. We will name this new
optional argument: --os-endpoint-type (Env: OS_ENDPOINT_TYPE) and
based on the value given, the service API will use that specific
endpoint type. Possible values: public, admin, internal.

DocImpact
Closes-Bug: #1454392
Change-Id: Ife3d4e46b44c0ddcd712b1130e27e362545a9a29
2015-07-02 10:10:46 -07:00
Jenkins
ec31a2a12e Merge "Enables retrieval of project's parents and subtree" 2015-06-25 21:51:04 +00:00
Samuel de Medeiros Queiroz
ed241ef9bc Add support to inherited project role grant calls
Once inherited project role grant calls are
implemented on python-keystoneclient,
python-openstackclient also should support such
calls.
This patch add such support as well as its
related tests.

Co-Authored-By: Raildo Mascena <raildo@lsd.ufcg.edu.br>

Change-Id: Id72670be8640e5c6e2490a6ef849e9ec3493b1a9
Implements: blueprint hierarchical-multitenancy
2015-06-22 11:05:01 -03:00
Jenkins
5e095d66b8 Merge "Refactor option handling for user|group|project domain scoping" 2015-06-17 18:43:32 +00:00
Steve Martinelli
2b0013c5c1 Refactor option handling for user|group|project domain scoping
put the common options in identity.common, this way the help is
consistent

Change-Id: I5b09cfb56fa0f8d16feb95150f216fccbe9f2b22
2015-06-17 12:38:40 -04:00
Steve Martinelli
258f4ca6e6 reference corect ec2 helper function
ec2creds.py was referencing a function on self, but wasn't there.
Correctly reference the right function.

Change-Id: I62f09c497be9dbb394341914388d60634e8b80c2
Closes-Bug: 1465561
2015-06-16 11:02:09 -04:00
Steve Martinelli
ec903a1f09 Add oidc plugin for listing federation projects
the oidc plugin should be included in the list of valid federation
protocols that can leverage `federation project list`

Change-Id: I3f5c5ab262c7097273716a81618a2dcbb159dd6f
2015-06-11 03:42:07 -04:00
Jenkins
bc53b05f8f Merge "Enable specifying domain for group and role commands" 2015-06-09 18:20:34 +00:00
Rodrigo Duarte Sousa
4fab606349 Enables retrieval of project's parents and subtree
Adds the possibility to retrieve a project and list its
parents and subtree in the hierarchy.

Co-Authored-By: Rodrigo Duarte <rodrigods@lsd.ufcg.edu.br>
Co-Authored-By: Samuel de Medeiros Queiroz <samuel@lsd.ufcg.edu.br>

Implements: bp hierarchical-multitenancy

Change-Id: I874f6faffc8a2db9d99f12cbe0a69c0a30c0d9df
2015-06-09 13:10:22 -03:00
Juan Antonio Osorio Robles
f7feef7f8d Enable specifying domain for group and role commands
Many of the commands for the group and role resources were lacking an
option to specify the specific domain groups, projects or users belong
to. This commit fixes that.

Change-Id: I461d2bcfd01ad2dea970de38ec7ad6f4a631ceb1
Closes-bug: #1446546
2015-06-08 17:05:10 +03:00
Dave Chen
7cf779004e Not use the deprecated argument
`project` argument is deprecated in keystoneclient for V3 API,
and use `default_project` instead, should use `default_project`
as the argument name in the openstackclient accordingly.

Change-Id: Ib9d70801c933a184afcdab75204393efa764fa87
Closes-Bug: #1462389
2015-06-08 10:15:24 +08:00
Jenkins
4cc7313504 Merge "add --domain argument to v3 project set" 2015-06-04 22:21:44 +00:00
Jenkins
0c5f12aec0 Merge "Clean up ec2 credentials help text" 2015-06-03 23:04:27 +00:00
Jenkins
7f658c0aca Merge "Add domain support for ec2creds in v3 identity" 2015-06-03 21:08:52 +00:00
Jenkins
1fff11a9ab Merge "Add EC2 support for identity v3 API" 2015-06-03 20:20:12 +00:00
Dean Troyer
3fa0bbc7ee Clean up ec2 credentials help text
Re-sync the text in v2 and v3 help and the docs

Depends-On: If4ac5356ade8cff347bb9eb9f88d1ace82bb7275
Change-Id: Iabef2f271fcf46748295c29713fea1811dcab29c
2015-06-03 15:03:57 -05:00
Steve Martinelli
7665d52a0c Add domain support for ec2creds in v3 identity
A follow up work item from I52ff2020ef2fcbdc8a98280b73c6fd4a93bc8e0f
to support domain scoped users and projects for ec2creds in the
v3 identity api.

Related-Bug: 1236326

Change-Id: If4ac5356ade8cff347bb9eb9f88d1ace82bb7275
2015-06-03 15:33:36 +00:00
Jamie Lennox
15d3717e73 Add EC2 support for identity v3 API
EC2 support is provided for the v2 identity API and is available in
almost exactly the same format in the v3 API and enabled by default.

Supporting EC2 in the v3 identity API in OSC will make it much easier to
transition devstack to a v3 only state.

Closes-Bug: 1236326

Change-Id: I52ff2020ef2fcbdc8a98280b73c6fd4a93bc8e0f
2015-06-03 15:33:15 +00:00
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
Guojian Shao
542f587364 add --domain argument to v3 project set
Currently argument 'domain' is not supported by command 'os project
set', but it is required by keystone v3 update project API to match
the domain id.

Closes-Bug: #1460122
Change-Id: I1b32f67f78b369f6134a74cdf9a4811b7539d44b
2015-05-29 22:42:42 -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