Browse code

[Sahara] Copy policy.json if it exists

To enable policy check in Sahara we need gate tests passed.
Tests will not pass until Sahara has default policy.json (
e.g. http://logs.openstack.org/09/131609/1/check/check-tempest-dsvm-full/536d5e7/console.html).
New code will copy of policy.json if it exists.

So, for now this code will do nothing.
Once policy.json appears in etc/sahara, the code will start coping
it to sahara conf dir. This will allow to merge auth support with
gate tests passed.

Related blueprint: auth-policy

Change-Id: I98e108ff02aacb91570f97e457d67dd02779ae3d

Andrew Lazarev authored on 2014/10/30 09:01:15
Showing 1 changed files
... ...
@@ -98,6 +98,10 @@ function configure_sahara {
98 98
     fi
99 99
     sudo chown $STACK_USER $SAHARA_CONF_DIR
100 100
 
101
+    if [[ -f $SAHARA_DIR/etc/sahara/policy.json ]]; then
102
+        cp -p $SAHARA_DIR/etc/sahara/policy.json $SAHARA_CONF_DIR
103
+    fi
104
+
101 105
     # Copy over sahara configuration file and configure common parameters.
102 106
     cp $SAHARA_DIR/etc/sahara/sahara.conf.sample $SAHARA_CONF_FILE
103 107