summaryrefslogtreecommitdiffstats
path: root/keystone-moon/keystone/tests/moon/scenario/test_nova_b.sh
diff options
context:
space:
mode:
authorWuKong <rebirthmonkey@gmail.com>2015-10-12 14:29:11 +0200
committerWuKong <rebirthmonkey@gmail.com>2015-10-12 14:29:11 +0200
commita363067a1bdf411c28032b926b451fc9d0964dc6 (patch)
treeb663db364a162232602210da11df567d286296ac /keystone-moon/keystone/tests/moon/scenario/test_nova_b.sh
parent43da0e268fd88c05e49a3d949e3685a13fa43926 (diff)
create scenario test
Change-Id: Id392d900583a31fb53a9da5bcb0c47746f34491a Signed-off-by: WuKong <rebirthmonkey@gmail.com>
Diffstat (limited to 'keystone-moon/keystone/tests/moon/scenario/test_nova_b.sh')
-rw-r--r--keystone-moon/keystone/tests/moon/scenario/test_nova_b.sh39
1 files changed, 39 insertions, 0 deletions
diff --git a/keystone-moon/keystone/tests/moon/scenario/test_nova_b.sh b/keystone-moon/keystone/tests/moon/scenario/test_nova_b.sh
new file mode 100644
index 00000000..f2c0e4fc
--- /dev/null
+++ b/keystone-moon/keystone/tests/moon/scenario/test_nova_b.sh
@@ -0,0 +1,39 @@
+#!/usr/bin/env bash
+
+# as user admin
+
+# create authz intraextension
+moon intraextension add policy_mls_authz test_authz
+
+# create admin intraextension
+moon intraextension add policy_rbac_admin test_admin
+
+# create tenant
+moon tenant add --authz xxx --admin xxx demo
+
+# select the authz tenant
+moon intraextension select `test_authz_uuid`
+
+# create a VM (vm1) in OpenStack
+nova create vm1.....
+
+# add corresponding object in moon
+moon object add vm1
+
+# check that moon blocks the vm1 manipulatin
+nova vm1 suspend ....
+
+# add object assignment for vm1
+moon object assignment `vm1_uuid` `object_security_level_uuid` `high_uuid`
+
+# check now moon block the manipulation of vm1
+nova vm1 suspend ....
+
+# del object assignment for servers
+moon object assignment del `vm1_uuid` `object_security_level_uuid` `high_uuid`
+
+# add object assignment for servers
+moon object assignment add `vm1_uuid` `object_security_level_uuid` `low_uuid`
+
+# check now moon unblock the manipulation of vm1
+nova vm1 suspend .... \ No newline at end of file