summaryrefslogtreecommitdiff
path: root/keystone
diff options
context:
space:
mode:
Diffstat (limited to 'keystone')
-rw-r--r--keystone/catalog/core.py7
-rw-r--r--keystone/endpoint_policy/core.py8
-rw-r--r--keystone/resource/core.py6
-rw-r--r--keystone/token/provider.py4
4 files changed, 14 insertions, 11 deletions
diff --git a/keystone/catalog/core.py b/keystone/catalog/core.py
index d78e98e81..8947c8f01 100644
--- a/keystone/catalog/core.py
+++ b/keystone/catalog/core.py
@@ -327,9 +327,8 @@ class Manager(manager.Manager):
# membership recover the endpoint group
self.resource_api.get_project(project_id)
try:
- refs = self.driver.list_endpoint_groups_for_project(
- project_id)
- endpoint_groups = [self.driver.get_endpoint_group(
+ refs = self.list_endpoint_groups_for_project(project_id)
+ endpoint_groups = [self.get_endpoint_group(
ref['endpoint_group_id']) for ref in refs]
return endpoint_groups
except exception.EndpointGroupNotFound:
@@ -337,7 +336,7 @@ class Manager(manager.Manager):
def get_endpoints_filtered_by_endpoint_group(self, endpoint_group_id):
endpoints = self.list_endpoints()
- filters = self.driver.get_endpoint_group(endpoint_group_id)['filters']
+ filters = self.get_endpoint_group(endpoint_group_id)['filters']
filtered_endpoints = []
for endpoint in endpoints:
diff --git a/keystone/endpoint_policy/core.py b/keystone/endpoint_policy/core.py
index e0b75b1e5..6243f26bf 100644
--- a/keystone/endpoint_policy/core.py
+++ b/keystone/endpoint_policy/core.py
@@ -158,7 +158,7 @@ class Manager(manager.Manager):
matching_endpoints = []
endpoints = self.catalog_api.list_endpoints()
regions = self.catalog_api.list_regions()
- for ref in self.driver.list_associations_for_policy(policy_id):
+ for ref in self.list_associations_for_policy(policy_id):
if ref.get('endpoint_id') is not None:
matching_endpoints.append(
_get_endpoint(ref['endpoint_id'], policy_id))
@@ -212,7 +212,7 @@ class Manager(manager.Manager):
regions_examined = []
while region_id is not None:
try:
- ref = self.driver.get_policy_association(
+ ref = self.get_policy_association(
service_id=endpoint['service_id'],
region_id=region_id)
return ref['policy_id']
@@ -237,7 +237,7 @@ class Manager(manager.Manager):
# this endpoint.
try:
- ref = self.driver.get_policy_association(endpoint_id=endpoint_id)
+ ref = self.get_policy_association(endpoint_id=endpoint_id)
return _get_policy(ref['policy_id'], endpoint_id)
except exception.PolicyAssociationNotFound: # nosec
# There wasn't a policy explicitly defined for this endpoint,
@@ -254,7 +254,7 @@ class Manager(manager.Manager):
# Finally, just check if there is one for the service.
try:
- ref = self.driver.get_policy_association(
+ ref = self.get_policy_association(
service_id=endpoint['service_id'])
return _get_policy(ref['policy_id'], endpoint_id)
except exception.PolicyAssociationNotFound: # nosec
diff --git a/keystone/resource/core.py b/keystone/resource/core.py
index 44073bd65..a2ee19e02 100644
--- a/keystone/resource/core.py
+++ b/keystone/resource/core.py
@@ -276,6 +276,7 @@ class Manager(manager.Manager):
'projects') % project_id)
def update_project(self, tenant_id, tenant, initiator=None):
+ # Use the driver directly to prevent using old cached value.
original_tenant = self.driver.get_project(tenant_id)
tenant = tenant.copy()
@@ -325,6 +326,7 @@ class Manager(manager.Manager):
return ret
def delete_project(self, tenant_id, initiator=None):
+ # Use the driver directly to prevent using old cached value.
project = self.driver.get_project(tenant_id)
if project['is_domain'] and project['enabled']:
raise exception.ValidationError(
@@ -332,7 +334,7 @@ class Manager(manager.Manager):
'domain. Please disable the project %s first.')
% project.get('id'))
- if not self.driver.is_leaf_project(tenant_id):
+ if not self.is_leaf_project(tenant_id):
raise exception.ForbiddenAction(
action=_('cannot delete the project %s since it is not '
'a leaf in the hierarchy.') % tenant_id)
@@ -532,6 +534,7 @@ class Manager(manager.Manager):
def update_domain(self, domain_id, domain, initiator=None):
self.assert_domain_not_federated(domain_id, domain)
+ # Use the driver directly to prevent using old cached value.
original_domain = self.driver.get_domain(domain_id)
if (CONF.resource.domain_name_url_safe != 'off' and
'name' in domain and domain['name'] != original_domain['name'] and
@@ -560,6 +563,7 @@ class Manager(manager.Manager):
raise exception.ForbiddenAction(action=_('delete the default '
'domain'))
+ # Use the driver directly to prevent using old cached value.
domain = self.driver.get_domain(domain_id)
# To help avoid inadvertent deletes, we insist that the domain
diff --git a/keystone/token/provider.py b/keystone/token/provider.py
index df1af7181..55c48b0db 100644
--- a/keystone/token/provider.py
+++ b/keystone/token/provider.py
@@ -243,7 +243,7 @@ class Manager(manager.Manager):
self.revoke_api.check_token(token_values)
def check_revocation(self, token):
- version = self.driver.get_token_version(token)
+ version = self.get_token_version(token)
if version == V2:
return self.check_revocation_v2(token)
else:
@@ -275,7 +275,7 @@ class Manager(manager.Manager):
if not self._needs_persistence:
return self.driver.validate_v3_token(token_id)
token_ref = self._persistence.get_token(token_id)
- version = self.driver.get_token_version(token_ref)
+ version = self.get_token_version(token_ref)
if version == self.V3:
return self.driver.validate_v3_token(token_ref)
elif version == self.V2: