Policy grain
diff --git a/_grains/cinder_policy.py b/_grains/cinder_policy.py
new file mode 100644
index 0000000..a2d265e
--- /dev/null
+++ b/_grains/cinder_policy.py
@@ -0,0 +1,15 @@
+#!/usr/bin/env python
+import salt.config
+import salt.loader
+
+
+def main():
+ path = "/etc/cinder/policy.json"
+ __opts__ = salt.config.minion_config('/etc/salt/minion')
+ keystone_policy_mod = salt.loader.raw_mod(__opts__, 'keystone_policy', None)
+ if keystone_policy_mod:
+ result = keystone_policy_mod['keystone_policy.rule_list'](path)
+ if result and 'Error' not in result:
+ return {'cinder_policy': result}
+ return {}
+