aboutsummaryrefslogtreecommitdiffstats
path: root/keystone-moon/keystone
diff options
context:
space:
mode:
authorasteroide <thomas.duval@orange.com>2016-01-26 09:54:22 +0100
committerasteroide <thomas.duval@orange.com>2016-01-26 09:54:22 +0100
commit53b0267edfe1d76a17e007941cc7b61d369dcaa4 (patch)
treeced7f5dfd4306e063bb3f2832be06d28bdd1eefa /keystone-moon/keystone
parent721f7d3e5fc68913fe6ee3d06959c5cc45f50aa1 (diff)
SubMetaRule algorithm IDs now is calculated via a hash from its name (needed for master-slave development).
Change-Id: Ia210b7a4b0084992d8b47f686796bca4934c3bcb
Diffstat (limited to 'keystone-moon/keystone')
-rw-r--r--keystone-moon/keystone/contrib/moon/backends/memory.py6
1 files changed, 4 insertions, 2 deletions
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):
"""