blob: 6b4819ef70058a4be19c4f63dc39728918e5f974 [file] [log] [blame]
Sean Daguee263c822014-12-05 14:25:28 -05001#!/bin/bash
2#
Ivar Lazzaroa03607d2014-02-03 06:28:14 -08003# Neutron Embrane plugin
4# ---------------------------
5
6# Save trace setting
Dean Troyere3a91602014-03-28 12:40:56 -05007EMBR_XTRACE=$(set +o | grep xtrace)
Ivar Lazzaroa03607d2014-02-03 06:28:14 -08008set +o xtrace
9
10source $TOP_DIR/lib/neutron_plugins/openvswitch
11
Ian Wienandaee18c72014-02-21 15:35:08 +110012function save_function {
Ivar Lazzaroa03607d2014-02-03 06:28:14 -080013 local ORIG_FUNC=$(declare -f $1)
14 local NEW_FUNC="$2${ORIG_FUNC#$1}"
15 eval "$NEW_FUNC"
16}
17
18save_function neutron_plugin_configure_service _neutron_plugin_configure_service
19
Ian Wienandaee18c72014-02-21 15:35:08 +110020function neutron_plugin_configure_common {
Ivar Lazzaroa03607d2014-02-03 06:28:14 -080021 Q_PLUGIN_CONF_PATH=etc/neutron/plugins/embrane
22 Q_PLUGIN_CONF_FILENAME=heleos_conf.ini
Ivar Lazzaroa03607d2014-02-03 06:28:14 -080023 Q_PLUGIN_CLASS="neutron.plugins.embrane.plugins.embrane_ovs_plugin.EmbraneOvsPlugin"
24}
25
Ian Wienandaee18c72014-02-21 15:35:08 +110026function neutron_plugin_configure_service {
Ivar Lazzaroa03607d2014-02-03 06:28:14 -080027 _neutron_plugin_configure_service
28 iniset /$Q_PLUGIN_CONF_FILE heleos esm_mgmt $HELEOS_ESM_MGMT
29 iniset /$Q_PLUGIN_CONF_FILE heleos admin_username $HELEOS_ADMIN_USERNAME
30 iniset /$Q_PLUGIN_CONF_FILE heleos admin_password $HELEOS_ADMIN_PASSWORD
31 iniset /$Q_PLUGIN_CONF_FILE heleos router_image $HELEOS_ROUTER_IMAGE
32 iniset /$Q_PLUGIN_CONF_FILE heleos mgmt_id $HELEOS_MGMT_ID
33 iniset /$Q_PLUGIN_CONF_FILE heleos inband_id $HELEOS_INBAND_ID
34 iniset /$Q_PLUGIN_CONF_FILE heleos oob_id $HELEOS_OOB_ID
35 iniset /$Q_PLUGIN_CONF_FILE heleos dummy_utif_id $HELEOS_DUMMY_UTIF_ID
36 iniset /$Q_PLUGIN_CONF_FILE heleos resource_pool_id $HELEOS_RESOURCE_POOL_ID
37 iniset /$Q_PLUGIN_CONF_FILE heleos async_requests $HELEOS_ASYNC_REQUESTS
38}
39
40# Restore xtrace
Dean Troyere3a91602014-03-28 12:40:56 -050041$EMBR_XTRACE