ada886dd43
Ia0957b47187c3dcadd46154b17022c4213781112 proposes to have bashate find instances of setting a local value. The issue is that "local" always returns 0, thus hiding any failure in the commands running to set the variable. This is an automated replacement of such instances Depends-On: I676c805e8f0401f75cc5367eee83b3d880cdef81 Change-Id: I9c8912a8fd596535589b207d7fc553b9d951d3fe
43 lines
1.4 KiB
Bash
43 lines
1.4 KiB
Bash
#!/bin/bash
|
|
#
|
|
# Neutron Embrane plugin
|
|
# ---------------------------
|
|
|
|
# Save trace setting
|
|
EMBR_XTRACE=$(set +o | grep xtrace)
|
|
set +o xtrace
|
|
|
|
source $TOP_DIR/lib/neutron_plugins/openvswitch
|
|
|
|
function save_function {
|
|
local ORIG_FUNC
|
|
ORIG_FUNC=$(declare -f $1)
|
|
local NEW_FUNC="$2${ORIG_FUNC#$1}"
|
|
eval "$NEW_FUNC"
|
|
}
|
|
|
|
save_function neutron_plugin_configure_service _neutron_plugin_configure_service
|
|
|
|
function neutron_plugin_configure_common {
|
|
Q_PLUGIN_CONF_PATH=etc/neutron/plugins/embrane
|
|
Q_PLUGIN_CONF_FILENAME=heleos_conf.ini
|
|
Q_PLUGIN_CLASS="neutron.plugins.embrane.plugins.embrane_ovs_plugin.EmbraneOvsPlugin"
|
|
}
|
|
|
|
function neutron_plugin_configure_service {
|
|
_neutron_plugin_configure_service
|
|
iniset /$Q_PLUGIN_CONF_FILE heleos esm_mgmt $HELEOS_ESM_MGMT
|
|
iniset /$Q_PLUGIN_CONF_FILE heleos admin_username $HELEOS_ADMIN_USERNAME
|
|
iniset /$Q_PLUGIN_CONF_FILE heleos admin_password $HELEOS_ADMIN_PASSWORD
|
|
iniset /$Q_PLUGIN_CONF_FILE heleos router_image $HELEOS_ROUTER_IMAGE
|
|
iniset /$Q_PLUGIN_CONF_FILE heleos mgmt_id $HELEOS_MGMT_ID
|
|
iniset /$Q_PLUGIN_CONF_FILE heleos inband_id $HELEOS_INBAND_ID
|
|
iniset /$Q_PLUGIN_CONF_FILE heleos oob_id $HELEOS_OOB_ID
|
|
iniset /$Q_PLUGIN_CONF_FILE heleos dummy_utif_id $HELEOS_DUMMY_UTIF_ID
|
|
iniset /$Q_PLUGIN_CONF_FILE heleos resource_pool_id $HELEOS_RESOURCE_POOL_ID
|
|
iniset /$Q_PLUGIN_CONF_FILE heleos async_requests $HELEOS_ASYNC_REQUESTS
|
|
}
|
|
|
|
# Restore xtrace
|
|
$EMBR_XTRACE
|