diff options
| author | Russell Bryant <rbryant@redhat.com> | 2013-03-22 12:47:27 -0400 |
|---|---|---|
| committer | Dolph Mathews <dolph.mathews@gmail.com> | 2013-03-22 15:57:27 -0500 |
| commit | 3e55be029c50eaf8567e7ca27b69a82363c00a4c (patch) | |
| tree | e1e7b44ca4c8c00bcae0e2ef1e530c4bf8430d24 /keystone | |
| parent | 4f75f848a5c33316b3b4ceec680575d68dfbcd6d (diff) | |
Rename trust extension (bug 1158980)
Change trust extension from RH-TRUST to OS-TRUST so that the namespace
being used is for OpenStack, as opposed to a contributing company. This
is also more consistent with namespacing used in other OpenStack APIs.
Some additional discussion about this is in this thread:
http://lists.openstack.org/pipermail/openstack-dev/2013-March/006876.html
Change-Id: I0fd869abe0f527c899808a4dde19dbd1fb6f32cd
Diffstat (limited to 'keystone')
| -rw-r--r-- | keystone/auth/controllers.py | 8 | ||||
| -rw-r--r-- | keystone/auth/token_factory.py | 2 | ||||
| -rw-r--r-- | keystone/trust/routers.py | 14 |
3 files changed, 12 insertions, 12 deletions
diff --git a/keystone/auth/controllers.py b/keystone/auth/controllers.py index 1ab9de03..113655db 100644 --- a/keystone/auth/controllers.py +++ b/keystone/auth/controllers.py @@ -171,9 +171,9 @@ class AuthInfo(object): return if sum(['project' in self.auth['scope'], 'domain' in self.auth['scope'], - 'RH-TRUST:trust' in self.auth['scope']]) != 1: + 'OS-TRUST:trust' in self.auth['scope']]) != 1: raise exception.ValidationError( - attribute='project, domain, or RH-TRUST:trust', + attribute='project, domain, or OS-TRUST:trust', target='scope') if 'project' in self.auth['scope']: @@ -182,11 +182,11 @@ class AuthInfo(object): elif 'domain' in self.auth['scope']: domain_ref = self._lookup_domain(self.auth['scope']['domain']) self._scope_data = (domain_ref['id'], None, None) - elif 'RH-TRUST:trust' in self.auth['scope']: + elif 'OS-TRUST:trust' in self.auth['scope']: if not CONF.trust.enabled: raise exception.Forbidden('Trusts are disabled.') trust_ref = self._lookup_trust( - self.auth['scope']['RH-TRUST:trust']) + self.auth['scope']['OS-TRUST:trust']) #TODO ayoung when trusts support domain, Fill in domain data here if 'project_id' in trust_ref: project_ref = self._lookup_project( diff --git a/keystone/auth/token_factory.py b/keystone/auth/token_factory.py index 430c442a..909aa48a 100644 --- a/keystone/auth/token_factory.py +++ b/keystone/auth/token_factory.py @@ -114,7 +114,7 @@ class TokenDataHelper(object): raise exception.Forbidden() if trust['impersonation']: user_ref = trustor_user_ref - token_data['RH-TRUST:trust'] = ( + token_data['OS-TRUST:trust'] = ( { 'id': trust['id'], 'trustor_user': {'id': trust['trustor_user_id']}, diff --git a/keystone/trust/routers.py b/keystone/trust/routers.py index 9f9ce3e5..f4870d0e 100644 --- a/keystone/trust/routers.py +++ b/keystone/trust/routers.py @@ -22,37 +22,37 @@ from keystone.common import router def append_v3_routers(mapper, routers): trust_controller = controllers.TrustV3() - mapper.connect('/RH-TRUST/trusts', + mapper.connect('/OS-TRUST/trusts', controller=trust_controller, action='create_trust', conditions=dict(method=['POST'])) - mapper.connect('/RH-TRUST/trusts', + mapper.connect('/OS-TRUST/trusts', controller=trust_controller, action='list_trusts', conditions=dict(method=['GET'])) - mapper.connect('/RH-TRUST/trusts/{trust_id}', + mapper.connect('/OS-TRUST/trusts/{trust_id}', controller=trust_controller, action='delete_trust', conditions=dict(method=['DELETE'])) - mapper.connect('/RH-TRUST/trusts/{trust_id}', + mapper.connect('/OS-TRUST/trusts/{trust_id}', controller=trust_controller, action='get_trust', conditions=dict(method=['GET'])) - mapper.connect('/RH-TRUST/trusts/{trust_id}/roles', + mapper.connect('/OS-TRUST/trusts/{trust_id}/roles', controller=trust_controller, action='list_roles_for_trust', conditions=dict(method=['GET'])) - mapper.connect('/RH-TRUST/trusts/{trust_id}/roles/{role_id}', + mapper.connect('/OS-TRUST/trusts/{trust_id}/roles/{role_id}', controller=trust_controller, action='check_role_for_trust', conditions=dict(method=['HEAD'])) - mapper.connect('/RH-TRUST/trusts/{trust_id}/roles/{role_id}', + mapper.connect('/OS-TRUST/trusts/{trust_id}/roles/{role_id}', controller=trust_controller, action='get_role_for_trust', conditions=dict(method=['GET'])) |
