watcher-dashboard/tools/register_plugin.sh
zte-hanrong 5ccab31a64 Add policies for API access control to watcher-dashboard
Co-Authored-By: David TARDIVEL <David.TARDIVEL@b-com.com>

Change-Id: I1babb96cbad71b74b6fd5e1ac5f1cfb7b263ba2c
blueprint: watcher-policies
2016-07-26 06:25:05 +00:00

23 lines
789 B
Bash
Executable File

#!/bin/bash
src_path=`cd "$1"; pwd`
dest_path=`cd "$2"; pwd`
# echo "$src_path --> $dest_path"
for filepath in $src_path/watcher_dashboard/enabled/*.py; do
filename=$(basename $filepath)
if [ $filename != "__init__.py" ]; then
echo $filepath
src_filepath="`cd "$(dirname $filepath)"; pwd`/$filename"
dest_filepath="$dest_path/openstack_dashboard/local/enabled/$filename"
echo "$src_filepath --> $dest_filepath"
ln -s $src_filepath $dest_filepath
fi
done
policy_file_name='watcher_policy.json'
src_policy_filepath=$src_path'/watcher_dashboard/conf/'$policy_file_name
dest_policy_file=$dest_path'/openstack_dashboard/conf/'$policy_file_name
echo "$src_policy_filepath --> $dest_policy_file"
ln -s $src_policy_filepath $dest_policy_file