Add support for [network] network_isolation

Change-Id: Ifdd4aad61df32ab4baba55eebaa9cf42567968c4
This commit is contained in:
Takashi Kajinami 2024-04-04 12:00:06 +09:00
parent 225592993c
commit 0959e03f96
3 changed files with 13 additions and 0 deletions

View File

@ -276,6 +276,10 @@
# (optional) The network that trove will attach by default.
# Defaults to $facts['os_service_default'].
#
# [*network_isolation*]
# (optional) Whether to plug user defined port to database container.
# Defaults to $facts['os_service_default'].
#
# [*trove_volume_support*]
# (optional) Whether to provision a Cinder volume for datadir.
# Defaults to $facts['os_service_default'].
@ -350,6 +354,7 @@ class trove(
$trove_endpoint_type = $facts['os_service_default'],
$neutron_endpoint_type = $facts['os_service_default'],
$management_networks = $facts['os_service_default'],
$network_isolation = $facts['os_service_default'],
$trove_volume_support = $facts['os_service_default'],
$volume_rootdisk_support = $facts['os_service_default'],
$volume_rootdisk_size = $facts['os_service_default'],
@ -414,6 +419,7 @@ class trove(
'DEFAULT/network_label_regex': value => '.*';
'DEFAULT/network_driver': value => 'trove.network.neutron.NeutronDriver';
'DEFAULT/management_networks': value => join(any2array($management_networks), ',');
'network/network_isolation': value => $network_isolation;
}
# volume

View File

@ -0,0 +1,4 @@
---
features:
- |
The new ``trove::network_isolation`` parameter has been added.

View File

@ -44,6 +44,7 @@ describe 'trove' do
is_expected.to contain_trove_config('DEFAULT/neutron_endpoint_type').with_value('<SERVICE DEFAULT>')
is_expected.to contain_trove_config('DEFAULT/glance_endpoint_type').with_value('<SERVICE DEFAULT>')
is_expected.to contain_trove_config('DEFAULT/management_networks').with_value('<SERVICE DEFAULT>')
is_expected.to contain_trove_config('network/network_isolation').with_value('<SERVICE DEFAULT>')
is_expected.to contain_trove_config('DEFAULT/trove_volume_support').with_value('<SERVICE DEFAULT>')
is_expected.to contain_trove_config('DEFAULT/volume_rootdisk_support').with_value('<SERVICE DEFAULT>')
is_expected.to contain_trove_config('DEFAULT/volume_rootdisk_size').with_value('<SERVICE DEFAULT>')
@ -124,6 +125,7 @@ describe 'trove' do
:swift_service_type => 'object-store',
:neutron_service_type => 'network',
:glance_service_type => 'image',
:network_isolation => true,
:trove_volume_support => true,
:volume_rootdisk_support => true,
:volume_rootdisk_size => 10,
@ -141,6 +143,7 @@ describe 'trove' do
is_expected.to contain_trove_config('DEFAULT/swift_service_type').with_value('object-store')
is_expected.to contain_trove_config('DEFAULT/neutron_service_type').with_value('network')
is_expected.to contain_trove_config('DEFAULT/glance_service_type').with_value('image')
is_expected.to contain_trove_config('network/network_isolation').with_value(true)
is_expected.to contain_trove_config('DEFAULT/trove_volume_support').with_value(true)
is_expected.to contain_trove_config('DEFAULT/volume_rootdisk_support').with_value(true)
is_expected.to contain_trove_config('DEFAULT/volume_rootdisk_size').with_value(10)