blob: 629f3b788a31498761f6361c78dbf443c76265fd [file] [log] [blame]
Emilien Macchi40546f72013-09-24 15:10:25 +02001# Neutron metering plugin
2# ---------------------------
3
4# Save trace setting
5MY_XTRACE=$(set +o | grep xtrace)
6set +o xtrace
7
8
9AGENT_METERING_BINARY="$NEUTRON_BIN_DIR/neutron-metering-agent"
10METERING_PLUGIN="neutron.services.metering.metering_plugin.MeteringPlugin"
11
12function neutron_agent_metering_configure_common() {
13 if [[ $Q_SERVICE_PLUGIN_CLASSES == '' ]]; then
14 Q_SERVICE_PLUGIN_CLASSES=$METERING_PLUGIN
15 else
16 Q_SERVICE_PLUGIN_CLASSES="$Q_SERVICE_PLUGIN_CLASSES,$METERING_PLUGIN"
17 fi
18}
19
20function neutron_agent_metering_configure_agent() {
21 METERING_AGENT_CONF_PATH=/etc/neutron/services/metering
22 mkdir -p $METERING_AGENT_CONF_PATH
23
24 METERING_AGENT_CONF_FILENAME="$METERING_AGENT_CONF_PATH/metering_agent.ini"
25
26 cp $NEUTRON_DIR/etc/metering_agent.ini $METERING_AGENT_CONF_FILENAME
27}
28
29# Restore xtrace
30$MY_XTRACE