2015-08-18 16:57:44 +02:00
|
|
|
LIBDIR=$DEST/neutron/devstack/lib
|
|
|
|
|
2016-09-22 17:52:25 -07:00
|
|
|
source $LIBDIR/dns
|
2015-09-01 15:27:26 -07:00
|
|
|
source $LIBDIR/flavors
|
2015-08-18 16:57:44 +02:00
|
|
|
source $LIBDIR/l2_agent
|
2015-08-25 15:50:09 +03:00
|
|
|
source $LIBDIR/l2_agent_sriovnicswitch
|
2018-02-23 14:00:08 +08:00
|
|
|
source $LIBDIR/l3_agent
|
2015-08-18 16:57:44 +02:00
|
|
|
source $LIBDIR/ml2
|
|
|
|
source $LIBDIR/qos
|
2016-04-12 12:54:48 +02:00
|
|
|
source $LIBDIR/ovs
|
2017-04-24 19:54:01 +00:00
|
|
|
source $LIBDIR/segments
|
2016-02-18 17:34:43 +08:00
|
|
|
source $LIBDIR/trunk
|
2016-11-10 18:01:35 +07:00
|
|
|
source $LIBDIR/log
|
2016-04-12 12:54:48 +02:00
|
|
|
|
|
|
|
Q_BUILD_OVS_FROM_GIT=$(trueorfalse False Q_BUILD_OVS_FROM_GIT)
|
2015-08-18 16:57:44 +02:00
|
|
|
|
2017-03-07 21:06:35 +00:00
|
|
|
if [ -f $LIBDIR/${NEUTRON_AGENT}_agent ]; then
|
|
|
|
source $LIBDIR/${NEUTRON_AGENT}_agent
|
2016-04-08 13:25:52 +02:00
|
|
|
fi
|
|
|
|
|
2015-09-10 16:54:31 +09:00
|
|
|
if [[ "$1" == "stack" ]]; then
|
|
|
|
case "$2" in
|
|
|
|
install)
|
2017-02-23 22:32:32 -05:00
|
|
|
if [[ "$NEUTRON_AGENT" == "openvswitch" ]] && \
|
|
|
|
[[ "$Q_BUILD_OVS_FROM_GIT" == "True" ]]; then
|
|
|
|
remove_ovs_packages
|
|
|
|
compile_ovs True /usr /var
|
|
|
|
start_new_ovs
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
post-config)
|
2017-03-07 21:11:31 +00:00
|
|
|
if is_service_enabled q-flavors neutron-flavors; then
|
2015-09-01 15:27:26 -07:00
|
|
|
configure_flavors
|
|
|
|
fi
|
2017-03-07 21:11:31 +00:00
|
|
|
if is_service_enabled q-qos neutron-qos; then
|
2015-09-10 16:54:31 +09:00
|
|
|
configure_qos
|
|
|
|
fi
|
2017-03-07 21:11:31 +00:00
|
|
|
if is_service_enabled q-trunk neutron-trunk; then
|
2016-02-18 17:34:43 +08:00
|
|
|
configure_trunk_extension
|
|
|
|
fi
|
2016-11-10 18:01:35 +07:00
|
|
|
if is_service_enabled q-log neutron-log; then
|
|
|
|
configure_log
|
|
|
|
fi
|
2017-03-07 21:11:31 +00:00
|
|
|
if is_service_enabled q-dns neutron-dns; then
|
2016-09-22 17:52:25 -07:00
|
|
|
configure_dns_extension
|
2017-02-23 22:32:32 -05:00
|
|
|
post_config_dns_extension
|
2017-11-06 16:56:01 +00:00
|
|
|
if is_service_enabled designate; then
|
|
|
|
configure_dns_integration
|
|
|
|
fi
|
2016-09-22 17:52:25 -07:00
|
|
|
fi
|
2017-04-24 19:54:01 +00:00
|
|
|
if is_service_enabled neutron-segments; then
|
|
|
|
configure_segments_extension
|
|
|
|
fi
|
2017-03-07 21:11:31 +00:00
|
|
|
if is_service_enabled q-agt neutron-agent; then
|
2015-09-10 16:54:31 +09:00
|
|
|
configure_l2_agent
|
|
|
|
fi
|
|
|
|
#Note: sriov agent should run with OVS or linux bridge agent
|
|
|
|
#because they are the mechanisms that bind the DHCP and router ports.
|
|
|
|
#Currently devstack lacks the option to run two agents on the same node.
|
2017-03-07 21:11:31 +00:00
|
|
|
#Therefore we create new service, q-sriov-agt, and the
|
|
|
|
# q-agt/neutron-agent should be OVS or linux bridge.
|
2017-05-02 13:49:34 +09:00
|
|
|
if is_service_enabled q-sriov-agt neutron-sriov-agent; then
|
2017-03-07 21:06:35 +00:00
|
|
|
configure_$NEUTRON_CORE_PLUGIN
|
2015-09-10 16:54:31 +09:00
|
|
|
configure_l2_agent
|
|
|
|
configure_l2_agent_sriovnicswitch
|
|
|
|
fi
|
2018-02-23 14:00:08 +08:00
|
|
|
if is_service_enabled q-l3 neutron-l3; then
|
|
|
|
if is_service_enabled q-qos neutron-qos; then
|
|
|
|
configure_l3_agent_extension_fip_qos
|
|
|
|
fi
|
|
|
|
configure_l3_agent
|
|
|
|
fi
|
2017-02-23 22:32:32 -05:00
|
|
|
if [ $NEUTRON_CORE_PLUGIN = ml2 ]; then
|
|
|
|
configure_ml2_extension_drivers
|
|
|
|
fi
|
2015-09-10 16:54:31 +09:00
|
|
|
;;
|
|
|
|
extra)
|
2017-05-02 13:49:34 +09:00
|
|
|
if is_service_enabled q-sriov-agt neutron-sriov-agent; then
|
2015-09-10 16:54:31 +09:00
|
|
|
start_l2_agent_sriov
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
elif [[ "$1" == "unstack" ]]; then
|
2017-05-02 13:49:34 +09:00
|
|
|
if is_service_enabled q-sriov-agt neutron-sriov-agent; then
|
2015-08-25 15:50:09 +03:00
|
|
|
stop_l2_agent_sriov
|
|
|
|
fi
|
2017-07-09 15:48:24 +03:00
|
|
|
if [[ "$NEUTRON_AGENT" == "openvswitch" ]] && \
|
|
|
|
[[ "$Q_BUILD_OVS_FROM_GIT" == "True" ]]; then
|
|
|
|
stop_new_ovs
|
|
|
|
fi
|
2015-09-01 15:27:26 -07:00
|
|
|
fi
|