Support amp_image_owner_id option for octavia controller

Change-Id: Ie0ee8e3b66e270a72483a7042045313d4d4511b3
This commit is contained in:
Sam Morrison 2020-03-05 10:08:21 +11:00 committed by Takashi Kajinami
parent c67e6fa142
commit 32bb8087c6
3 changed files with 16 additions and 1 deletions

View File

@ -23,6 +23,11 @@
# be updated without requiring reconfiguration of Octavia.
# Defaults to $::os_service_default
#
# [*amp_image_owner_id*]
# Restrict glance image selection to a specific owner ID. This is a
# recommended security setting.
# Defaults to $::os_service_default
#
# [*amp_secgroup_list*]
# List of security groups to use for Amphorae.
# Defaults to $::os_service_default
@ -165,6 +170,7 @@ class octavia::controller (
$amp_active_wait_sec = $::os_service_default,
$amp_flavor_id = '65',
$amp_image_tag = $::os_service_default,
$amp_image_owner_id = $::os_service_default,
$amp_secgroup_list = $::os_service_default,
$amp_boot_network_list = [],
$loadbalancer_topology = $::os_service_default,
@ -234,6 +240,7 @@ class octavia::controller (
'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_image_owner_id' : value => $amp_image_owner_id;
'controller_worker/amp_secgroup_list' : value => $amp_secgroup_list_real;
'controller_worker/amp_boot_network_list' : value => $amp_boot_network_list_real;
'controller_worker/loadbalancer_topology' : value => $loadbalancer_topology_real;

View File

@ -0,0 +1,5 @@
---
features:
- |
Support amp_image_owner_id setting in octavia controller
Set using ``octavia::controller::amp_image_owner_id```

View File

@ -17,6 +17,7 @@ describe 'octavia::controller' do
:amp_active_wait_sec => '10',
:amp_flavor_id => '42',
:amp_image_tag => 'amphorae1',
:amp_image_owner_id => 'customowner',
:amp_secgroup_list => ['lb-mgmt-sec-grp'],
:amp_boot_network_list => ['lbnet1', 'lbnet2'],
:loadbalancer_topology => 'SINGLE',
@ -54,6 +55,7 @@ describe 'octavia::controller' do
is_expected.to contain_octavia_config('controller_worker/amp_active_wait_sec').with_value('10')
is_expected.to contain_octavia_config('controller_worker/amp_flavor_id').with_value('42')
is_expected.to contain_octavia_config('controller_worker/amp_image_tag').with_value('amphorae1')
is_expected.to contain_octavia_config('controller_worker/amp_image_owner_id').with_value('customowner')
is_expected.to contain_octavia_config('controller_worker/amp_secgroup_list').with_value(['lb-mgmt-sec-grp'])
is_expected.to contain_octavia_config('controller_worker/amp_boot_network_list').with_value(['lbnet1', 'lbnet2'])
is_expected.to contain_octavia_config('controller_worker/loadbalancer_topology').with_value('SINGLE')
@ -83,7 +85,7 @@ describe 'octavia::controller' do
is_expected.to contain_octavia_config('keepalived_vrrp/vrrp_success_count').with_value(2)
is_expected.to contain_octavia_config('keepalived_vrrp/vrrp_garp_refresh_interval').with_value(5)
is_expected.to contain_octavia_config('keepalived_vrrp/vrrp_garp_refresh_count').with_value(2)
end
end
end
it 'configures with the default values' do
@ -91,6 +93,7 @@ describe 'octavia::controller' do
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/amp_image_tag').with_value('<SERVICE DEFAULT>')
is_expected.to contain_octavia_config('controller_worker/amp_image_owner_id').with_value('<SERVICE DEFAULT>')
is_expected.to contain_octavia_config('controller_worker/amp_secgroup_list').with_value('<SERVICE DEFAULT>')
is_expected.to contain_octavia_config('controller_worker/amp_boot_network_list').with_value([])
is_expected.to contain_octavia_config('controller_worker/loadbalancer_topology').with_value('<SERVICE DEFAULT>')