b33c4dd2ce
This patch introduces BgpDriver interface which will be used by the BgpDrAgent for passing BGP speaker, peer and route information to the registered BGP driver. In addition, this patch also implements Ryu as a reference BGP driver for the proof of concept. Partially-Implements: blueprint bgp-dynamic-routing Co-Authored-By: Ryan Tidwell <ryan.tidwell@hp.com> Co-Authored-By: Jaume Devesa <devvesa@gmail.com> Co-Authored-By: vikram.choudhary <vikram.choudhary@huawei.com> Co-Authored-By: Numan Siddique <nusiddiq@redhat.com> Change-Id: If9a7e2c4c45c395b8e93bd1293667bf67f53dcfa
32 lines
965 B
Plaintext
32 lines
965 B
Plaintext
RYU_BGP_SPEAKER_DRIVER="neutron.services.bgp.driver.ryu.driver.RyuBgpDriver"
|
|
|
|
function configure_bgp_service_plugin {
|
|
_neutron_service_plugin_class_add "bgp"
|
|
}
|
|
|
|
function configure_bgp {
|
|
configure_bgp_service_plugin
|
|
}
|
|
|
|
function configure_bgp_dragent {
|
|
cp $NEUTRON_DIR/etc/bgp_dragent.ini.sample $Q_BGP_DRAGENT_CONF_FILE
|
|
|
|
iniset $Q_BGP_DRAGENT_CONF_FILE DEFAULT verbose True
|
|
iniset $Q_BGP_DRAGENT_CONF_FILE DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL
|
|
if [ -n "$BGP_ROUTER_ID" ]; then
|
|
iniset $Q_BGP_DRAGENT_CONF_FILE BGP bgp_router_id $BGP_ROUTER_ID
|
|
fi
|
|
if [ -z "$BGP_SPEAKER_DRIVER" ]; then
|
|
BGP_SPEAKER_DRIVER=$RYU_BGP_SPEAKER_DRIVER
|
|
fi
|
|
iniset $Q_BGP_DRAGENT_CONF_FILE BGP bgp_speaker_driver $BGP_SPEAKER_DRIVER
|
|
}
|
|
|
|
function start_bgp_dragent {
|
|
run_process q-bgp-agt "$AGENT_BGP_BINARY --config-file $NEUTRON_CONF --config-file /$Q_BGP_DRAGENT_CONF_FILE"
|
|
}
|
|
|
|
function stop_bgp_dragent {
|
|
stop_process q-bgp-agt
|
|
}
|