Files
f98cd4b9e703d8261b5f811149cf3b1ef0fa94dd
networking-bgpvpn /devstack /plugin.sh

104 lines
3.9 KiB
Bash
Raw Normal View History

# Save trace setting
set -o xtrace
if [[ "1ドル" == "source" ]]; then
:
setup_develop $NETWORKING_BGPVPN_DIR
inicomment $NETWORKING_BGPVPN_CONF service_providers service_provider
iniadd $NETWORKING_BGPVPN_CONF service_providers service_provider $NETWORKING_BGPVPN_DRIVER
if [[ "$Q_AGENT" == "openvswitch" ]]; then
# l2pop and arp_responder are required for bagpipe driver
iniset /$Q_PLUGIN_CONF_FILE agent l2_population True
iniset /$Q_PLUGIN_CONF_FILE agent arp_responder True
elif [[ "$Q_AGENT" == "linuxbridge" ]]; then
# l2pop is required for EVPN/VXLAN bagpipe driver
iniset /$Q_PLUGIN_CONF_FILE vxlan l2_population True
else
die $LINENO "unsupported agent for networking-bagpipe: $Q_AGENT"
fi
# l2pop and arp_responder are required for bagpipe driver
iniset $NEUTRON_CORE_PLUGIN_CONF agent l2_population True
iniset $NEUTRON_CORE_PLUGIN_CONF agent arp_responder True
elif [[ "$NEUTRON_AGENT" == "linuxbridge" ]]; then
# l2pop is required for EVPN/VXLAN bagpipe driver
iniset $NEUTRON_CORE_PLUGIN_CONF vxlan l2_population True
else
die $LINENO "unsupported agent for networking-bagpipe: $NEUTRON_AGENT"
fi
fi
iniset $HEAT_CONF DEFAULT plugin_dirs $NETWORKING_BGPVPN_DIR/networking_bgpvpn_heat
fi
_set_policy_file $DEST/horizon/openstack_dashboard/local/local_settings.py \
networking-bgpvpn $NETWORKING_BGPVPN_DIR/bgpvpn_dashboard/etc/bgpvpn-horizon.conf
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ドル" == "clean" ]]; then
${_XTRACE_NETWORKING_BGPVPN}