79 Commits

Author SHA1 Message Date
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
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
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
Jenkins
6698f14fdb Merge "type should be required for v2.0 service create" 2015-01-03 00:47:25 +00:00
Jenkins
9d5a7c7c1b Merge "Rename column to default project id for long listing v3 user" 2015-01-02 19:11:45 +00:00
Jenkins
ee912035ca Merge "Command docs: domain" 2015-01-02 08:50:15 +00:00
Steve Martinelli
e7ec6bc6e4 Rename column to default project id for long listing v3 user
Previously this column was coming up as empty, since user's
have a `default project id`, not just `project id`.

Change-Id: I3d7f7eb600e9526b9c6cc2a8c5d6009b9100b1f5
2015-01-02 02:39:44 -05:00
Dean Troyer
f18f264ed7 Command docs: domain
Change the implementation of --enable|--disable on domain create
and set commands to our usual style.

Change-Id: I10f2b96281a114fa3cf3b001394844770b2a8632
2014-12-31 10:08:51 -06:00
lin-hua-cheng
4a07e63e7e type should be required for v2.0 service create
Updated the service name to be optional, mostly matching the cli arguments
with v3 service create.
Implemented the following changes on service create:
- if only a single positional is present, it's a <type>.
  This is not currently legal so it is considered a new case.
- if --type option is present the positional is handled as <name>;
  display deprecation message
- if --name option is present the positional is handled as <type>.
  Making --type optional is new, but back-compatible
- Made --name and --type mutually exclusive.
- only '--name <service-name> <type>' shall appear in the help output

Change-Id: I8fd4adba3d8cd00d5a8cacc2c494d99d492c45a3
Closes-Bug: #1404073
2014-12-30 17:31:29 -08:00
Jenkins
8593b0a56a Merge "Allow service description to be set for KS V3" 2014-12-30 21:01:03 +00:00
lin-hua-cheng
36ab944d2e Allow service description to be set for KS V3
Change-Id: Ibf84882c9a9f408268c225190436fc1a534e1017
Closes-Bug: #1404997
2014-12-23 18:06:13 -08:00
wanghong
d8f1cbd984 add multi-delete support for identity
This is part2. Add support for these objects:
identity.project(v2.0)
identity.role(v2.0)
identity.user(v2.0)
identity.project(v3)
identity.role(v3)
identity.user(v3)
identity.group(v3)

Closes-Bug: #1400597
Change-Id: I270434d657cf4ddc23c3aba2c704d6ef184b0dbc
2014-12-23 09:39:29 +08:00
Jamie Lennox
25a7c1f27f Don't import form keystoneclient.openstack.common
The keystoneclient.openstack.common directory is where we sync files
from oslo incubator. It is not a public directory and should not be
being consumed by openstackclient.

Change-Id: I011bb95c2c824e2dbc4b822ca922ae77b8d9b955
2014-12-17 18:17:56 +10:00
Jenkins
6d589ac801 Merge "add keystone v3 region object" 2014-11-19 04:18:38 +00:00
wanghong
6edc9b89ed add keystone v3 region object
Co-Authored-By: Steve Martinelli <stevemar@ca.ibm.com>

Change-Id: Ia6f607630dbf507681733c3ab3b9b7c55de30f49
Closes-Bug: #1387932
2014-11-18 09:46:26 -05:00
Steve Martinelli
7242113a8f Add additional support for --or-show
Add --or-show for the following:
  * v2 roles
  * v2 projects

Change-Id: Ibbae19cda668575b9527fbd259f1298c48b8265b
2014-11-14 16:29:57 -05:00
Dean Troyer
46f6df5f23 Swap remaining assertEqual arguments
Change-Id: I1abdebb298b93074657a7ba65a7186d814969780
2014-11-07 15:08:08 -06:00
Dean Troyer
42d0b20ebc Add --or-show option to user create
The --or-show option is added to create commands for the common case
of needing to ensure an object exists and getting its properties if
it does or creating a new one if it does not exist.

Note that if the object exists, any additional options that would
set values in a newly created object are ignored if the object
exists.

FakeResource needs the __name__ attribute to fall through utils.find_resource.

Prove the concept on v2 user create then propogate once we're happy with it...

Change-Id: I6268566514840c284e6a1d44b409a81d6699ef99
2014-11-07 12:28:42 -06:00
Matthieu Huin
631ed3c802 Unscoped federated user-specific commands
A federated user can authenticate with the v3unscopedsaml plugin and
list the domains and projects she is allowed to scope to.
This patch introduces the new commands 'federation domain list' and
'federation project list'.
Note that for these commands -and plugin- to be available, the lxml
library must be installed.

Change-Id: I2707b624befcfb0a01b40a094e12fd68a3ee7773
Co-Authored-By: Florent Flament <florent.flament-ext@cloudwatt.com>
2014-10-30 17:27:28 +01:00
Dean Troyer
cd368bb816 Fix token issue after auth changeup
IssueToken.take_action() was missed in updating the structure of
the ClientManager.

Also, TOKEN_WITH_TENANT_ID in v3 is just wrong...

Closes-Bug: #1383396

Change-Id: If2dd82a26af1d743ee9df73e0c1aebce497bf22e
2014-10-20 18:21:51 +00:00
Jenkins
79a9331f95 Merge "Remove 'links' section from several v3 Identity objects" 2014-10-13 03:26:27 +00:00
Steve Martinelli
a8d4b0eebb Remove 'links' section from several v3 Identity objects
The links field in the returned objects from the v3 Identity
API aren't really useful, so let's remove them.
Managed to remove most of them from the core API.
I'll likely remove the extension/contribution (oauth/federation)
related ones in another patch.

Also in this patch the code for setting services and projects
was changed. Though not incorrect, it was not needed to copy
the entire returned object, we should just need to pass in
the fields we want to update.

Change-Id: I164ca9ad8b28fa10b291e9115ef40753e387c547
2014-10-11 22:35:12 -04:00
Steve Martinelli
1b3c7ec122 Fix issue token for v3
Currently the code is broken as it references a part of
keystoneclient that does not exist.

Change-Id: I7fbc754537fbb4acffb166b5854840acfaef1fb8
Closes-Bug: #1379871
2014-10-11 20:34:09 -04:00
Jenkins
8554fd24fe Merge "CRUD operations for federated protocols" 2014-10-09 03:59:33 +00:00
Jenkins
d87868720e Merge "Pass in domain and project as positional args, not kwargs" 2014-10-09 03:23:03 +00:00
Marek Denis
14c61a0ace CRUD operations for federated protocols
Openstackclient needs to have a capability to manage federated protocols
(like saml2, openid connect, abfab). This patch allows users to
administrate such operations from the commandline.

Change-Id: I59eef2acdda60c7ec795d1bfe31e8e960b4478a1
Implements: bp/add-openstackclient-federation-crud
2014-10-08 21:12:38 -04:00
Marek Denis
30b0a41ce7 Implement CRUD operations for Mapping objects
Change-Id: I4b8f2e77e741cf74f50aba98ab975af7321b02c6
Implements: bp/add-openstackclient-federation-crud
2014-10-08 18:35:11 +02:00
Steve Martinelli
d972b8364c Pass in domain and project as positional args, not kwargs
The signature for users.set in keystoneclient dictates that
domain and project be sent in, not domainId and projectId,
which are being incorrectly sent in as 'extra' data.

Closes-Bug: #1376833

Change-Id: I44df3e492f61eab2241f3758dee622417bb6f399
2014-10-02 14:32:12 -04:00
Dean Troyer
da45b34828 Add service catalog commands
'catalog list' and 'catalog show' for Identity v2

Identity v2 only so far.

Change-Id: I9df0dac3d5bb7c18f38a81bd7d29f8119462d3a5
2014-09-18 15:42:10 -05:00
Dean Troyer
ae957b176e Use Keystone client session.Session
This replaces the restapi requests wrapper with the one from Keystone client so
we can take advantage of the auth plugins.

As a first step only the v2 and v3 token and password plugins are supported.
This maintainis no changes to the command options or environment variables.

The next steps will include reworking the other API client interfaces to
fully utilize the single auth session.

Blueprint: ksc-session-auth
Change-Id: I47ec63291e4c3cf36c8061299a4764f60b36ab89
2014-09-08 00:06:52 -05:00
Jenkins
3317e0abf6 Merge "Add action 'user password set' for identiy v3" 2014-09-07 15:12:18 +00:00
Mouad Benchchaoui
0069adef5c Add action 'user password set' for identiy v3
This new action will allow a user to change their own password by
either providing the new password as an argument (--password) or by
being prompted to enter the new password.
In both cases user will be prompted to enter their current password
as required by the v3 API.

Closes-Bug: #1337245
Change-Id: I5e1e0fd2b46a4502318da57f7cce2b236fb2d93d
2014-09-07 02:37:54 -04:00
Jenkins
b7816f3997 Merge "add service/interface/region filter for endpoint v3" 2014-09-06 17:02:45 +00:00
Jenkins
7a8c9a7a8a Merge "add tests for identity v3 endpoint" 2014-08-23 16:42:08 +00:00
Jenkins
fc44578f0a Merge "add tests for identity v3 domain" 2014-08-22 10:57:36 +00:00
wanghong
181f16da8a add service/interface/region filter for endpoint v3
Change-Id: I7eac5b2ff5f5a6f3f08b22dd3a48a5ae7e2c056b
Closes-Bug: #1281888
2014-08-18 16:41:15 +08:00
wanghong
99ad9ef92e add tests for identity v3 endpoint
Change-Id: I1479460473656ea4e2a48a976808371e840b49c1
Closes-Bug: #1348867
2014-08-14 20:17:54 +08:00
wanghong
2dc060cff3 add tests for identity v3 domain
Change-Id: I478215f62b51e6e73283f0304ea1b0736177d1b1
2014-08-14 20:11:00 +08:00
wanghong
19b8605224 a mistake in tests/identity/v3/test_role.py
Change test_service_show to test_role_show.

Change-Id: Ieef7fdeb9401b4dc28720c9ba14bf460ac171288
2014-08-12 19:36:57 +08:00
Jamie Lennox
5e7e94d59e Fix IDP commands
identity_client.identity_providers doesn't exist as a manager. These are
located at identity_client.federation.identity_providers. Fix the
routes.

Also fix passing id to .create() as a positional argument. This is not
allowed from keystoneclient it should be passed as a keyword argument.

Change-Id: I912c27fcee58b0723e27e9147def2cbd1c62c288
2014-07-21 10:04:47 +10:00
Terry Howe
b638488697 Domain administrator cannot do project operations
Domain administrator cannot do project operations because the
require access to the domain API (which they don't have).  When
attempting to find a domain for project operations, ignore errors
because the API returns nothing without indicating there is a
problem.  The domain administrators will have to use a domain id,
but they will still be able to do project operations.  If the user
does not have permission to read the domain table, they cannot
use domain names.

Change-Id: Ieed5d420022a407c8296a0bb3569d9469c89d752
Closes-Bug: #1317478
Closes-Bug: #1317485
2014-07-07 20:18:39 +00:00
Steve Martinelli
3bdfef827c Remove backslash usage from a few tests
Noticed these in the code, figured we should stick to not using
backslashes if possible.

Change-Id: I55e5402683141e14df7c2b38883b1f3cc2a6bb6a
2014-07-02 00:00:33 -04:00
Jenkins
ddf0c16a10 Merge "Fix PEP8 E126 and E202 errors" 2014-06-27 21:41:34 +00:00
Jenkins
58583b55ca Merge "Fix PEP8 E265 errors" 2014-06-27 21:41:33 +00:00
Dean Troyer
1fca946890 Rename token classes to match command
The token create/delete commands were renamed but not the class names.
Rename them to match.

Change-Id: Icbf9c0a954ed0332fa4c99e4ee2612bb11f89e3a
2014-06-27 09:14:58 -05:00
Dean Troyer
4914a8d107 Fix PEP8 E126 and E202 errors
Do both as they are all in the same set of files that required
major re-formatting.

Change-Id: I6e8a8ce19a55105124a33c0e2487fc4b4e06d252
2014-06-27 09:12:55 -05:00
Dean Troyer
11f3654f6e Fix PEP8 E265 errors
Change-Id: Ieb9a9af1da27d3935d1a4d3cfb61b0ccb03d099a
2014-06-27 09:12:55 -05:00
Dean Troyer
9dd3a5326c Complete Identity v3 list command filters
Complete the 'group list' and 'user list' filter options following
the refactor in https://review.openstack.org/69878

Change-Id: Ib4af417c56d4f7da4b88852f191af615cc7fa2ec
2014-06-19 13:00:02 -05:00
Jenkins
c6cc1d72d5 Merge "Refactor role list subcommand for identity v3 api" 2014-06-19 17:14:03 +00:00