Merge "Provide a flag that mark existence of provider network"
This commit is contained in:
commit
c05beb45cd
@ -18,6 +18,9 @@ $floating_net_cidr = $settings['floating_net_cidr']
|
||||
$floating_net_gw = $settings['floating_net_gw']
|
||||
$default_floating_net_gw = regsubst($floating_net_cidr,'^(\d+\.\d+\.\d+)\.\d+/\d+$','\1.1')
|
||||
|
||||
$skip_provider_network = try_get_value('skip_provider_network', false)
|
||||
|
||||
if ! $skip_provider_network {
|
||||
neutron_network { $floating_net :
|
||||
ensure => 'present',
|
||||
provider_physical_network => $settings['external_network'],
|
||||
@ -26,6 +29,7 @@ neutron_network { $floating_net :
|
||||
tenant_name => $os_tenant_name,
|
||||
shared => true,
|
||||
}
|
||||
|
||||
neutron_subnet { "${floating_net}__subnet" :
|
||||
ensure => 'present',
|
||||
cidr => $floating_net_cidr,
|
||||
@ -37,6 +41,9 @@ neutron_subnet { "${floating_net}__subnet" :
|
||||
require => Neutron_network[$floating_net],
|
||||
}
|
||||
|
||||
skip_provider_network($::nsxt::params::hiera_yml)
|
||||
}
|
||||
|
||||
$internal_net_dns = split($settings['internal_net_dns'], ',')
|
||||
$internal_net_cidr = $settings['internal_net_cidr']
|
||||
|
||||
|
@ -8,7 +8,14 @@ file name, where write new parameters in yaml format, ex:
|
||||
EOS
|
||||
) do |args|
|
||||
filename = args[0]
|
||||
|
||||
begin
|
||||
yaml_string = File.read filename
|
||||
|
||||
hiera_overrides = YAML.load yaml_string
|
||||
rescue Errno::ENOENT
|
||||
hiera_overrides = {}
|
||||
end
|
||||
|
||||
# override neutron_advanced_configuration
|
||||
neutron_advanced_configuration = {}
|
||||
|
@ -0,0 +1,24 @@
|
||||
require 'yaml'
|
||||
|
||||
module Puppet::Parser::Functions
|
||||
newfunction(:skip_provider_network, :doc => <<-EOS
|
||||
Custom function to override hiera parameters, the first argument -
|
||||
file name, where write new parameters in yaml format, ex:
|
||||
hiera_overrides('/etc/hiera/test.yaml')
|
||||
EOS
|
||||
) do |args|
|
||||
filename = args[0]
|
||||
|
||||
begin
|
||||
yaml_string = File.read filename
|
||||
hiera_overrides = YAML.load yaml_string
|
||||
rescue Errno::ENOENT
|
||||
hiera_overrides = {}
|
||||
end
|
||||
|
||||
hiera_overrides['skip_provider_network'] = true
|
||||
|
||||
# write to hiera override yaml file
|
||||
File.open(filename, 'w') { |file| file.write(hiera_overrides.to_yaml) }
|
||||
end
|
||||
end
|
@ -1,5 +1,6 @@
|
||||
class nsxt::params {
|
||||
$hiera_key = 'nsx-t'
|
||||
$hiera_yml = '/etc/hiera/plugins/nsx-t.yaml'
|
||||
$plugin_package = 'python-vmware-nsx'
|
||||
$core_plugin = 'vmware_nsx.plugin.NsxV3Plugin'
|
||||
$nsx_plugin_dir = '/etc/neutron/plugins/vmware'
|
||||
|
@ -257,8 +257,6 @@
|
||||
- nsx-t-primary-neutron-server-start
|
||||
- nsx-t-configure-agents-dhcp
|
||||
- primary-openstack-network-agents-metadata
|
||||
condition:
|
||||
yaql_exp: "changed($.quantum)"
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/neutron-network-create.pp
|
||||
puppet_modules: puppet/modules:/etc/puppet/modules
|
||||
|
Loading…
Reference in New Issue
Block a user