Treat IP address as optional in Cisco VTS ML2 configuration
Bug #1766949 Change-Id: I5d8b7f05a2d8d7bff608c8bbe9bd0d837bd1e3dc Signed-off-by: Wojciech Dec <wdec@cisco.com>
This commit is contained in:
parent
971efd6be1
commit
ffc4ca8e71
@ -20,11 +20,11 @@
|
||||
#
|
||||
#
|
||||
# [*vts_url_ip*]
|
||||
# IP address for VTS Api Service
|
||||
# Defaults to hiera('vts_ip')
|
||||
# (Optional) IP address of the VTS Server
|
||||
# Defaults to undefined
|
||||
#
|
||||
# [*vts_port*]
|
||||
# (Optional) VTS server Neutron service port
|
||||
# (Optional) VTS Server Neutron service port
|
||||
# Defaults to '8888'
|
||||
#
|
||||
# [*step*]
|
||||
@ -33,13 +33,14 @@
|
||||
# Defaults to hiera('step')
|
||||
#
|
||||
class tripleo::profile::base::neutron::plugins::ml2::vts (
|
||||
$vts_url_ip = hiera('vts::vts_ip'),
|
||||
$vts_url_ip = hiera('vts::vts_ip', undef),
|
||||
$vts_port = hiera('vts::vts_port', 8888),
|
||||
$step = hiera('step'),
|
||||
) {
|
||||
|
||||
if $step >= 4 {
|
||||
|
||||
if $vts_url_ip != undef {
|
||||
$vts_url_ip_out = normalize_ip_for_uri($vts_url_ip)
|
||||
|
||||
class { '::neutron::plugins::ml2::cisco::vts':
|
||||
@ -47,3 +48,4 @@ class tripleo::profile::base::neutron::plugins::ml2::vts (
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -48,6 +48,12 @@ describe 'tripleo::profile::base::neutron::plugins::ml2::vts' do
|
||||
end
|
||||
end
|
||||
|
||||
context 'with no IP address' do
|
||||
it 'should not configure vts ml2 plugin' do
|
||||
is_expected.not_to contain_class('neutron::plugins::ml2::cisco::vts')
|
||||
end
|
||||
end
|
||||
|
||||
context 'with VTS IPv4 and port 9999' do
|
||||
before do
|
||||
params.merge!({
|
||||
|
Loading…
Reference in New Issue
Block a user