[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
diff --git a/lib/sahara b/lib/sahara
index 5c7c253..7f59cc1 100644
--- a/lib/sahara
+++ b/lib/sahara
@@ -98,6 +98,10 @@
fi
sudo chown $STACK_USER $SAHARA_CONF_DIR
+ if [[ -f $SAHARA_DIR/etc/sahara/policy.json ]]; then
+ cp -p $SAHARA_DIR/etc/sahara/policy.json $SAHARA_CONF_DIR
+ fi
+
# Copy over sahara configuration file and configure common parameters.
cp $SAHARA_DIR/etc/sahara/sahara.conf.sample $SAHARA_CONF_FILE