Merge "Remove _disable_domain from the resource API"

This commit is contained in:
Jenkins
2016-03-05 06:32:33 +00:00
committed by Gerrit Code Review

View File

@@ -422,7 +422,8 @@ class Manager(manager.Manager):
# If the domain is being disabled, issue the disable notification
# as well
if original_project_enabled and not project_enabled:
self._disable_domain(project_id)
notifications.Audit.disabled(self._DOMAIN, project_id,
public=False)
self.get_project.invalidate(self, project_id)
self.get_project_by_name.invalidate(self, original_project['name'],
@@ -759,18 +760,6 @@ class Manager(manager.Manager):
for project in projects]
return domains
def _disable_domain(self, domain_id):
"""Emit a notification to the callback system domain is been disabled.
This method, and associated callback listeners, removes the need for
making direct calls to other managers to take action (e.g. revoking
domain scoped tokens) when a domain is disabled.
:param domain_id: domain identifier
:type domain_id: string
"""
notifications.Audit.disabled(self._DOMAIN, domain_id, public=False)
def update_domain(self, domain_id, domain, initiator=None):
# TODO(henry-nash): We shouldn't have to check for the federated domain
# here as well as _update_project, but currently our tests assume the