30d5fae315
Generate the neutron core sample config files by using the oslo generator. The files are generated with a .sample extension and replace the static example configuration files. Once the generation code is delivered, the static config files will be removed. Change-Id: Ic37a16b6cf8eb92030649f1fc8b198738a8cc104 Related-blueprint: autogen-neutron-conf-file Partial-bug: #1199963 Depends-On: I1c6dc4e7d479f1b7c755597caded24a0f018c712 Co-Authored-By: Louis Taylor <louis@kragniz.eu>
34 lines
821 B
Bash
34 lines
821 B
Bash
#!/bin/bash
|
|
|
|
# Neutron metering plugin
|
|
# ---------------------------
|
|
|
|
# Save trace setting
|
|
_XTRACE_NETURON_METER=$(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.sample $METERING_AGENT_CONF_FILENAME
|
|
}
|
|
|
|
function neutron_metering_stop {
|
|
stop_process q-metering
|
|
}
|
|
|
|
# Restore xtrace
|
|
$_XTRACE_NETURON_METER
|
|
|