diff options
author | Jenkins <jenkins@review.openstack.org> | 2014-12-11 00:07:53 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2014-12-11 00:07:53 +0000 |
commit | 05f146c2b8cc83158973f51ef70f15b8ad154ba4 (patch) | |
tree | bc7b350365dd6cc65ca307b5386677444b0d0498 | |
parent | a60978ed73227f6087ddad6a024e0a04255e35c5 (diff) | |
parent | b7da6d0e8449355fa7652523ee5ad0b36b298399 (diff) | |
download | python-keystoneclient-05f146c2b8cc83158973f51ef70f15b8ad154ba4.tar.gz |
Merge "duplicate auth-url option returned by BaseGenericPlugin"
-rw-r--r-- | keystoneclient/auth/identity/generic/base.py | 2 | ||||
-rw-r--r-- | keystoneclient/tests/auth/test_password.py | 22 | ||||
-rw-r--r-- | keystoneclient/tests/auth/test_token.py | 18 |
3 files changed, 41 insertions, 1 deletions
diff --git a/keystoneclient/auth/identity/generic/base.py b/keystoneclient/auth/identity/generic/base.py index 631eebd..6b1aceb 100644 --- a/keystoneclient/auth/identity/generic/base.py +++ b/keystoneclient/auth/identity/generic/base.py @@ -27,7 +27,7 @@ LOG = logging.getLogger(__name__) def get_options(): - return base.get_options() + [ + return [ cfg.StrOpt('domain-id', help='Domain ID to scope to'), cfg.StrOpt('domain-name', help='Domain name to scope to'), cfg.StrOpt('tenant-id', help='Tenant ID to scope to'), diff --git a/keystoneclient/tests/auth/test_password.py b/keystoneclient/tests/auth/test_password.py index 5c93864..c08e69d 100644 --- a/keystoneclient/tests/auth/test_password.py +++ b/keystoneclient/tests/auth/test_password.py @@ -38,3 +38,25 @@ class PasswordTests(utils.GenericPluginTestCase): def test_v3_user_params_v2_url(self): self.stub_discovery(v3=False) self.assertDiscoveryFailure(user_domain_id=uuid.uuid4().hex) + + def test_options(self): + opts = [o.name for o in self.PLUGIN_CLASS.get_options()] + + allowed_opts = ['user-name', + 'user-domain-id', + 'user-domain-name', + 'password', + + 'domain-id', + 'domain-name', + 'tenant-id', + 'tenant-name', + 'project-id', + 'project-name', + 'project-domain-id', + 'project-domain-name', + 'trust-id', + 'auth-url'] + + self.assertEqual(set(allowed_opts), set(opts)) + self.assertEqual(len(allowed_opts), len(opts)) diff --git a/keystoneclient/tests/auth/test_token.py b/keystoneclient/tests/auth/test_token.py index d9a11e0..9f0cc3c 100644 --- a/keystoneclient/tests/auth/test_token.py +++ b/keystoneclient/tests/auth/test_token.py @@ -27,3 +27,21 @@ class TokenTests(utils.GenericPluginTestCase): def new_plugin(self, **kwargs): kwargs.setdefault('token', uuid.uuid4().hex) return super(TokenTests, self).new_plugin(**kwargs) + + def test_options(self): + opts = [o.name for o in self.PLUGIN_CLASS.get_options()] + + allowed_opts = ['token', + 'domain-id', + 'domain-name', + 'tenant-id', + 'tenant-name', + 'project-id', + 'project-name', + 'project-domain-id', + 'project-domain-name', + 'trust-id', + 'auth-url'] + + self.assertEqual(set(allowed_opts), set(opts)) + self.assertEqual(len(allowed_opts), len(opts)) |