devstack/lib/neutron_plugins/services/metering
Dean Troyer e3a9160c0d Fix Neutron plugin XTRACE handling
The various Neutron plugin files need to have unique variables for the
xtrace state as they are sometimes nested more than two levels deep
and MY_XTRACE is getting stomped.  This gives each of the neutron_plugin
and neutron_thirdparty include files a unique XTRACE state variable.

I don't think this is a problem with any of the other plugin include
files (yet) so this just handles Neutron for now.

Change-Id: I7c272a48e7974edecaff5f431ff7443dd6622588
2014-03-28 12:40:59 -05:00

31 lines
760 B
Plaintext

# Neutron metering plugin
# ---------------------------
# Save trace setting
METER_XTRACE=$(set +o | grep xtrace)
set +o xtrace
AGENT_METERING_BINARY="$NEUTRON_BIN_DIR/neutron-metering-agent"
METERING_PLUGIN="neutron.services.metering.metering_plugin.MeteringPlugin"
function neutron_agent_metering_configure_common {
_neutron_service_plugin_class_add $METERING_PLUGIN
}
function neutron_agent_metering_configure_agent {
METERING_AGENT_CONF_PATH=/etc/neutron/services/metering
mkdir -p $METERING_AGENT_CONF_PATH
METERING_AGENT_CONF_FILENAME="$METERING_AGENT_CONF_PATH/metering_agent.ini"
cp $NEUTRON_DIR/etc/metering_agent.ini $METERING_AGENT_CONF_FILENAME
}
function neutron_metering_stop {
:
}
# Restore xtrace
$METER_XTRACE