From 47dd812926c9c4f0bb09e2184b2205519494105d Mon Sep 17 00:00:00 2001 From: Lance Bragstad Date: Fri, 4 Mar 2016 22:36:02 +0000 Subject: [PATCH] Remove _disable_domain from the resource API The _disable_domain method in was only there to act as a method we could put a decorator on for notifications. The notification decorator has been replaced with an inline statement for sending the notification. This means we no longer need to have a specific method for the purpose of a decorator, so we can remove _disable_domain. Change-Id: I86ec5d7bc317454b2a95e1afc2b380e292acf363 --- keystone/resource/core.py | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/keystone/resource/core.py b/keystone/resource/core.py index f0884a5135..447bfed7b5 100644 --- a/keystone/resource/core.py +++ b/keystone/resource/core.py @@ -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