From 53b0267edfe1d76a17e007941cc7b61d369dcaa4 Mon Sep 17 00:00:00 2001 From: asteroide Date: Tue, 26 Jan 2016 09:54:22 +0100 Subject: SubMetaRule algorithm IDs now is calculated via a hash from its name (needed for master-slave development). Change-Id: Ia210b7a4b0084992d8b47f686796bca4934c3bcb --- keystone-moon/keystone/contrib/moon/backends/memory.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'keystone-moon') diff --git a/keystone-moon/keystone/contrib/moon/backends/memory.py b/keystone-moon/keystone/contrib/moon/backends/memory.py index 45055f60..b9fbb622 100644 --- a/keystone-moon/keystone/contrib/moon/backends/memory.py +++ b/keystone-moon/keystone/contrib/moon/backends/memory.py @@ -26,8 +26,10 @@ class ConfigurationConnector(ConfigurationDriver): self.aggregation_algorithms_dict[hashlib.sha224("one_true").hexdigest()[:32]] = \ {'name': 'one_true', 'description': 'only one rule has to match'} self.sub_meta_rule_algorithms_dict = dict() - self.sub_meta_rule_algorithms_dict[uuid4().hex] = {'name': 'inclusion', 'description': 'inclusion'} - self.sub_meta_rule_algorithms_dict[uuid4().hex] = {'name': 'comparison', 'description': 'comparison'} + self.sub_meta_rule_algorithms_dict[hashlib.sha224("inclusion").hexdigest()[:32]] = \ + {'name': 'inclusion', 'description': 'inclusion'} + self.sub_meta_rule_algorithms_dict[hashlib.sha224("comparison").hexdigest()[:32]] = \ + {'name': 'comparison', 'description': 'comparison'} def get_policy_templates_dict(self): """ -- cgit 1.2.3-korg