diff options
author | WuKong <rebirthmonkey@gmail.com> | 2015-07-22 15:46:03 +0200 |
---|---|---|
committer | WuKong <rebirthmonkey@gmail.com> | 2015-07-22 15:46:03 +0200 |
commit | 5637b139e1696f665263fcfdaf97f8a2b37c5bfb (patch) | |
tree | b00833a8bab63253651f7cb5ca351549aa2fafe5 /keystone-moon/keystone | |
parent | c07dc2887f0ccab9372014790cda130781f28a09 (diff) |
finish review code
Change-Id: Ie39003b523b287837d4f93f82c035b8f921067a5
Signed-off-by: WuKong <rebirthmonkey@gmail.com>
Diffstat (limited to 'keystone-moon/keystone')
3 files changed, 5 insertions, 5 deletions
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) |