1754 Commits

Author SHA1 Message Date
Jenkins
f845d09b5a Merge "Replace assertRaisesRegexp with assertRaisesRegex" 2015-03-27 02:29:22 +00:00
Victor Morales
cf97f271ed Replace assertRaisesRegexp with assertRaisesRegex
assertRaisesRegexp is raising a warning message that indicated the
function is going to be deprecated, use assertRaisesRegex instead.

Change-Id: Iff3b36ebec5d5d4b75c95c699ab76704d0053137
Closes-Bug: #1436957
2015-03-26 20:31:02 +00:00
OpenStack Proposal Bot
981c499c6c Updated from global requirements
Change-Id: I499261729a8342a7dd733b3d4ff18cb5b86e946f
2015-03-26 11:01:31 +00:00
Jenkins
a84b5ac115 Merge "Add a FederatedBase v3 plugin" 2015-03-24 21:46:36 +00:00
Jamie Lennox
161c869c6c Return None for missing trust_id in fixture
If the trust_id is unset it raises a KeyError. This is unusual from a
python perspective (if nothing else it should be AttributeError) and
different to all the other attributes of the fixture.

Return None if no trust_id is set on the fixture.

Change-Id: I15d33d77027a188fa47df18387c4610908f8e2d2
2015-03-24 21:31:27 +11:00
Jenkins
26230c5a7e Merge "Improve feedback message in SSL error" 2015-03-24 00:55:21 +00:00
Rodrigo Duarte Sousa
cccc065516 Improve feedback message in SSL error
Adds the error message to give a hint to the user about
what happened.

Change-Id: I9ca56de8592e65194062038c81b468be72ffb2d9
Closes-Bug: 1297280
2015-03-20 10:04:39 -03:00
Jamie Lennox
3759cfa96b Add a FederatedBase v3 plugin
With the out of tree federation plugins going on extract the basic
federation workflow and required information that can be reused.

Change-Id: I6fdb3a5c6d9f3e1d6fa3425fd05809155effed1f
2015-03-20 20:29:18 +11:00
Jenkins
3a76d5c211 Merge "Rename requests mock object in testing" 2015-03-20 07:37:45 +00:00
Jenkins
cda1f54f68 Merge "Deprecate keystone CLI" 2015-03-20 01:34:39 +00:00
Jenkins
37d191c169 Merge "Add OS-SIMPLE-CERT support for v3." 2015-03-19 18:51:31 +00:00
Brant Knudson
29c84cdf8b Deprecate keystone CLI
The keystone CLI is now deprecated. Every time you run it it's
going to print out an annoying message saying how deprecated it
is.

bp deprecate-cli

Change-Id: Ife7ad2025f515dc716efe2b2dd275663c21402da
2015-03-18 20:06:09 -05:00
Jenkins
bde71a25f1 Merge "Allow passing logger object to request" 2015-03-18 21:35:11 +00:00
Marek Denis
7e63af0c4e Clean arguments in test_federation.*.test_create()
This applies to test_federation.IdentityProviderTests.test_create() and
test_federation.MappingTests.test_create()

Change-Id: Ie88c959626520fcec4ee64ffc73a8fc845c5a6d3
2015-03-18 15:40:16 +00:00
Jenkins
cfad7da20e Merge "Implements subtree_as_ids and parents_as_ids" 2015-03-18 03:59:43 +00:00
Jamie Lennox
4822d8bb9d Rename requests mock object in testing
It has been mentioned a number of times that the self.requests naming
for the requests_mock object is confusing between whether you are
actually sending a request or are mocking a request.

Rename all entries of the requests object to requests_mock.

This cleans up a couple of entries where the older register_uri format
was being used in favour of using the HTTP method as the requests_mock
method.

Change-Id: I315085b4088130b510f9dbd696011d983598372c
2015-03-18 10:31:06 +11:00
Jamie Lennox
e39eec0ff8 Provide a generic auth plugin loader
For keystonemiddleware, shade and other projects that do more
complicated option loading than simply CLI or CONF file provide a means
to load an auth plugin where options are discovered by a provided
function.

This plugin is designed to work with the options as provided by
get_options rather than either the argparse or CONF registration
functions.

Use these as the default loading mechanism for the existing argparse and
CONF functions as it standardizes the mechanism between the two sources.

Change-Id: I15634ac30581c7aea14e709f12fb202570190f46
Closes-Bug: #1428900
2015-03-18 10:25:55 +11:00
Joe Gordon
c0145e5fe1 Make non-import packages lazy
6659902a731767b3405d68e515c8edcc3af81119 caused a lot of importing a
lot of things in __init__ which makes loading anything, say session,
really slow. The load time for keystoneclient is really critical since
every client uses it. And having a CLI take several seconds to do
nothing is really bad user experience.

This drops the hot cache import time of keystoneclient.session down to
160ms which is about 60ms faster (down from 220ms without this patch)
for me.

Change-Id: I917503ae54c9abcff417f0a0368abb765a847b6e
Partial-Bug: #1431649
Co-Authored-By: Robert Collins <rbtcollins@hp.com>
2015-03-17 08:27:47 -05:00
Jamie Lennox
fc1f5a7963 Extract BaseAuth out of Auth Plugin
The basic Auth plugin for v3 tokens makes the assumption that you need
to pass in some AuthMethod objects. This works well for most auth types
where you want the plugin to construct the auth request for you.

In the case of federation though we want to be able to have a rescoping
plugin that will return an auth_ref and not take any auth_methods as
arguments.

Extract the most basic part of the Auth plugin into BaseAuth class that
Auth and federation plugins can both inherit from.

Change-Id: Ia8c8c614b8eb51170346ff5b1e20a1e7ebbb47de
2015-03-17 09:54:17 +11:00
Jamie Lennox
d4a4acecbe Split v3 authentication file into module
The V3 authentication plugins file contained the existing plugins as
well as the base class. As we look to add new plugins it is simpler if
we break this file up.

Change-Id: I42b222a2012ea10491450d6b91c2008178dc7671
2015-03-17 09:54:17 +11:00
Jenkins
c30cf7807c Merge "Federation Service Providers CRUD operations" 2015-03-16 17:30:45 +00:00
Steve Martinelli
e491d0dc84 Federation Service Providers CRUD operations
Implement CRUD operations for Service Providers used in K2K.

Implements: bp k2k-service-providers
Change-Id: I514c64d2a412d12cff922a02c575f1764a1a23ae
2015-03-16 10:12:12 -03:00
Jamie Lennox
c0a731204e Allow passing logger object to request
It can become difficult to trace the client that created HTTP requests
as the logging all goes through the keystoneclient.session logger. Allow
passing the logger through the request function and make it able to be
set via the adapter so it can be set once per client instantiation.

Change-Id: Id45c315bee9a56f1c241210d667470751bf689d5
Closes-Bug: #1421868
2015-03-16 15:16:07 +11:00
Dave Chen
997a649d26 Crosslink to other sites that are owned by Keystone
Add links to identity service and keystone middleware to
the landing page. This indicates to the user that the
three projects are related.

Change-Id: I37bb4cd866524bad69f90c53e6a58d58202fc263
Co-Authored-By: Steve Martinelli <stevemar@ca.ibm.com>
Partial-Bug: #1428321
2015-03-14 18:47:05 +08:00
Rodrigo Duarte Sousa
14ace4a5de Implements subtree_as_ids and parents_as_ids
This patch implements the new ways to get the project's hierarchy:
  'subtree_as_ids': If True, returns projects IDs down the hierarchy
                    as a structured dictionay.
  'parents_as_ids': If True, returns projects IDs up the hierarchy
                    as a structured dictionay.

Change-Id: Ia3afe994893dfca059cb8361f7ab1c14e28e1ad5
Implements: blueprint hierarchical-multitenancy-improvements
2015-03-13 17:02:39 -03:00
Jenkins
385c19b8b6 Merge "Fix time issue in AccessInfo test" 2015-03-10 22:26:42 +00:00
Jenkins
4a0d1b3f13 Merge "Creating parameter to list inherited role assignments" 2015-03-10 20:53:17 +00:00
Jenkins
ed43a70012 Merge "token signing support alternative message digest" 2015-03-10 19:05:01 +00:00
Jamie Lennox
932e6d5510 Fix time issue in AccessInfo test
I've only seen this happen once, however by making the token expiry 5
minutes in the future, then checking that it wont have expired in 300
seconds means that if the test happens all on the same second boundary
then the test will fail.

Just increase the time we're checking for by a second to ensure it
doesn't happen.

Change-Id: Iadeadfbacaf6f1b939c237919b52445c60c9bdd0
2015-03-11 05:32:33 +11:00
Jamie Lennox
be1e94f9a2 Don't autodoc the test suite
Don't build API documentation for the keystoneclient tests. These are
not public functions, pollute the existing docs, and extend the time
required to build docs.

Change-Id: I1206a808272d19b342d26f5117aedafb476d0994
2015-03-09 16:11:51 +11:00
Brant Knudson
b5a5af1c3b Add OS-SIMPLE-CERT support for v3.
There was no API support for the OS-SIMPLE-CERT v3 extension.

bp auth-token-use-client

Change-Id: Ic3d36018fc2e5a5a0da8d37a7fa58b77b8fa8e15
2015-03-05 19:34:44 -06:00
OpenStack Proposal Bot
d403c34132 Updated from global requirements
Change-Id: I750e817d2ff4e464f36584e5fd298f8037bd84db
2015-03-05 04:57:50 +00:00
Jenkins
94e01e20d1 Merge "Import functional CLI tests from tempest" 2015-03-04 00:40:15 +00:00
Jamie Lennox
3e2035bf88 Allow handling multiple service_types
If the same service_type was mentioned in the catalog more than once
then only the last entry would be parsed and any possible other matches
would be lost.

This was something that novaclient used to do, and as we are pushing
sessions as the way that clients should all work we need to maintain
that compatibility.

Change-Id: I6964515ed1975bce1998897abfc02a1ec36e2584
Closes-Bug: #1425766
2015-02-26 14:29:18 +11:00
Jamie Lennox
0ef042c723 Import functional CLI tests from tempest
These are mostly unmodified other than:
 - fixing up the imports to work in the keystoneclient directories.
 - Setting the timeout value to 15 (the tempest default) as we don't
   have a CONF file to make it configurable.

Take from tempest Commit: d3a8c7778217cceb84d995f1509e68bb8d7a403f

Change-Id: Id2a4300b7c0a53b2da2f62c07a0ffb71798908b6
Implements: bp functional-testing
2015-02-26 14:23:50 +11:00
henriquetruta
c756f2dab3 Creating parameter to list inherited role assignments
This change adds the 'os_inherit_extension_inherited_to'
parameter when calling the list role assignment method.
It adds the following query to the URL:

http://host:35357/v3/role_assignments?scope.OS-INHERIT:inherited_to=projects

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

Change-Id: I9bfeecf4ae9da6a0d232f0cff80af64a16ec0829
Closes-bug: 1367868
2015-02-23 13:38:19 -03:00
Jenkins
bd6fa327c8 Merge "Make post_test_hook.sh executable" 2015-02-23 04:44:50 +00:00
Jenkins
7a50071be6 Merge "Add default body for non-abstract empty methods" 2015-02-23 01:38:27 +00:00
Jenkins
1ab3c8747f Merge "Using correct keyword for region in v3" 2015-02-23 01:38:04 +00:00
OpenStack Proposal Bot
b3cf5994ad Updated from global requirements
Change-Id: If749314fbad1c0e1c55614fed10e7211c62559af
2015-02-20 13:59:27 +00:00
Jamie Lennox
0dbb3138a8 Make post_test_hook.sh executable
Functional test job fails with permission denied trying to execute the
post_test_hook. Set permissions +x.

Change-Id: I9ef052daf73761ea1e4128fc1738278fc8fa2483
2015-02-20 18:09:39 +11:00
lin-hua-cheng
67a0c2e31a Add default body for non-abstract empty methods
Some non-abstract methods only have docstring with no content,
this just add a default content to those function.

Change-Id: Idcf5b9f6ed766d3bc1541e158bdd8e58b06223e2
2015-02-14 05:57:37 +00:00
Jenkins
96c038004f Merge "Make remove_service_catalog private" 2015-02-13 16:38:49 +00:00
Jenkins
4e2a14a132 Merge "Create functional test base" 2015-02-13 15:56:05 +00:00
Jamie Lennox
ffe34935a4 Create functional test base
Setup test runners to run unit tests by default and add a stub
functional test that we can get gating.

Change-Id: I6627925ab63340c880adc7c938a0b74faff47bc7
Implements: bp functional-testing
2015-02-13 17:55:34 +11:00
Brant Knudson
ae78422562 Ignore all failures removing catalog when logging token
Operations could fail if the response was logged and had a 'token'
field that's not a dict. The fix is to ignore all errors when
trying to remove the service catalog from the response.

Also, enhanced the service catalog removal code to support V2
tokens.

Closes-Bug: 1420080
Change-Id: I35b971415744825e8e5f00f30dcf193d04ee699a
2015-02-12 20:20:48 -06:00
Sergey Kraynev
8311708907 Using correct keyword for region in v3
Keystone v3 and v2 have different keywords in endpoint
dictionary. This patch adds ability for keystone client for correct
work with old and new API.

Change-Id: I886b4c7ac3cbe08ac1b88f490e9ca92a90256961
Closes-Bug: #1364463
2015-02-12 07:24:16 -05:00
Jenkins
32c18a83e2 Merge "Move tests to the unit subdirectory" 2015-02-12 07:36:45 +00:00
Jenkins
8f80b585b6 Merge "Fix a comment error in cms.py" 2015-02-12 07:36:26 +00:00
Jamie Lennox
6bd93179a2 Move tests to the unit subdirectory
Move all the existing tests to the unit/ subdirectory. This gives us
some room to add a functional/ directory later with other tests.

Change-Id: I0fb8d5b628eb8ee1f35f05f42d0c0ac9f285e8c3
Implements: functional-testing
2015-02-11 19:03:25 +11:00