From 5637b139e1696f665263fcfdaf97f8a2b37c5bfb Mon Sep 17 00:00:00 2001 From: WuKong Date: Wed, 22 Jul 2015 15:46:03 +0200 Subject: finish review code Change-Id: Ie39003b523b287837d4f93f82c035b8f921067a5 Signed-off-by: WuKong --- .../extensions/moon/ExceptionHierarchy-v0.2.pptx | Bin 34849 -> 34159 bytes keystone-moon/keystone/contrib/moon/core.py | 2 +- keystone-moon/keystone/contrib/moon/exception.py | 6 +++--- .../unit/test_unit_core_intra_extension_authz.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/keystone-moon/doc/source/extensions/moon/ExceptionHierarchy-v0.2.pptx b/keystone-moon/doc/source/extensions/moon/ExceptionHierarchy-v0.2.pptx index 96f9a041..a512a98b 100644 Binary files a/keystone-moon/doc/source/extensions/moon/ExceptionHierarchy-v0.2.pptx and b/keystone-moon/doc/source/extensions/moon/ExceptionHierarchy-v0.2.pptx differ diff --git a/keystone-moon/keystone/contrib/moon/core.py b/keystone-moon/keystone/contrib/moon/core.py index 7761130e..03467ca5 100644 --- a/keystone-moon/keystone/contrib/moon/core.py +++ b/keystone-moon/keystone/contrib/moon/core.py @@ -1317,7 +1317,7 @@ class IntraExtensionManager(manager.Manager): @enforce(("read", "write"), "aggregation_algorithm") def set_aggregation_algorithm_dict(self, user_id, intra_extension_id, aggregation_algorithm_id, aggregation_algorithm_dict): if aggregation_algorithm_id: - if aggregation_algorithm_id not in self.configuration_api.get_aggregation_algorithms(ROOT_ID): + if aggregation_algorithm_id not in self.configuration_api.get_aggregation_algorithms(ADMIN_ID): raise AggregationAlgorithmUnknown() else: aggregation_algorithm_id = uuid4().hex diff --git a/keystone-moon/keystone/contrib/moon/exception.py b/keystone-moon/keystone/contrib/moon/exception.py index d2e67030..a53a3397 100644 --- a/keystone-moon/keystone/contrib/moon/exception.py +++ b/keystone-moon/keystone/contrib/moon/exception.py @@ -91,10 +91,10 @@ class IntraExtensionUnknown(IntraExtensionException): logger = "Error" -class SuperExtensionUnknown(IntraExtensionUnknown): - message_format = _("The super_extension is unknown.") +class RootExtensionUnknown(IntraExtensionUnknown): + message_format = _("The root_extension is unknown.") code = 400 - title = 'Super Extension Unknown' + title = 'Root Extension Unknown' logger = "Error" diff --git a/keystone-moon/keystone/tests/moon/unit/test_unit_core_intra_extension_authz.py b/keystone-moon/keystone/tests/moon/unit/test_unit_core_intra_extension_authz.py index 8887049f..e397157f 100644 --- a/keystone-moon/keystone/tests/moon/unit/test_unit_core_intra_extension_authz.py +++ b/keystone-moon/keystone/tests/moon/unit/test_unit_core_intra_extension_authz.py @@ -87,7 +87,7 @@ class TestIntraExtensionAuthzManagerAuthz(tests.TestCase): def create_intra_extension(self, policy_model="policy_authz"): - IE["policymodel"] = policy_model + IE["model"] = policy_model IE["name"] = uuid.uuid4().hex ref = self.admin_manager.load_intra_extension_dict(DEFAULT_USER_ID, IE) self.assertIsInstance(ref, dict) -- cgit 1.2.3-korg