Skip creating non-existing resources
Skip creating overridden neutron resources for odl controller in standalone mode. Change-Id: I429ff55e49744b84e6132412ed379b7a6a37ee14
This commit is contained in:
parent
207f862727
commit
001dc03a06
|
@ -1,9 +1,9 @@
|
|||
require 'yaml'
|
||||
|
||||
module Puppet::Parser::Functions
|
||||
newfunction(:odl_hiera_overrides, :type => :rvalue, :arity => 5) do |args|
|
||||
newfunction(:odl_hiera_overrides, :type => :rvalue, :arity => 6) do |args|
|
||||
|
||||
odl, neutron_config, neutron_advanced_configuration, network_scheme, mgmt_vip = args
|
||||
odl, neutron_config, neutron_advanced_configuration, network_scheme, mgmt_vip, standalone_mode = args
|
||||
|
||||
hiera_overrides = {}
|
||||
configuration = {}
|
||||
|
@ -56,10 +56,13 @@ module Puppet::Parser::Functions
|
|||
}
|
||||
}
|
||||
|
||||
configuration.merge! ml2_plugin
|
||||
configuration.merge! l3_agent
|
||||
configuration.merge! dhcp_agent
|
||||
configuration.merge! neutron_ovs_config
|
||||
unless standalone_mode
|
||||
configuration.merge! ml2_plugin
|
||||
configuration.merge! l3_agent
|
||||
configuration.merge! dhcp_agent
|
||||
configuration.merge! neutron_ovs_config
|
||||
end
|
||||
|
||||
hiera_overrides['configuration'] = configuration
|
||||
hiera_overrides['configuration_options'] = { 'create' => false }
|
||||
|
||||
|
|
|
@ -6,13 +6,15 @@ class opendaylight::hiera_override {
|
|||
$orig_network_scheme = hiera_hash('network_scheme')
|
||||
$network_scheme = odl_network_scheme($opendaylight::odl_settings['enable_bgpvpn'], $orig_network_scheme)
|
||||
$ovsdb_managers = odl_ovsdb_managers($opendaylight::odl_mgmt_ips)
|
||||
$standalone_mode = roles_include(['opendaylight']) and size(hiera('roles')) == 1
|
||||
|
||||
$odl_hiera_yaml = odl_hiera_overrides(
|
||||
$opendaylight::odl_settings,
|
||||
hiera('neutron_config'),
|
||||
hiera('neutron_advanced_configuration'),
|
||||
$network_scheme,
|
||||
hiera('management_vip')
|
||||
hiera('management_vip'),
|
||||
$standalone_mode
|
||||
)
|
||||
|
||||
file { $override_file:
|
||||
|
|
Loading…
Reference in New Issue