Merge "Adds amp_active_retries and amp_active_wait_sec"

This commit is contained in:
Zuul 2020-03-09 17:00:14 +00:00 committed by Gerrit Code Review
commit 2afe375f78
3 changed files with 25 additions and 1 deletions

View File

@ -2,6 +2,15 @@
#
# === Parameters
#
# [*amp_active_retries*]
# (optional) Retry attempts to wait for Amphora to become active.
# Defaults to $::os_service_default
#
# [*amp_active_wait_sec*]
# (optional) Seconds to wait between checks on whether an Amphora has
# become active.
# Defaults to $::os_service_default
#
# [*amp_flavor_id*]
# (optional) Nova instance flavor id for the Amphora.
# Note: since we set manage_nova_flavor to True by default, we need
@ -152,6 +161,8 @@
# Defaults to $::os_service_default
#
class octavia::controller (
$amp_active_retries = $::os_service_default,
$amp_active_wait_sec = $::os_service_default,
$amp_flavor_id = '65',
$amp_image_tag = $::os_service_default,
$amp_secgroup_list = $::os_service_default,
@ -219,6 +230,8 @@ class octavia::controller (
}
octavia_config {
'controller_worker/amp_active_retries' : value => $amp_active_retries;
'controller_worker/amp_active_wait_sec' : value => $amp_active_wait_sec;
'controller_worker/amp_flavor_id' : value => $amp_flavor_id_real;
'controller_worker/amp_image_tag' : value => $amp_image_tag_real;
'controller_worker/amp_secgroup_list' : value => $amp_secgroup_list_real;

View File

@ -0,0 +1,5 @@
---
features:
- |
Added parameters octavia::controller::amp_active_retries and
octavia::controller::amp_active_wait_sec.

View File

@ -13,7 +13,9 @@ describe 'octavia::controller' do
context 'configured with specific parameters' do
let :params do
{ :amp_flavor_id => '42',
{ :amp_active_retries => '30',
:amp_active_wait_sec => '10',
:amp_flavor_id => '42',
:amp_image_tag => 'amphorae1',
:amp_secgroup_list => ['lb-mgmt-sec-grp'],
:amp_boot_network_list => ['lbnet1', 'lbnet2'],
@ -41,6 +43,8 @@ describe 'octavia::controller' do
}
end
it { is_expected.to contain_octavia_config('controller_worker/amp_active_retries').with_value('30') }
it { is_expected.to contain_octavia_config('controller_worker/amp_active_wait_sec').with_value('10') }
it { is_expected.to contain_octavia_config('controller_worker/amp_flavor_id').with_value('42') }
it { is_expected.to contain_octavia_config('controller_worker/amp_image_tag').with_value('amphorae1') }
it { is_expected.to contain_octavia_config('controller_worker/amp_secgroup_list').with_value(['lb-mgmt-sec-grp']) }
@ -69,6 +73,8 @@ describe 'octavia::controller' do
end
it 'configures worker parameters' do
is_expected.to contain_octavia_config('controller_worker/amp_active_retries').with_value('<SERVICE DEFAULT>')
is_expected.to contain_octavia_config('controller_worker/amp_active_wait_sec').with_value('<SERVICE DEFAULT>')
is_expected.to contain_octavia_config('controller_worker/amp_flavor_id').with_value('65')
is_expected.to contain_octavia_config('controller_worker/amphora_driver').with_value('amphora_haproxy_rest_driver')
is_expected.to contain_octavia_config('controller_worker/compute_driver').with_value('compute_nova_driver')