aboutsummaryrefslogtreecommitdiffstats
path: root/moonv4/tests/get_keystone_projects.py
diff options
context:
space:
mode:
Diffstat (limited to 'moonv4/tests/get_keystone_projects.py')
-rw-r--r--moonv4/tests/get_keystone_projects.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/moonv4/tests/get_keystone_projects.py b/moonv4/tests/get_keystone_projects.py
new file mode 100644
index 00000000..7b37b0e7
--- /dev/null
+++ b/moonv4/tests/get_keystone_projects.py
@@ -0,0 +1,19 @@
+from utils import pdp
+from utils import parse
+from utils import models
+from utils import policies
+from utils import pdp
+
+if __name__ == "__main__":
+ args = parse.parse()
+ consul_host = args.consul_host
+ consul_port = args.consul_port
+
+ models.init(consul_host, consul_port)
+ policies.init(consul_host, consul_port)
+ pdp.init(consul_host, consul_port)
+
+ projects = pdp.get_keystone_projects()
+
+ for _project in projects['projects']:
+ print("{} {}".format(_project['id'], _project['name']))