metering-agent: Support [agent] report_interval
This change allows customizing [agent] report_interval of the metering agent service. To distinguish the new parameter from the existing [DEFAULT] report_interval, the parameter is named with the 'agent_' prefix. Change-Id: I7f3e09a6028d8bbedfe6f8c1de69553954aac9a9
This commit is contained in:
parent
38f1a2e250
commit
343a8807d6
@ -52,12 +52,17 @@
|
||||
# (Optional) Maximum seconds to wait for a response from an RPC call
|
||||
# Defaults to: $::os_service_default
|
||||
#
|
||||
# [*agent_report_interval*]
|
||||
# (optional) Set the agent report interval. By default the global report
|
||||
# interval in neutron.conf ([agent]/report_interval) is used. This parameter
|
||||
# can be used to override the reporting interval for the metering-agent.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*purge_config*]
|
||||
# (optional) Whether to set only the specified config options
|
||||
# in the metering config.
|
||||
# Defaults to false.
|
||||
#
|
||||
|
||||
class neutron::agents::metering (
|
||||
$package_ensure = present,
|
||||
$enabled = true,
|
||||
@ -68,6 +73,7 @@ class neutron::agents::metering (
|
||||
$measure_interval = $::os_service_default,
|
||||
$report_interval = $::os_service_default,
|
||||
$rpc_response_max_timeout = $::os_service_default,
|
||||
$agent_report_interval = $::os_service_default,
|
||||
$purge_config = false,
|
||||
) {
|
||||
|
||||
@ -88,6 +94,7 @@ class neutron::agents::metering (
|
||||
'DEFAULT/measure_interval': value => $measure_interval;
|
||||
'DEFAULT/report_interval': value => $report_interval;
|
||||
'DEFAULT/rpc_response_max_timeout': value => $rpc_response_max_timeout;
|
||||
'agent/report_interval': value => $agent_report_interval;
|
||||
}
|
||||
|
||||
if $::neutron::params::metering_agent_package {
|
||||
|
@ -0,0 +1,6 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
The new ``neutron::agents::metering::agent_report_interval`` has been
|
||||
added. This parameter determines the ``[AGENT] report_interval`` parameter
|
||||
of the ``meterng-agent`` service.
|
@ -61,6 +61,7 @@ describe 'neutron::agents::metering' do
|
||||
should contain_neutron_metering_agent_config('DEFAULT/measure_interval').with_value('<SERVICE DEFAULT>');
|
||||
should contain_neutron_metering_agent_config('DEFAULT/report_interval').with_value('<SERVICE DEFAULT>');
|
||||
should contain_neutron_metering_agent_config('DEFAULT/rpc_response_max_timeout').with_value('<SERVICE DEFAULT>');
|
||||
should contain_neutron_metering_agent_config('agent/report_interval').with_value('<SERVICE DEFAULT>');
|
||||
end
|
||||
|
||||
it 'installs neutron metering agent package' do
|
||||
|
Loading…
Reference in New Issue
Block a user