blob: 788f1abb0eb4bb7f48a11fa8f1545766d0332ca6 [file] [log] [blame]
Adam Tengleraa48e202017-05-22 17:12:24 +02001#!/usr/bin/env python
2import salt.config
3import salt.loader
4
5
6def main():
7 path = "/etc/glance/policy.json"
8 __opts__ = salt.config.minion_config('/etc/salt/minion')
9 keystone_policy_mod = salt.loader.raw_mod(__opts__, 'keystone_policy', None)
10 if keystone_policy_mod:
11 result = keystone_policy_mod['keystone_policy.rule_list'](path)
12 if result and 'Error' not in result:
13 return {'glance_policy': result}
14 return {}
15