dashboard: introduce usage of the policy file

The policy check framework is added in the
devstack installation.
Documentation modified for a manuel installation.
Change-Id: I0791e329f41feca79ebe2f31321d1ce02ac44ec3
This commit is contained in:
Cédric Savignan
2017年07月18日 15:35:33 +02:00
parent 8b2b913c43
commit 9ca3781e87

View File

@@ -50,8 +50,41 @@ elif [[ "1ドル" == "stack" && "2ドル" == "post-config" ]]; then
fi
if is_service_enabled horizon; then
cp $BGPVPN_DASHBOARD_ENABLE $HORIZON_DIR/openstack_dashboard/local/enabled/
# Add policy file for BGPVPN_DASHBOARD
_set_policy_file $DEST/horizon/openstack_dashboard/local/local_settings.py \
networking-bgpvpn $NETWORKING_BGPVPN_DIR/bgpvpn_dashboard/etc/bgpvpn-horizon.conf
fi
fi
function _ensure_policy_file {
local file=1ドル
# Look for POLICY_FILES dict.
start=$(grep -nE '^\s*POLICY_FILES\s*=\s*' $file | cut -d : -f 1)
if [ ! -n "$start" ]; then
# If POLICY_FILES is not found, define it.
cat <<EOF >> $file
POLICY_FILES = {
'identity': 'keystone_policy.json',
'compute': 'nova_policy.json',
'volume': 'cinder_policy.json',
'image': 'glance_policy.json',
'orchestration': 'heat_policy.json',
'network': 'neutron_policy.json',
}
EOF
fi
}
function _set_policy_file {
local file=1ドル
local policy_name=2ドル
local policy_file=3ドル
_ensure_policy_file $file
echo "POLICY_FILES['$policy_name'] = '$policy_file'" >> $file
}
if [[ "1ドル" == "unstack" ]]; then
#no-op
:
Reference in New Issue
openstack/networking-bgpvpn
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.

The note is not visible to the blocked user.