External ID switched to parameter
The external ID was hard coded to $::fqdn, in this change it is now a parameter that defaults to $::fqdn. Change-Id: I2f69502150b65421b1b6c02eb93804229e053349
This commit is contained in:
parent
c3e5717561
commit
25e01583e1
@ -25,12 +25,17 @@
|
||||
# (optional) List of <bridge-name>:<interface-name> when doing bridge mapping
|
||||
# Defaults to empty list
|
||||
#
|
||||
# [*hostname*]
|
||||
# (optional) The hostname to use with the external id
|
||||
# Defaults to $::fqdn
|
||||
#
|
||||
class ovn::controller(
|
||||
$ovn_remote,
|
||||
$ovn_encap_ip,
|
||||
$ovn_encap_type = 'geneve',
|
||||
$ovn_bridge_mappings = [],
|
||||
$bridge_interface_mappings = []
|
||||
$bridge_interface_mappings = [],
|
||||
$hostname = $::fqdn,
|
||||
) {
|
||||
include ::ovn::params
|
||||
include ::vswitch::ovs
|
||||
@ -58,7 +63,7 @@ class ovn::controller(
|
||||
'external_ids:ovn-remote' => { 'value' => $ovn_remote },
|
||||
'external_ids:ovn-encap-type' => { 'value' => $ovn_encap_type },
|
||||
'external_ids:ovn-encap-ip' => { 'value' => $ovn_encap_ip },
|
||||
'external_ids:hostname' => { 'value' => $::fqdn },
|
||||
'external_ids:hostname' => { 'value' => $hostname },
|
||||
}
|
||||
|
||||
if !empty($ovn_bridge_mappings) {
|
||||
|
@ -0,0 +1,3 @@
|
||||
---
|
||||
issues:
|
||||
- The external id was hard coded to $::fqdn, it is now a parameter that defaults to $::fqdn
|
@ -7,7 +7,8 @@ describe 'ovn::controller' do
|
||||
:ovn_encap_type => 'geneve',
|
||||
:ovn_encap_ip => '1.2.3.4',
|
||||
:ovn_bridge_mappings => ['physnet-1:br-1'],
|
||||
:bridge_interface_mappings => ['br-1:eth1']
|
||||
:bridge_interface_mappings => ['br-1:eth1'],
|
||||
:hostname => 'server1.example.com'
|
||||
}
|
||||
end
|
||||
|
||||
@ -52,7 +53,7 @@ describe 'ovn::controller' do
|
||||
)
|
||||
|
||||
is_expected.to contain_vs_config('external_ids:hostname').with(
|
||||
:value => 'foo.example.com',
|
||||
:value => 'server1.example.com',
|
||||
)
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user