Merge "Add support for [network] network_isolation"

This commit is contained in:
Zuul 2024-04-05 22:36:42 +00:00 committed by Gerrit Code Review
commit 4de70202f8
3 changed files with 13 additions and 0 deletions

View File

@ -271,6 +271,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'].
@ -351,6 +355,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'],
@ -406,6 +411,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>')
@ -121,6 +122,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,
@ -138,6 +140,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)