diff -Nru puppet-module-neutron-8.0.0/debian/changelog puppet-module-neutron-9.4.0/debian/changelog --- puppet-module-neutron-8.0.0/debian/changelog 2016-04-29 15:38:12.000000000 +0000 +++ puppet-module-neutron-9.4.0/debian/changelog 2016-10-21 13:38:44.000000000 +0000 @@ -1,3 +1,15 @@ +puppet-module-neutron (9.4.0-1) unstable; urgency=medium + + [ Ondřej Nový ] + * d/rules: Changed UPSTREAM_GIT protocol to https + * d/copyright: Changed source URL to https protocol + + [ Thomas Goirand ] + * New upstream release. + * Fixed runtime depends for this release. + + -- Thomas Goirand Fri, 21 Oct 2016 13:38:44 +0000 + puppet-module-neutron (8.0.0-2) unstable; urgency=medium [ Ondřej Nový ] diff -Nru puppet-module-neutron-8.0.0/debian/control puppet-module-neutron-9.4.0/debian/control --- puppet-module-neutron-8.0.0/debian/control 2016-04-29 15:38:12.000000000 +0000 +++ puppet-module-neutron-9.4.0/debian/control 2016-10-21 13:38:44.000000000 +0000 @@ -16,12 +16,14 @@ Package: puppet-module-neutron Architecture: all Depends: puppet-common, - puppet-module-keystone, - puppet-module-nova, - puppet-module-openstacklib, + puppet-module-keystone (>= 9.4.0), + puppet-module-nova (>= 9.4.0), + puppet-module-openstacklib (>= 9.4.0), + puppet-module-oslo, puppet-module-puppetlabs-inifile, puppet-module-puppetlabs-stdlib, - puppet-module-vswitch, + puppet-module-duritong-sysctl, + puppet-module-vswitch (>= 5.4.0), ${misc:Depends}, Description: Puppet module for OpenStack Neutron Puppet lets you centrally manage every important aspect of your system using a diff -Nru puppet-module-neutron-8.0.0/debian/copyright puppet-module-neutron-9.4.0/debian/copyright --- puppet-module-neutron-8.0.0/debian/copyright 2016-04-29 15:38:12.000000000 +0000 +++ puppet-module-neutron-9.4.0/debian/copyright 2016-10-21 13:38:44.000000000 +0000 @@ -1,7 +1,7 @@ Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: puppet-neutron Upstream-Contact: OpenStack Devel -Source: git://github.com/openstack/puppet-neutron +Source: https://github.com/openstack/puppet-neutron Files: * Copyright: (c) 2013-2016, OpenStack Foundation diff -Nru puppet-module-neutron-8.0.0/debian/gbp.conf puppet-module-neutron-9.4.0/debian/gbp.conf --- puppet-module-neutron-8.0.0/debian/gbp.conf 2016-04-29 15:38:12.000000000 +0000 +++ puppet-module-neutron-9.4.0/debian/gbp.conf 2016-10-21 13:38:44.000000000 +0000 @@ -1,6 +1,6 @@ [DEFAULT] upstream-branch = master -debian-branch = debian/mitaka +debian-branch = debian/newton upstream-tag = %(version)s compression = xz diff -Nru puppet-module-neutron-8.0.0/debian/rules puppet-module-neutron-9.4.0/debian/rules --- puppet-module-neutron-8.0.0/debian/rules 2016-04-29 15:38:12.000000000 +0000 +++ puppet-module-neutron-9.4.0/debian/rules 2016-10-21 13:38:44.000000000 +0000 @@ -1,6 +1,6 @@ #!/usr/bin/make -f -UPSTREAM_GIT = git://github.com/openstack/puppet-neutron.git +UPSTREAM_GIT := https://github.com/openstack/puppet-neutron.git include /usr/share/openstack-pkg-tools/pkgos.make export OSLO_PACKAGE_VERSION=$(VERSION) diff -Nru puppet-module-neutron-8.0.0/examples/cisco_ml2.pp puppet-module-neutron-9.4.0/examples/cisco_ml2.pp --- puppet-module-neutron-8.0.0/examples/cisco_ml2.pp 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/examples/cisco_ml2.pp 2016-09-26 21:11:55.000000000 +0000 @@ -4,7 +4,6 @@ rabbit_host => '127.0.0.1', rabbit_user => 'neutron', rabbit_password => 'rabbit_secret', - verbose => true, debug => true, } diff -Nru puppet-module-neutron-8.0.0/examples/neutron_l3_with_to_uuid.pp puppet-module-neutron-9.4.0/examples/neutron_l3_with_to_uuid.pp --- puppet-module-neutron-8.0.0/examples/neutron_l3_with_to_uuid.pp 1970-01-01 00:00:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/examples/neutron_l3_with_to_uuid.pp 2016-09-26 21:11:55.000000000 +0000 @@ -0,0 +1,31 @@ +# +# This manifest is intended to demonstrate the 'transform_to' argument +# for converting the name of a Neutron router to its UUID for +# inclusion in l3-agent.ini +# +# This manifest extends the one shown in base_provision.pp +# + +class { '::neutron': + allow_overlapping_ips => true, + rabbit_password => 'password', + rabbit_user => 'guest', + rabbit_host => 'localhost', + service_plugins => ['router'] +} + +class { '::neutron::server': + auth_password => 'password', + database_connection => 'mysql://neutron:password@192.168.1.1/neutron', +} + +# configure l3-agent to use the new router by name +class { '::neutron::agents::l3': + enabled => true, + use_namespaces => false, + require => Neutron_router['demo_router'], +} + +neutron_l3_agent_config { + 'DEFAULT/router_id': value => 'demo_router', transform_to => 'uuid'; +} diff -Nru puppet-module-neutron-8.0.0/examples/neutron.pp puppet-module-neutron-9.4.0/examples/neutron.pp --- puppet-module-neutron-8.0.0/examples/neutron.pp 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/examples/neutron.pp 2016-09-26 21:11:55.000000000 +0000 @@ -3,7 +3,6 @@ # General Neutron stuff # Configures everything in neutron.conf class { '::neutron': - verbose => true, allow_overlapping_ips => true, rabbit_password => 'password', rabbit_user => 'guest', @@ -33,8 +32,8 @@ # This plugin configures Neutron for OVS on the server # Agent class { '::neutron::agents::ml2::ovs': - local_ip => '192.168.1.1', - enable_tunneling => true, + local_ip => '192.168.1.1', + tunnel_types => ['vxlan'] } # ml2 plugin with vxlan as ml2 driver and ovs as mechanism driver @@ -59,6 +58,6 @@ # The agent/plugin combo also needs installed on clients # Agent class { '::neutron::agents::ml2::ovs': - local_ip => '192.168.1.11', - enable_tunneling => true, + local_ip => '192.168.1.11', + tunnel_types => ['vxlan'] } diff -Nru puppet-module-neutron-8.0.0/examples/neutron_with_pacemaker.pp puppet-module-neutron-9.4.0/examples/neutron_with_pacemaker.pp --- puppet-module-neutron-8.0.0/examples/neutron_with_pacemaker.pp 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/examples/neutron_with_pacemaker.pp 2016-09-26 21:11:55.000000000 +0000 @@ -23,7 +23,6 @@ # sudo pcs constraint colocation add neutron_server_service with neutron_vip class { '::neutron': - verbose => true, allow_overlapping_ips => true, service_plugins => [ 'dhcp', 'l3' ] } diff -Nru puppet-module-neutron-8.0.0/Gemfile puppet-module-neutron-9.4.0/Gemfile --- puppet-module-neutron-8.0.0/Gemfile 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/Gemfile 2016-09-26 21:11:55.000000000 +0000 @@ -1,31 +1,11 @@ source ENV['GEM_SOURCE'] || "https://rubygems.org" -group :development, :test do - gem 'puppetlabs_spec_helper', :require => 'false' - gem 'rspec-puppet', '~> 2.2.0', :require => 'false' - gem 'rspec-puppet-facts', :require => 'false' - gem 'metadata-json-lint', :require => 'false' - gem 'puppet-lint-param-docs', :require => 'false' - gem 'puppet-lint-absolute_classname-check', :require => 'false' - gem 'puppet-lint-absolute_template_path', :require => 'false' - gem 'puppet-lint-trailing_newline-check', :require => 'false' - gem 'puppet-lint-unquoted_string-check', :require => 'false' - gem 'puppet-lint-leading_zero-check', :require => 'false' - gem 'puppet-lint-variable_contains_upcase', :require => 'false' - gem 'puppet-lint-numericvariable', :require => 'false' - gem 'json', :require => 'false' +group :development, :test, :system_tests do gem 'puppet-openstack_spec_helper', :git => 'https://git.openstack.org/openstack/puppet-openstack_spec_helper', - :branch => 'stable/mitaka', :require => false end -group :system_tests do - gem 'beaker-rspec', :require => 'false' - gem 'beaker-puppet_install_helper', :require => 'false' - gem 'r10k', :require => 'false' -end - if facterversion = ENV['FACTER_GEM_VERSION'] gem 'facter', facterversion, :require => false else diff -Nru puppet-module-neutron-8.0.0/.gitreview puppet-module-neutron-9.4.0/.gitreview --- puppet-module-neutron-8.0.0/.gitreview 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/.gitreview 2016-09-26 21:11:55.000000000 +0000 @@ -2,4 +2,3 @@ host=review.openstack.org port=29418 project=openstack/puppet-neutron.git -defaultbranch=stable/mitaka diff -Nru puppet-module-neutron-8.0.0/lib/puppet/parser/functions/validate_vxlan_udp_port.rb puppet-module-neutron-9.4.0/lib/puppet/parser/functions/validate_vxlan_udp_port.rb --- puppet-module-neutron-8.0.0/lib/puppet/parser/functions/validate_vxlan_udp_port.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/lib/puppet/parser/functions/validate_vxlan_udp_port.rb 2016-09-26 21:11:55.000000000 +0000 @@ -25,7 +25,7 @@ # check if port is either default value or one of the private ports # according to http://tools.ietf.org/html/rfc6056 - if value != 4789 or (49151 >= value and value > 65535) + if value != 4789 and (49151 >= value or value > 65535) raise Puppet::Error, "vxlan udp port is invalid." end end diff -Nru puppet-module-neutron-8.0.0/lib/puppet/provider/neutron_agent_linuxbridge/ini_setting.rb puppet-module-neutron-9.4.0/lib/puppet/provider/neutron_agent_linuxbridge/ini_setting.rb --- puppet-module-neutron-8.0.0/lib/puppet/provider/neutron_agent_linuxbridge/ini_setting.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/lib/puppet/provider/neutron_agent_linuxbridge/ini_setting.rb 2016-09-26 21:11:55.000000000 +0000 @@ -3,8 +3,13 @@ :parent => Puppet::Type.type(:openstack_config).provider(:ini_setting) ) do - def file_path + def self.file_path '/etc/neutron/plugins/ml2/linuxbridge_agent.ini' end + # added for backwards compatibility with older versions of inifile + def file_path + self.class.file_path + end + end diff -Nru puppet-module-neutron-8.0.0/lib/puppet/provider/neutron_agent_ovs/ini_setting.rb puppet-module-neutron-9.4.0/lib/puppet/provider/neutron_agent_ovs/ini_setting.rb --- puppet-module-neutron-8.0.0/lib/puppet/provider/neutron_agent_ovs/ini_setting.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/lib/puppet/provider/neutron_agent_ovs/ini_setting.rb 2016-09-26 21:11:55.000000000 +0000 @@ -3,8 +3,13 @@ :parent => Puppet::Type.type(:openstack_config).provider(:ini_setting) ) do - def file_path + def self.file_path '/etc/neutron/plugins/ml2/openvswitch_agent.ini' end + # added for backwards compatibility with older versions of inifile + def file_path + self.class.file_path + end + end diff -Nru puppet-module-neutron-8.0.0/lib/puppet/provider/neutron_agent_sriov_numvfs/sriov_numvfs.rb puppet-module-neutron-9.4.0/lib/puppet/provider/neutron_agent_sriov_numvfs/sriov_numvfs.rb --- puppet-module-neutron-8.0.0/lib/puppet/provider/neutron_agent_sriov_numvfs/sriov_numvfs.rb 1970-01-01 00:00:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/lib/puppet/provider/neutron_agent_sriov_numvfs/sriov_numvfs.rb 2016-09-26 21:11:55.000000000 +0000 @@ -0,0 +1,58 @@ +Puppet::Type.type(:neutron_agent_sriov_numvfs).provide(:sriov_numvfs) do + desc <<-EOT + The file /sys/class/net//device/sriov_numvfs will be + present when a physical PCIe device supports SR-IOV. A number written to + this file will enable the specified number of VFs. This provider shall read + the file and ensure that the value is zero, before writing the number of + VFs that should be enabled. If the VFs needs to be disabled then we shall + write a zero to this file. + EOT + + def create + if File.file?(sriov_numvfs_path) + _set_numvfs + else + fail("#{sriov_numvfs_path} doesn't exist. Check if #{sriov_get_interface} is a valid network interface supporting SR-IOV") + end + end + + def destroy + if File.file?(sriov_numvfs_path) + File.write(sriov_numvfs_path,"0") + end + end + + def exists? + if File.file?(sriov_numvfs_path) + cur_value = File.read(sriov_numvfs_path) + if cur_value.to_i == sriov_numvfs_value + return true + end + end + return false + end + + def _set_numvfs + # During an update, the content of file sriov_numvfs_path has to be set + # to 0 (ZERO), before writing the actual value + cur_value = File.read(sriov_numvfs_path) + if cur_value != 0 + File.write(sriov_numvfs_path,"0") + end + File.write(sriov_numvfs_path,sriov_numvfs_value) + end + + def sriov_numvfs_path + "/sys/class/net/#{sriov_get_interface}/device/sriov_numvfs" + end + + def sriov_get_interface + resource[:name].split(':', 2).first + end + + def sriov_numvfs_value + resource[:name].split(':', 2).last.to_i + end + +end + diff -Nru puppet-module-neutron-8.0.0/lib/puppet/provider/neutron_api_config/ini_setting.rb puppet-module-neutron-9.4.0/lib/puppet/provider/neutron_api_config/ini_setting.rb --- puppet-module-neutron-8.0.0/lib/puppet/provider/neutron_api_config/ini_setting.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/lib/puppet/provider/neutron_api_config/ini_setting.rb 2016-09-26 21:11:55.000000000 +0000 @@ -3,8 +3,13 @@ :parent => Puppet::Type.type(:openstack_config).provider(:ini_setting) ) do - def file_path + def self.file_path '/etc/neutron/api-paste.ini' end + # added for backwards compatibility with older versions of inifile + def file_path + self.class.file_path + end + end diff -Nru puppet-module-neutron-8.0.0/lib/puppet/provider/neutron_config/ini_setting.rb puppet-module-neutron-9.4.0/lib/puppet/provider/neutron_config/ini_setting.rb --- puppet-module-neutron-8.0.0/lib/puppet/provider/neutron_config/ini_setting.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/lib/puppet/provider/neutron_config/ini_setting.rb 1970-01-01 00:00:00.000000000 +0000 @@ -1,10 +0,0 @@ -Puppet::Type.type(:neutron_config).provide( - :ini_setting, - :parent => Puppet::Type.type(:openstack_config).provider(:ini_setting) -) do - - def file_path - '/etc/neutron/neutron.conf' - end - -end diff -Nru puppet-module-neutron-8.0.0/lib/puppet/provider/neutron_config/openstackconfig.rb puppet-module-neutron-9.4.0/lib/puppet/provider/neutron_config/openstackconfig.rb --- puppet-module-neutron-8.0.0/lib/puppet/provider/neutron_config/openstackconfig.rb 1970-01-01 00:00:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/lib/puppet/provider/neutron_config/openstackconfig.rb 2016-09-26 21:11:55.000000000 +0000 @@ -0,0 +1,15 @@ +Puppet::Type.type(:neutron_config).provide( + :openstackconfig, + :parent => Puppet::Type.type(:openstack_config).provider(:ruby) +) do + + def self.file_path + '/etc/neutron/neutron.conf' + end + + # added for backwards compatibility with older versions of inifile + def file_path + self.class.file_path + end + +end diff -Nru puppet-module-neutron-8.0.0/lib/puppet/provider/neutron_dhcp_agent_config/ini_setting.rb puppet-module-neutron-9.4.0/lib/puppet/provider/neutron_dhcp_agent_config/ini_setting.rb --- puppet-module-neutron-8.0.0/lib/puppet/provider/neutron_dhcp_agent_config/ini_setting.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/lib/puppet/provider/neutron_dhcp_agent_config/ini_setting.rb 2016-09-26 21:11:55.000000000 +0000 @@ -3,8 +3,13 @@ :parent => Puppet::Type.type(:openstack_config).provider(:ini_setting) ) do - def file_path + def self.file_path '/etc/neutron/dhcp_agent.ini' end + # added for backwards compatibility with older versions of inifile + def file_path + self.class.file_path + end + end diff -Nru puppet-module-neutron-8.0.0/lib/puppet/provider/neutron_fwaas_service_config/ini_setting.rb puppet-module-neutron-9.4.0/lib/puppet/provider/neutron_fwaas_service_config/ini_setting.rb --- puppet-module-neutron-8.0.0/lib/puppet/provider/neutron_fwaas_service_config/ini_setting.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/lib/puppet/provider/neutron_fwaas_service_config/ini_setting.rb 2016-09-26 21:11:55.000000000 +0000 @@ -3,8 +3,13 @@ :parent => Puppet::Type.type(:openstack_config).provider(:ini_setting) ) do - def file_path + def self.file_path '/etc/neutron/fwaas_driver.ini' end + # added for backwards compatibility with older versions of inifile + def file_path + self.class.file_path + end + end diff -Nru puppet-module-neutron-8.0.0/lib/puppet/provider/neutron_l3_agent_config/ini_setting.rb puppet-module-neutron-9.4.0/lib/puppet/provider/neutron_l3_agent_config/ini_setting.rb --- puppet-module-neutron-8.0.0/lib/puppet/provider/neutron_l3_agent_config/ini_setting.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/lib/puppet/provider/neutron_l3_agent_config/ini_setting.rb 2016-09-26 21:11:55.000000000 +0000 @@ -1,10 +1,29 @@ +require 'puppet/provider/neutron' + Puppet::Type.type(:neutron_l3_agent_config).provide( :ini_setting, :parent => Puppet::Type.type(:openstack_config).provider(:ini_setting) ) do - def file_path + def self.file_path '/etc/neutron/l3_agent.ini' end + # added for backwards compatibility with older versions of inifile + def file_path + self.class.file_path + end + + def to_uuid(name) + neutron = Puppet::Provider::Neutron.new + neutron.auth_neutron('router-show', "#{name}", + '--format=value', '--column=id').chop + end + + def from_uuid(uuid) + neutron = Puppet::Provider::Neutron.new + neutron.auth_neutron('router-show', "#{uuid}", + '--format=value', '--column=name').chop + end + end diff -Nru puppet-module-neutron-8.0.0/lib/puppet/provider/neutron_lbaas_agent_config/ini_setting.rb puppet-module-neutron-9.4.0/lib/puppet/provider/neutron_lbaas_agent_config/ini_setting.rb --- puppet-module-neutron-8.0.0/lib/puppet/provider/neutron_lbaas_agent_config/ini_setting.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/lib/puppet/provider/neutron_lbaas_agent_config/ini_setting.rb 2016-09-26 21:11:55.000000000 +0000 @@ -3,8 +3,13 @@ :parent => Puppet::Type.type(:openstack_config).provider(:ini_setting) ) do - def file_path + def self.file_path '/etc/neutron/lbaas_agent.ini' end + # added for backwards compatibility with older versions of inifile + def file_path + self.class.file_path + end + end diff -Nru puppet-module-neutron-8.0.0/lib/puppet/provider/neutron_lbaas_service_config/openstackconfig.rb puppet-module-neutron-9.4.0/lib/puppet/provider/neutron_lbaas_service_config/openstackconfig.rb --- puppet-module-neutron-8.0.0/lib/puppet/provider/neutron_lbaas_service_config/openstackconfig.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/lib/puppet/provider/neutron_lbaas_service_config/openstackconfig.rb 2016-09-26 21:11:55.000000000 +0000 @@ -3,8 +3,13 @@ :parent => Puppet::Type.type(:openstack_config).provider(:ruby) ) do + def self.file_path + '/etc/neutron/neutron.conf' + end + + # added for backwards compatibility with older versions of inifile def file_path - '/etc/neutron/neutron_lbaas.conf' + self.class.file_path end end diff -Nru puppet-module-neutron-8.0.0/lib/puppet/provider/neutron_metadata_agent_config/ini_setting.rb puppet-module-neutron-9.4.0/lib/puppet/provider/neutron_metadata_agent_config/ini_setting.rb --- puppet-module-neutron-8.0.0/lib/puppet/provider/neutron_metadata_agent_config/ini_setting.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/lib/puppet/provider/neutron_metadata_agent_config/ini_setting.rb 2016-09-26 21:11:55.000000000 +0000 @@ -3,8 +3,13 @@ :parent => Puppet::Type.type(:openstack_config).provider(:ini_setting) ) do - def file_path + def self.file_path '/etc/neutron/metadata_agent.ini' end + # added for backwards compatibility with older versions of inifile + def file_path + self.class.file_path + end + end diff -Nru puppet-module-neutron-8.0.0/lib/puppet/provider/neutron_metering_agent_config/ini_setting.rb puppet-module-neutron-9.4.0/lib/puppet/provider/neutron_metering_agent_config/ini_setting.rb --- puppet-module-neutron-8.0.0/lib/puppet/provider/neutron_metering_agent_config/ini_setting.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/lib/puppet/provider/neutron_metering_agent_config/ini_setting.rb 2016-09-26 21:11:55.000000000 +0000 @@ -3,8 +3,13 @@ :parent => Puppet::Type.type(:openstack_config).provider(:ini_setting) ) do - def file_path + def self.file_path '/etc/neutron/metering_agent.ini' end + # added for backwards compatibility with older versions of inifile + def file_path + self.class.file_path + end + end diff -Nru puppet-module-neutron-8.0.0/lib/puppet/provider/neutron_network/neutron.rb puppet-module-neutron-9.4.0/lib/puppet/provider/neutron_network/neutron.rb --- puppet-module-neutron-8.0.0/lib/puppet/provider/neutron_network/neutron.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/lib/puppet/provider/neutron_network/neutron.rb 2016-09-26 21:11:55.000000000 +0000 @@ -11,8 +11,6 @@ Assumes that the neutron service is configured on the same host. EOT - commands :neutron => 'neutron' - mk_resource_methods def self.neutron_type @@ -41,7 +39,8 @@ :provider_segmentation_id => attrs['provider:segmentation_id'], :router_external => attrs['router:external'], :shared => attrs['shared'], - :tenant_id => attrs['tenant_id'] + :tenant_id => attrs['tenant_id'], + :availability_zone_hint => attrs['availability_zone_hint'] ) end self.do_not_manage = false @@ -99,6 +98,11 @@ network_opts << '--router:external' end + if @resource[:availability_zone_hint] + network_opts << \ + "--availability-zone-hint=#{@resource[:availability_zone_hint]}" + end + results = auth_neutron('net-create', '--format=shell', network_opts, resource[:name]) @@ -114,6 +118,7 @@ :router_external => attrs['router:external'], :shared => attrs['shared'], :tenant_id => attrs['tenant_id'], + :availability_zone_hint => attrs['availability_zone_hint'] } end @@ -150,6 +155,13 @@ end end + def availability_zone_hint=(value) + if self.class.do_not_manage + fail("Not managing Neutron_network[#{@resource[:name]}] due to earlier Neutron API failures.") + end + auth_neutron('net-update', "--availability-zone-hint=#{value}", name) + end + [ :provider_network_type, :provider_physical_network, diff -Nru puppet-module-neutron-8.0.0/lib/puppet/provider/neutron_plugin_cisco/ini_setting.rb puppet-module-neutron-9.4.0/lib/puppet/provider/neutron_plugin_cisco/ini_setting.rb --- puppet-module-neutron-8.0.0/lib/puppet/provider/neutron_plugin_cisco/ini_setting.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/lib/puppet/provider/neutron_plugin_cisco/ini_setting.rb 2016-09-26 21:11:55.000000000 +0000 @@ -3,8 +3,13 @@ :parent => Puppet::Type.type(:openstack_config).provider(:ini_setting) ) do - def file_path + def self.file_path '/etc/neutron/plugins/cisco/cisco_plugins.ini' end + # added for backwards compatibility with older versions of inifile + def file_path + self.class.file_path + end + end diff -Nru puppet-module-neutron-8.0.0/lib/puppet/provider/neutron_plugin_cisco_credentials/ini_setting.rb puppet-module-neutron-9.4.0/lib/puppet/provider/neutron_plugin_cisco_credentials/ini_setting.rb --- puppet-module-neutron-8.0.0/lib/puppet/provider/neutron_plugin_cisco_credentials/ini_setting.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/lib/puppet/provider/neutron_plugin_cisco_credentials/ini_setting.rb 2016-09-26 21:11:55.000000000 +0000 @@ -3,8 +3,13 @@ :parent => Puppet::Type.type(:openstack_config).provider(:ini_setting) ) do - def file_path + def self.file_path '/etc/neutron/plugins/cisco/credentials.ini' end + # added for backwards compatibility with older versions of inifile + def file_path + self.class.file_path + end + end diff -Nru puppet-module-neutron-8.0.0/lib/puppet/provider/neutron_plugin_cisco_db_conn/ini_setting.rb puppet-module-neutron-9.4.0/lib/puppet/provider/neutron_plugin_cisco_db_conn/ini_setting.rb --- puppet-module-neutron-8.0.0/lib/puppet/provider/neutron_plugin_cisco_db_conn/ini_setting.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/lib/puppet/provider/neutron_plugin_cisco_db_conn/ini_setting.rb 2016-09-26 21:11:55.000000000 +0000 @@ -3,8 +3,13 @@ :parent => Puppet::Type.type(:openstack_config).provider(:ini_setting) ) do - def file_path + def self.file_path '/etc/neutron/plugins/cisco/db_conn.ini' end + # added for backwards compatibility with older versions of inifile + def file_path + self.class.file_path + end + end diff -Nru puppet-module-neutron-8.0.0/lib/puppet/provider/neutron_plugin_cisco_l2network/ini_setting.rb puppet-module-neutron-9.4.0/lib/puppet/provider/neutron_plugin_cisco_l2network/ini_setting.rb --- puppet-module-neutron-8.0.0/lib/puppet/provider/neutron_plugin_cisco_l2network/ini_setting.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/lib/puppet/provider/neutron_plugin_cisco_l2network/ini_setting.rb 2016-09-26 21:11:55.000000000 +0000 @@ -3,8 +3,13 @@ :parent => Puppet::Type.type(:openstack_config).provider(:ini_setting) ) do - def file_path + def self.file_path '/etc/neutron/plugins/cisco/l2network_plugin.ini' end + # added for backwards compatibility with older versions of inifile + def file_path + self.class.file_path + end + end diff -Nru puppet-module-neutron-8.0.0/lib/puppet/provider/neutron_plugin_linuxbridge/ini_setting.rb puppet-module-neutron-9.4.0/lib/puppet/provider/neutron_plugin_linuxbridge/ini_setting.rb --- puppet-module-neutron-8.0.0/lib/puppet/provider/neutron_plugin_linuxbridge/ini_setting.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/lib/puppet/provider/neutron_plugin_linuxbridge/ini_setting.rb 2016-09-26 21:11:55.000000000 +0000 @@ -3,8 +3,13 @@ :parent => Puppet::Type.type(:openstack_config).provider(:ini_setting) ) do - def file_path + def self.file_path '/etc/neutron/plugins/linuxbridge/linuxbridge_conf.ini' end + # added for backwards compatibility with older versions of inifile + def file_path + self.class.file_path + end + end diff -Nru puppet-module-neutron-8.0.0/lib/puppet/provider/neutron_plugin_midonet/ini_setting.rb puppet-module-neutron-9.4.0/lib/puppet/provider/neutron_plugin_midonet/ini_setting.rb --- puppet-module-neutron-8.0.0/lib/puppet/provider/neutron_plugin_midonet/ini_setting.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/lib/puppet/provider/neutron_plugin_midonet/ini_setting.rb 2016-09-26 21:11:55.000000000 +0000 @@ -3,8 +3,13 @@ :parent => Puppet::Type.type(:openstack_config).provider(:ini_setting) ) do - def file_path + def self.file_path '/etc/neutron/plugins/midonet/midonet.ini' end + # added for backwards compatibility with older versions of inifile + def file_path + self.class.file_path + end + end diff -Nru puppet-module-neutron-8.0.0/lib/puppet/provider/neutron_plugin_ml2/ini_setting.rb puppet-module-neutron-9.4.0/lib/puppet/provider/neutron_plugin_ml2/ini_setting.rb --- puppet-module-neutron-8.0.0/lib/puppet/provider/neutron_plugin_ml2/ini_setting.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/lib/puppet/provider/neutron_plugin_ml2/ini_setting.rb 2016-09-26 21:11:55.000000000 +0000 @@ -3,8 +3,13 @@ :parent => Puppet::Type.type(:openstack_config).provider(:ini_setting) ) do - def file_path + def self.file_path '/etc/neutron/plugins/ml2/ml2_conf.ini' end + # added for backwards compatibility with older versions of inifile + def file_path + self.class.file_path + end + end diff -Nru puppet-module-neutron-8.0.0/lib/puppet/provider/neutron_plugin_nuage/ini_setting.rb puppet-module-neutron-9.4.0/lib/puppet/provider/neutron_plugin_nuage/ini_setting.rb --- puppet-module-neutron-8.0.0/lib/puppet/provider/neutron_plugin_nuage/ini_setting.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/lib/puppet/provider/neutron_plugin_nuage/ini_setting.rb 2016-09-26 21:11:55.000000000 +0000 @@ -3,9 +3,14 @@ :parent => Puppet::Type.type(:openstack_config).provider(:ini_setting) ) do - def file_path + def self.file_path '/etc/neutron/plugins/nuage/plugin.ini' end + # added for backwards compatibility with older versions of inifile + def file_path + self.class.file_path + end + end diff -Nru puppet-module-neutron-8.0.0/lib/puppet/provider/neutron_plugin_nvp/ini_setting.rb puppet-module-neutron-9.4.0/lib/puppet/provider/neutron_plugin_nvp/ini_setting.rb --- puppet-module-neutron-8.0.0/lib/puppet/provider/neutron_plugin_nvp/ini_setting.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/lib/puppet/provider/neutron_plugin_nvp/ini_setting.rb 2016-09-26 21:11:55.000000000 +0000 @@ -3,8 +3,13 @@ :parent => Puppet::Type.type(:openstack_config).provider(:ini_setting) ) do - def file_path + def self.file_path '/etc/neutron/plugins/nicira/nvp.ini' end + # added for backwards compatibility with older versions of inifile + def file_path + self.class.file_path + end + end diff -Nru puppet-module-neutron-8.0.0/lib/puppet/provider/neutron_plugin_opencontrail/ini_setting.rb puppet-module-neutron-9.4.0/lib/puppet/provider/neutron_plugin_opencontrail/ini_setting.rb --- puppet-module-neutron-8.0.0/lib/puppet/provider/neutron_plugin_opencontrail/ini_setting.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/lib/puppet/provider/neutron_plugin_opencontrail/ini_setting.rb 2016-09-26 21:11:55.000000000 +0000 @@ -3,8 +3,13 @@ :parent => Puppet::Type.type(:openstack_config).provider(:ini_setting) ) do - def file_path + def self.file_path '/etc/neutron/plugins/opencontrail/ContrailPlugin.ini' end + # added for backwards compatibility with older versions of inifile + def file_path + self.class.file_path + end + end diff -Nru puppet-module-neutron-8.0.0/lib/puppet/provider/neutron_plugin_plumgrid/ini_setting.rb puppet-module-neutron-9.4.0/lib/puppet/provider/neutron_plugin_plumgrid/ini_setting.rb --- puppet-module-neutron-8.0.0/lib/puppet/provider/neutron_plugin_plumgrid/ini_setting.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/lib/puppet/provider/neutron_plugin_plumgrid/ini_setting.rb 2016-09-26 21:11:55.000000000 +0000 @@ -3,8 +3,13 @@ :parent => Puppet::Type.type(:openstack_config).provider(:ini_setting) ) do - def file_path + def self.file_path '/etc/neutron/plugins/plumgrid/plumgrid.ini' end + # added for backwards compatibility with older versions of inifile + def file_path + self.class.file_path + end + end diff -Nru puppet-module-neutron-8.0.0/lib/puppet/provider/neutron_plugin_sriov/ini_setting.rb puppet-module-neutron-9.4.0/lib/puppet/provider/neutron_plugin_sriov/ini_setting.rb --- puppet-module-neutron-8.0.0/lib/puppet/provider/neutron_plugin_sriov/ini_setting.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/lib/puppet/provider/neutron_plugin_sriov/ini_setting.rb 2016-09-26 21:11:55.000000000 +0000 @@ -3,8 +3,13 @@ :parent => Puppet::Type.type(:openstack_config).provider(:ini_setting) ) do - def file_path + def self.file_path '/etc/neutron/plugins/ml2/ml2_conf_sriov.ini' end + # added for backwards compatibility with older versions of inifile + def file_path + self.class.file_path + end + end diff -Nru puppet-module-neutron-8.0.0/lib/puppet/provider/neutron_plumlib_plumgrid/ini_setting.rb puppet-module-neutron-9.4.0/lib/puppet/provider/neutron_plumlib_plumgrid/ini_setting.rb --- puppet-module-neutron-8.0.0/lib/puppet/provider/neutron_plumlib_plumgrid/ini_setting.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/lib/puppet/provider/neutron_plumlib_plumgrid/ini_setting.rb 2016-09-26 21:11:55.000000000 +0000 @@ -3,8 +3,13 @@ :parent => Puppet::Type.type(:openstack_config).provider(:ini_setting) ) do - def file_path + def self.file_path '/etc/neutron/plugins/plumgrid/plumlib.ini' end + # added for backwards compatibility with older versions of inifile + def file_path + self.class.file_path + end + end diff -Nru puppet-module-neutron-8.0.0/lib/puppet/provider/neutron_port/neutron.rb puppet-module-neutron-9.4.0/lib/puppet/provider/neutron_port/neutron.rb --- puppet-module-neutron-8.0.0/lib/puppet/provider/neutron_port/neutron.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/lib/puppet/provider/neutron_port/neutron.rb 2016-09-26 21:11:55.000000000 +0000 @@ -12,8 +12,6 @@ EOT #TODO No security group support - commands :neutron => "neutron" - mk_resource_methods def self.instances @@ -21,17 +19,19 @@ attrs = get_neutron_resource_attrs("port", id) attrs["name"] = attrs["id"] if attrs["name"].empty? new( - :ensure => :present, - :name => attrs["name"], - :id => attrs["id"], - :status => attrs["status"], - :tenant_id => attrs["tenant_id"], - :network_id => attrs["network_id"], - :admin_state_up => attrs["admin_state_up"], - :network_name => get_network_name(attrs["network_id"]), - :subnet_name => get_subnet_name(parse_subnet_id(attrs["fixed_ips"])), - :subnet_id => parse_subnet_id(attrs["fixed_ips"]), - :ip_address => parse_ip_address(attrs["fixed_ips"]) + :ensure => :present, + :name => attrs["name"], + :id => attrs["id"], + :status => attrs["status"], + :tenant_id => attrs["tenant_id"], + :network_id => attrs["network_id"], + :admin_state_up => attrs["admin_state_up"], + :network_name => get_network_name(attrs["network_id"]), + :subnet_name => get_subnet_name(parse_subnet_id(attrs["fixed_ips"])), + :subnet_id => parse_subnet_id(attrs["fixed_ips"]), + :ip_address => parse_ip_address(attrs["fixed_ips"]), + :binding_profile => parse_binding_profile_interface_name(attrs["binding:profile"]), + :binding_host_id => attrs["binding:host_id"], ) end end @@ -51,6 +51,7 @@ def create opts = Array.new + dict_opts = Array.new if @resource[:admin_state_up] == "False" opts << "--admin-state-down" @@ -60,14 +61,14 @@ # The spec says that multiple ip addresses may be specified, but this # doesn't seem to work yet. opts << "--fixed-ip" - opts << @resource[:ip_address].map{|ip|"ip_address=#{ip}"}.join(',') + opts << resource[:ip_address].map{|ip|"ip_address=#{ip}"}.join(',') end if @resource[:subnet_name] # The spec says that multiple subnets may be specified, but this doesn't # seem to work yet. opts << "--fixed-ip" - opts << @resource[:subnet_name].map{|s|"subnet_id=#{s}"}.join(',') + opts << resource[:subnet_name].map{|s|"subnet_id=#{s}"}.join(',') end if @resource[:tenant_name] @@ -80,27 +81,41 @@ opts << "--tenant_id=#{@resource[:tenant_id]}" end + if @resource[:binding_host_id] + opts << "--binding:host_id=#{@resource[:binding_host_id]}" + end + + if @resource[:binding_profile] + binding_profile_opts = @resource[:binding_profile].map{|k,v| "#{k}=#{v}"}.join(' ') + dict_opts << "--binding:profile" + dict_opts << "type=dict" + dict_opts << "#{binding_profile_opts}" + end + results = auth_neutron( "port-create", "--format=shell", "--name=#{resource[:name]}", opts, - resource[:network_name] + resource[:network_name], + dict_opts ) attrs = self.class.parse_creation_output(results) @property_hash = { - :ensure => :present, - :name => resource[:name], - :id => attrs["id"], - :status => attrs["status"], - :tenant_id => attrs["tenant_id"], - :network_id => attrs["network_id"], - :admin_state_up => attrs["admin_state_up"], - :network_name => resource[:network_name], - :subnet_name => resource[:subnet_name], - :subnet_id => self.class.parse_subnet_id(attrs["fixed_ips"]), - :ip_address => self.class.parse_ip_address(attrs["fixed_ips"]) + :ensure => :present, + :name => resource[:name], + :id => attrs["id"], + :status => attrs["status"], + :tenant_id => attrs["tenant_id"], + :network_id => attrs["network_id"], + :admin_state_up => attrs["admin_state_up"], + :network_name => resource[:network_name], + :subnet_name => resource[:subnet_name], + :subnet_id => self.class.parse_subnet_id(attrs["fixed_ips"]), + :ip_address => self.class.parse_ip_address(attrs["fixed_ips"]), + :binding_profile => self.class.parse_binding_profile_interface_name(attrs["binding:profile"]), + :binding_host_id => attrs["binding:host_id"], } end @@ -184,4 +199,13 @@ end end + def self.parse_binding_profile_interface_name(binding_profile_) + match_data = /\{"interface_name": "(.*)"\}/.match(binding_profile_) + if match_data + match_data[1] + else + nil + end + end + end diff -Nru puppet-module-neutron-8.0.0/lib/puppet/provider/neutron.rb puppet-module-neutron-9.4.0/lib/puppet/provider/neutron.rb --- puppet-module-neutron-8.0.0/lib/puppet/provider/neutron.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/lib/puppet/provider/neutron.rb 2016-09-26 21:11:55.000000000 +0000 @@ -3,6 +3,9 @@ class Puppet::Provider::Neutron < Puppet::Provider + initvars + commands :neutron => 'neutron' + def self.conf_filename '/etc/neutron/neutron.conf' end @@ -26,8 +29,7 @@ end def self.get_neutron_credentials - deprecated_auth_keys = ['admin_tenant_name', 'admin_user', 'admin_password', 'identity_uri'] - auth_keys = ['tenant_name', 'username', 'password', 'auth_url'] + auth_keys = ['project_name', 'username', 'password', 'auth_url'] conf = neutron_conf if conf and conf['keystone_authtoken'] and !conf['keystone_authtoken']['password'].nil? and @@ -38,15 +40,6 @@ creds['region_name'] = conf['keystone_authtoken']['region_name'].strip end return creds - elsif conf and conf['keystone_authtoken'] and - !conf['keystone_authtoken']['admin_password'].nil? and - deprecated_auth_keys.all?{|k| !conf['keystone_authtoken'][k].nil?} - creds = Hash[ deprecated_auth_keys.map \ - { |k| [k, conf['keystone_authtoken'][k].strip] } ] - if conf['DEFAULT'] and !conf['DEFAULT']['nova_region_name'].nil? - creds['nova_region_name'] = conf['DEFAULT']['nova_region_name'].strip - end - return creds else raise(Puppet::Error, "File: #{conf_filename} does not contain all \ required sections. Neutron types will not work if neutron is not \ @@ -67,24 +60,13 @@ def self.auth_neutron(*args) q = neutron_credentials - if q.key?('admin_password') - authenv = { - :OS_AUTH_URL => q['identity_uri'], - :OS_USERNAME => q['admin_user'], - :OS_TENANT_NAME => q['admin_tenant_name'], - :OS_PASSWORD => q['admin_password'] - } - else - authenv = { - :OS_AUTH_URL => q['auth_url'], - :OS_USERNAME => q['username'], - :OS_TENANT_NAME => q['tenant_name'], - :OS_PASSWORD => q['password'] - } - end - if q.key?('nova_region_name') - authenv[:OS_REGION_NAME] = q['nova_region_name'] - elsif q.key?('region_name') + authenv = { + :OS_AUTH_URL => q['auth_url'], + :OS_USERNAME => q['username'], + :OS_PROJECT_NAME => q['project_name'], + :OS_PASSWORD => q['password'] + } + if q.key?('region_name') authenv[:OS_REGION_NAME] = q['region_name'] end rv = nil diff -Nru puppet-module-neutron-8.0.0/lib/puppet/provider/neutron_router/neutron.rb puppet-module-neutron-9.4.0/lib/puppet/provider/neutron_router/neutron.rb --- puppet-module-neutron-8.0.0/lib/puppet/provider/neutron_router/neutron.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/lib/puppet/provider/neutron_router/neutron.rb 2016-09-26 21:11:55.000000000 +0000 @@ -11,8 +11,6 @@ Assumes that the neutron service is configured on the same host. EOT - commands :neutron => 'neutron' - mk_resource_methods def self.do_not_manage @@ -36,7 +34,8 @@ :status => attrs['status'], :distributed => attrs['distributed'], :ha => attrs['ha'], - :tenant_id => attrs['tenant_id'] + :tenant_id => attrs['tenant_id'], + :availability_zone_hint => attrs['availability_zone_hint'] ) end self.do_not_manage = false @@ -83,6 +82,10 @@ opts << "--ha=#{@resource[:ha]}" end + if @resource[:availability_zone_hint] + opts << "--availability-zone-hint=#{@resource[:availability_zone_hint]}" + end + results = auth_neutron("router-create", '--format=shell', opts, resource[:name]) @@ -95,6 +98,7 @@ :external_gateway_info => attrs['external_gateway_info'], :status => attrs['status'], :tenant_id => attrs['tenant_id'], + :availability_zone_hint => attrs['availability_zone_hint'] } if @resource[:gateway_network_name] @@ -188,4 +192,16 @@ end end + def availability_zone_hint=(value) + if self.class.do_not_manage + fail("Not managing Neutron_router[#{@resource[:name]}] due to earlier Neutron API failures.") + end + results = auth_neutron("router-show", '--format=shell', resource[:name]) + attrs = self.class.parse_creation_output(results) + set_admin_state_up(false) + auth_neutron('router-update', "--availability-zone-hint=#{value}", name) + if attrs['admin_state_up'] == 'True' + set_admin_state_up(true) + end + end end diff -Nru puppet-module-neutron-8.0.0/lib/puppet/provider/neutron_router_interface/neutron.rb puppet-module-neutron-9.4.0/lib/puppet/provider/neutron_router_interface/neutron.rb --- puppet-module-neutron-8.0.0/lib/puppet/provider/neutron_router_interface/neutron.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/lib/puppet/provider/neutron_router_interface/neutron.rb 2016-09-26 21:11:55.000000000 +0000 @@ -17,8 +17,6 @@ EOT - commands :neutron => 'neutron' - mk_resource_methods def self.instances diff -Nru puppet-module-neutron-8.0.0/lib/puppet/provider/neutron_sriov_agent_config/ini_setting.rb puppet-module-neutron-9.4.0/lib/puppet/provider/neutron_sriov_agent_config/ini_setting.rb --- puppet-module-neutron-8.0.0/lib/puppet/provider/neutron_sriov_agent_config/ini_setting.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/lib/puppet/provider/neutron_sriov_agent_config/ini_setting.rb 2016-09-26 21:11:55.000000000 +0000 @@ -3,7 +3,13 @@ :parent => Puppet::Type.type(:openstack_config).provider(:ini_setting) ) do - def file_path + def self.file_path '/etc/neutron/plugins/ml2/sriov_agent.ini' end + + # added for backwards compatibility with older versions of inifile + def file_path + self.class.file_path + end + end diff -Nru puppet-module-neutron-8.0.0/lib/puppet/provider/neutron_subnet/neutron.rb puppet-module-neutron-9.4.0/lib/puppet/provider/neutron_subnet/neutron.rb --- puppet-module-neutron-8.0.0/lib/puppet/provider/neutron_subnet/neutron.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/lib/puppet/provider/neutron_subnet/neutron.rb 2016-09-26 21:11:55.000000000 +0000 @@ -12,8 +12,6 @@ Assumes that the neutron service is configured on the same host. EOT - commands :neutron => 'neutron' - mk_resource_methods def self.neutron_type diff -Nru puppet-module-neutron-8.0.0/lib/puppet/provider/neutron_vpnaas_agent_config/ini_setting.rb puppet-module-neutron-9.4.0/lib/puppet/provider/neutron_vpnaas_agent_config/ini_setting.rb --- puppet-module-neutron-8.0.0/lib/puppet/provider/neutron_vpnaas_agent_config/ini_setting.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/lib/puppet/provider/neutron_vpnaas_agent_config/ini_setting.rb 2016-09-26 21:11:55.000000000 +0000 @@ -3,8 +3,13 @@ :parent => Puppet::Type.type(:openstack_config).provider(:ini_setting) ) do - def file_path + def self.file_path '/etc/neutron/vpn_agent.ini' end + # added for backwards compatibility with older versions of inifile + def file_path + self.class.file_path + end + end diff -Nru puppet-module-neutron-8.0.0/lib/puppet/provider/neutron_vpnaas_service_config/openstackconfig.rb puppet-module-neutron-9.4.0/lib/puppet/provider/neutron_vpnaas_service_config/openstackconfig.rb --- puppet-module-neutron-8.0.0/lib/puppet/provider/neutron_vpnaas_service_config/openstackconfig.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/lib/puppet/provider/neutron_vpnaas_service_config/openstackconfig.rb 2016-09-26 21:11:55.000000000 +0000 @@ -3,8 +3,13 @@ :parent => Puppet::Type.type(:openstack_config).provider(:ruby) ) do - def file_path + def self.file_path '/etc/neutron/neutron_vpnaas.conf' end + # added for backwards compatibility with older versions of inifile + def file_path + self.class.file_path + end + end diff -Nru puppet-module-neutron-8.0.0/lib/puppet/type/neutron_agent_sriov_numvfs.rb puppet-module-neutron-9.4.0/lib/puppet/type/neutron_agent_sriov_numvfs.rb --- puppet-module-neutron-8.0.0/lib/puppet/type/neutron_agent_sriov_numvfs.rb 1970-01-01 00:00:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/lib/puppet/type/neutron_agent_sriov_numvfs.rb 2016-09-26 21:11:55.000000000 +0000 @@ -0,0 +1,11 @@ +Puppet::Type.newtype(:neutron_agent_sriov_numvfs) do + + ensurable + + newparam(:name) do + desc "sriov_numvfs conf as : format" + newvalues(/^[a-z0-9-_]+:[0-9]+$/) + end + +end + diff -Nru puppet-module-neutron-8.0.0/lib/puppet/type/neutron_config.rb puppet-module-neutron-9.4.0/lib/puppet/type/neutron_config.rb --- puppet-module-neutron-8.0.0/lib/puppet/type/neutron_config.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/lib/puppet/type/neutron_config.rb 2016-09-26 21:11:55.000000000 +0000 @@ -7,14 +7,25 @@ newvalues(/\S+\/\S+/) end - newproperty(:value) do + newproperty(:value, :array_matching => :all) do desc 'The value of the setting to be defined.' + def insync?(is) + return true if @should.empty? + return false unless is.is_a? Array + return false unless is.length == @should.length + # we don't care about the order of items in array, hence + # it is necessary to override insync + return ( + is & @should == is or + is & @should.map(&:to_s) == is + ) + end + munge do |value| value = value.to_s.strip value.capitalize! if value =~ /^(true|false)$/i value end - newvalues(/^[\S ]*$/) def is_to_s( currentvalue ) if resource.secret? diff -Nru puppet-module-neutron-8.0.0/lib/puppet/type/neutron_l3_agent_config.rb puppet-module-neutron-9.4.0/lib/puppet/type/neutron_l3_agent_config.rb --- puppet-module-neutron-8.0.0/lib/puppet/type/neutron_l3_agent_config.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/lib/puppet/type/neutron_l3_agent_config.rb 2016-09-26 21:11:55.000000000 +0000 @@ -21,6 +21,8 @@ defaultto('') end + newparam(:transform_to) + autorequire(:package) do 'neutron' end diff -Nru puppet-module-neutron-8.0.0/lib/puppet/type/neutron_lbaas_service_config.rb puppet-module-neutron-9.4.0/lib/puppet/type/neutron_lbaas_service_config.rb --- puppet-module-neutron-8.0.0/lib/puppet/type/neutron_lbaas_service_config.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/lib/puppet/type/neutron_lbaas_service_config.rb 2016-09-26 21:11:55.000000000 +0000 @@ -3,7 +3,7 @@ ensurable newparam(:name, :namevar => true) do - desc 'Section/setting name to manage from neutron_lbaas.conf' + desc 'Section/setting name to manage from neutron.conf' newvalues(/\S+\/\S+/) end @@ -34,7 +34,7 @@ end autorequire(:package) do - 'neutron-lbaas-agent' + 'neutron-server' end end diff -Nru puppet-module-neutron-8.0.0/lib/puppet/type/neutron_network.rb puppet-module-neutron-9.4.0/lib/puppet/type/neutron_network.rb --- puppet-module-neutron-8.0.0/lib/puppet/type/neutron_network.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/lib/puppet/type/neutron_network.rb 2016-09-26 21:11:55.000000000 +0000 @@ -42,7 +42,7 @@ newproperty(:provider_network_type) do desc 'The physical mechanism by which the virtual network is realized.' - newvalues(:flat, :vlan, :local, :gre, :l3_ext, :vxlan) + newvalues(:flat, :vlan, :local, :gre, :l3_ext, :vxlan, :uplink) end newproperty(:provider_physical_network) do @@ -69,6 +69,10 @@ end end + newproperty(:availability_zone_hint) do + desc 'The availability zone hint to provide the scheduler' + end + # Require the neutron-server service to be running autorequire(:service) do ['neutron-server'] diff -Nru puppet-module-neutron-8.0.0/lib/puppet/type/neutron_plugin_midonet.rb puppet-module-neutron-9.4.0/lib/puppet/type/neutron_plugin_midonet.rb --- puppet-module-neutron-8.0.0/lib/puppet/type/neutron_plugin_midonet.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/lib/puppet/type/neutron_plugin_midonet.rb 2016-09-26 21:11:55.000000000 +0000 @@ -52,7 +52,7 @@ end autorequire(:package) do - 'python-neutron-plugin-midonet' + 'python-networking-midonet' end end diff -Nru puppet-module-neutron-8.0.0/lib/puppet/type/neutron_plugin_nuage.rb puppet-module-neutron-9.4.0/lib/puppet/type/neutron_plugin_nuage.rb --- puppet-module-neutron-8.0.0/lib/puppet/type/neutron_plugin_nuage.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/lib/puppet/type/neutron_plugin_nuage.rb 2016-09-26 21:11:55.000000000 +0000 @@ -25,5 +25,9 @@ 'neutron-plugin-nuage' end + autorequire(:file) do + '/etc/neutron/plugins/nuage/plugin.ini' + end + end diff -Nru puppet-module-neutron-8.0.0/lib/puppet/type/neutron_port.rb puppet-module-neutron-9.4.0/lib/puppet/type/neutron_port.rb --- puppet-module-neutron-8.0.0/lib/puppet/type/neutron_port.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/lib/puppet/type/neutron_port.rb 2016-09-26 21:11:55.000000000 +0000 @@ -74,6 +74,20 @@ desc 'A uuid identifying the tenant which will own the port.' end + newproperty(:binding_host_id) do + desc 'A uuid identifying the host where we will bind the port.' + end + + newproperty(:binding_profile) do + desc 'A dictionary the enables the application running on the host + to pass and receive VIF port-specific information to the plug-in.' + validate do |value| + unless value.class == Hash + raise ArgumentError, "Binding profile is not a valid dictionary" + end + end + end + autorequire(:service) do ['neutron-server'] end diff -Nru puppet-module-neutron-8.0.0/lib/puppet/type/neutron_router.rb puppet-module-neutron-9.4.0/lib/puppet/type/neutron_router.rb --- puppet-module-neutron-8.0.0/lib/puppet/type/neutron_router.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/lib/puppet/type/neutron_router.rb 2016-09-26 21:11:55.000000000 +0000 @@ -92,6 +92,10 @@ end end + newproperty(:availability_zone_hint) do + desc 'The availability zone hint to provide the scheduler' + end + validate do if self[:ensure] != :present return diff -Nru puppet-module-neutron-8.0.0/manifests/agents/bigswitch.pp puppet-module-neutron-9.4.0/manifests/agents/bigswitch.pp --- puppet-module-neutron-8.0.0/manifests/agents/bigswitch.pp 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/manifests/agents/bigswitch.pp 2016-09-26 21:11:55.000000000 +0000 @@ -23,22 +23,29 @@ $agent_enabled = false, ) { + include ::neutron::deps + if($::osfamily != 'Redhat') { fail("Unsupported osfamily ${::osfamily}") } - require ::neutron::plugins::ml2::bigswitch + ensure_packages('python-networking-bigswitch', + { + ensure => $package_ensure, + tag => 'openstack', + } + ) package { 'bigswitch-lldp': ensure => $package_ensure, name => $::neutron::params::bigswitch_lldp_package, - tag => 'openstack', + tag => ['neutron-support-package', 'openstack'], } package { 'bigswitch-agent': ensure => $package_ensure, name => $::neutron::params::bigswitch_agent_package, - tag => 'openstack', + tag => ['neutron-support-package', 'openstack'], } if $lldp_enabled { @@ -54,18 +61,16 @@ } service { 'bigswitch-lldp': - ensure => $lldp_service_ensure, - name => $::neutron::params::bigswitch_lldp_service, - enable => $lldp_enabled, - require => [Class['neutron'], Package['bigswitch-lldp']], - tag => 'neutron-service', + ensure => $lldp_service_ensure, + name => $::neutron::params::bigswitch_lldp_service, + enable => $lldp_enabled, + tag => 'neutron-service', } service { 'bigswitch-agent': - ensure => $agent_service_ensure, - name => $::neutron::params::bigswitch_agent_service, - enable => $agent_enabled, - require => [Class['neutron'], Package['bigswitch-agent']], - tag => 'neutron-service', + ensure => $agent_service_ensure, + name => $::neutron::params::bigswitch_agent_service, + enable => $agent_enabled, + tag => 'neutron-service', } } diff -Nru puppet-module-neutron-8.0.0/manifests/agents/dhcp.pp puppet-module-neutron-9.4.0/manifests/agents/dhcp.pp --- puppet-module-neutron-8.0.0/manifests/agents/dhcp.pp 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/manifests/agents/dhcp.pp 2016-09-26 21:11:55.000000000 +0000 @@ -41,6 +41,10 @@ # (optional) Override the default dnsmasq settings with this file. # Defaults to $::os_service_default # +# [*dnsmasq_dns_servers*] +# (optional) List of servers to use as dnsmasq forwarders. +# Defaults to $::os_service_default. +# # [*enable_isolated_metadata*] # (optional) enable metadata support on isolated networks. # Defaults to false. @@ -60,22 +64,22 @@ # (optional) Use broadcast in DHCP replies # Defaults to $::os_service_default. # -# === Deprecated Parameters +# [*purge_config*] +# (optional) Whether to set only the specified config options +# in the dhcp config. +# Defaults to false. +# +# [*availability_zone*] +# (optional) The availability zone of the agent. +# Neutron will only schedule dhcp on the agent based on availability zone +# Defaults to $::os_service_default # -# [*dhcp_delete_namespaces*] -# (optional) Deprecated. Delete namespace after removing a dhcp server -# Defaults to $::os_service_default. +# === Deprecated Parameters # # [*dhcp_domain*] # (optional) Deprecated. Domain to use for building the hostnames # Defaults to $::os_service_default # -# [*use_namespaces*] -# (optional) Deprecated. 'True' value will be enforced in future releases. -# Allow overlapping IP (Must have kernel build with -# CONFIG_NET_NS=y and iproute2 package that supports namespaces). -# Defaults to $::os_service_default. -# class neutron::agents::dhcp ( $package_ensure = present, $enabled = true, @@ -87,29 +91,25 @@ $dhcp_driver = 'neutron.agent.linux.dhcp.Dnsmasq', $root_helper = 'sudo neutron-rootwrap /etc/neutron/rootwrap.conf', $dnsmasq_config_file = $::os_service_default, + $dnsmasq_dns_servers = $::os_service_default, $enable_isolated_metadata = false, $enable_force_metadata = $::os_service_default, $enable_metadata_network = false, $dhcp_broadcast_reply = $::os_service_default, + $purge_config = false, + $availability_zone = $::os_service_default, # DEPRECATED PARAMETERS - $dhcp_delete_namespaces = $::os_service_default, $dhcp_domain = $::os_service_default, - $use_namespaces = $::os_service_default, ) { + include ::neutron::deps include ::neutron::params - Neutron_config<||> ~> Service['neutron-dhcp-service'] - Neutron_dhcp_agent_config<||> ~> Service['neutron-dhcp-service'] - case $dhcp_driver { /\.Dnsmasq/: { Package[$::neutron::params::dnsmasq_packages] -> Package<| title == 'neutron-dhcp-agent' |> ensure_packages($::neutron::params::dnsmasq_packages) } - /^midonet.*/: { - ensure_packages($::neutron::params::midonet_server_package) - } default: { fail("Unsupported dhcp_driver ${dhcp_driver}") } @@ -125,6 +125,10 @@ } } + resources { 'neutron_dhcp_agent_config': + purge => $purge_config, + } + # The DHCP agent loads both neutron.ini and its own file. # This only lists config specific to the agent. neutron.ini supplies # the rest. @@ -138,36 +142,20 @@ 'DEFAULT/root_helper': value => $root_helper; 'DEFAULT/dhcp_broadcast_reply': value => $dhcp_broadcast_reply; 'DEFAULT/dnsmasq_config_file': value => $dnsmasq_config_file; - } - - if ! is_service_default ($dhcp_delete_namespaces) { - warning('The dhcp_delete_namespaces parameter was removed in Mitaka, it does not take any affect') + 'DEFAULT/dnsmasq_dns_servers': value => join(any2array($dnsmasq_dns_servers), ','); + 'AGENT/availability_zone': value => $availability_zone; } if ! is_service_default ($dhcp_domain) { warning('The dhcp_domain parameter is deprecated and will be removed in future releases') } - if ! is_service_default ($use_namespaces) { - warning('The use_namespaces parameter is deprecated and will be removed in future releases') - neutron_dhcp_agent_config { - 'DEFAULT/use_namespaces': value => $use_namespaces; - } - } - if $::neutron::params::dhcp_agent_package { - Package['neutron'] -> Package['neutron-dhcp-agent'] - Package['neutron-dhcp-agent'] -> Neutron_config<||> - Package['neutron-dhcp-agent'] -> Neutron_dhcp_agent_config<||> package { 'neutron-dhcp-agent': ensure => $package_ensure, name => $::neutron::params::dhcp_agent_package, tag => ['openstack', 'neutron-package'], } - } else { - # Some platforms (RedHat) do not provide a neutron DHCP agent package. - # The neutron DHCP agent config file is provided by the neutron package. - Package['neutron'] -> Neutron_dhcp_agent_config<||> } if $manage_service { @@ -176,17 +164,12 @@ } else { $service_ensure = 'stopped' } - Package['neutron'] ~> Service['neutron-dhcp-service'] - if $::neutron::params::dhcp_agent_package { - Package['neutron-dhcp-agent'] ~> Service['neutron-dhcp-service'] - } } service { 'neutron-dhcp-service': - ensure => $service_ensure, - name => $::neutron::params::dhcp_agent_service, - enable => $enabled, - require => Class['neutron'], - tag => 'neutron-service', + ensure => $service_ensure, + name => $::neutron::params::dhcp_agent_service, + enable => $enabled, + tag => 'neutron-service', } } diff -Nru puppet-module-neutron-8.0.0/manifests/agents/l3.pp puppet-module-neutron-9.4.0/manifests/agents/l3.pp --- puppet-module-neutron-8.0.0/manifests/agents/l3.pp 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/manifests/agents/l3.pp 2016-09-26 21:11:55.000000000 +0000 @@ -26,10 +26,6 @@ # (optional) Driver to interface with neutron # Defaults to OVSInterfaceDriver # -# [*router_id*] -# (optional) The ID of the external router in neutron -# Defaults to $::os_service_default -# # [*gateway_external_network_id*] # (optional) The ID of the external network in neutron # Defaults to $::os_service_default @@ -59,11 +55,6 @@ # (optional) can be set to False if the Nova metadata server is not available # Defaults to $::os_service_default # -# [*network_device_mtu*] -# (optional) The MTU size for the interfaces managed by the L3 agent -# Defaults to $::os_service_default -# Should be deprecated in the next major release in favor of a global parameter -# # [*ha_enabled*] # (optional) Enabled or not HA for L3 agent. # Defaults to false @@ -87,32 +78,28 @@ # 'dvr_snat': enable DVR with centralized SNAT support (DVR for single-host, for testing only) # Defaults to 'legacy' # -# [*allow_automatic_l3agent_failover*] -# DEPRECATED: Has no effect in this class. Use the same parameter in neutron::server instead. +# [*purge_config*] +# (optional) Whether to set only the specified config options +# in the l3 config. +# Defaults to false. +# +# [*availability_zone*] +# (optional) The availability zone of the agent. +# Neutron will only schedule routers on the agent based on availability zone +# Defaults to $::os_service_default # # === Deprecated Parameters # -# [*use_namespaces*] -# (optional) Deprecated. 'True' value will be enforced in future releases. -# Allow overlapping IP (Must have kernel build with -# CONFIG_NET_NS=y and iproute2 package that supports namespaces). -# Defaults to $::os_service_default. -# # [*external_network_bridge*] # (optional) Deprecated. The name of the external bridge # Defaults to $::os_service_default # -# [*router_delete_namespaces*] -# (optional) Deprecated. Namespaces can be deleted cleanly on the host running the L3 agent -# Defaults to ::os_service_default -# class neutron::agents::l3 ( $package_ensure = 'present', $enabled = true, $manage_service = true, $debug = false, $interface_driver = 'neutron.agent.linux.interface.OVSInterfaceDriver', - $router_id = $::os_service_default, $gateway_external_network_id = $::os_service_default, $handle_internal_only_routers = $::os_service_default, $metadata_port = $::os_service_default, @@ -120,34 +107,26 @@ $periodic_interval = $::os_service_default, $periodic_fuzzy_delay = $::os_service_default, $enable_metadata_proxy = $::os_service_default, - $network_device_mtu = $::os_service_default, $ha_enabled = false, $ha_vrrp_auth_type = 'PASS', $ha_vrrp_auth_password = $::os_service_default, $ha_vrrp_advert_int = '3', $agent_mode = 'legacy', + $purge_config = false, + $availability_zone = $::os_service_default, # DEPRECATED PARAMETERS - $allow_automatic_l3agent_failover = false, - $use_namespaces = $::os_service_default, $external_network_bridge = $::os_service_default, - $router_delete_namespaces = $::os_service_default, ) { + include ::neutron::deps include ::neutron::params - Neutron_config<||> ~> Service['neutron-l3'] - Neutron_l3_agent_config<||> ~> Service['neutron-l3'] - - if $allow_automatic_l3agent_failover { - warning('parameter allow_automatic_l3agent_failover is deprecated, use parameter in neutron::server instead') - } - if ! is_service_default ($external_network_bridge) { warning('parameter external_network_bridge is deprecated') } - if ! is_service_default ($router_delete_namespaces) { - warning('parameter router_delete_namespaces was removed in Mitaka, it does not take any affect') + resources { 'neutron_l3_agent_config': + purge => $purge_config, } if $ha_enabled { @@ -162,7 +141,6 @@ 'DEFAULT/debug': value => $debug; 'DEFAULT/external_network_bridge': value => $external_network_bridge; 'DEFAULT/interface_driver': value => $interface_driver; - 'DEFAULT/router_id': value => $router_id; 'DEFAULT/gateway_external_network_id': value => $gateway_external_network_id; 'DEFAULT/handle_internal_only_routers': value => $handle_internal_only_routers; 'DEFAULT/metadata_port': value => $metadata_port; @@ -171,30 +149,15 @@ 'DEFAULT/periodic_fuzzy_delay': value => $periodic_fuzzy_delay; 'DEFAULT/enable_metadata_proxy': value => $enable_metadata_proxy; 'DEFAULT/agent_mode': value => $agent_mode; - 'DEFAULT/network_device_mtu': value => $network_device_mtu; - 'DEFAULT/use_namespaces': value => $use_namespaces; - } - - if ! is_service_default ($use_namespaces) { - warning('The use_namespaces parameter is deprecated and will be removed in future releases') - } - - if ! is_service_default ($network_device_mtu) { - warning('The neutron::agents::l3::network_device_mtu parameter is deprecated, use neutron::network_device_mtu instead.') + 'AGENT/availability_zone': value => $availability_zone; } if $::neutron::params::l3_agent_package { - Package['neutron-l3'] -> Neutron_l3_agent_config<||> package { 'neutron-l3': - ensure => $package_ensure, - name => $::neutron::params::l3_agent_package, - require => Package['neutron'], - tag => ['openstack', 'neutron-package'], + ensure => $package_ensure, + name => $::neutron::params::l3_agent_package, + tag => ['openstack', 'neutron-package'], } - } else { - # Some platforms (RedHat) does not provide a neutron L3 agent package. - # The neutron L3 agent config file is provided by the neutron package. - Package['neutron'] -> Neutron_l3_agent_config<||> } if $manage_service { @@ -203,17 +166,11 @@ } else { $service_ensure = 'stopped' } - Package['neutron'] ~> Service['neutron-l3'] - if $::neutron::params::l3_agent_package { - Package['neutron-l3'] ~> Service['neutron-l3'] + service { 'neutron-l3': + ensure => $service_ensure, + name => $::neutron::params::l3_agent_service, + enable => $enabled, + tag => 'neutron-service', } } - - service { 'neutron-l3': - ensure => $service_ensure, - name => $::neutron::params::l3_agent_service, - enable => $enabled, - require => Class['neutron'], - tag => 'neutron-service', - } } diff -Nru puppet-module-neutron-8.0.0/manifests/agents/lbaas.pp puppet-module-neutron-9.4.0/manifests/agents/lbaas.pp --- puppet-module-neutron-8.0.0/manifests/agents/lbaas.pp 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/manifests/agents/lbaas.pp 2016-09-26 21:11:55.000000000 +0000 @@ -21,7 +21,7 @@ # (optional) Defaults to 'neutron.agent.linux.interface.OVSInterfaceDriver'. # # [*device_driver*] -# (optional) Defaults to 'neutron_lbaas.services.loadbalancer.drivers.haproxy.namespace_driver.HaproxyNSDriver'. +# (optional) Defaults to 'neutron_lbaas.drivers.haproxy.namespace_driver.HaproxyNSDriver'. # # [*user_group*] # (optional) The user group. @@ -32,13 +32,22 @@ # Disable this if you are using the puppetlabs-haproxy module # Defaults to true # -# === Deprecated Parameters -# -# [*use_namespaces*] -# (optional) Deprecated. 'True' value will be enforced in future releases. -# Allow overlapping IP (Must have kernel build with -# CONFIG_NET_NS=y and iproute2 package that supports namespaces). -# Defaults to $::os_service_default. +# [*purge_config*] +# (optional) Whether to set only the specified config options +# in the lbaas config. +# Defaults to false. +# +# DEPRECATED PARAMETERS +# +# [*enable_v1*] +# (optional) Whether to use lbaas v1 agent or not. +# Deprecated. Will be removed in Ocata. +# Defaults to undef +# +# [*enable_v2*] +# (optional) Whether to use lbaas v2 agent or not. +# Deprecated. Will be removed in Ocata. +# Defaults to undef # class neutron::agents::lbaas ( $package_ensure = present, @@ -46,21 +55,25 @@ $manage_service = true, $debug = $::os_service_default, $interface_driver = 'neutron.agent.linux.interface.OVSInterfaceDriver', - $device_driver = 'neutron_lbaas.services.loadbalancer.drivers.haproxy.namespace_driver.HaproxyNSDriver', + $device_driver = 'neutron_lbaas.drivers.haproxy.namespace_driver.HaproxyNSDriver', $user_group = $::neutron::params::nobody_user_group, $manage_haproxy_package = true, + $purge_config = false, # DEPRECATED PARAMETERS - $use_namespaces = $::os_service_default, + $enable_v1 = undef, + $enable_v2 = undef, ) { + include ::neutron::deps include ::neutron::params - Neutron_config<||> ~> Service['neutron-lbaas-service'] - Neutron_lbaas_agent_config<||> ~> Service['neutron-lbaas-service'] + if $enable_v1 or $enable_v2 { + warning('enable_v1 and enable_v2 parameters are deprecated and will be removed in Ocata.') + } case $device_driver { /\.haproxy/: { - Package <| title == $::neutron::params::haproxy_package |> -> Package <| title == 'neutron-lbaas-agent' |> + Package <| title == $::neutron::params::haproxy_package |> -> Package <| title == 'neutron-lbaasv2-agent' |> if $manage_haproxy_package { ensure_packages([$::neutron::params::haproxy_package]) } @@ -70,6 +83,10 @@ } } + resources { 'neutron_lbaas_agent_config': + purge => $purge_config, + } + # The LBaaS agent loads both neutron.ini and its own file. # This only lists config specific to the agent. neutron.ini supplies # the rest. @@ -80,34 +97,23 @@ 'haproxy/user_group': value => $user_group; } - if ! is_service_default ($use_namespaces) { - warning('The use_namespaces parameter is deprecated and will be removed in future releases') - neutron_lbaas_agent_config { - 'DEFAULT/use_namespaces': value => $use_namespaces; - } - } - - Package['neutron'] -> Package['neutron-lbaas-agent'] - ensure_resource( 'package', 'neutron-lbaas-agent', { + Package['neutron'] -> Package['neutron-lbaasv2-agent'] + ensure_resource( 'package', 'neutron-lbaasv2-agent', { ensure => $package_ensure, - name => $::neutron::params::lbaas_agent_package, + name => $::neutron::params::lbaasv2_agent_package, tag => ['openstack', 'neutron-package'], }) + if $manage_service { - if $enabled { - $service_ensure = 'running' + $service_ensure = 'running' } else { - $service_ensure = 'stopped' - } - Package['neutron'] ~> Service['neutron-lbaas-service'] - Package['neutron-lbaas-agent'] ~> Service['neutron-lbaas-service'] + $service_ensure = 'stopped' } - service { 'neutron-lbaas-service': - ensure => $service_ensure, - name => $::neutron::params::lbaas_agent_service, - enable => $enabled, - require => Class['neutron'], - tag => 'neutron-service', + service { 'neutron-lbaasv2-service': + ensure => $service_ensure, + name => $::neutron::params::lbaasv2_agent_service, + enable => $enabled, + tag => 'neutron-service', } } diff -Nru puppet-module-neutron-8.0.0/manifests/agents/metadata.pp puppet-module-neutron-9.4.0/manifests/agents/metadata.pp --- puppet-module-neutron-8.0.0/manifests/agents/metadata.pp 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/manifests/agents/metadata.pp 2016-09-26 21:11:55.000000000 +0000 @@ -56,24 +56,10 @@ # Set to 0 will cause cache entries to never expire. # Set to $::os_service_default or false to disable cache. # -# === Deprecated Parameters -# [*auth_password*] -# (required) The password for the administrative user (Defaults to undef). -# -# [*auth_tenant*] -# The administrative user's tenant name (Defaults to undef). -# -# [*auth_user*] -# The administrative user name for OpenStack Networking (Defaults to undef). -# -# [*auth_url*] -# The URL used to validate tokens (Defaults to undef). -# -# [*auth_insecure*] -# turn off verification of the certificate for ssl (Defaults to undef). -# -# [*auth_region*] -# The authentication region (Defaults to undef). +# [*purge_config*] +# (optional) Whether to set only the specified config options +# in the metadata config. +# Defaults to false. # class neutron::agents::metadata ( @@ -91,42 +77,14 @@ $metadata_memory_cache_ttl = $::os_service_default, $nova_client_cert = $::os_service_default, $nova_client_priv_key = $::os_service_default, - # DEPRECATED PARAMETERS - $auth_password = undef, - $auth_tenant = undef, - $auth_user = undef, - $auth_url = undef, - $auth_insecure = undef, - $auth_region = undef, + $purge_config = false, ) { + include ::neutron::deps include ::neutron::params - Neutron_config<||> ~> Service['neutron-metadata'] - Neutron_metadata_agent_config<||> ~> Service['neutron-metadata'] - - if $auth_password { - warning('The auth_password parameter is deprecated and was removed in Mitaka release.') - } - - if $auth_tenant { - warning('The auth_tenant parameter is deprecated and was removed in Mitaka release.') - } - - if $auth_user { - warning('The auth_user parameter is deprecated and was removed in Mitaka release.') - } - - if $auth_url { - warning('The auth_url parameter is deprecated and was removed in Mitaka release.') - } - - if $auth_insecure != undef { - warning('The auth_insecure parameter is deprecated and was removed in Mitaka release.') - } - - if $auth_region { - warning('The auth_region parameter is deprecated and was removed in Mitaka release.') + resources { 'neutron_metadata_agent_config': + purge => $purge_config, } neutron_metadata_agent_config { @@ -153,13 +111,10 @@ } if $::neutron::params::metadata_agent_package { - Package['neutron-metadata'] -> Service['neutron-metadata'] - Package['neutron-metadata'] -> Neutron_metadata_agent_config<||> package { 'neutron-metadata': - ensure => $package_ensure, - name => $::neutron::params::metadata_agent_package, - require => Package['neutron'], - tag => ['openstack', 'neutron-package'], + ensure => $package_ensure, + name => $::neutron::params::metadata_agent_package, + tag => ['openstack', 'neutron-package'], } } @@ -169,17 +124,12 @@ } else { $service_ensure = 'stopped' } - Package['neutron'] ~> Service['neutron-metadata'] - if $::neutron::params::metadata_agent_package { - Package['neutron-metadata'] ~> Service['neutron-metadata'] - } } service { 'neutron-metadata': - ensure => $service_ensure, - name => $::neutron::params::metadata_agent_service, - enable => $enabled, - require => Class['neutron'], - tag => 'neutron-service', + ensure => $service_ensure, + name => $::neutron::params::metadata_agent_service, + enable => $enabled, + tag => 'neutron-service', } } diff -Nru puppet-module-neutron-8.0.0/manifests/agents/metering.pp puppet-module-neutron-9.4.0/manifests/agents/metering.pp --- puppet-module-neutron-8.0.0/manifests/agents/metering.pp 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/manifests/agents/metering.pp 2016-09-26 21:11:55.000000000 +0000 @@ -48,13 +48,10 @@ # (optional) Interval between two metering reports. # Defaults to 300. # -# === Deprecated Parameters -# -# [*use_namespaces*] -# (optional) Deprecated. 'True' value will be enforced in future releases. -# Allow overlapping IP (Must have kernel build with -# CONFIG_NET_NS=y and iproute2 package that supports namespaces). -# Defaults to $::os_service_default. +# [*purge_config*] +# (optional) Whether to set only the specified config options +# in the metering config. +# Defaults to false. # class neutron::agents::metering ( @@ -66,14 +63,15 @@ $driver = 'neutron.services.metering.drivers.noop.noop_driver.NoopMeteringDriver', $measure_interval = $::os_service_default, $report_interval = $::os_service_default, - # DEPRECATED PARAMETERS - $use_namespaces = $::os_service_default, + $purge_config = false, ) { + include ::neutron::deps include ::neutron::params - Neutron_config<||> ~> Service['neutron-metering-service'] - Neutron_metering_agent_config<||> ~> Service['neutron-metering-service'] + resources { 'neutron_metering_agent_config': + purge => $purge_config, + } # The metering agent loads both neutron.ini and its own file. # This only lists config specific to the agent. neutron.ini supplies @@ -86,15 +84,7 @@ 'DEFAULT/report_interval': value => $report_interval; } - if ! is_service_default ($use_namespaces) { - warning('The use_namespaces parameter is deprecated and will be removed in future releases') - neutron_metering_agent_config { - 'DEFAULT/use_namespaces': value => $use_namespaces; - } - } - if $::neutron::params::metering_agent_package { - Package['neutron'] -> Package['neutron-metering-agent'] package { 'neutron-metering-agent': ensure => $package_ensure, name => $::neutron::params::metering_agent_package, @@ -108,17 +98,12 @@ } else { $service_ensure = 'stopped' } - Package['neutron'] ~> Service['neutron-metering-service'] - if $::neutron::params::metering_agent_package { - Package['neutron-metering-agent'] ~> Service['neutron-metering-service'] - } } service { 'neutron-metering-service': - ensure => $service_ensure, - name => $::neutron::params::metering_agent_service, - enable => $enabled, - require => Class['neutron'], - tag => 'neutron-service', + ensure => $service_ensure, + name => $::neutron::params::metering_agent_service, + enable => $enabled, + tag => 'neutron-service', } } diff -Nru puppet-module-neutron-8.0.0/manifests/agents/ml2/linuxbridge.pp puppet-module-neutron-9.4.0/manifests/agents/ml2/linuxbridge.pp --- puppet-module-neutron-8.0.0/manifests/agents/ml2/linuxbridge.pp 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/manifests/agents/ml2/linuxbridge.pp 2016-09-26 21:11:55.000000000 +0000 @@ -58,6 +58,11 @@ # (optional) Firewall driver for realizing neutron security group function. # Defaults to 'neutron.agent.linux.iptables_firewall.IptablesFirewallDriver'. # +# [*purge_config*] +# (optional) Whether to set only the specified config options +# in the linuxbridge config. +# Defaults to false. +# class neutron::agents::ml2::linuxbridge ( $package_ensure = 'present', $enabled = true, @@ -70,15 +75,19 @@ $polling_interval = $::os_service_default, $l2_population = $::os_service_default, $physical_interface_mappings = [], - $firewall_driver = 'neutron.agent.linux.iptables_firewall.IptablesFirewallDriver' + $firewall_driver = 'neutron.agent.linux.iptables_firewall.IptablesFirewallDriver', + $purge_config = false, ) { validate_array($tunnel_types) validate_array($physical_interface_mappings) + include ::neutron::deps include ::neutron::params - Neutron_agent_linuxbridge<||> ~> Service['neutron-plugin-linuxbridge-agent'] + resources { 'neutron_agent_linuxbridge': + purge => $purge_config, + } if ('vxlan' in $tunnel_types) { @@ -101,6 +110,16 @@ } } + if size($tunnel_types) > 0 { + neutron_agent_linuxbridge { + 'agent/tunnel_types': value => join($tunnel_types, ','); + } + } else { + neutron_agent_linuxbridge { + 'agent/tunnel_types': ensure => absent; + } + } + neutron_agent_linuxbridge { 'agent/polling_interval': value => $polling_interval; 'linux_bridge/physical_interface_mappings': value => join($physical_interface_mappings, ','); @@ -136,8 +155,6 @@ } else { $service_ensure = 'stopped' } - Package['neutron'] ~> Service['neutron-plugin-linuxbridge-agent'] - Package['neutron-plugin-linuxbridge-agent'] ~> Service['neutron-plugin-linuxbridge-agent'] } if $::neutron::rpc_backend == 'neutron.openstack.common.rpc.impl_kombu' { @@ -150,7 +167,6 @@ ensure => $service_ensure, name => $::neutron::params::linuxbridge_agent_service, enable => $enabled, - require => Class['neutron'], tag => 'neutron-service', subscribe => $linuxbridge_agent_subscribe, } diff -Nru puppet-module-neutron-8.0.0/manifests/agents/ml2/ovs.pp puppet-module-neutron-9.4.0/manifests/agents/ml2/ovs.pp --- puppet-module-neutron-8.0.0/manifests/agents/ml2/ovs.pp 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/manifests/agents/ml2/ovs.pp 2016-09-26 21:11:55.000000000 +0000 @@ -46,14 +46,10 @@ # (optional) Integration bridge in OVS # Defaults to 'br-int' # -# [*enable_tunneling*] -# (optional) Enable or not tunneling -# Defaults to false -# # [*tunnel_types*] # (optional) List of types of tunnels to use when utilizing tunnels, # either 'gre' or 'vxlan'. -# Defaults to false +# Defaults to empty list # # [*local_ip*] # (optional) Local IP address of GRE tunnel endpoints. @@ -105,10 +101,6 @@ # mappings provided as part of the $bridge_mappings parameters. # Defaults to true # -# [*prevent_arp_spoofing*] -# (optional) Enable or not ARP Spoofing Protection -# Defaults to $::os_service_default -# # [*extensions*] # (optional) Extensions list to use # Defaults to $::os_service_default @@ -129,11 +121,35 @@ # (optional) The vhost-user socket directory for OVS # Defaults to $::os_service_default # -# [*ovsdb_interface*] +# [*of_interface*] # (optional) OpenFlow interface to use # Allowed values: ovs-ofctl, native # Defaults to $::os_service_default # +# [*ovsdb_interface*] +# (optional) The interface for interacting with the OVSDB +# Allowed values: vsctl, native +# Defaults to $::os_service_default +# +# [*purge_config*] +# (optional) Whether to set only the specified config options +# in the ovs config. +# Defaults to false. +# +# [*enable_dpdk*] +# (optional) Enable or not DPDK with OVS +# Defaults to false. +# +# === Deprecated Parameters +# +# [*prevent_arp_spoofing*] +# (optional) Enable or not ARP Spoofing Protection +# Defaults to $::os_service_default +# +# [*enable_tunneling*] +# (optional) Enable or not tunneling +# Defaults to false +# class neutron::agents::ml2::ovs ( $package_ensure = 'present', $enabled = true, @@ -142,7 +158,6 @@ $bridge_uplinks = [], $bridge_mappings = [], $integration_bridge = 'br-int', - $enable_tunneling = false, $tunnel_types = [], $local_ip = false, $tunnel_bridge = 'br-tun', @@ -154,34 +169,78 @@ $enable_distributed_routing = $::os_service_default, $drop_flows_on_start = false, $manage_vswitch = true, - $prevent_arp_spoofing = $::os_service_default, $int_peer_patch_port = $::os_service_default, $tun_peer_patch_port = $::os_service_default, $datapath_type = $::os_service_default, $vhostuser_socket_dir = $::os_service_default, + $of_interface = $::os_service_default, $ovsdb_interface = $::os_service_default, + $purge_config = false, + $enable_dpdk = false, + # DEPRECATED PARAMETERS + $prevent_arp_spoofing = $::os_service_default, + $enable_tunneling = false, ) { + include ::neutron::deps include ::neutron::params + + if $enable_dpdk and ! $manage_vswitch { + fail('Enabling DPDK without manage vswitch does not have any effect') + } + + if $enable_dpdk and is_service_default($datapath_type) { + fail('Datapath type for ovs agent must be set when DPDK is enabled') + } + + if $enable_dpdk and is_service_default($vhostuser_socket_dir) { + fail('vhost user socket directory for ovs agent must be set when DPDK is enabled') + } + if $manage_vswitch { - require vswitch::ovs + if $enable_dpdk { + require ::vswitch::dpdk + } else { + require ::vswitch::ovs + } + } + + if $enable_tunneling { + warning('The enable_tunneling parameter is deprecated. Please set tunnel_types with the desired type to enable tunneling.') + } + + validate_array($tunnel_types) + if $enable_tunneling or (size($tunnel_types) > 0) { + $enable_tunneling_real = true + } else { + $enable_tunneling_real = false } - if $enable_tunneling and ! $local_ip { + if $enable_tunneling_real and ! $local_ip { fail('Local ip for ovs agent must be set when tunneling is enabled') } - if ($enable_tunneling) and (!is_service_default($enable_distributed_routing)) and (!is_service_default($l2_population)) { + if ($enable_tunneling_real) and (!is_service_default($enable_distributed_routing)) and (!is_service_default($l2_population)) { if $enable_distributed_routing and ! $l2_population { fail('L2 population must be enabled when DVR and tunneling are enabled') } } - if ! (is_service_default($ovsdb_interface)) and ! ($ovsdb_interface =~ /^(ovs-ofctl|native)$/) { - fail('A value of $ovsdb_interface is incorrect. The allowed values are ovs-ofctl and native') + if ! (is_service_default($of_interface)) and ! ($of_interface =~ /^(ovs-ofctl|native)$/) { + fail('A value of $of_interface is incorrect. The allowed values are ovs-ofctl and native') } - Neutron_agent_ovs<||> ~> Service['neutron-ovs-agent-service'] + if ! (is_service_default($ovsdb_interface)) and ! ($ovsdb_interface =~ /^(vsctl|native)$/) { + fail('A value of $ovsdb_interface is incorrect. The allowed values are vsctl and native') + } + + if ! is_service_default ($prevent_arp_spoofing) { + warning('The prevent_arp_spoofing parameter is deprecated and will be removed in Ocata release') + } + + resources { 'neutron_agent_ovs': + purge => $purge_config, + } if ($bridge_mappings != []) { # bridge_mappings are used to describe external networks that are @@ -224,6 +283,7 @@ 'ovs/datapath_type': value => $datapath_type; 'ovs/vhostuser_socket_dir': value => $vhostuser_socket_dir; 'ovs/ovsdb_interface': value => $ovsdb_interface; + 'ovs/of_interface': value => $of_interface; } if $firewall_driver { @@ -232,20 +292,15 @@ neutron_agent_ovs { 'securitygroup/firewall_driver': ensure => absent } } - if $enable_tunneling { + if $enable_tunneling_real { neutron_agent_ovs { - 'ovs/enable_tunneling': value => true; 'ovs/tunnel_bridge': value => $tunnel_bridge; 'ovs/local_ip': value => $local_ip; 'ovs/int_peer_patch_port': value => $int_peer_patch_port; 'ovs/tun_peer_patch_port': value => $tun_peer_patch_port; + 'agent/tunnel_types': value => join($tunnel_types, ','); } - if size($tunnel_types) > 0 { - neutron_agent_ovs { - 'agent/tunnel_types': value => join($tunnel_types, ','); - } - } if 'vxlan' in $tunnel_types { validate_vxlan_udp_port($vxlan_udp_port) neutron_agent_ovs { @@ -254,7 +309,6 @@ } } else { neutron_agent_ovs { - 'ovs/enable_tunneling': value => false; 'ovs/tunnel_bridge': ensure => absent; 'ovs/local_ip': ensure => absent; 'ovs/int_peer_patch_port': ensure => absent; @@ -288,23 +342,22 @@ } else { $service_ensure = 'stopped' } - Package['neutron'] ~> Service['neutron-ovs-agent-service'] - Package['neutron-ovs-agent'] ~> Service['neutron-ovs-agent-service'] } service { 'neutron-ovs-agent-service': - ensure => $service_ensure, - name => $::neutron::params::ovs_agent_service, - enable => $enabled, - require => Class['neutron'], - tag => 'neutron-service', + ensure => $service_ensure, + name => $::neutron::params::ovs_agent_service, + enable => $enabled, + tag => ['neutron-service', 'neutron-db-sync-service'], } if $::neutron::params::ovs_cleanup_service { - Package['neutron-ovs-agent'] -> Service['ovs-cleanup-service'] service { 'ovs-cleanup-service': - name => $::neutron::params::ovs_cleanup_service, - enable => $enabled, + name => $::neutron::params::ovs_cleanup_service, + enable => $enabled, + # TODO: Remove this require once ovs-cleanup service + # script is packaged in neutron-openvswitch package + require => Package['neutron'], } } } diff -Nru puppet-module-neutron-8.0.0/manifests/agents/ml2/sriov.pp puppet-module-neutron-9.4.0/manifests/agents/ml2/sriov.pp --- puppet-module-neutron-8.0.0/manifests/agents/ml2/sriov.pp 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/manifests/agents/ml2/sriov.pp 2016-09-26 21:11:55.000000000 +0000 @@ -34,11 +34,11 @@ # Defaults to true # # [*physical_device_mappings*] -# (optional) List of : +# (optional) Array of : # All physical networks listed in network_vlan_ranges # on the server should have mappings to appropriate # interfaces on each agent. -# Defaults to empty list +# Value should be of type array, Defaults to $::os_service_default # # [*polling_interval*] # (optional) The number of seconds the agent will wait between @@ -46,38 +46,62 @@ # Defaults to '2" # # [*exclude_devices*] -# (optional) List of : mapping +# (optional) Array of : mapping # network_device to the agent's node-specific list of virtual functions # that should not be used for virtual networking. excluded_devices is a # semicolon separated list of virtual functions to exclude from network_device. # The network_device in the mapping should appear in the physical_device_mappings list. +# Value should be of type array, Defaults to $::os_service_default # # [*extensions*] # (optional) Extensions list to use # Defaults to $::os_service_default # +# [*purge_config*] +# (optional) Whether to set only the specified config options +# in the sriov config. +# Defaults to false. +# +# [*number_of_vfs*] +# (optional) List of : specifying the number +# VFs to be exposed per physical interface. +# For example, to configure two inteface with number of VFs, specify +# it as "eth1:4,eth2:10" +# Defaults to $::os_service_default. +# class neutron::agents::ml2::sriov ( $package_ensure = 'present', $enabled = true, $manage_service = true, - $physical_device_mappings = [], + $physical_device_mappings = $::os_service_default, $polling_interval = 2, - $exclude_devices = [], + $exclude_devices = $::os_service_default, $extensions = $::os_service_default, + $purge_config = false, + $number_of_vfs = $::os_service_default, ) { + include ::neutron::deps include ::neutron::params - Neutron_sriov_agent_config <||> ~> Service['neutron-sriov-nic-agent-service'] + resources { 'neutron_sriov_agent_config': + purge => $purge_config, + } neutron_sriov_agent_config { 'sriov_nic/polling_interval': value => $polling_interval; - 'sriov_nic/exclude_devices': value => join($exclude_devices, ','); - 'sriov_nic/physical_device_mappings': value => join($physical_device_mappings, ','); + 'sriov_nic/exclude_devices': value => pick(join(any2array($exclude_devices), ','), $::os_service_default); + 'sriov_nic/physical_device_mappings': value => pick(join(any2array($physical_device_mappings), ','), $::os_service_default); 'agent/extensions': value => join(any2array($extensions), ','); + # As of now security groups are not supported for SR-IOV ports. + # It is required to disable Firewall driver in the SR-IOV agent config. + 'securitygroup/firewall_driver': value => 'neutron.agent.firewall.NoopFirewallDriver'; + } + + if !is_service_default($number_of_vfs) and !empty($number_of_vfs) { + neutron_agent_sriov_numvfs { $number_of_vfs: ensure => present } } - Package['neutron-sriov-nic-agent'] -> Neutron_sriov_agent_config <||> package { 'neutron-sriov-nic-agent': ensure => $package_ensure, name => $::neutron::params::sriov_nic_agent_package, @@ -90,16 +114,13 @@ } else { $service_ensure = 'stopped' } - Package['neutron'] ~> Service['neutron-sriov-nic-agent-service'] - Package['neutron-sriov-nic-agent'] ~> Service['neutron-sriov-nic-agent-service'] } service { 'neutron-sriov-nic-agent-service': - ensure => $service_ensure, - name => $::neutron::params::sriov_nic_agent_service, - enable => $enabled, - require => Class['neutron'], - tag => 'neutron-service', + ensure => $service_ensure, + name => $::neutron::params::sriov_nic_agent_service, + enable => $enabled, + tag => 'neutron-service', } } diff -Nru puppet-module-neutron-8.0.0/manifests/agents/n1kv_vem.pp puppet-module-neutron-9.4.0/manifests/agents/n1kv_vem.pp --- puppet-module-neutron-8.0.0/manifests/agents/n1kv_vem.pp 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/manifests/agents/n1kv_vem.pp 2016-09-26 21:11:55.000000000 +0000 @@ -121,8 +121,9 @@ $fastpath_flood = 'enable' ) { + include ::neutron::deps include ::neutron::params - require vswitch::ovs + require ::vswitch::ovs Exec { path => [ '/bin/', '/sbin/' , '/usr/bin/', '/usr/sbin/' ] } @@ -147,7 +148,8 @@ package { 'libnl': ensure => $package_ensure, - name => $::neutron::params::libnl_package + name => $::neutron::params::libnl_package, + tag => ['neutron-support-package'], } file { @@ -187,7 +189,7 @@ ensure => $n1kv_version, provider => $::neutron::params::package_provider, source => $vemtgtimg, - tag => 'openstack', + tag => ['neutron-support-package', 'openstack'], require => File[$vemtgtimg] } } else { @@ -206,7 +208,7 @@ } package {'nexus1000v': ensure => $package_ensure, - tag => 'openstack', + tag => ['neutron-support-package', 'openstack'], } } warning('nexus1000v package management is deprecated, it will be dropped in a future release.') diff -Nru puppet-module-neutron-8.0.0/manifests/agents/vpnaas.pp puppet-module-neutron-9.4.0/manifests/agents/vpnaas.pp --- puppet-module-neutron-8.0.0/manifests/agents/vpnaas.pp 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/manifests/agents/vpnaas.pp 2016-09-26 21:11:55.000000000 +0000 @@ -40,6 +40,11 @@ # [*ipsec_status_check_interval*] # (optional) Status check interval. Defaults to $::os_service_default. # +# [*purge_config*] +# (optional) Whether to set only the specified config options +# in the vpnaas config. +# Defaults to false. +# # === Deprecated Parameters # # [*external_network_bridge*] @@ -52,20 +57,20 @@ $vpn_device_driver = 'neutron.services.vpn.device_drivers.ipsec.OpenSwanDriver', $interface_driver = 'neutron.agent.linux.interface.OVSInterfaceDriver', $external_network_bridge = $::os_service_default, - $ipsec_status_check_interval = $::os_service_default + $ipsec_status_check_interval = $::os_service_default, + $purge_config = false, ) { + include ::neutron::deps include ::neutron::params - Neutron_config<||> ~> Service['neutron-vpnaas-service'] - Neutron_vpnaas_agent_config<||> ~> Service['neutron-vpnaas-service'] - case $vpn_device_driver { /\.OpenSwan/: { Package['openswan'] -> Package<| title == 'neutron-vpnaas-agent' |> package { 'openswan': ensure => present, name => $::neutron::params::openswan_package, + tag => ['neutron-support-package', 'openstack'], } } /\.LibreSwan/: { @@ -76,6 +81,7 @@ package { 'libreswan': ensure => present, name => $::neutron::params::libreswan_package, + tag => ['neutron-support-package', 'openstack'], } } } @@ -84,6 +90,10 @@ } } + resources { 'neutron_vpnaas_agent_config': + purge => $purge_config, + } + # The VPNaaS agent loads both neutron.ini and its own file. # This only lists config specific to the agent. neutron.ini supplies # the rest. @@ -102,7 +112,6 @@ } if $::neutron::params::vpnaas_agent_package { - Package['neutron'] -> Package['neutron-vpnaas-agent'] ensure_resource( 'package', 'neutron-vpnaas-agent', { 'ensure' => $package_ensure, 'name' => $::neutron::params::vpnaas_agent_package, @@ -116,17 +125,12 @@ } else { $service_ensure = 'stopped' } - Package['neutron'] ~> Service['neutron-vpnaas-service'] - if $::neutron::params::vpnaas_agent_package { - Package['neutron-vpnaas-agent'] ~> Service['neutron-vpnaas-service'] - } } service { 'neutron-vpnaas-service': - ensure => $service_ensure, - name => $::neutron::params::vpnaas_agent_service, - enable => $enabled, - require => Class['neutron'], - tag => 'neutron-service', + ensure => $service_ensure, + name => $::neutron::params::vpnaas_agent_service, + enable => $enabled, + tag => 'neutron-service', } } diff -Nru puppet-module-neutron-8.0.0/manifests/client.pp puppet-module-neutron-9.4.0/manifests/client.pp --- puppet-module-neutron-8.0.0/manifests/client.pp 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/manifests/client.pp 2016-09-26 21:11:55.000000000 +0000 @@ -12,12 +12,13 @@ $package_ensure = present ) { + include ::neutron::deps include ::neutron::params package { 'python-neutronclient': ensure => $package_ensure, name => $::neutron::params::client_package, - tag => 'openstack', + tag => ['neutron-support-package', 'openstack'], } } diff -Nru puppet-module-neutron-8.0.0/manifests/config.pp puppet-module-neutron-9.4.0/manifests/config.pp --- puppet-module-neutron-8.0.0/manifests/config.pp 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/manifests/config.pp 2016-09-26 21:11:55.000000000 +0000 @@ -66,6 +66,9 @@ # [*plugin_opencontrail_config*] # (optional) Manage configuration of plugins/opencontrail/ContrailPlugin.ini # +# [*plugin_ovn_config*] +# (optional) Manage configuration of plugins/networking-ovn/networking-ovn.ini +# # [*plugin_nuage_config*] # (optional) Manage configuration of plugins/nuage/plugin.ini # @@ -94,10 +97,13 @@ $plugin_midonet_config = {}, $plugin_plumgrid_config = {}, $plugin_opencontrail_config = {}, + $plugin_ovn_config = {}, $plugin_nuage_config = {}, $plugin_ml2_config = {}, ) { + include ::neutron::deps + validate_hash($server_config) validate_hash($api_config) validate_hash($l3_agent_config) @@ -113,6 +119,7 @@ validate_hash($plugin_midonet_config) validate_hash($plugin_plumgrid_config) validate_hash($plugin_opencontrail_config) + validate_hash($plugin_ovn_config) validate_hash($plugin_nuage_config) validate_hash($plugin_ml2_config) diff -Nru puppet-module-neutron-8.0.0/manifests/db/mysql.pp puppet-module-neutron-9.4.0/manifests/db/mysql.pp --- puppet-module-neutron-8.0.0/manifests/db/mysql.pp 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/manifests/db/mysql.pp 2016-09-26 21:11:55.000000000 +0000 @@ -34,9 +34,10 @@ $allowed_hosts = undef, $charset = 'utf8', $collate = 'utf8_general_ci', - # DEPRECATED ) { + include ::neutron::deps + validate_string($password) ::openstacklib::db::mysql { 'neutron': @@ -48,6 +49,8 @@ collate => $collate, allowed_hosts => $allowed_hosts, } - ::Openstacklib::Db::Mysql['neutron'] ~> Service <| title == 'neutron-server' |> - ::Openstacklib::Db::Mysql['neutron'] ~> Exec <| title == 'neutron-db-sync' |> + + Anchor['neutron::db::begin'] + ~> Class['neutron::db::mysql'] + ~> Anchor['neutron::db::end'] } diff -Nru puppet-module-neutron-8.0.0/manifests/db/postgresql.pp puppet-module-neutron-9.4.0/manifests/db/postgresql.pp --- puppet-module-neutron-8.0.0/manifests/db/postgresql.pp 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/manifests/db/postgresql.pp 2016-09-26 21:11:55.000000000 +0000 @@ -32,6 +32,8 @@ $privileges = 'ALL', ) { + include ::neutron::deps + ::openstacklib::db::postgresql { 'neutron': password_hash => postgresql_password($user, $password), dbname => $dbname, @@ -40,6 +42,7 @@ privileges => $privileges, } - ::Openstacklib::Db::Postgresql['neutron'] ~> Service <| title == 'neutron-server' |> - ::Openstacklib::Db::Postgresql['neutron'] ~> Exec <| title == 'neutron-db-sync' |> + Anchor['neutron::db::begin'] + ~> Class['neutron::db::postgresql'] + ~> Anchor['neutron::db::end'] } diff -Nru puppet-module-neutron-8.0.0/manifests/db/sync.pp puppet-module-neutron-9.4.0/manifests/db/sync.pp --- puppet-module-neutron-8.0.0/manifests/db/sync.pp 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/manifests/db/sync.pp 2016-09-26 21:11:55.000000000 +0000 @@ -14,18 +14,19 @@ $extra_params = '--config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugin.ini', ) { + include ::neutron::deps include ::neutron::params - Package<| tag == 'neutron-package' |> ~> Exec['neutron-db-sync'] - Exec['neutron-db-sync'] ~> Service <| tag == 'neutron-db-sync-service' |> - - Neutron_config<||> ~> Exec['neutron-db-sync'] - Neutron_config<| title == 'database/connection' |> ~> Exec['neutron-db-sync'] - exec { 'neutron-db-sync': - command => "neutron-db-manage ${extra_params} upgrade head", + command => "neutron-db-manage ${extra_params} upgrade heads", path => '/usr/bin', refreshonly => true, logoutput => on_failure, + subscribe => [ + Anchor['neutron::install::end'], + Anchor['neutron::config::end'], + Anchor['neutron::dbsync::begin'] + ], + notify => Anchor['neutron::dbsync::end'], } } diff -Nru puppet-module-neutron-8.0.0/manifests/db.pp puppet-module-neutron-9.4.0/manifests/db.pp --- puppet-module-neutron-8.0.0/manifests/db.pp 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/manifests/db.pp 2016-09-26 21:11:55.000000000 +0000 @@ -33,6 +33,11 @@ # If set, use this value for max_overflow with sqlalchemy. # (Optional) Defaults to $::os_service_default. # +# [*database_db_max_retries*] +# (Optional) Maximum retries in case of connection error or deadlock error +# before error is raised. Set to -1 to specify an infinite retry count. +# Defaults to $::os_service_default +# class neutron::db ( $database_connection = 'sqlite:////var/lib/neutron/ovs.sqlite', $database_idle_timeout = $::os_service_default, @@ -41,9 +46,10 @@ $database_max_retries = $::os_service_default, $database_retry_interval = $::os_service_default, $database_max_overflow = $::os_service_default, + $database_db_max_retries = $::os_service_default, ) { - include ::neutron::params + include ::neutron::deps # NOTE(spredzy): In order to keep backward compatibility we rely on the pick function # to use neutron:: if neutron::db:: isn't specified. @@ -59,44 +65,16 @@ '^(sqlite|mysql(\+pymysql)?|postgresql):\/\/(\S+:\S+@\S+\/\S+)?') if $database_connection_real { - case $database_connection_real { - /^mysql(\+pymysql)?:\/\//: { - require 'mysql::bindings' - require 'mysql::bindings::python' - if $database_connection_real =~ /^mysql\+pymysql/ { - $backend_package = $::neutron::params::pymysql_package_name - } else { - $backend_package = false - } - } - /^postgresql:\/\//: { - $backend_package = false - require 'postgresql::lib::python' - } - /^sqlite:\/\//: { - $backend_package = $::neutron::params::sqlite_package_name - } - default: { - fail('Unsupported backend configured') - } - } - - if $backend_package and !defined(Package[$backend_package]) { - package {'neutron-backend-package': - ensure => present, - name => $backend_package, - tag => 'openstack', - } - } - neutron_config { - 'database/connection': value => $database_connection_real, secret => true; - 'database/idle_timeout': value => $database_idle_timeout_real; - 'database/min_pool_size': value => $database_min_pool_size_real; - 'database/max_retries': value => $database_max_retries_real; - 'database/retry_interval': value => $database_retry_interval_real; - 'database/max_pool_size': value => $database_max_pool_size_real; - 'database/max_overflow': value => $database_max_overflow_real; + oslo::db { 'neutron_config': + connection => $database_connection_real, + idle_timeout => $database_idle_timeout_real, + min_pool_size => $database_min_pool_size_real, + max_retries => $database_max_retries_real, + retry_interval => $database_retry_interval_real, + max_pool_size => $database_max_pool_size_real, + max_overflow => $database_max_overflow_real, + db_max_retries => $database_db_max_retries, } } diff -Nru puppet-module-neutron-8.0.0/manifests/deps.pp puppet-module-neutron-9.4.0/manifests/deps.pp --- puppet-module-neutron-8.0.0/manifests/deps.pp 1970-01-01 00:00:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/manifests/deps.pp 2016-09-26 21:11:55.000000000 +0000 @@ -0,0 +1,86 @@ +# == Class: neutron::deps +# +# neutron anchors and dependency management +# +class neutron::deps { + # Setup anchors for install, config and service phases of the module. These + # anchors allow external modules to hook the begin and end of any of these + # phases. Package or service management can also be replaced by ensuring the + # package is absent or turning off service management and having the + # replacement depend on the appropriate anchors. When applicable, end tags + # should be notified so that subscribers can determine if installation, + # config or service state changed and act on that if needed. + anchor { 'neutron::install::begin': } + -> Package<| tag == 'neutron-package'|> + ~> anchor { 'neutron::install::end': } + -> anchor { 'neutron::config::begin': } + -> File<| tag == 'neutron-config-file' |> + ~> anchor { 'neutron::config::end': } + -> anchor { 'neutron::db::begin': } + -> anchor { 'neutron::db::end': } + ~> anchor { 'neutron::dbsync::begin': } + -> anchor { 'neutron::dbsync::end': } + ~> anchor { 'neutron::service::begin': } + ~> Service<| tag == 'neutron-service' |> + ~> anchor { 'neutron::service::end': } + + # Ensure files are modified in the config block + Anchor['neutron::config::begin'] + -> File_line<| tag == 'neutron-file-line' |> + ~> Anchor['neutron::config::end'] + + # Ensure all files are in place before modifying them + File<| tag == 'neutron-config-file' |> -> File_line<| tag == 'neutron-file-line' |> + + # All other inifile providers need to be processed in the config block + Anchor['neutron::config::begin'] -> Neutron_agent_linuxbridge<||> ~> Anchor['neutron::config::end'] + Anchor['neutron::config::begin'] -> Neutron_agent_ovs<||> ~> Anchor['neutron::config::end'] + Anchor['neutron::config::begin'] -> Neutron_api_config<||> ~> Anchor['neutron::config::end'] + Anchor['neutron::config::begin'] -> Neutron_api_paste_ini<||> ~> Anchor['neutron::config::end'] + Anchor['neutron::config::begin'] -> Neutron_config<||> ~> Anchor['neutron::config::end'] + Anchor['neutron::config::begin'] -> Neutron_dhcp_agent_config<||> ~> Anchor['neutron::config::end'] + Anchor['neutron::config::begin'] -> Neutron_fwaas_service_config<||> ~> Anchor['neutron::config::end'] + Anchor['neutron::config::begin'] -> Neutron_l3_agent_config<||> ~> Anchor['neutron::config::end'] + Anchor['neutron::config::begin'] -> Neutron_lbaas_agent_config<||> ~> Anchor['neutron::config::end'] + Anchor['neutron::config::begin'] -> Neutron_lbaas_service_config<||> ~> Anchor['neutron::config::end'] + Anchor['neutron::config::begin'] -> Neutron_lbaas_service_config<||> ~> Anchor['neutron::config::end'] + Anchor['neutron::config::begin'] -> Neutron_metadata_agent_config<||> ~> Anchor['neutron::config::end'] + Anchor['neutron::config::begin'] -> Neutron_metering_agent_config<||> ~> Anchor['neutron::config::end'] + Anchor['neutron::config::begin'] -> Neutron_plugin_cisco_credentials<||> ~> Anchor['neutron::config::end'] + Anchor['neutron::config::begin'] -> Neutron_plugin_cisco_db_conn<||> ~> Anchor['neutron::config::end'] + Anchor['neutron::config::begin'] -> Neutron_plugin_cisco<||> ~> Anchor['neutron::config::end'] + Anchor['neutron::config::begin'] -> Neutron_plugin_cisco_l2network<||> ~> Anchor['neutron::config::end'] + Anchor['neutron::config::begin'] -> Neutron_plugin_linuxbridge<||> ~> Anchor['neutron::config::end'] + Anchor['neutron::config::begin'] -> Neutron_plugin_midonet<||> ~> Anchor['neutron::config::end'] + Anchor['neutron::config::begin'] -> Neutron_plugin_ml2<||> ~> Anchor['neutron::config::end'] + Anchor['neutron::config::begin'] -> Neutron_plugin_nuage<||> ~> Anchor['neutron::config::end'] + Anchor['neutron::config::begin'] -> Neutron_plugin_nvp<||> ~> Anchor['neutron::config::end'] + Anchor['neutron::config::begin'] -> Neutron_plugin_opencontrail<||> ~> Anchor['neutron::config::end'] + Anchor['neutron::config::begin'] -> Neutron_plugin_plumgrid<||> ~> Anchor['neutron::config::end'] + Anchor['neutron::config::begin'] -> Neutron_plugin_sriov<||> ~> Anchor['neutron::config::end'] + Anchor['neutron::config::begin'] -> Neutron_plumlib_plumgrid<||> ~> Anchor['neutron::config::end'] + Anchor['neutron::config::begin'] -> Neutron_sriov_agent_config<||> ~> Anchor['neutron::config::end'] + Anchor['neutron::config::begin'] -> Neutron_vpnaas_agent_config<||> ~> Anchor['neutron::config::end'] + Anchor['neutron::config::begin'] -> Neutron_vpnaas_service_config<||> ~> Anchor['neutron::config::end'] + + # Support packages need to be installed in the install phase, but we don't + # put them in the chain above because we don't want any false dependencies + # between packages with the neutron-package tag and the neutron-support-package + # tag. Note: the package resources here will have a 'before' relationshop on + # the neutron::install::end anchor. The line between neutron-support-package and + # neutron-package should be whether or not neutron services would need to be + # restarted if the package state was changed. + Anchor['neutron::install::begin'] + -> Package<| tag == 'neutron-support-package'|> + -> Anchor['neutron::install::end'] + + Anchor['neutron::service::end'] -> Neutron_l3_ovs_bridge<||> + Anchor['neutron::service::end'] -> Neutron_network<||> + Anchor['neutron::service::end'] -> Neutron_port<||> + Anchor['neutron::service::end'] -> Neutron_router<||> + Anchor['neutron::service::end'] -> Neutron_subnet<||> + + # Installation or config changes will always restart services. + Anchor['neutron::install::end'] ~> Anchor['neutron::service::begin'] + Anchor['neutron::config::end'] ~> Anchor['neutron::service::begin'] +} diff -Nru puppet-module-neutron-8.0.0/manifests/init.pp puppet-module-neutron-9.4.0/manifests/init.pp --- puppet-module-neutron-8.0.0/manifests/init.pp 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/manifests/init.pp 2016-09-26 21:11:55.000000000 +0000 @@ -13,13 +13,9 @@ # (optional) The state of the package # Defaults to 'present' # -# [*verbose*] -# (optional) Verbose logging -# Defaults to $::os_service_default -# # [*debug*] # (optional) Print debug messages in the logs -# Defaults to $::os_service_default +# Defaults to undef # # [*bind_host*] # (optional) The IP/interface to bind to @@ -32,7 +28,8 @@ # [*core_plugin*] # (optional) Neutron plugin provider # Defaults to openvswitch -# Could be bigswitch, brocade, cisco, embrane, hyperv, linuxbridge, midonet, ml2, mlnx, nec, nicira, plumgrid, ryu, nuage, opencontrail (full path) +# Could be bigswitch, brocade, cisco, embrane, hyperv, linuxbridge, midonet, +# ml2, mlnx, nec, nicira, plumgrid, ryu, nuage, opencontrail (full path) # # Example for opencontrail: # @@ -62,6 +59,10 @@ # (optional) DHCP lease # Defaults to $::os_service_default # +# [*host*] +# (optional) Hostname to be used by the server, agents and services. +# Defaults to $::os_service_default +# # [*dns_domain*] # (optional) Domain to use for building the hostnames # Defaults to $::os_service_default @@ -71,7 +72,7 @@ # This enables redundant DHCP agents for configured networks. # Defaults to $::os_service_default # -# [*network_device_mtu*] +# [*global_physnet_mtu*] # (optional) The MTU size for the interfaces managed by neutron # Defaults to $::os_service_default # @@ -79,22 +80,10 @@ # (optional) Allow sending resource operation notification to DHCP agent. # Defaults to $::os_service_default # -# [*advertise_mtu*] -# (optional) VMs will receive DHCP and RA MTU option when the network's preferred MTU is known -# Defaults to $::os_service_default -# # [*allow_bulk*] # (optional) Enable bulk crud operations # Defaults to $::os_service_default # -# [*allow_pagination*] -# (optional) Enable pagination -# Defaults to $::os_service_default -# -# [*allow_sorting*] -# (optional) Enable sorting -# Defaults to $::os_service_default -# # [*allow_overlapping_ips*] # (optional) Enables network namespaces # Defaults to $::os_service_default @@ -110,6 +99,10 @@ # directly # Defaults to 'sudo neutron-rootwrap /etc/neutron/rootwrap.conf'. # +# [*root_helper_daemon*] +# (optional) Root helper daemon application to use when possible. +# Defaults to $::os_service_default. +# # [*report_interval*] # (optional) Seconds between nodes reporting state to server; should be less than # agent_down_time, best if it is half or less than agent_down_time. @@ -124,10 +117,16 @@ # [*control_exchange*] # (optional) What RPC queue/exchange to use # Defaults to neutron - +# +# [*default_transport_url*] +# (optional) A URL representing the messaging driver to use and its full +# configuration. Transport URLs take the form: +# transport://user:pass@host1:port[,hostN:portN]/virtual_host +# Defaults to $::os_service_default +# # [*rpc_backend*] # (optional) what rpc/queuing service to use -# Defaults to rabbit (rabbitmq) +# Defaults to $::os_service_default # # [*rpc_response_timeout*] # (optional) Seconds to wait for a response from a call @@ -138,6 +137,7 @@ # [*rabbit_port*] # [*rabbit_user*] # (optional) Various rabbitmq settings +# Defaults to $::os_service_default # # [*rabbit_virtual_host*] # (optional) virtualhost to use. @@ -147,11 +147,11 @@ # (optional) array of rabbitmq servers for HA. # A single IP address, such as a VIP, can be used for load-balancing # multiple RabbitMQ Brokers. -# Defaults to false +# Defaults to $::os_service_default # # [*rabbit_ha_queues*] # (Optional) Use HA queues in RabbitMQ. -# Defaults to undef +# Defaults to $::os_service_default # # [*rabbit_heartbeat_timeout_threshold*] # (optional) Number of seconds after which the RabbitMQ broker is considered @@ -159,19 +159,25 @@ # Heartbeating helps to ensure the TCP connection to RabbitMQ isn't silently # closed, resulting in missed or lost messages from the queue. # (Requires kombu >= 3.0.7 and amqp >= 1.4.0) -# Defaults to 0 +# Defaults to $::os_service_default # # [*rabbit_heartbeat_rate*] # (optional) How often during the rabbit_heartbeat_timeout_threshold period to # check the heartbeat on RabbitMQ connection. (i.e. rabbit_heartbeat_rate=2 # when rabbit_heartbeat_timeout_threshold=60, the heartbeat will be checked # every 30 seconds. -# Defaults to 2 +# Defaults to $::os_service_default # # [*rabbit_use_ssl*] # (optional) Connect over SSL for RabbitMQ # Defaults to $::os_service_default # +# [*rabbit_transient_queues_ttl*] +# (optional) Positive integer representing duration in seconds for queue +# TTL (x-expires). Queues which are unused for the duration of the TTL are +# automatically deleted. The parameter affects only reply and fanout queues. +# Defaults to $::os_service_default +# # [*amqp_durable_queues*] # (optional) Define queues as "durable" to rabbitmq. # Defaults to $::os_service_default @@ -192,7 +198,7 @@ # (optional) SSL version to use (valid only if SSL enabled). # Valid values are TLSv1, SSLv23 and SSLv3. SSLv2 may be # available on some distributions. -# Defaults to 'TLSv1' +# Defaults to $::os_service_default # # [*kombu_reconnect_delay*] # (optional) The amount of time to wait before attempting to reconnect @@ -201,6 +207,88 @@ # reconnect. See https://review.openstack.org/#/c/76686 # Defaults to $::os_service_default # +# [*kombu_missing_consumer_retry_timeout*] +# (Optional) How long to wait a missing client beforce abandoning to send it +# its replies. This value should not be longer than rpc_response_timeout. +# (integer value) +# Defaults to $::os_service_default +# +# [*kombu_failover_strategy*] +# (Optional) Determines how the next RabbitMQ node is chosen in case the one +# we are currently connected to becomes unavailable. Takes effect only if +# more than one RabbitMQ node is provided in config. (string value) +# Defaults to $::os_service_default +# +# [*kombu_compression*] +# (optional) Possible values are: gzip, bz2. If not set compression will not +# be used. This option may notbe available in future versions. EXPERIMENTAL. +# (string value) +# Defaults to $::os_service_default +# +# [*amqp_server_request_prefix*] +# (Optional) Address prefix used when sending to a specific server +# Defaults to $::os_service_default. +# +# [*amqp_broadcast_prefix*] +# (Optional) address prefix used when broadcasting to all servers +# Defaults to $::os_service_default. +# +# [*amqp_group_request_prefix*] +# (Optional) address prefix when sending to any server in group +# Defaults to $::os_service_default. +# +# [*amqp_container_name*] +# (Optional) Name for the AMQP container +# Defaults to $::os_service_default. +# +# [*amqp_idle_timeout*] +# (Optional) Timeout for inactive connections +# Defaults to $::os_service_default. +# +# [*amqp_trace*] +# (Optional) Debug: dump AMQP frames to stdout +# Defaults to $::os_service_default. +# +# [*amqp_ssl_ca_file*] +# (Optional) CA certificate PEM file to verify server certificate +# Defaults to $::os_service_default. +# +# [*amqp_ssl_cert_file*] +# (Optional) Identifying certificate PEM file to present to clients +# Defaults to $::os_service_default. +# +# [*amqp_ssl_key_file*] +# (Optional) Private key PEM file used to sign cert_file certificate +# Defaults to $::os_service_default. +# +# [*amqp_ssl_key_password*] +# (Optional) Password for decrypting ssl_key_file (if encrypted) +# Defaults to $::os_service_default. +# +# [*amqp_allow_insecure_clients*] +# (Optional) Accept clients using either SSL or plain TCP +# Defaults to $::os_service_default. +# +# [*amqp_sasl_mechanisms*] +# (Optional) Space separated list of acceptable SASL mechanisms +# Defaults to $::os_service_default. +# +# [*amqp_sasl_config_dir*] +# (Optional) Path to directory that contains the SASL configuration +# Defaults to $::os_service_default. +# +# [*amqp_sasl_config_name*] +# (Optional) Name of configuration file (without .conf suffix) +# Defaults to $::os_service_default. +# +# [*amqp_username*] +# (Optional) User name for message broker authentication +# Defaults to $::os_service_default. +# +# [*amqp_password*] +# (Optional) Password for message broker authentication +# Defaults to $::os_service_default. +# # [*use_ssl*] # (optinal) Enable SSL on the API server # Defaults to $::os_service_default @@ -219,24 +307,25 @@ # # [*use_syslog*] # (optional) Use syslog for logging -# Defaults to $::os_service_default +# Defaults to undef # # [*use_stderr*] # (optional) Use stderr for logging -# Defaults to $::os_service_default -# -# [*log_facility*] -# (optional) Syslog facility to receive log lines -# Defaults to $::os_service_default +# Defaults to undef # # [*log_file*] # (optional) Where to log -# Defaults to false +# Defaults to undef # # [*log_dir*] # (optional) Directory where logs should be stored # If set to boolean false, it will not log to any directory -# Defaults to /var/log/neutron +# Defaults to undef +# +# [*manage_logging*] +# (optional) Whether to manage olso.logging options +# If set to false, neutron::logging class should be evaluated +# Defaults to true. # # [*state_path*] # (optional) Where to store state files. This directory must be writable @@ -248,95 +337,145 @@ # by the user executing the agent # Defaults to: '$state_path/lock' # +# [*purge_config*] +# (optional) Whether to set only the specified config options +# in the neutron config. +# Defaults to false. +# +# [*notification_driver*] +# (optional) Driver or drivers to handle sending notifications. +# Value can be a string or a list. +# Defaults to $::os_service_default. +# +# [*notification_topics*] +# (optional) AMQP topic used for OpenStack notifications +# Defaults to ::os_service_default +# +# [*notification_transport_url*] +# (optional) A URL representing the messaging driver to use for +# notifications and its full configuration. Transport URLs +# take the form: +# transport://user:pass@host1:port[,hostN:portN]/virtual_host +# Defaults to $::os_service_default. +# # DEPRECATED PARAMETERS # -# [*qpid_hostname*] -# [*qpid_port*] -# [*qpid_username*] -# [*qpid_password*] -# [*qpid_heartbeat*] -# [*qpid_protocol*] -# [*qpid_tcp_nodelay*] -# [*qpid_reconnect*] -# [*qpid_reconnect_timeout*] -# [*qpid_reconnect_limit*] -# [*qpid_reconnect_interval*] -# [*qpid_reconnect_interval_min*] -# [*qpid_reconnect_interval_max*] +# [*verbose*] +# (optional) Deprecated. Verbose logging +# Defaults to undef +# +# [*log_facility*] +# (optional) Syslog facility to receive log lines +# Defaults to undef +# +# [*advertise_mtu*] +# (optional) VMs will receive DHCP and RA MTU option when the network's preferred MTU is known +# Defaults to undef +# +# [*allow_sorting*] +# (optional) Enable sorting +# Defaults to undef +# +# [*allow_pagination*] +# (optional) Enable pagination +# Defaults to undef # class neutron ( - $enabled = true, - $package_ensure = 'present', - $verbose = $::os_service_default, - $debug = $::os_service_default, - $bind_host = $::os_service_default, - $bind_port = $::os_service_default, - $core_plugin = 'openvswitch', - $service_plugins = $::os_service_default, - $auth_strategy = 'keystone', - $base_mac = $::os_service_default, - $mac_generation_retries = $::os_service_default, - $dhcp_lease_duration = $::os_service_default, - $dns_domain = $::os_service_default, - $dhcp_agents_per_network = $::os_service_default, - $network_device_mtu = $::os_service_default, - $dhcp_agent_notification = $::os_service_default, - $advertise_mtu = $::os_service_default, - $allow_bulk = $::os_service_default, - $allow_pagination = $::os_service_default, - $allow_sorting = $::os_service_default, - $allow_overlapping_ips = $::os_service_default, - $api_extensions_path = $::os_service_default, - $root_helper = 'sudo neutron-rootwrap /etc/neutron/rootwrap.conf', - $report_interval = $::os_service_default, - $memcache_servers = false, - $control_exchange = 'neutron', - $rpc_backend = 'rabbit', - $rpc_response_timeout = $::os_service_default, - $rabbit_password = false, - $rabbit_host = 'localhost', - $rabbit_hosts = false, - $rabbit_port = 5672, - $rabbit_ha_queues = undef, - $rabbit_user = 'guest', - $rabbit_virtual_host = $::os_service_default, - $rabbit_heartbeat_timeout_threshold = 0, - $rabbit_heartbeat_rate = 2, - $rabbit_use_ssl = $::os_service_default, - $amqp_durable_queues = $::os_service_default, - $kombu_ssl_ca_certs = $::os_service_default, - $kombu_ssl_certfile = $::os_service_default, - $kombu_ssl_keyfile = $::os_service_default, - $kombu_ssl_version = 'TLSv1', - $kombu_reconnect_delay = $::os_service_default, - $use_ssl = $::os_service_default, - $cert_file = $::os_service_default, - $key_file = $::os_service_default, - $ca_file = $::os_service_default, - $use_syslog = $::os_service_default, - $use_stderr = $::os_service_default, - $log_facility = $::os_service_default, - $log_file = false, - $log_dir = '/var/log/neutron', - $state_path = $::os_service_default, - $lock_path = '$state_path/lock', + $enabled = true, + $package_ensure = 'present', + $debug = undef, + $bind_host = $::os_service_default, + $bind_port = $::os_service_default, + $core_plugin = 'openvswitch', + $service_plugins = $::os_service_default, + $auth_strategy = 'keystone', + $base_mac = $::os_service_default, + $mac_generation_retries = $::os_service_default, + $dhcp_lease_duration = $::os_service_default, + $host = $::os_service_default, + $dns_domain = $::os_service_default, + $dhcp_agents_per_network = $::os_service_default, + $global_physnet_mtu = $::os_service_default, + $dhcp_agent_notification = $::os_service_default, + $allow_bulk = $::os_service_default, + $allow_overlapping_ips = $::os_service_default, + $api_extensions_path = $::os_service_default, + $root_helper = 'sudo neutron-rootwrap /etc/neutron/rootwrap.conf', + $root_helper_daemon = $::os_service_default, + $report_interval = $::os_service_default, + $memcache_servers = false, + $control_exchange = 'neutron', + $default_transport_url = $::os_service_default, + $rpc_backend = $::os_service_default, + $rpc_response_timeout = $::os_service_default, + $rabbit_password = $::os_service_default, + $rabbit_host = $::os_service_default, + $rabbit_hosts = $::os_service_default, + $rabbit_port = $::os_service_default, + $rabbit_ha_queues = $::os_service_default, + $rabbit_user = $::os_service_default, + $rabbit_virtual_host = $::os_service_default, + $rabbit_heartbeat_timeout_threshold = $::os_service_default, + $rabbit_heartbeat_rate = $::os_service_default, + $rabbit_use_ssl = $::os_service_default, + $rabbit_transient_queues_ttl = $::os_service_default, + $amqp_durable_queues = $::os_service_default, + $kombu_ssl_ca_certs = $::os_service_default, + $kombu_ssl_certfile = $::os_service_default, + $kombu_ssl_keyfile = $::os_service_default, + $kombu_ssl_version = $::os_service_default, + $kombu_reconnect_delay = $::os_service_default, + $kombu_missing_consumer_retry_timeout = $::os_service_default, + $kombu_failover_strategy = $::os_service_default, + $kombu_compression = $::os_service_default, + $amqp_server_request_prefix = $::os_service_default, + $amqp_broadcast_prefix = $::os_service_default, + $amqp_group_request_prefix = $::os_service_default, + $amqp_container_name = $::os_service_default, + $amqp_idle_timeout = $::os_service_default, + $amqp_trace = $::os_service_default, + $amqp_ssl_ca_file = $::os_service_default, + $amqp_ssl_cert_file = $::os_service_default, + $amqp_ssl_key_file = $::os_service_default, + $amqp_ssl_key_password = $::os_service_default, + $amqp_allow_insecure_clients = $::os_service_default, + $amqp_sasl_mechanisms = $::os_service_default, + $amqp_sasl_config_dir = $::os_service_default, + $amqp_sasl_config_name = $::os_service_default, + $amqp_username = $::os_service_default, + $amqp_password = $::os_service_default, + $use_ssl = $::os_service_default, + $cert_file = $::os_service_default, + $key_file = $::os_service_default, + $ca_file = $::os_service_default, + $use_syslog = undef, + $use_stderr = undef, + $log_file = undef, + $log_dir = undef, + $manage_logging = true, + $state_path = $::os_service_default, + $lock_path = '$state_path/lock', + $purge_config = false, + $notification_driver = $::os_service_default, + $notification_topics = $::os_service_default, + $notification_transport_url = $::os_service_default, # DEPRECATED PARAMETERS - $qpid_hostname = undef, - $qpid_port = undef, - $qpid_username = undef, - $qpid_password = undef, - $qpid_heartbeat = undef, - $qpid_protocol = undef, - $qpid_tcp_nodelay = undef, - $qpid_reconnect = undef, - $qpid_reconnect_timeout = undef, - $qpid_reconnect_limit = undef, - $qpid_reconnect_interval_min = undef, - $qpid_reconnect_interval_max = undef, - $qpid_reconnect_interval = undef, + $verbose = undef, + $log_facility = undef, + $advertise_mtu = undef, + $allow_pagination = undef, + $allow_sorting = undef, ) { + include ::neutron::deps include ::neutron::params + if $manage_logging { + include ::neutron::logging + } + + if $verbose { + warning('verbose is deprecated, has no effect and will be removed after Newton cycle.') + } if ! is_service_default($use_ssl) and ($use_ssl) { if is_service_default($cert_file) { @@ -353,20 +492,30 @@ } } - if ! is_service_default($rabbit_use_ssl) and !($rabbit_use_ssl) { - if ! is_service_default($kombu_ssl_ca_certs) and ($kombu_ssl_ca_certs) { - fail('The kombu_ssl_ca_certs parameter requires rabbit_use_ssl to be set to true') - } - if ! is_service_default($kombu_ssl_certfile) and ($kombu_ssl_certfile) { - fail('The kombu_ssl_certfile parameter requires rabbit_use_ssl to be set to true') - } - if ! is_service_default($kombu_ssl_keyfile) and ($kombu_ssl_keyfile) { - fail('The kombu_ssl_keyfile parameter requires rabbit_use_ssl to be set to true') - } - } - if (is_service_default($kombu_ssl_certfile) and ! is_service_default($kombu_ssl_keyfile)) or (is_service_default($kombu_ssl_keyfile) and ! is_service_default($kombu_ssl_certfile)) { + if (is_service_default($kombu_ssl_certfile) and ! is_service_default($kombu_ssl_keyfile)) + or (is_service_default($kombu_ssl_keyfile) and ! is_service_default($kombu_ssl_certfile)) { fail('The kombu_ssl_certfile and kombu_ssl_keyfile parameters must be used together') } + if ! is_service_default($kombu_missing_consumer_retry_timeout) and ! is_service_default($rpc_response_timeout) + and ($kombu_missing_consumer_retry_timeout > $rpc_response_timeout) { + warning('kombu_missing_consumer_retry_timeout should not be longer than rpc_response_timeout') + } + + if $log_facility { + warning('log_facility is deprecated, has no effect and will be removed after Newton cycle.') + } + + if $advertise_mtu { + warning('advertise_mtu is deprecated, has no effect and will be removed in Ocata.') + } + + if $allow_sorting { + warning('allow_sorting is deprecated, has no effect and will be removed in a future release.') + } + + if $allow_pagination { + warning('allow_pagination is deprecated, has no effect and will be removed in a future release.') + } if $memcache_servers { validate_array($memcache_servers) @@ -378,15 +527,11 @@ tag => ['openstack', 'neutron-package'], } - # Make sure all services get restarted if neutron-common package is upgraded - Package['neutron'] ~> Service<| tag == 'neutron-service' |> + resources { 'neutron_config': + purge => $purge_config, + } neutron_config { - 'DEFAULT/verbose': value => $verbose; - 'DEFAULT/debug': value => $debug; - 'DEFAULT/use_stderr': value => $use_stderr; - 'DEFAULT/use_syslog': value => $use_syslog; - 'DEFAULT/syslog_log_facility': value => $log_facility; 'DEFAULT/bind_host': value => $bind_host; 'DEFAULT/bind_port': value => $bind_port; 'DEFAULT/auth_strategy': value => $auth_strategy; @@ -394,42 +539,32 @@ 'DEFAULT/base_mac': value => $base_mac; 'DEFAULT/mac_generation_retries': value => $mac_generation_retries; 'DEFAULT/dhcp_lease_duration': value => $dhcp_lease_duration; + 'DEFAULT/host': value => $host; 'DEFAULT/dns_domain': value => $dns_domain; 'DEFAULT/dhcp_agents_per_network': value => $dhcp_agents_per_network; 'DEFAULT/dhcp_agent_notification': value => $dhcp_agent_notification; - 'DEFAULT/advertise_mtu': value => $advertise_mtu; 'DEFAULT/allow_bulk': value => $allow_bulk; - 'DEFAULT/allow_pagination': value => $allow_pagination; - 'DEFAULT/allow_sorting': value => $allow_sorting; 'DEFAULT/allow_overlapping_ips': value => $allow_overlapping_ips; - 'DEFAULT/control_exchange': value => $control_exchange; - 'DEFAULT/rpc_backend': value => $rpc_backend; 'DEFAULT/api_extensions_path': value => $api_extensions_path; 'DEFAULT/state_path': value => $state_path; - 'DEFAULT/rpc_response_timeout': value => $rpc_response_timeout; - 'DEFAULT/network_device_mtu': value => $network_device_mtu; - 'oslo_concurrency/lock_path': value => $lock_path; + 'DEFAULT/global_physnet_mtu': value => $global_physnet_mtu; 'agent/root_helper': value => $root_helper; + 'agent/root_helper_daemon': value => $root_helper_daemon; 'agent/report_interval': value => $report_interval; } - if $log_file { - neutron_config { - 'DEFAULT/log_file': value => $log_file; - 'DEFAULT/log_dir': value => $log_dir; - } - } else { - if $log_dir { - neutron_config { - 'DEFAULT/log_dir': value => $log_dir; - 'DEFAULT/log_file': ensure => absent; - } - } else { - neutron_config { - 'DEFAULT/log_dir': ensure => absent; - 'DEFAULT/log_file': ensure => absent; - } - } + oslo::messaging::default { 'neutron_config': + transport_url => $default_transport_url, + rpc_response_timeout => $rpc_response_timeout, + control_exchange => $control_exchange + } + + oslo::concurrency { 'neutron_config': lock_path => $lock_path } + + oslo::messaging::notifications { 'neutron_config': + driver => $notification_driver, + topics => $notification_topics, + transport_url => $notification_transport_url, } if ! is_service_default ($service_plugins) and ($service_plugins) { @@ -451,60 +586,56 @@ } - if $rpc_backend == 'rabbit' or $rpc_backend == 'neutron.openstack.common.rpc.impl_kombu' { - if ! $rabbit_password { + if $rpc_backend in [$::os_service_default, 'neutron.openstack.common.rpc.impl_kombu', 'rabbit'] { + if is_service_default($rabbit_password) { fail('When rpc_backend is rabbitmq, you must set rabbit password') } - if $rabbit_hosts { - neutron_config { 'oslo_messaging_rabbit/rabbit_hosts': value => join($rabbit_hosts, ',') } - } else { - neutron_config { 'oslo_messaging_rabbit/rabbit_host': value => $rabbit_host } - neutron_config { 'oslo_messaging_rabbit/rabbit_port': value => $rabbit_port } - neutron_config { 'oslo_messaging_rabbit/rabbit_hosts': value => "${rabbit_host}:${rabbit_port}" } - } - if $rabbit_ha_queues == undef { - if $rabbit_hosts { - neutron_config { 'oslo_messaging_rabbit/rabbit_ha_queues': value => true } - } else { - neutron_config { 'oslo_messaging_rabbit/rabbit_ha_queues': value => false } - } - } else { - neutron_config { 'oslo_messaging_rabbit/rabbit_ha_queues': value => $rabbit_ha_queues } + oslo::messaging::rabbit {'neutron_config': + rabbit_userid => $rabbit_user, + rabbit_password => $rabbit_password, + rabbit_virtual_host => $rabbit_virtual_host, + heartbeat_timeout_threshold => $rabbit_heartbeat_timeout_threshold, + heartbeat_rate => $rabbit_heartbeat_rate, + rabbit_use_ssl => $rabbit_use_ssl, + rabbit_transient_queues_ttl => $rabbit_transient_queues_ttl, + kombu_reconnect_delay => $kombu_reconnect_delay, + kombu_missing_consumer_retry_timeout => $kombu_missing_consumer_retry_timeout, + kombu_failover_strategy => $kombu_failover_strategy, + kombu_compression => $kombu_compression, + kombu_ssl_ca_certs => $kombu_ssl_ca_certs, + kombu_ssl_certfile => $kombu_ssl_certfile, + kombu_ssl_keyfile => $kombu_ssl_keyfile, + amqp_durable_queues => $amqp_durable_queues, + rabbit_hosts => $rabbit_hosts, + rabbit_ha_queues => $rabbit_ha_queues, + rabbit_host => $rabbit_host, + rabbit_port => $rabbit_port, + kombu_ssl_version => $kombu_ssl_version, + } + } elsif $rpc_backend == 'amqp' { + oslo::messaging::amqp { 'neutron_config': + server_request_prefix => $amqp_server_request_prefix, + broadcast_prefix => $amqp_broadcast_prefix, + group_request_prefix => $amqp_group_request_prefix, + container_name => $amqp_container_name, + idle_timeout => $amqp_idle_timeout, + trace => $amqp_trace, + ssl_ca_file => $amqp_ssl_ca_file, + ssl_cert_file => $amqp_ssl_cert_file, + ssl_key_file => $amqp_ssl_key_file, + ssl_key_password => $amqp_ssl_key_password, + allow_insecure_clients => $amqp_allow_insecure_clients, + sasl_mechanisms => $amqp_sasl_mechanisms, + sasl_config_dir => $amqp_sasl_config_dir, + sasl_config_name => $amqp_sasl_config_name, + username => $amqp_username, + password => $amqp_password, } - + } else { neutron_config { - 'oslo_messaging_rabbit/rabbit_userid': value => $rabbit_user; - 'oslo_messaging_rabbit/rabbit_password': value => $rabbit_password, secret => true; - 'oslo_messaging_rabbit/rabbit_virtual_host': value => $rabbit_virtual_host; - 'oslo_messaging_rabbit/heartbeat_timeout_threshold': value => $rabbit_heartbeat_timeout_threshold; - 'oslo_messaging_rabbit/heartbeat_rate': value => $rabbit_heartbeat_rate; - 'oslo_messaging_rabbit/rabbit_use_ssl': value => $rabbit_use_ssl; - 'oslo_messaging_rabbit/kombu_reconnect_delay': value => $kombu_reconnect_delay; - 'oslo_messaging_rabbit/kombu_ssl_ca_certs': value => $kombu_ssl_ca_certs; - 'oslo_messaging_rabbit/kombu_ssl_certfile': value => $kombu_ssl_certfile; - 'oslo_messaging_rabbit/kombu_ssl_keyfile': value => $kombu_ssl_keyfile; - 'oslo_messaging_rabbit/amqp_durable_queues': value => $amqp_durable_queues; + 'DEFAULT/rpc_backend': value => $rpc_backend; } - - if ! is_service_default($rabbit_use_ssl) and ($rabbit_use_ssl) { - - if $kombu_ssl_version { - neutron_config { 'oslo_messaging_rabbit/kombu_ssl_version': value => $kombu_ssl_version; } - } else { - neutron_config { 'oslo_messaging_rabbit/kombu_ssl_version': ensure => absent; } - } - - } else { - neutron_config { - 'oslo_messaging_rabbit/kombu_ssl_version': ensure => absent; - } - } - - } - - if $rpc_backend == 'qpid' or $rpc_backend == 'neutron.openstack.common.rpc.impl_qpid' { - warning('Qpid driver is removed from Oslo.messaging in the Mitaka release') } # SSL Options diff -Nru puppet-module-neutron-8.0.0/manifests/keystone/auth.pp puppet-module-neutron-9.4.0/manifests/keystone/auth.pp --- puppet-module-neutron-8.0.0/manifests/keystone/auth.pp 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/manifests/keystone/auth.pp 2016-09-26 21:11:55.000000000 +0000 @@ -27,7 +27,7 @@ # Defaults to 'true'. # # [*service_name*] -# Name of the service. Defaults to the value of auth_name. +# Name of the service. Defaults 'neutron'. # # [*service_type*] # Type of service. Defaults to 'network'. @@ -51,51 +51,6 @@ # (optional) The endpoint's internal url. (Defaults to 'http://127.0.0.1:9696') # This url should *not* contain any trailing '/'. # -# [*port*] -# (optional) DEPRECATED: Use public_url, internal_url and admin_url instead. -# Default port for endpoints. (Defaults to 9696) -# Setting this parameter overrides public_url, internal_url and admin_url parameters. -# -# [*public_port*] -# (optional) DEPRECATED: Use public_url instead. -# Default port for endpoints. (Defaults to 9696) -# Setting this parameter overrides public_url parameter. -# -# [*public_protocol*] -# (optional) DEPRECATED: Use public_url instead. -# Protocol for public endpoint. (Defaults to 'http') -# Setting this parameter overrides public_url parameter. -# -# [*public_address*] -# (optional) DEPRECATED: Use public_url instead. -# Public address for endpoint. (Defaults to '127.0.0.1') -# Setting this parameter overrides public_url parameter. -# -# [*internal_protocol*] -# (optional) DEPRECATED: Use internal_url instead. -# Protocol for internal endpoint. (Defaults to 'http') -# Setting this parameter overrides internal_url parameter. -# -# [*internal_address*] -# (optional) DEPRECATED: Use internal_url instead. -# Internal address for endpoint. (Defaults to '127.0.0.1') -# Setting this parameter overrides internal_url parameter. -# -# [*admin_protocol*] -# (optional) DEPRECATED: Use admin_url instead. -# Protocol for admin endpoint. (Defaults to 'http') -# Setting this parameter overrides admin_url parameter. -# -# [*admin_address*] -# (optional) DEPRECATED: Use admin_url instead. -# Admin address for endpoint. (Defaults to '127.0.0.1') -# Setting this parameter overrides admin_url parameter. -# -# === Deprecation notes -# -# If any value is provided for public_protocol, public_address or port parameters, -# public_url will be completely ignored. The same applies for internal and admin parameters. -# # === Examples # # class { 'neutron::keystone::auth': @@ -113,103 +68,40 @@ $configure_endpoint = true, $configure_user = true, $configure_user_role = true, - $service_name = undef, + $service_name = 'neutron', $service_type = 'network', $service_description = 'Neutron Networking Service', $region = 'RegionOne', $public_url = 'http://127.0.0.1:9696', $admin_url = 'http://127.0.0.1:9696', $internal_url = 'http://127.0.0.1:9696', - # DEPRECATED PARAMETERS - $port = undef, - $public_protocol = undef, - $public_address = undef, - $public_port = undef, - $internal_protocol = undef, - $internal_address = undef, - $admin_protocol = undef, - $admin_address = undef, ) { - if $port { - warning('The port parameter is deprecated, use public_url, internal_url and admin_url instead.') - } - - if $public_protocol { - warning('The public_protocol parameter is deprecated, use public_url instead.') - } - - if $internal_protocol { - warning('The internal_protocol parameter is deprecated, use internal_url instead.') - } - - if $admin_protocol { - warning('The admin_protocol parameter is deprecated, use admin_url instead.') - } - - if $public_address { - warning('The public_address parameter is deprecated, use public_url instead.') - } - - if $internal_address { - warning('The internal_address parameter is deprecated, use internal_url instead.') - } - - if $admin_address { - warning('The admin_address parameter is deprecated, use admin_url instead.') - } - - if ($public_protocol or $public_address or $port or $public_port) { - $public_url_real = sprintf('%s://%s:%s', - pick($public_protocol, 'http'), - pick($public_address, '127.0.0.1'), - pick($public_port, $port, '9696')) - } else { - $public_url_real = $public_url - } - - if ($admin_protocol or $admin_address or $port) { - $admin_url_real = sprintf('%s://%s:%s', - pick($admin_protocol, 'http'), - pick($admin_address, '127.0.0.1'), - pick($port, '9696')) - } else { - $admin_url_real = $admin_url - } - - if ($internal_protocol or $internal_address or $port) { - $internal_url_real = sprintf('%s://%s:%s', - pick($internal_protocol, 'http'), - pick($internal_address, '127.0.0.1'), - pick($port, '9696')) - } else { - $internal_url_real = $internal_url - } - - $real_service_name = pick($service_name, $auth_name) + include ::neutron::deps if $configure_endpoint { - Keystone_endpoint["${region}/${real_service_name}::${service_type}"] ~> Service <| title == 'neutron-server' |> + Keystone_endpoint["${region}/${service_name}::${service_type}"] ~> Service <| title == 'neutron-server' |> } if $configure_user_role { Keystone_user_role["${auth_name}@${tenant}"] ~> Service <| title == 'neutron-server' |> } - keystone::resource::service_identity { $auth_name: + keystone::resource::service_identity { 'neutron': configure_user => $configure_user, configure_user_role => $configure_user_role, configure_endpoint => $configure_endpoint, service_type => $service_type, service_description => $service_description, - service_name => $real_service_name, + service_name => $service_name, + auth_name => $auth_name, region => $region, password => $password, email => $email, tenant => $tenant, - public_url => $public_url_real, - admin_url => $admin_url_real, - internal_url => $internal_url_real, + public_url => $public_url, + admin_url => $admin_url, + internal_url => $internal_url, } } diff -Nru puppet-module-neutron-8.0.0/manifests/keystone/authtoken.pp puppet-module-neutron-9.4.0/manifests/keystone/authtoken.pp --- puppet-module-neutron-8.0.0/manifests/keystone/authtoken.pp 1970-01-01 00:00:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/manifests/keystone/authtoken.pp 2016-09-26 21:11:55.000000000 +0000 @@ -0,0 +1,279 @@ +# class: neutron::keystone::authtoken +# +# Configure the keystone_authtoken section in the configuration file +# +# === Parameters +# +# [*username*] +# (Optional) The name of the service user +# Defaults to 'neutron' +# +# [*password*] +# (Optional) Password to create for the service user +# Defaults to $::os_service_default +# +# [*auth_url*] +# (Optional) The URL to use for authentication. +# Defaults to 'http://localhost:35357'. +# +# [*project_name*] +# (Optional) Service project name +# Defaults to 'services' +# +# [*user_domain_name*] +# (Optional) Name of domain for $username +# Defaults to 'Default' +# +# [*project_domain_name*] +# (Optional) Name of domain for $project_name +# Defaults to 'Default' +# +# [*insecure*] +# (Optional) If true, explicitly allow TLS without checking server cert +# against any certificate authorities. WARNING: not recommended. Use with +# caution. +# Defaults to $:os_service_default +# +# [*auth_section*] +# (Optional) Config Section from which to load plugin specific options +# Defaults to $::os_service_default. +# +# [*auth_type*] +# (Optional) Authentication type to load +# Defaults to $::os_service_default +# +# [*auth_uri*] +# (Optional) Complete public Identity API endpoint. +# Defaults to 'http://localhost:5000'. +# +# [*auth_version*] +# (Optional) API version of the admin Identity API endpoint. +# Defaults to $::os_service_default. +# +# [*cache*] +# (Optional) Env key for the swift cache. +# Defaults to $::os_service_default. +# +# [*cafile*] +# (Optional) A PEM encoded Certificate Authority to use when verifying HTTPs +# connections. +# Defaults to $::os_service_default. +# +# [*certfile*] +# (Optional) Required if identity server requires client certificate +# Defaults to $::os_service_default. +# +# [*check_revocations_for_cached*] +# (Optional) If true, the revocation list will be checked for cached tokens. +# This requires that PKI tokens are configured on the identity server. +# boolean value. +# Defaults to $::os_service_default. +# +# [*delay_auth_decision*] +# (Optional) Do not handle authorization requests within the middleware, but +# delegate the authorization decision to downstream WSGI components. Boolean +# value +# Defaults to $::os_service_default. +# +# [*enforce_token_bind*] +# (Optional) Used to control the use and type of token binding. Can be set +# to: "disabled" to not check token binding. "permissive" (default) to +# validate binding information if the bind type is of a form known to the +# server and ignore it if not. "strict" like "permissive" but if the bind +# type is unknown the token will be rejected. "required" any form of token +# binding is needed to be allowed. Finally the name of a binding method that +# must be present in tokens. String value. +# Defaults to $::os_service_default. +# +# [*hash_algorithms*] +# (Optional) Hash algorithms to use for hashing PKI tokens. This may be a +# single algorithm or multiple. The algorithms are those supported by Python +# standard hashlib.new(). The hashes will be tried in the order given, so put +# the preferred one first for performance. The result of the first hash will +# be stored in the cache. This will typically be set to multiple values only +# while migrating from a less secure algorithm to a more secure one. Once all +# the old tokens are expired this option should be set to a single value for +# better performance. List value. +# Defaults to $::os_service_default. +# +# [*http_connect_timeout*] +# (Optional) Request timeout value for communicating with Identity API +# server. +# Defaults to $::os_service_default. +# +# [*http_request_max_retries*] +# (Optional) How many times are we trying to reconnect when communicating +# with Identity API Server. Integer value +# Defaults to $::os_service_default. +# +# [*include_service_catalog*] +# (Optional) Indicate whether to set the X-Service-Catalog header. If False, +# middleware will not ask for service catalog on token validation and will +# not set the X-Service-Catalog header. Boolean value. +# Defaults to $::os_service_default. +# +# [*keyfile*] +# (Optional) Required if identity server requires client certificate +# Defaults to $::os_service_default. +# +# [*memcache_pool_conn_get_timeout*] +# (Optional) Number of seconds that an operation will wait to get a memcached +# client connection from the pool. Integer value +# Defaults to $::os_service_default. +# +# [*memcache_pool_dead_retry*] +# (Optional) Number of seconds memcached server is considered dead before it +# is tried again. Integer value +# Defaults to $::os_service_default. +# +# [*memcache_pool_maxsize*] +# (Optional) Maximum total number of open connections to every memcached +# server. Integer value +# Defaults to $::os_service_default. +# +# [*memcache_pool_socket_timeout*] +# (Optional) Number of seconds a connection to memcached is held unused in +# the pool before it is closed. Integer value +# Defaults to $::os_service_default. +# +# [*memcache_pool_unused_timeout*] +# (Optional) Number of seconds a connection to memcached is held unused in +# the pool before it is closed. Integer value +# Defaults to $::os_service_default. +# +# [*memcache_secret_key*] +# (Optional, mandatory if memcache_security_strategy is defined) This string +# is used for key derivation. +# Defaults to $::os_service_default. +# +# [*memcache_security_strategy*] +# (Optional) If defined, indicate whether token data should be authenticated +# or authenticated and encrypted. If MAC, token data is authenticated (with +# HMAC) in the cache. If ENCRYPT, token data is encrypted and authenticated in the +# cache. If the value is not one of these options or empty, auth_token will +# raise an exception on initialization. +# Defaults to $::os_service_default. +# +# [*memcache_use_advanced_pool*] +# (Optional) Use the advanced (eventlet safe) memcached client pool. The +# advanced pool will only work under python 2.x Boolean value +# Defaults to $::os_service_default. +# +# [*memcached_servers*] +# (Optional) Optionally specify a list of memcached server(s) to use for +# caching. If left undefined, tokens will instead be cached in-process. +# Defaults to $::os_service_default. +# +# [*region_name*] +# (Optional) The region in which the identity server can be found. +# Defaults to $::os_service_default. +# +# [*revocation_cache_time*] +# (Optional) Determines the frequency at which the list of revoked tokens is +# retrieved from the Identity service (in seconds). A high number of +# revocation events combined with a low cache duration may significantly +# reduce performance. Only valid for PKI tokens. Integer value +# Defaults to $::os_service_default. +# +# [*signing_dir*] +# (Optional) Directory used to cache files related to PKI tokens. +# Defaults to $::os_service_default. +# +# [*token_cache_time*] +# (Optional) In order to prevent excessive effort spent validating tokens, +# the middleware caches previously-seen tokens for a configurable duration +# (in seconds). Set to -1 to disable caching completely. Integer value +# Defaults to $::os_service_default. +# +class neutron::keystone::authtoken( + $username = 'neutron', + $password = $::os_service_default, + $auth_url = 'http://localhost:35357', + $project_name = 'services', + $user_domain_name = 'Default', + $project_domain_name = 'Default', + $insecure = $::os_service_default, + $auth_section = $::os_service_default, + $auth_type = 'password', + $auth_uri = 'http://localhost:5000', + $auth_version = $::os_service_default, + $cache = $::os_service_default, + $cafile = $::os_service_default, + $certfile = $::os_service_default, + $check_revocations_for_cached = $::os_service_default, + $delay_auth_decision = $::os_service_default, + $enforce_token_bind = $::os_service_default, + $hash_algorithms = $::os_service_default, + $http_connect_timeout = $::os_service_default, + $http_request_max_retries = $::os_service_default, + $include_service_catalog = $::os_service_default, + $keyfile = $::os_service_default, + $memcache_pool_conn_get_timeout = $::os_service_default, + $memcache_pool_dead_retry = $::os_service_default, + $memcache_pool_maxsize = $::os_service_default, + $memcache_pool_socket_timeout = $::os_service_default, + $memcache_pool_unused_timeout = $::os_service_default, + $memcache_secret_key = $::os_service_default, + $memcache_security_strategy = $::os_service_default, + $memcache_use_advanced_pool = $::os_service_default, + $memcached_servers = $::os_service_default, + $region_name = $::os_service_default, + $revocation_cache_time = $::os_service_default, + $signing_dir = $::os_service_default, + $token_cache_time = $::os_service_default, +) { + + if is_service_default($password) and ! $::neutron::server::password { + fail('Please set password for neutron service user') + } + + $auth_uri_real = pick($::neutron::server::auth_uri,$auth_uri) + $auth_url_real = pick($::neutron::server::auth_url,$auth_url) + $auth_type_real = pick($::neutron::server::keystone_auth_type,$auth_type) + $memcached_servers_real = pick($::neutron::server::memcached_servers,$memcached_servers) + $password_real = pick($::neutron::server::password,$password) + $project_domain_name_real = pick($::neutron::server::project_domain_name,$project_domain_name) + $project_name_real = pick($::neutron::server::project_name,$project_name) + $region_name_real = pick($::neutron::server::region_name,$region_name) + $username_real = pick($::neutron::server::username,$username) + $user_domain_name_real = pick($::neutron::server::user_domain_name,$user_domain_name) + + keystone::resource::authtoken { 'neutron_config': + username => $username_real, + password => $password_real, + project_name => $project_name_real, + auth_url => $auth_url_real, + auth_uri => $auth_uri_real, + auth_version => $auth_version, + auth_type => $auth_type_real, + auth_section => $auth_section, + user_domain_name => $user_domain_name_real, + project_domain_name => $project_domain_name_real, + insecure => $insecure, + cache => $cache, + cafile => $cafile, + certfile => $certfile, + check_revocations_for_cached => $check_revocations_for_cached, + delay_auth_decision => $delay_auth_decision, + enforce_token_bind => $enforce_token_bind, + hash_algorithms => $hash_algorithms, + http_connect_timeout => $http_connect_timeout, + http_request_max_retries => $http_request_max_retries, + include_service_catalog => $include_service_catalog, + keyfile => $keyfile, + memcache_pool_conn_get_timeout => $memcache_pool_conn_get_timeout, + memcache_pool_dead_retry => $memcache_pool_dead_retry, + memcache_pool_maxsize => $memcache_pool_maxsize, + memcache_pool_socket_timeout => $memcache_pool_socket_timeout, + memcache_secret_key => $memcache_secret_key, + memcache_security_strategy => $memcache_security_strategy, + memcache_use_advanced_pool => $memcache_use_advanced_pool, + memcache_pool_unused_timeout => $memcache_pool_unused_timeout, + memcached_servers => $memcached_servers_real, + region_name => $region_name_real, + revocation_cache_time => $revocation_cache_time, + signing_dir => $signing_dir, + token_cache_time => $token_cache_time, + } +} + diff -Nru puppet-module-neutron-8.0.0/manifests/logging.pp puppet-module-neutron-9.4.0/manifests/logging.pp --- puppet-module-neutron-8.0.0/manifests/logging.pp 1970-01-01 00:00:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/manifests/logging.pp 2016-09-26 21:11:55.000000000 +0000 @@ -0,0 +1,173 @@ +# == Class: neutron::logging +# +# Neutron logging configuration +# +# === Parameters: +# +# [*debug*] +# (optional) Print debug messages in the logs +# Defaults to $::os_service_default +# +# [*use_syslog*] +# (optional) Use syslog for logging +# Defaults to $::os_service_default +# +# [*use_stderr*] +# (optional) Use stderr for logging +# Defaults to $::os_service_default +# +# [*log_file*] +# (optional) Where to log +# Defaults to $::os_service_default +# +# [*log_dir*] +# (optional) Directory where logs should be stored +# If set to boolean false, it will not log to any directory +# Defaults to /var/log/neutron +# +# [*log_config_append*] +# The name of an additional logging configuration file. +# Defaults to $::os_service_default +# See https://docs.python.org/2/howto/logging.html +# +# [*log_date_format*] +# (Optional) Format string for %%(asctime)s in log records. +# Defaults to $::os_service_default +# Example: 'Y-%m-%d %H:%M:%S' +# +# [*watch_log_file*] +# (Optional) Uses logging handler designed to watch file system (boolean value). +# Defaults to $::os_service_default +# +# [*syslog_log_facility*] +# (Optional) Syslog facility to receive log lines. +# This option is ignored if log_config_append is set. +# Defaults to $::os_service_default +# +# [*logging_context_format_string*] +# (Optional) Format string to use for log messages with context. +# Defaults to $::os_service_default +# Example: '%(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s \ +# [%(request_id)s %(user_identity)s] %(instance)s%(message)s' +# +# [*logging_default_format_string*] +# (Optional) Format string to use for log messages when context is undefined. +# Defaults to $::os_service_default +# Example: '%(asctime)s.%(msecs)03d %(process)d %(levelname)s \ +# %(name)s [-] %(instance)s%(message)s' +# +# [*logging_debug_format_suffix*] +# (Optional) Additional data to append to log message when logging level for the message is DEBUG' +# Defaults to $::os_service_default +# Example: '%(funcName)s %(pathname)s:%(lineno)d' +# +# [*logging_exception_prefix*] +# (Optional) Prefix each line of exception output with this format. +# Defaults to $::os_service_default +# Example: '%(asctime)s.%(msecs)03d %(process)d ERROR %(name)s %(instance)s' +# +# [*logging_user_identity_format*] +# (Optional) Defines the format string for %(user_identity)s that is used in logging_context_format_string. +# Defaults to $::os_service_default +# Example: '%(user)s %(tenant)s %(domain)s %(user_domain)s %(project_domain)s' +# +# [*default_log_levels*] +# (Optional) Hash of logger (keys) and level (values) pairs. +# Defaults to $::os_service_default +# Example: +# { 'amqp' => 'WARN', 'amqplib' => 'WARN', 'boto' => 'WARN', +# 'sqlalchemy' => 'WARN', 'suds' => 'INFO', 'iso8601' => 'WARN', +# 'requests.packages.urllib3.connectionpool' => 'WARN' } +# +# [*publish_errors*] +# (Optional) Enables or disables publication of error events (boolean value). +# Defaults to $::os_service_default +# +# [*instance_format*] +# (Optional) The format for an instance that is passed with the log message. +# Defaults to $::os_service_default +# Example: '[instance: %(uuid)s] ' +# +# [*instance_uuid_format*] +# (Optional) The format for an instance UUID that is passed with the log message. +# Defaults to $::os_service_default +# Example: '[instance: %(uuid)s] ' +# +# [*fatal_deprecations*] +# (Optional) Enables or disables fatal status of deprecations (boolean value). +# Defaults to $::os_service_default +# +# DEPRECATED PARAMETERS +# +# [*verbose*] +# (optional) Deprecated. Verbose logging +# Defaults to undef +# +# [*log_facility*] +# (optional) Syslog facility to receive log lines +# Defaults to undef +# +class neutron::logging ( + $debug = $::os_service_default, + $use_syslog = $::os_service_default, + $use_stderr = $::os_service_default, + $log_file = $::os_service_default, + $log_dir = '/var/log/neutron', + $log_config_append = $::os_service_default, + $log_date_format = $::os_service_default, + $watch_log_file = $::os_service_default, + $syslog_log_facility = $::os_service_default, + $logging_context_format_string = $::os_service_default, + $logging_default_format_string = $::os_service_default, + $logging_debug_format_suffix = $::os_service_default, + $logging_exception_prefix = $::os_service_default, + $logging_user_identity_format = $::os_service_default, + $default_log_levels = $::os_service_default, + $publish_errors = $::os_service_default, + $instance_format = $::os_service_default, + $instance_uuid_format = $::os_service_default, + $fatal_deprecations = $::os_service_default, + # Deprecated + $verbose = undef, + $log_facility = undef, +) { + + include ::neutron::deps + + $debug_real = pick($::neutron::debug,$debug) + $use_syslog_real = pick($::neutron::use_syslog,$use_syslog) + $use_stderr_real = pick($::neutron::use_stderr,$use_stderr) + $log_file_real = pick($::neutron::log_file,$log_file) + $log_dir_real = pick($::neutron::log_dir,$log_dir) + + if $verbose { + warning('verbose is deprecated, has no effect and will be removed after Newton cycle.') + } + + if $log_facility { + warning('log_facility is deprecated, has no effect and will be removed after Newton cycle. Please use syslog_log_facility instead.') + } + + oslo::log { 'neutron_config': + debug => $debug_real, + use_stderr => $use_stderr_real, + use_syslog => $use_syslog_real, + syslog_log_facility => $syslog_log_facility, + log_file => $log_file_real, + log_dir => $log_dir_real, + log_config_append => $log_config_append, + log_date_format => $log_date_format, + watch_log_file => $watch_log_file, + logging_context_format_string => $logging_context_format_string, + logging_default_format_string => $logging_default_format_string, + logging_debug_format_suffix => $logging_debug_format_suffix, + logging_exception_prefix => $logging_exception_prefix, + logging_user_identity_format => $logging_user_identity_format, + default_log_levels => $default_log_levels, + publish_errors => $publish_errors, + instance_format => $instance_format, + instance_uuid_format => $instance_uuid_format, + fatal_deprecations => $fatal_deprecations, + } + +} diff -Nru puppet-module-neutron-8.0.0/manifests/params.pp puppet-module-neutron-9.4.0/manifests/params.pp --- puppet-module-neutron-8.0.0/manifests/params.pp 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/manifests/params.pp 2016-09-26 21:11:55.000000000 +0000 @@ -1,5 +1,6 @@ # class neutron::params { + include ::openstacklib::defaults if($::osfamily == 'Redhat') { $nobody_user_group = 'nobody' @@ -39,9 +40,11 @@ $opencontrail_plugin_package = 'neutron-plugin-contrail' $opencontrail_config_file = '/etc/neutron/plugins/opencontrail/ContrailPlugin.ini' - $midonet_server_package = 'python-neutron-plugin-midonet' + $midonet_server_package = 'python-networking-midonet' $midonet_config_file = '/etc/neutron/plugins/midonet/midonet.ini' + $ovn_plugin_package = 'python-networking-ovn' + $plumgrid_plugin_package = 'networking-plumgrid' $plumgrid_pythonlib_package = 'plumgrid-pythonlib' $plumgrid_config_file = '/etc/neutron/plugins/plumgrid/plumgrid.ini' @@ -55,8 +58,8 @@ $dnsmasq_packages = ['dnsmasq', 'dnsmasq-utils'] - $lbaas_agent_package = 'openstack-neutron-lbaas' - $lbaas_agent_service = 'neutron-lbaas-agent' + $lbaasv2_agent_package = 'openstack-neutron-lbaas' + $lbaasv2_agent_service = 'neutron-lbaasv2-agent' $haproxy_package = 'haproxy' @@ -83,9 +86,6 @@ $kernel_headers = "linux-headers-${::kernelrelease}" - $sqlite_package_name = undef - $pymysql_package_name = undef - } elsif($::osfamily == 'Debian') { $nobody_user_group = 'nogroup' @@ -124,9 +124,11 @@ $opencontrail_plugin_package = 'neutron-plugin-contrail' $opencontrail_config_file = '/etc/neutron/plugins/opencontrail/ContrailPlugin.ini' - $midonet_server_package = 'python-neutron-plugin-midonet' + $midonet_server_package = 'python-networking-midonet' $midonet_config_file = '/etc/neutron/plugins/midonet/midonet.ini' + $ovn_plugin_package = 'python-networking-ovn' + $plumgrid_plugin_package = 'networking-plumgrid' $plumgrid_pythonlib_package = 'plumgrid-pythonlib' $plumgrid_config_file = '/etc/neutron/plugins/plumgrid/plumgrid.ini' @@ -138,8 +140,8 @@ $dhcp_agent_package = 'neutron-dhcp-agent' $dhcp_agent_service = 'neutron-dhcp-agent' - $lbaas_agent_package = 'neutron-lbaas-agent' - $lbaas_agent_service = 'neutron-lbaas-agent' + $lbaasv2_agent_package = 'neutron-lbaasv2-agent' + $lbaasv2_agent_service = 'neutron-lbaasv2-agent' $haproxy_package = 'haproxy' @@ -166,9 +168,6 @@ $cliff_package = 'python-cliff' $kernel_headers = "linux-headers-${::kernelrelease}" - - $sqlite_package_name = 'python-pysqlite2' - $pymysql_package_name = 'python-pymysql' } else { fail("Unsupported osfamily ${::osfamily}") diff -Nru puppet-module-neutron-8.0.0/manifests/plugins/cisco.pp puppet-module-neutron-9.4.0/manifests/plugins/cisco.pp --- puppet-module-neutron-8.0.0/manifests/plugins/cisco.pp 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/manifests/plugins/cisco.pp 2016-09-26 21:11:55.000000000 +0000 @@ -81,6 +81,11 @@ # (optional) the ensure state of the package resource # Defaults to 'present' # +# [*purge_config*] +# (optional) Whether to set only the specified config options +# in the cisco config. +# Defaults to false. +# # Other parameters are currently not used by the plugin and # can be left unchanged, but in grizzly the plugin will fail # to launch if they are not there. The config for Havana will @@ -112,12 +117,11 @@ $max_port_profiles = '65568', $manager_class = 'neutron.plugins.cisco.segmentation.l2network_vlan_mgr_v2.L2NetworkVLANMgr', $max_networks = '65568', - $package_ensure = 'present' + $package_ensure = 'present', + $purge_config = false, ) { - Neutron_plugin_cisco<||> ~> Service['neutron-server'] - Neutron_plugin_cisco_db_conn<||> ~> Service['neutron-server'] - Neutron_plugin_cisco_l2network<||> ~> Service['neutron-server'] + include ::neutron::deps ensure_resource('file', '/etc/neutron/plugins', { ensure => directory, @@ -133,34 +137,37 @@ mode => '0640'} ) - # Ensure the neutron package is installed before config is set - # under both RHEL and Ubuntu - if ($::neutron::params::server_package) { - Package['neutron-server'] -> Neutron_plugin_cisco<||> - Package['neutron-server'] -> Neutron_plugin_cisco_db_conn<||> - Package['neutron-server'] -> Neutron_plugin_cisco_l2network<||> - } else { - Package['neutron'] -> Neutron_plugin_cisco<||> - Package['neutron'] -> Neutron_plugin_cisco_db_conn<||> - Package['neutron'] -> Neutron_plugin_cisco_l2network<||> - } - if $::operatingsystem == 'Ubuntu' { file_line { '/etc/default/neutron-server:NEUTRON_PLUGIN_CONFIG': - path => '/etc/default/neutron-server', - match => '^NEUTRON_PLUGIN_CONFIG=(.*)$', - line => "NEUTRON_PLUGIN_CONFIG=${::neutron::params::cisco_config_file}", - require => [ Package['neutron-server'], Package['neutron-plugin-cisco'] ], - notify => Service['neutron-server'], + path => '/etc/default/neutron-server', + match => '^NEUTRON_PLUGIN_CONFIG=(.*)$', + line => "NEUTRON_PLUGIN_CONFIG=${::neutron::params::cisco_config_file}", + tag => 'neutron-file-line', } } package { 'neutron-plugin-cisco': ensure => $package_ensure, name => $::neutron::params::cisco_server_package, - tag => 'openstack', + tag => ['neutron-support-package', 'openstack'], + } + + # Setting purge for all configs + resources { 'neutron_plugin_cisco': + purge => $purge_config, } + resources { 'neutron_plugin_cisco_db_conn': + purge => $purge_config, + } + + resources { 'neutron_plugin_cisco_l2network': + purge => $purge_config, + } + + resources { 'neutron_plugin_cisco_credentials': + purge => $purge_config, + } neutron_plugin_cisco { 'PLUGINS/nexus_plugin' : value => $nexus_plugin; @@ -211,9 +218,9 @@ } else { file {'/etc/neutron/plugin.ini': - ensure => link, - target => '/etc/neutron/plugins/cisco/cisco_plugins.ini', - require => Package['neutron-plugin-cisco'], + ensure => link, + target => '/etc/neutron/plugins/cisco/cisco_plugins.ini', + tag => 'neutron-config-file', } } } diff -Nru puppet-module-neutron-8.0.0/manifests/plugins/midonet.pp puppet-module-neutron-9.4.0/manifests/plugins/midonet.pp --- puppet-module-neutron-8.0.0/manifests/plugins/midonet.pp 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/manifests/plugins/midonet.pp 2016-09-26 21:11:55.000000000 +0000 @@ -1,7 +1,7 @@ # == Class: midonet::neutron_plugin # # Install and configure Midonet Neutron Plugin. Please note that this manifest -# does not install the 'python-neutron-midonet-plugin' package, it only +# does not install the 'python-networking-midonet' package, it only # configures Neutron to do so needed for this deployment. Check out the # MidoNet module to do so. # @@ -25,6 +25,15 @@ # Whether 'midonet-db-manage' should run to create and/or syncrhonize the database # with MidoNet specific tables. Defaults to false # +# [*purge_config*] +# (optional) Whether to set only the specified config options +# in the midonet config. +# Defaults to false. +# +# [*package_ensure*] +# Whether to install the latest package, or a version for midonet plugin +# Defaults to 'present'. +# # === Examples # # An example call would be: @@ -72,13 +81,14 @@ $keystone_username = 'neutron', $keystone_password = $::os_service_default, $keystone_tenant = 'services', - $sync_db = false + $sync_db = false, + $purge_config = false, + $package_ensure = 'present' ) { + include ::neutron::deps include ::neutron::params - Neutron_plugin_midonet<||> ~> Service['neutron-server'] - ensure_resource('file', '/etc/neutron/plugins/midonet', { ensure => directory, owner => 'root', @@ -86,14 +96,16 @@ mode => '0640'} ) - # Ensure the neutron package is installed before config is set - # under both RHEL and Ubuntu - if ($::neutron::params::server_package) { - Package['neutron-server'] -> Neutron_plugin_midonet<||> - } else { - Package['neutron'] -> Neutron_plugin_midonet<||> + resources { 'neutron_plugin_midonet': + purge => $purge_config, } + package { 'python-networking-midonet': + ensure => $package_ensure, + name => $::neutron::params::midonet_server_package, + tag => ['neutron-package', 'openstack'], + } + neutron_plugin_midonet { 'MIDONET/midonet_uri': value => "http://${midonet_api_ip}:${midonet_api_port}/midonet-api"; 'MIDONET/username': value => $keystone_username; @@ -103,11 +115,10 @@ if $::osfamily == 'Debian' { file_line { '/etc/default/neutron-server:NEUTRON_PLUGIN_CONFIG': - path => '/etc/default/neutron-server', - match => '^NEUTRON_PLUGIN_CONFIG=(.*)$', - line => "NEUTRON_PLUGIN_CONFIG=${::neutron::params::midonet_config_file}", - require => [ Package['neutron-server'], Package[$::neutron::params::midonet_server_package] ], - notify => Service['neutron-server'], + path => '/etc/default/neutron-server', + match => '^NEUTRON_PLUGIN_CONFIG=(.*)$', + line => "NEUTRON_PLUGIN_CONFIG=${::neutron::params::midonet_config_file}", + tag => 'neutron-file-line', } } @@ -118,23 +129,25 @@ } else { file {'/etc/neutron/plugin.ini': - ensure => link, - target => $::neutron::params::midonet_config_file, - require => Package[$::neutron::params::midonet_server_package] + ensure => link, + target => $::neutron::params::midonet_config_file, + tag => 'neutron-config-file' } } if $sync_db { - - Package<| title == $::neutron::params::midonet_server_package |> ~> Exec['midonet-db-sync'] - + Package<| title == 'python-networking-midonet' |> ~> Exec['midonet-db-sync'] exec { 'midonet-db-sync': - command => 'midonet-db-manage --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugin.ini upgrade head', + command => 'neutron-db-manage --subproject networking-midonet upgrade head', path => '/usr/bin', - before => Service['neutron-server'], - subscribe => Neutron_config['database/connection'], + subscribe => [ + Anchor['neutron::install::end'], + Anchor['neutron::config::end'], + Anchor['neutron::dbsync::begin'], + Exec['neutron-db-sync'] + ], + notify => Anchor['neutron::dbsync::end'], refreshonly => true } } } - diff -Nru puppet-module-neutron-8.0.0/manifests/plugins/ml2/arista/l3.pp puppet-module-neutron-9.4.0/manifests/plugins/ml2/arista/l3.pp --- puppet-module-neutron-8.0.0/manifests/plugins/ml2/arista/l3.pp 1970-01-01 00:00:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/manifests/plugins/ml2/arista/l3.pp 2016-09-26 21:11:55.000000000 +0000 @@ -0,0 +1,79 @@ +# +# Copyright (C) 2016 Matthew J. Black +# +# Author: Matthew J. Black +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +# == Class: neutron::plugins::ml2::arista::l3_arista +# +# === Parameters +# +# [*primary_l3_host*] +# (required) The Arista EOS IP address. +# +# [*primary_l3_host_username*] +# (required) The Arista EOS username. +# +# [*primary_l3_host_password*] +# (required) The Arista EOS password. +# +# [*secondary_l3_host*] +# (optional) The Arist EOS IP address for second switch MLAGed +# with the first one. Only required if $mlag_config is set to true. +# Defaults to $::os_service_default +# +# [*mlag_config*] +# (optional) Indicates that the switch is in MLAG mode. +# Defaults to $::os_service_default +# +# [*l3_sync_interval*] +# (optional) Sync interval in seconds between l3 service plugin and +# the EOS. +# Defaults to $::os_service_default +# +# [*use_vrf*] +# (optional) If it should create a router in VRF. +# Defaults to $::os_service_default +# +class neutron::plugins::ml2::arista::l3( + $primary_l3_host, + $primary_l3_host_username, + $primary_l3_host_password, + $secondary_l3_host = $::os_service_default, + $mlag_config = $::os_service_default, + $l3_sync_interval = $::os_service_default, + $use_vrf = $::os_service_default + +) { + + include ::neutron::deps + require ::neutron::plugins::ml2 + + if !is_service_default($mlag_config) { + validate_bool($mlag_config) + if $mlag_config and is_service_default($secondary_l3_host) { + fail('Must set secondary_l3_host when mlag_config is true.') + } + } + + neutron_plugin_ml2 { + 'l3_arista/primary_l3_host' : value => $primary_l3_host; + 'l3_arista/primary_l3_host_username': value => $primary_l3_host_username; + 'l3_arista/primary_l3_host_password': value => $primary_l3_host_password; + 'l3_arista/secondary_l3_host' : value => $secondary_l3_host; + 'l3_arista/mlag_config' : value => $mlag_config; + 'l3_arista/l3_sync_interval' : value => $l3_sync_interval; + 'l3_arista/use_vrf' : value => $use_vrf; + } +} diff -Nru puppet-module-neutron-8.0.0/manifests/plugins/ml2/arista.pp puppet-module-neutron-9.4.0/manifests/plugins/ml2/arista.pp --- puppet-module-neutron-8.0.0/manifests/plugins/ml2/arista.pp 1970-01-01 00:00:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/manifests/plugins/ml2/arista.pp 2016-09-26 21:11:55.000000000 +0000 @@ -0,0 +1,66 @@ +# +# Copyright (C) 2016 Matthew J. Black +# +# Author: Matthew J. Black +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +# == Class: neutron::plugins::ml2::arista +# +# === Parameters +# +# [*eapi_host*] +# (required) The Arista EOS IP address. +# +# [*eapi_username*] +# (required) The Arista EOS api username. +# +# [*eapi_password*] +# (required) The Arista EOS api password. +# +# [*region_name*] +# (optional) Region name that is assigned to the OpenStack controller. +# This setting must be set if multiple regions are using the same Arista +# hardware. +# Defaults to $::os_service_default +# +# [*sync_interval*] +# (optional) Sync interval in seconds between neutron plugin and EOS. +# Defaults to $::os_service_default +# +# [*use_fqdn*] +# (optional) Defines if hostnames are sent to Arista EOS as FQDNS +# Defaults to $::os_service_default +# +class neutron::plugins::ml2::arista( + $eapi_host, + $eapi_username, + $eapi_password, + $region_name = $::os_service_default, + $sync_interval = $::os_service_default, + $use_fqdn = $::os_service_default, + +) { + + include ::neutron::deps + require ::neutron::plugins::ml2 + + neutron_plugin_ml2 { + 'ml2_arista/eapi_host' : value => $eapi_host; + 'ml2_arista/eapi_username': value => $eapi_username; + 'ml2_arista/eapi_password': value => $eapi_password; + 'ml2_arista/region_name' : value => $region_name; + 'ml2_arista/sync_interval': value => $sync_interval; + 'ml2_arista/use_fqdn' : value => $use_fqdn; + } +} diff -Nru puppet-module-neutron-8.0.0/manifests/plugins/ml2/bigswitch/restproxy.pp puppet-module-neutron-9.4.0/manifests/plugins/ml2/bigswitch/restproxy.pp --- puppet-module-neutron-8.0.0/manifests/plugins/ml2/bigswitch/restproxy.pp 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/manifests/plugins/ml2/bigswitch/restproxy.pp 2016-09-26 21:11:55.000000000 +0000 @@ -64,6 +64,8 @@ $auth_user = 'neutron', $auth_url = false, ) { + + include ::neutron::deps require ::neutron::plugins::ml2::bigswitch neutron_plugin_ml2 { diff -Nru puppet-module-neutron-8.0.0/manifests/plugins/ml2/bigswitch.pp puppet-module-neutron-9.4.0/manifests/plugins/ml2/bigswitch.pp --- puppet-module-neutron-8.0.0/manifests/plugins/ml2/bigswitch.pp 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/manifests/plugins/ml2/bigswitch.pp 2016-09-26 21:11:55.000000000 +0000 @@ -12,6 +12,8 @@ class neutron::plugins::ml2::bigswitch ( $package_ensure = 'present', ) { + + include ::neutron::deps include ::neutron::params require ::neutron::plugins::ml2 diff -Nru puppet-module-neutron-8.0.0/manifests/plugins/ml2/cisco/nexus1000v.pp puppet-module-neutron-9.4.0/manifests/plugins/ml2/cisco/nexus1000v.pp --- puppet-module-neutron-8.0.0/manifests/plugins/ml2/cisco/nexus1000v.pp 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/manifests/plugins/ml2/cisco/nexus1000v.pp 2016-09-26 21:11:55.000000000 +0000 @@ -87,11 +87,11 @@ $enable_vif_type_n1kv = 'False', ) { + + include ::neutron::deps include ::neutron::plugins::ml2::cisco - $extension_drivers = 'cisco_n1kv_ext' neutron_plugin_ml2 { - 'ml2/extension_drivers' : value => $extension_drivers; 'ml2_cisco_n1kv/n1kv_vsm_ips' : value => $n1kv_vsm_ip; 'ml2_cisco_n1kv/username' : value => $n1kv_vsm_username; 'ml2_cisco_n1kv/password' : value => $n1kv_vsm_password; diff -Nru puppet-module-neutron-8.0.0/manifests/plugins/ml2/cisco/nexus_creds.pp puppet-module-neutron-9.4.0/manifests/plugins/ml2/cisco/nexus_creds.pp --- puppet-module-neutron-8.0.0/manifests/plugins/ml2/cisco/nexus_creds.pp 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/manifests/plugins/ml2/cisco/nexus_creds.pp 2016-09-26 21:11:55.000000000 +0000 @@ -86,19 +86,13 @@ $physnet = undef, ) { - # Ensure Neutron server is installed before configuring ssh keys - if ($::neutron::params::server_package) { - Package['neutron-server'] -> File['/var/lib/neutron/.ssh'] - Package['neutron-server'] -> Exec["nexus_creds_${name}"] - } else { - Package['neutron'] -> File['/var/lib/neutron/.ssh'] - Package['neutron'] -> Exec["nexus_creds_${name}"] - } + include ::neutron::deps ensure_resource('file', '/var/lib/neutron/.ssh', { ensure => directory, owner => 'neutron', + tag => 'neutron-config-file', } ) @@ -117,6 +111,6 @@ unless => $check_known_hosts, command => "/usr/bin/ssh-keyscan -t rsa ${ip_address} >> /var/lib/neutron/.ssh/known_hosts", user => 'neutron', - require => [Exec["ping_test_${name}"], File['/var/lib/neutron/.ssh']] + require => [Exec["ping_test_${name}"], Anchor['neutron::config::end']] } } diff -Nru puppet-module-neutron-8.0.0/manifests/plugins/ml2/cisco/nexus.pp puppet-module-neutron-9.4.0/manifests/plugins/ml2/cisco/nexus.pp --- puppet-module-neutron-8.0.0/manifests/plugins/ml2/cisco/nexus.pp 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/manifests/plugins/ml2/cisco/nexus.pp 2016-09-26 21:11:55.000000000 +0000 @@ -111,6 +111,8 @@ $vxlan_global_config = true, $host_key_checks = false ) { + + include ::neutron::deps include ::neutron::plugins::ml2::cisco if ! is_service_default($switch_replay_count) { diff -Nru puppet-module-neutron-8.0.0/manifests/plugins/ml2/cisco/nexus_switch.pp puppet-module-neutron-9.4.0/manifests/plugins/ml2/cisco/nexus_switch.pp --- puppet-module-neutron-8.0.0/manifests/plugins/ml2/cisco/nexus_switch.pp 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/manifests/plugins/ml2/cisco/nexus_switch.pp 2016-09-26 21:11:55.000000000 +0000 @@ -88,6 +88,9 @@ $nve_src_intf = $::os_service_default, $physnet = $::os_service_default ) { + + include ::neutron::deps + $section = "ML2_MECH_CISCO_NEXUS:${ip_address}" neutron_plugin_ml2 { "${section}/username": value => $username; diff -Nru puppet-module-neutron-8.0.0/manifests/plugins/ml2/cisco/nexus_switch_server.pp puppet-module-neutron-9.4.0/manifests/plugins/ml2/cisco/nexus_switch_server.pp --- puppet-module-neutron-8.0.0/manifests/plugins/ml2/cisco/nexus_switch_server.pp 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/manifests/plugins/ml2/cisco/nexus_switch_server.pp 2016-09-26 21:11:55.000000000 +0000 @@ -26,6 +26,9 @@ $ports, $hostname = $title, ) { + + include ::neutron::deps + $section = "ML2_MECH_CISCO_NEXUS:${switch_ip_address}" neutron_plugin_ml2 { "${section}/${hostname}": value => $ports; diff -Nru puppet-module-neutron-8.0.0/manifests/plugins/ml2/cisco/type_nexus_vxlan.pp puppet-module-neutron-9.4.0/manifests/plugins/ml2/cisco/type_nexus_vxlan.pp --- puppet-module-neutron-8.0.0/manifests/plugins/ml2/cisco/type_nexus_vxlan.pp 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/manifests/plugins/ml2/cisco/type_nexus_vxlan.pp 2016-09-26 21:11:55.000000000 +0000 @@ -25,6 +25,7 @@ $vni_ranges, $mcast_ranges, ) { + include ::neutron::deps include ::neutron::plugins::ml2::cisco neutron_plugin_ml2 { diff -Nru puppet-module-neutron-8.0.0/manifests/plugins/ml2/cisco/ucsm.pp puppet-module-neutron-9.4.0/manifests/plugins/ml2/cisco/ucsm.pp --- puppet-module-neutron-8.0.0/manifests/plugins/ml2/cisco/ucsm.pp 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/manifests/plugins/ml2/cisco/ucsm.pp 2016-09-26 21:11:55.000000000 +0000 @@ -35,6 +35,8 @@ $ucsm_host_list, $supported_pci_devs = $::os_service_default, ) { + + include ::neutron::deps include ::neutron::plugins::ml2::cisco neutron_plugin_ml2 { diff -Nru puppet-module-neutron-8.0.0/manifests/plugins/ml2/cisco.pp puppet-module-neutron-9.4.0/manifests/plugins/ml2/cisco.pp --- puppet-module-neutron-8.0.0/manifests/plugins/ml2/cisco.pp 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/manifests/plugins/ml2/cisco.pp 2016-09-26 21:11:55.000000000 +0000 @@ -14,6 +14,8 @@ class neutron::plugins::ml2::cisco ( $package_ensure = 'present' ) { + + include ::neutron::deps include ::neutron::params require ::neutron::plugins::ml2 diff -Nru puppet-module-neutron-8.0.0/manifests/plugins/ml2/mech_driver.pp puppet-module-neutron-9.4.0/manifests/plugins/ml2/mech_driver.pp --- puppet-module-neutron-8.0.0/manifests/plugins/ml2/mech_driver.pp 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/manifests/plugins/ml2/mech_driver.pp 2016-09-26 21:11:55.000000000 +0000 @@ -23,17 +23,32 @@ # (required) Supported PCI vendor devices, defined by vendor_id:product_id according # to the PCI ID Repository. Default enables support for Intel and Mellanox SR-IOV capable NICs # -# [*sriov_agent_required*] -# (optional) SRIOV neutron agent is always required for port binding -# define neutron::plugins::ml2::mech_driver ( $supported_pci_vendor_devs, - $sriov_agent_required = true, ){ + + include ::neutron::deps + if ($name == 'sriovnicswitch') { neutron_plugin_sriov { 'ml2_sriov/supported_pci_vendor_devs': value => join(any2array($supported_pci_vendor_devs), ','); - 'ml2_sriov/agent_required': value => $sriov_agent_required; + } + case $::osfamily { + 'RedHat': { + file { '/etc/neutron/conf.d/neutron-server/ml2_conf_sriov.conf': + ensure => link, + target => '/etc/neutron/plugins/ml2/ml2_conf_sriov.ini', + } + } + /^(Debian|Ubuntu)$/: { + file_line { 'DAEMON_ARGS': + path => '/etc/default/neutron-server', + line => 'DAEMON_ARGS="$DAEMON_ARGS --config-file /etc/neutron/plugins/ml2/ml2_conf_sriov.ini"', + } + } + default: { + fail("Unsupported osfamily ${::osfamily}") + } } } } diff -Nru puppet-module-neutron-8.0.0/manifests/plugins/ml2/midonet.pp puppet-module-neutron-9.4.0/manifests/plugins/ml2/midonet.pp --- puppet-module-neutron-8.0.0/manifests/plugins/ml2/midonet.pp 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/manifests/plugins/ml2/midonet.pp 2016-09-26 21:11:55.000000000 +0000 @@ -25,6 +25,8 @@ $project_id = 'services', ) { + include ::neutron::deps + neutron_plugin_ml2 { 'MIDONET/midonet_uri' : value => $midonet_uri; 'MIDONET/username' : value => $username; diff -Nru puppet-module-neutron-8.0.0/manifests/plugins/ml2/opendaylight.pp puppet-module-neutron-9.4.0/manifests/plugins/ml2/opendaylight.pp --- puppet-module-neutron-8.0.0/manifests/plugins/ml2/opendaylight.pp 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/manifests/plugins/ml2/opendaylight.pp 2016-09-26 21:11:55.000000000 +0000 @@ -31,6 +31,8 @@ $odl_password = $::os_service_default, $odl_url = $::os_service_default, ) { + + include ::neutron::deps require ::neutron::plugins::ml2 ensure_resource('package', 'python-networking-odl', diff -Nru puppet-module-neutron-8.0.0/manifests/plugins/ml2/ovn.pp puppet-module-neutron-9.4.0/manifests/plugins/ml2/ovn.pp --- puppet-module-neutron-8.0.0/manifests/plugins/ml2/ovn.pp 1970-01-01 00:00:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/manifests/plugins/ml2/ovn.pp 2016-09-26 21:11:55.000000000 +0000 @@ -0,0 +1,86 @@ +# This class installs and configures the OVN Neutron plugin +# +# === Parameters +# +# [*ovn_nb_connection*] +# (optional) The connection string for the OVN_Northbound OVSDB. +# Defaults to 'tcp:127.0.0.1:6641' +# +# [*ovn_sb_connection*] +# (optional) The connection string for the OVN_Southbound OVSDB +# Defaults to 'tcp:127.0.0.1:6642' +# +# [*package_ensure*] +# (optional) The intended state of the python-networking-odl +# package, i.e. any of the possible values of the 'ensure' +# property for a package resource type. +# Defaults to 'present' +# +# [*ovsdb_connection_timeout*] +# (optional) Timeout in seconds for the OVSDB connection transaction +# Defaults to $::os_service_default +# +# [*neutron_sync_mode*] +# (optional) The synchronization mode of OVN with Neutron DB. +# Valid values are - ['log', 'off', 'repair'] +# off - synchronization is off +# log - during neutron-server startup check to see if OVN is in sync with +# the Neutron database. Log warnings for any inconsistencies found so +# that an admin can investigate. +# repair - during neutron-server startup, automatically create resources +# found in Neutron but not in OVN. Also remove resources from OVN +# that are no longer in Neutron. +# Defaults to $::os_service_default +# +# [*ovn_l3_mode*] +# (optional) Whether to use OVN native L3 support. Do not change the +# value for existing deployments that contain routers. +# Type: boolean +# Defaults to $::os_service_default +# +# [*vif_type*] +# (optional) Type of VIF to be used for ports. +# Valid values are ['ovs', 'vhostuser'] +# Defaults to $::os_service_default + +class neutron::plugins::ml2::ovn( + $ovn_nb_connection = $::os_service_default, + $ovn_sb_connection = $::os_service_default, + $package_ensure = 'present', + $ovsdb_connection_timeout = $::os_service_default, + $neutron_sync_mode = $::os_service_default, + $ovn_l3_mode = $::os_service_default, + $vif_type = $::os_service_default, + ) { + + include ::neutron::deps + require ::neutron::plugins::ml2 + + if ! is_service_default($ovn_l3_mode) { + validate_bool($ovn_l3_mode) + } + + if ! ( $vif_type in ['ovs', 'vhostuser', $::os_service_default] ) { + fail( 'Invalid value for vif_type parameter' ) + } + + if ! ( $neutron_sync_mode in ['off', 'log', 'repair', $::os_service_default] ) { + fail( 'Invalid value for neutron_sync_mode parameter' ) + } + + ensure_resource('package', $::neutron::params::ovn_plugin_package, + { + ensure => $package_ensure, + tag => 'openstack', + } + ) + + neutron_plugin_ml2 { + 'ml2_ovn/ovn_nb_connection' : value => $ovn_nb_connection; + 'ml2_ovn/ovn_sb_connection' : value => $ovn_sb_connection; + 'ml2_ovn/ovsdb_connection_timeout' : value => $ovsdb_connection_timeout; + 'ml2_ovn/neutron_sync_mode' : value => $neutron_sync_mode; + 'ml2_ovn/ovn_l3_mode' : value => $ovn_l3_mode; + 'ml2_ovn/vif_type' : value => $vif_type; + } +} diff -Nru puppet-module-neutron-8.0.0/manifests/plugins/ml2/type_driver.pp puppet-module-neutron-9.4.0/manifests/plugins/ml2/type_driver.pp --- puppet-module-neutron-8.0.0/manifests/plugins/ml2/type_driver.pp 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/manifests/plugins/ml2/type_driver.pp 2016-09-26 21:11:55.000000000 +0000 @@ -39,13 +39,21 @@ # [*vxlan_group*] # (required) Multicast group for VXLAN. If unset, disables VXLAN multicast mode. # +# [*max_header_size*] +# (optional) Geneve encapsulation header size is dynamic, this value is used to calculate +# the maximum MTU for the driver. +# define neutron::plugins::ml2::type_driver ( $flat_networks, $tunnel_id_ranges, $network_vlan_ranges, $vni_ranges, - $vxlan_group + $vxlan_group, + $max_header_size ){ + + include ::neutron::deps + if ($name == 'flat') { neutron_plugin_ml2 { 'ml2_type_flat/flat_networks': value => join(any2array($flat_networks), ','); @@ -110,6 +118,16 @@ elsif ($name == 'midonet') or ($name == 'uplink') { # midonet type driver has its own class separate from this one } + elsif ($name == 'geneve') { + validate_vni_ranges($vni_ranges) + if !is_service_default($max_header_size) { + validate_integer($max_header_size) + } + neutron_plugin_ml2 { + 'ml2_type_geneve/max_header_size': value => $max_header_size; + 'ml2_type_geneve/vni_ranges': value => join($vni_ranges,','); + } + } else { # detect an invalid type_drivers value fail('type_driver unknown.') diff -Nru puppet-module-neutron-8.0.0/manifests/plugins/ml2.pp puppet-module-neutron-9.4.0/manifests/plugins/ml2.pp --- puppet-module-neutron-8.0.0/manifests/plugins/ml2.pp 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/manifests/plugins/ml2.pp 2016-09-26 21:11:55.000000000 +0000 @@ -27,7 +27,7 @@ # from the neutron.ml2.type_drivers namespace. # Could be an array that can have these elements: # local, flat, vlan, gre, vxlan -# Defaults to ['local', 'flat', 'vlan', 'gre', 'vxlan']. +# Defaults to ['local', 'flat', 'vlan', 'gre', 'vxlan', 'geneve']. # # [*extension_drivers*] # (optional) Ordered list of extension driver entrypoints to be loaded @@ -91,7 +91,11 @@ # [*enable_security_group*] # (optional) Controls if neutron security group is enabled or not. # It should be false when you use nova security group. -# Defaults to true. +# Defaults to $::os_service_default. +# +# [*firewall_driver*] +# (optional) Firewall driver for realizing neutron security group function. +# Defaults to $::os_service_default # # [*package_ensure*] # (optional) Ensure state for package. @@ -103,12 +107,6 @@ # Repository. Should be an array of devices. # Defaults to ['15b3:1004', '8086:10ca'] (Intel & Mellanox SR-IOV capable NICs) # -# [*sriov_agent_required*] -# (optional) SRIOV neutron agent is required for port binding. -# Only set to true if SRIOV network adapters support VF link state setting -# and if admin state management is desired. -# Defaults to false. -# # [*physical_network_mtus*] # (optional) For L2 mechanism drivers, per-physical network MTU setting. # Should be an array with 'physnetX1:9000'. @@ -120,7 +118,27 @@ # encapsulated traffic is sent. # Defaults to 0. # - +# [*purge_config*] +# (optional) Whether to set only the specified config options +# in the ml2 config. +# Defaults to false. +# +# [*max_header_size*] +# (optional) Geneve encapsulation header size is dynamic, this value is used to calculate +# the maximum MTU for the driver. +# Defaults to $::os_service_default +# +# [*overlay_ip_version*] +# (optional) Configures the IP version used for all overlay network endpoints. Valid values +# are 4 and 6. +# Defaults to $::os_service_default +# +# DEPRECATED PARAMETERS +# +# [*sriov_agent_required*] +# (optional) Deprecated. +# Defaults to undef. +# class neutron::plugins::ml2 ( $type_drivers = ['local', 'flat', 'vlan', 'gre', 'vxlan'], $extension_drivers = $::os_service_default, @@ -131,45 +149,56 @@ $tunnel_id_ranges = '20:100', $vxlan_group = '224.0.0.1', $vni_ranges = '10:100', - $enable_security_group = true, + $enable_security_group = $::os_service_default, + $firewall_driver = $::os_service_default, $package_ensure = 'present', $supported_pci_vendor_devs = ['15b3:1004', '8086:10ca'], - $sriov_agent_required = false, $physical_network_mtus = $::os_service_default, $path_mtu = 0, + $purge_config = false, + $max_header_size = $::os_service_default, + $overlay_ip_version = $::os_service_default, + # DEPRECATED PARAMETERS + $sriov_agent_required = undef, ) { + include ::neutron::deps include ::neutron::params - Neutron_plugin_ml2<||> ~> Service<| title == 'neutron-server' |> - if ! $mechanism_drivers { warning('Without networking mechanism driver, ml2 will not communicate with L2 agents') } + if !is_service_default($enable_security_group) and $enable_security_group and is_service_default($firewall_driver) { + warning('Security groups will not work without properly set firewall_driver') + } + + if !is_service_default($overlay_ip_version) and !($overlay_ip_version in [4, 6]) { + fail('Invalid IP version for overlay_ip_version') + } + if $::operatingsystem == 'Ubuntu' { file_line { '/etc/default/neutron-server:NEUTRON_PLUGIN_CONFIG': - path => '/etc/default/neutron-server', - match => '^NEUTRON_PLUGIN_CONFIG=(.*)$', - line => 'NEUTRON_PLUGIN_CONFIG=/etc/neutron/plugin.ini', - require => File['/etc/default/neutron-server','/etc/neutron/plugin.ini'], + path => '/etc/default/neutron-server', + match => '^NEUTRON_PLUGIN_CONFIG=(.*)$', + line => 'NEUTRON_PLUGIN_CONFIG=/etc/neutron/plugin.ini', + tag => 'neutron-file-line' } - Package<| title == 'neutron-server' |> - -> File_line['/etc/default/neutron-server:NEUTRON_PLUGIN_CONFIG'] - ~> Service<| title == 'neutron-server' |> } # In RH, the link is used to start Neutron process but in Debian, it's used only # to manage database synchronization. file {'/etc/neutron/plugin.ini': ensure => link, - target => '/etc/neutron/plugins/ml2/ml2_conf.ini' + target => '/etc/neutron/plugins/ml2/ml2_conf.ini', + tag => 'neutron-config-file', } file {'/etc/default/neutron-server': ensure => present, owner => 'root', group => 'root', - mode => '0644' + mode => '0644', + tag => 'neutron-config-file', } # Some platforms do not have a dedicated ml2 plugin package @@ -177,13 +206,12 @@ package { 'neutron-plugin-ml2': ensure => $package_ensure, name => $::neutron::params::ml2_server_package, - tag => 'openstack', + tag => ['neutron-package', 'openstack'], } - Package['neutron-plugin-ml2'] -> File['/etc/neutron/plugin.ini'] - Package['neutron-plugin-ml2'] -> File['/etc/default/neutron-server'] - } else { - Package['neutron'] -> File['/etc/neutron/plugin.ini'] - Package['neutron'] -> File['/etc/default/neutron-server'] + } + + resources { 'neutron_plugin_ml2': + purge => $purge_config, } neutron::plugins::ml2::type_driver { $type_drivers: @@ -192,11 +220,15 @@ network_vlan_ranges => $network_vlan_ranges, vni_ranges => $vni_ranges, vxlan_group => $vxlan_group, + max_header_size => $max_header_size + } + + if $sriov_agent_required { + warning ('sriov_agent_required is deprecated, has no effect and will be removed in a future release.') } neutron::plugins::ml2::mech_driver { $mechanism_drivers: supported_pci_vendor_devs => $supported_pci_vendor_devs, - sriov_agent_required => $sriov_agent_required, } neutron_plugin_ml2 { @@ -205,7 +237,9 @@ 'ml2/mechanism_drivers': value => join(any2array($mechanism_drivers), ','); 'ml2/path_mtu': value => $path_mtu; 'ml2/extension_drivers': value => join(any2array($extension_drivers), ','); + 'ml2/overlay_ip_version': value => $overlay_ip_version; 'securitygroup/enable_security_group': value => $enable_security_group; + 'securitygroup/firewall_driver': value => $firewall_driver; } if is_service_default($physical_network_mtus) { @@ -217,5 +251,5 @@ neutron_plugin_ml2 { 'ml2/physical_network_mtus': value => join($physical_network_mtus, ','); } - } Neutron_plugin_ml2<||> ~> Exec<| title == 'neutron-db-sync' |> + } } diff -Nru puppet-module-neutron-8.0.0/manifests/plugins/nuage.pp puppet-module-neutron-9.4.0/manifests/plugins/nuage.pp --- puppet-module-neutron-8.0.0/manifests/plugins/nuage.pp 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/manifests/plugins/nuage.pp 2016-09-26 21:11:55.000000000 +0000 @@ -34,6 +34,10 @@ # (optional) Flag to determine whether to use ssl connection # to connect to VSD. The default is True # +# [*purge_config*] +# (optional) Whether to set only the specified config options +# in the nuage config. +# Defaults to false. # class neutron::plugins::nuage ( $nuage_net_partition_name, @@ -45,33 +49,32 @@ $nuage_cms_id, $nuage_auth_resource = '/me', $nuage_server_ssl = true, + $purge_config = false, ) { + include ::neutron::deps include ::neutron::params - File['/etc/neutron/plugins/nuage/plugin.ini'] -> Neutron_plugin_nuage<||> - Neutron_plugin_nuage<||> ~> Service['neutron-server'] - Neutron_plugin_nuage<||> ~> Exec<| title == 'neutron-db-sync' |> - file { '/etc/neutron/plugins/nuage': ensure => directory, + tag => 'neutron-config-file', } if $::osfamily == 'Debian' { file_line { '/etc/default/neutron-server:NEUTRON_PLUGIN_CONFIG': - path => '/etc/default/neutron-server', - match => '^NEUTRON_PLUGIN_CONFIG=(.*)$', - line => "NEUTRON_PLUGIN_CONFIG=${::neutron::params::nuage_config_file}", - notify => Service['neutron-server'], + path => '/etc/default/neutron-server', + match => '^NEUTRON_PLUGIN_CONFIG=(.*)$', + line => "NEUTRON_PLUGIN_CONFIG=${::neutron::params::nuage_config_file}", + tag => 'neutron-file-line', } } if $::osfamily == 'Redhat' { - File['/etc/neutron/plugin.ini'] ~> Exec<| title == 'neutron-db-sync' |> file { '/etc/neutron/plugin.ini': ensure => link, require => File['/etc/neutron/plugins/nuage/plugin.ini'], target => $::neutron::params::nuage_config_file, + tag => 'neutron-config-file', } } @@ -80,7 +83,12 @@ owner => 'root', group => 'neutron', require => File['/etc/neutron/plugins/nuage'], - mode => '0640' + mode => '0640', + tag => 'neutron-config-file', + } + + resources { 'neutron_plugin_nuage': + purge => $purge_config, } $nuage_base_uri_base = '/nuage/api' diff -Nru puppet-module-neutron-8.0.0/manifests/plugins/nvp.pp puppet-module-neutron-9.4.0/manifests/plugins/nvp.pp --- puppet-module-neutron-8.0.0/manifests/plugins/nvp.pp 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/manifests/plugins/nvp.pp 2016-09-26 21:11:55.000000000 +0000 @@ -25,29 +25,38 @@ # (optional) Ensure state for package. # Defaults to 'present'. # +# [*purge_config*] +# (optional) Whether to set only the specified config options +# in the nvp config. +# Defaults to false. +# class neutron::plugins::nvp ( $default_tz_uuid, $nvp_controllers, $nvp_user, $nvp_password, $default_l3_gw_service_uuid = $::os_service_default, - $package_ensure = 'present' + $package_ensure = 'present', + $purge_config = false, ) { + include ::neutron::deps include ::neutron::params Package['neutron'] -> Package['neutron-plugin-nvp'] - Neutron_plugin_nvp<||> ~> Service<| title == 'neutron-server' |> - Package['neutron-plugin-nvp'] -> Service<| title == 'neutron-server' |> package { 'neutron-plugin-nvp': ensure => $package_ensure, name => $::neutron::params::nvp_server_package, - tag => 'openstack', + tag => ['neutron-package', 'openstack'], } validate_array($nvp_controllers) + resources { 'neutron_plugin_nvp': + purge => $purge_config, + } + neutron_plugin_nvp { 'DEFAULT/default_tz_uuid': value => $default_tz_uuid; 'DEFAULT/nvp_controllers': value => join($nvp_controllers, ','); @@ -64,9 +73,9 @@ # In RH, this link is used to start Neutron process but in Debian, it's used only # to manage database synchronization. file {'/etc/neutron/plugin.ini': - ensure => link, - target => '/etc/neutron/plugins/nicira/nvp.ini', - require => Package['neutron-plugin-nvp'] + ensure => link, + target => '/etc/neutron/plugins/nicira/nvp.ini', + tag => 'neutron-config-file', } } diff -Nru puppet-module-neutron-8.0.0/manifests/plugins/opencontrail.pp puppet-module-neutron-9.4.0/manifests/plugins/opencontrail.pp --- puppet-module-neutron-8.0.0/manifests/plugins/opencontrail.pp 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/manifests/plugins/opencontrail.pp 2016-09-26 21:11:55.000000000 +0000 @@ -47,6 +47,11 @@ # (optional) Ensure state for package. # Defaults to 'present'. # +# [*purge_config*] +# (optional) Whether to set only the specified config options +# in the opencontrail config. +# Defaults to false. +# class neutron::plugins::opencontrail ( $api_server_ip = $::os_service_default, $api_server_port = $::os_service_default, @@ -58,8 +63,10 @@ $keystone_admin_password = $::os_service_default, $keystone_admin_token = $::os_service_default, $package_ensure = 'present', + $purge_config = false, ) { + include ::neutron::deps include ::neutron::params validate_array($contrail_extensions) @@ -67,11 +74,9 @@ package { 'neutron-plugin-contrail': ensure => $package_ensure, name => $::neutron::params::opencontrail_plugin_package, - tag => 'openstack', + tag => ['neutron-package', 'openstack'], } - Neutron_plugin_opencontrail<||> ~> Service['neutron-server'] - ensure_resource('file', '/etc/neutron/plugins/opencontrail', { ensure => directory, owner => 'root', @@ -79,21 +84,12 @@ mode => '0640'} ) - # Ensure the neutron package is installed before config is set - # under both RHEL and Ubuntu - if ($::neutron::params::server_package) { - Package['neutron-server'] -> Neutron_plugin_opencontrail<||> - } else { - Package['neutron'] -> Neutron_plugin_opencontrail<||> - } - if $::osfamily == 'Debian' { file_line { '/etc/default/neutron-server:NEUTRON_PLUGIN_CONFIG': - path => '/etc/default/neutron-server', - match => '^NEUTRON_PLUGIN_CONFIG=(.*)$', - line => "NEUTRON_PLUGIN_CONFIG=${::neutron::params::opencontrail_config_file}", - require => [ Package['neutron-server'], Package[$::neutron::params::opencontrail_plugin_package] ], - notify => Service['neutron-server'], + path => '/etc/default/neutron-server', + match => '^NEUTRON_PLUGIN_CONFIG=(.*)$', + line => "NEUTRON_PLUGIN_CONFIG=${::neutron::params::opencontrail_config_file}", + tag => 'neutron-file-line', } } @@ -102,9 +98,14 @@ ensure => link, target => $::neutron::params::opencontrail_config_file, require => Package[$::neutron::params::opencontrail_plugin_package], + tag => 'neutron-config-file', } } + resources { 'neutron_plugin_opencontrail': + purge => $purge_config, + } + neutron_plugin_opencontrail { 'APISERVER/api_server_ip': value => $api_server_ip; 'APISERVER/api_server_port': value => $api_server_port; diff -Nru puppet-module-neutron-8.0.0/manifests/plugins/ovn.pp puppet-module-neutron-9.4.0/manifests/plugins/ovn.pp --- puppet-module-neutron-8.0.0/manifests/plugins/ovn.pp 1970-01-01 00:00:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/manifests/plugins/ovn.pp 2016-09-26 21:11:55.000000000 +0000 @@ -0,0 +1,56 @@ +# == DEPRECATED +# This class has been deprecated in favor of neutron::plugins::ml2::ovn +# +# This class installs and configures the OVN Neutron plugin +# +# === Parameters +# +# [*ovsdb_connection*] +# (required) The connection string for the native OVSDB backend. +# +# [*ovsdb_connection_timeout*] +# (optional) Timeout in seconds for the OVSDB connection transaction +# Defaults to $::os_service_default +# +# [*neutron_sync_mode*] +# (optional) The synchronization mode of OVN with Neutron DB. +# Valid values are - ['log', 'off', 'repair'] +# off - synchronization is off +# log - during neutron-server startup check to see if OVN is in sync with +# the Neutron database. Log warnings for any inconsistencies found so +# that an admin can investigate. +# repair - during neutron-server startup, automatically create resources +# found in Neutron but not in OVN. Also remove resources from OVN +# that are no longer in Neutron. +# Defaults to $::os_service_default +# +# [*ovn_l3_mode*] +# (optional) Whether to use OVN native L3 support. Do not change the +# value for existing deployments that contain routers. +# Type: boolean +# Defaults to $::os_service_default +# +# [*vif_type*] +# (optional) Type of VIF to be used for ports. +# Valid values are ['ovs', 'vhostuser'] +# Defaults to $::os_service_default + +class neutron::plugins::ovn( + $ovsdb_connection, + $ovsdb_connection_timeout = $::os_service_default, + $neutron_sync_mode = $::os_service_default, + $ovn_l3_mode = $::os_service_default, + $vif_type = $::os_service_default, + ) { + + warning('neutron::plugins::ovn is deprecated in favor of neutron::plugins::ml2::ovn') + + class { '::neutron::plugins::ml2::ovn': + ovn_nb_connection => $ovsdb_connection, + ovsdb_connection_timeout => $ovsdb_connection_timeout, + neutron_sync_mode => $neutron_sync_mode, + ovn_l3_mode => $ovn_l3_mode, + vif_type => $vif_type + } + +} diff -Nru puppet-module-neutron-8.0.0/manifests/plugins/ovs/bridge.pp puppet-module-neutron-9.4.0/manifests/plugins/ovs/bridge.pp --- puppet-module-neutron-8.0.0/manifests/plugins/ovs/bridge.pp 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/manifests/plugins/ovs/bridge.pp 2016-09-26 21:11:55.000000000 +0000 @@ -1,5 +1,8 @@ # define neutron::plugins::ovs::bridge { + + include ::neutron::deps + $mapping = split($name, ':') $bridge = $mapping[1] diff -Nru puppet-module-neutron-8.0.0/manifests/plugins/ovs/opendaylight.pp puppet-module-neutron-9.4.0/manifests/plugins/ovs/opendaylight.pp --- puppet-module-neutron-8.0.0/manifests/plugins/ovs/opendaylight.pp 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/manifests/plugins/ovs/opendaylight.pp 2016-09-26 21:11:55.000000000 +0000 @@ -46,6 +46,9 @@ $retry_interval = 60, $retry_count = 20, ) { + + include ::neutron::deps + # Handle the case where ODL controller is also on this host Service<| title == 'opendaylight' |> -> Exec <| title == 'Wait for NetVirt OVSDB to come up' |> diff -Nru puppet-module-neutron-8.0.0/manifests/plugins/ovs/port.pp puppet-module-neutron-9.4.0/manifests/plugins/ovs/port.pp --- puppet-module-neutron-8.0.0/manifests/plugins/ovs/port.pp 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/manifests/plugins/ovs/port.pp 2016-09-26 21:11:55.000000000 +0000 @@ -1,5 +1,8 @@ # define neutron::plugins::ovs::port { + + include ::neutron::deps + $mapping = split($name, ':') vs_port {$mapping[1]: ensure => present, diff -Nru puppet-module-neutron-8.0.0/manifests/plugins/plumgrid.pp puppet-module-neutron-9.4.0/manifests/plugins/plumgrid.pp --- puppet-module-neutron-8.0.0/manifests/plugins/plumgrid.pp 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/manifests/plugins/plumgrid.pp 2016-09-26 21:11:55.000000000 +0000 @@ -40,7 +40,11 @@ # # [*identity_version*] # Keystone identity version -# Defaults to v2.0 +# Defaults to v3 +# +# [*user_domain_name*] +# Keystone user domain name +# Defaults to Default # # [*nova_metadata_ip*] # Nova metadata IP @@ -50,6 +54,10 @@ # Nova metadata port # Defaults to 8775 # +# [*nova_metadata_subnet*] +# Nova metadata subnet +# Defaults to 127.0.0.1/24 +# # [*metadata_proxy_shared_secret*] # Neutron metadata shared secret key # Defaults to $::os_service_default @@ -78,6 +86,11 @@ # (optional) Ensure state for plugin package. # Defaults to 'present'. # +# [*purge_config*] +# (optional) Whether to set only the specified config options +# in the plumgrid config. +# Defaults to false. +# class neutron::plugins::plumgrid ( $director_server = '127.0.0.1', $director_server_port = '443', @@ -88,24 +101,24 @@ $admin_password = $::os_service_default, $controller_priv_host = '127.0.0.1', $auth_protocol = 'http', - $identity_version = 'v2.0', + $identity_version = 'v3', + $user_domain_name = 'Default', $nova_metadata_ip = '127.0.0.1', $nova_metadata_port = '8775', + $nova_metadata_subnet = '127.0.0.1/24', $metadata_proxy_shared_secret = $::os_service_default, $connector_type = 'distributed', $l2gateway_vendor = $::os_service_default, $l2gateway_sw_username = $::os_service_default, $l2gateway_sw_password = $::os_service_default, $plumlib_package_ensure = 'present', - $package_ensure = 'present' + $package_ensure = 'present', + $purge_config = false, ) { + include ::neutron::deps include ::neutron::params - Neutron_plugin_plumgrid<||> ~> Service['neutron-server'] - Neutron_plumlib_plumgrid<||> ~> Service['neutron-server'] - Neutron_plugin_plumgrid<||> ~> Exec<| title == 'neutron-db-sync' |> - ensure_resource('file', '/etc/neutron/plugins/plumgrid', { ensure => directory, owner => 'root', @@ -113,16 +126,6 @@ mode => '0640'} ) - # Ensure the neutron package is installed before config is set - # under both RHEL and Ubuntu - if ($::neutron::params::server_package) { - Package['neutron-server'] -> Neutron_plugin_plumgrid<||> - Package['neutron-server'] -> Neutron_plumlib_plumgrid<||> - } else { - Package['neutron'] -> Neutron_plugin_plumgrid<||> - Package['neutron'] -> Neutron_plumlib_plumgrid<||> - } - package { 'neutron-plugin-plumgrid': ensure => $package_ensure, name => $::neutron::params::plumgrid_plugin_package @@ -135,22 +138,29 @@ if $::osfamily == 'Debian' { file_line { '/etc/default/neutron-server:NEUTRON_PLUGIN_CONFIG': - path => '/etc/default/neutron-server', - match => '^NEUTRON_PLUGIN_CONFIG=(.*)$', - line => "NEUTRON_PLUGIN_CONFIG=${::neutron::params::plumgrid_config_file}", - require => [ Package['neutron-server'], Package['neutron-plugin-plumgrid'] ], - notify => Service['neutron-server'], + path => '/etc/default/neutron-server', + match => '^NEUTRON_PLUGIN_CONFIG=(.*)$', + line => "NEUTRON_PLUGIN_CONFIG=${::neutron::params::plumgrid_config_file}", + tag => 'neutron-file-line', } } if $::osfamily == 'Redhat' { file { '/etc/neutron/plugin.ini': - ensure => link, - target => $::neutron::params::plumgrid_config_file, - require => Package['neutron-plugin-plumgrid'], + ensure => link, + target => $::neutron::params::plumgrid_config_file, + tag => 'neutron-config-file', } } + resources { 'neutron_plugin_plumgrid': + purge => $purge_config, + } + + resources { 'neutron_plumlib_plumgrid': + purge => $purge_config, + } + neutron_plugin_plumgrid { 'PLUMgridDirector/director_server': value => $director_server; 'PLUMgridDirector/director_server_port': value => $director_server_port; @@ -158,6 +168,9 @@ 'PLUMgridDirector/password': value => $password, secret =>true; 'PLUMgridDirector/servertimeout': value => $servertimeout; 'database/connection': value => $connection; + 'l2gateway/vendor': value => $l2gateway_vendor; + 'l2gateway/sw_username': value => $l2gateway_sw_username; + 'l2gateway/sw_password': value => $l2gateway_sw_password; } neutron_plumlib_plumgrid { @@ -166,14 +179,13 @@ 'keystone_authtoken/auth_uri': value => "${auth_protocol}://${controller_priv_host}:35357/${identity_version}"; 'keystone_authtoken/admin_tenant_name': value => 'admin'; 'keystone_authtoken/identity_version': value => $identity_version; + 'keystone_authtoken/user_domain_name': value => $user_domain_name; 'PLUMgridMetadata/enable_pg_metadata' : value => 'True'; 'PLUMgridMetadata/metadata_mode': value => 'local'; 'PLUMgridMetadata/nova_metadata_ip': value => $nova_metadata_ip; 'PLUMgridMetadata/nova_metadata_port': value => $nova_metadata_port; + 'PLUMgridMetadata/nova_metadata_subnet': value => $nova_metadata_subnet; 'PLUMgridMetadata/metadata_proxy_shared_secret': value => $metadata_proxy_shared_secret; 'ConnectorType/connector_type': value => $connector_type; - 'l2gateway/vendor': value => $l2gateway_vendor; - 'l2gateway/sw_username': value => $l2gateway_sw_username; - 'l2gateway/sw_password': value => $l2gateway_sw_password; } } diff -Nru puppet-module-neutron-8.0.0/manifests/policy.pp puppet-module-neutron-9.4.0/manifests/policy.pp --- puppet-module-neutron-8.0.0/manifests/policy.pp 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/manifests/policy.pp 2016-09-26 21:11:55.000000000 +0000 @@ -32,8 +32,12 @@ Openstacklib::Policy::Base { file_path => $policy_path, + require => Anchor['neutron::config::begin'], + notify => Anchor['neutron::config::end'], } create_resources('openstacklib::policy::base', $policies) + oslo::policy { 'neutron_config': policy_file => $policy_path } + } diff -Nru puppet-module-neutron-8.0.0/manifests/quota.pp puppet-module-neutron-9.4.0/manifests/quota.pp --- puppet-module-neutron-8.0.0/manifests/quota.pp 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/manifests/quota.pp 2016-09-26 21:11:55.000000000 +0000 @@ -59,10 +59,6 @@ # A negative value means unlimited. # Defaults to $::os_service_default. # -# [*quota_items*] -# (optional) Resource name(s) that are supported in quota features. -# Defaults to $::os_service_default. -# # [*quota_member*] # (optional) Number of pool members allowed per tenant. # A negative value means unlimited @@ -86,6 +82,12 @@ # A negative value means unlimited. # Defaults to $::os_service_default. # +# DEPRECATED PARAMATERS +# +# [*quota_items*] +# (optional) Resource name(s) that are supported in quota features. +# Defaults to undef +# class neutron::quota ( $default_quota = $::os_service_default, $quota_network = $::os_service_default, @@ -102,14 +104,21 @@ $quota_firewall_policy = $::os_service_default, $quota_firewall_rule = -1, $quota_health_monitor = $::os_service_default, - $quota_items = $::os_service_default, $quota_member = $::os_service_default, $quota_network_gateway = 5, $quota_packet_filter = 100, $quota_pool = $::os_service_default, - $quota_vip = $::os_service_default + $quota_vip = $::os_service_default, + #DEPRECATED PAMAMETERS + $quota_items = undef, ) { + include ::neutron::deps + + if $quota_items { + warning('quota_items is deprecated, has no effect and will be removed after Newton cycle.') + } + neutron_config { 'quotas/default_quota': value => $default_quota; 'quotas/quota_network': value => $quota_network; @@ -124,7 +133,6 @@ 'quotas/quota_firewall_policy': value => $quota_firewall_policy; 'quotas/quota_firewall_rule': value => $quota_firewall_rule; 'quotas/quota_health_monitor': value => $quota_health_monitor; - 'quotas/quota_items': value => $quota_items; 'quotas/quota_member': value => $quota_member; 'quotas/quota_network_gateway': value => $quota_network_gateway; 'quotas/quota_packet_filter': value => $quota_packet_filter; diff -Nru puppet-module-neutron-8.0.0/manifests/server/notifications.pp puppet-module-neutron-9.4.0/manifests/server/notifications.pp --- puppet-module-neutron-8.0.0/manifests/server/notifications.pp 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/manifests/server/notifications.pp 2016-09-26 21:11:55.000000000 +0000 @@ -30,11 +30,6 @@ # any events to send. # Defaults to $::os_service_default # -# [*nova_url*] -# (optional) URL for connection to nova (Only supports one nova region -# currently). -# Defaults to 'http://127.0.0.1:8774/v2' -# # [*auth_type*] # (optional) An authentication type to use with an OpenStack Identity server. # The value should contain auth plugin name @@ -117,12 +112,16 @@ # An authentication plugin to use with an OpenStack Identity server. # Defaults to $::os_service_default # +# [*nova_url*] +# Deprecated URL for connection to nova (Only supports one nova region +# currently). +# Defaults to $::os_service_default +# class neutron::server::notifications ( $notify_nova_on_port_status_changes = true, $notify_nova_on_port_data_changes = true, $send_events_interval = $::os_service_default, - $nova_url = 'http://127.0.0.1:8774/v2', $auth_type = 'password', $username = 'nova', $password = false, @@ -141,8 +140,11 @@ $nova_admin_password = false, $nova_region_name = $::os_service_default, $auth_plugin = $::os_service_default, + $nova_url = $::os_service_default, ) { + include ::neutron::deps + # Depend on the specified keystone_user resource, if it exists. Keystone_user <| title == 'nova' |> -> Class[neutron::server::notifications] @@ -158,6 +160,10 @@ fail('You must provide either tenant_name or tenant_id.') } + if ! is_service_default ($nova_url) { + warning('nova_url is deprecated and will be removed after Newton cycle.') + } + if $nova_admin_password { warning('nova_admin-* and nova_region_name parameters are deprecated and will be removed in a future release') neutron_config { diff -Nru puppet-module-neutron-8.0.0/manifests/server.pp puppet-module-neutron-9.4.0/manifests/server.pp --- puppet-module-neutron-8.0.0/manifests/server.pp 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/manifests/server.pp 2016-09-26 21:11:55.000000000 +0000 @@ -26,93 +26,28 @@ # [*log_dir*] # REMOVED: Use log_dir of neutron class instead. # -# [*auth_type*] -# (optional) What auth system to use -# Defaults to 'keystone'. Can other be 'noauth' -# -# [*keystone_auth_type*] -# (optional) An authentication plugin to use with an OpenStack Identity server. -# Defaults to 'password' -# -# [*auth_uri*] -# (optional) Complete public Identity API endpoint. -# Defaults to: 'http://localhost:5000/' -# -# [*auth_url*] -# (optional) Authorization URL. -# If version independent identity plugin is used available versions will be -# determined using auth_url -# Defaults to 'http://localhost:35357' -# -# [*username*] -# (optional) The name of the auth user -# Defaults to 'neutron' -# -# [*password*] -# The password to use for authentication (keystone) -# Either password or auth_password is required -# -# [*tenant_name*] -# (optional) The tenant of the auth user -# Defaults to 'services' -# -# [*project_domain_id*] -# (optional) Auth user project's domain ID -# Defaults to 'Default' -# -# [*project_name*] -# (optional) Auth user project's name -# Defaults to 'services' -# -# [*user_domain_id*] -# (optional) Auth user's domain ID -# Defaults to 'Default' -# -# [*region_name*] -# (optional) The authentication region -# Defaults to $::os_service_default -# # [*database_connection*] # (optional) Connection url for the neutron database. # (Defaults to undef) # -# [*sql_connection*] -# DEPRECATED: Use database_connection instead. -# -# [*connection*] -# DEPRECATED: Use database_connection instead. +# [*memcached_servers*] +# (optinal) a list of memcached server(s) to use for caching. If left +# undefined, tokens will instead be cached in-process. +# Defaults to $::os_service_default. # # [*database_max_retries*] # (optional) Maximum database connection retries during startup. # (Defaults to undef) # -# [*sql_max_retries*] -# DEPRECATED: Use database_max_retries instead. -# -# [*max_retries*] -# DEPRECATED: Use database_max_retries instead. -# # [*database_idle_timeout*] # (optional) Timeout before idle database connections are reaped. # Deprecates sql_idle_timeout # (Defaults to undef) # -# [*sql_idle_timeout*] -# DEPRECATED: Use database_idle_timeout instead. -# -# [*idle_timeout*] -# DEPRECATED: Use database_idle_timeout instead. -# # [*database_retry_interval*] # (optional) Interval between retries of opening a database connection. # (Defaults to 10) # -# [*sql_reconnect_interval*] -# DEPRECATED: Use database_retry_interval instead. -# -# [*retry_interval*] -# DEPRECATED: Use database_retry_interval instead. -# # [*database_min_pool_size*] # (optional) Minimum number of SQL connections to keep open in a pool. # Defaults to: undef. @@ -158,10 +93,22 @@ # [*lock_path*] # (optional) Deprecated. Use lock_path parameter on base neutron class instead. # +# [*network_scheduler_driver*] +# (optional) The scheduler used when scheduling networks +# neutron.scheduler.dhcp_agent_scheduler.AZAwareWeightScheduler to use availability zone hints scheduling. +# Defaults to $::os_service_default +# +# Example: +# +# class { 'neutron': +# network_scheduler_driver => 'neutron.scheduler.dhcp_agent_scheduler.AZAwareWeightScheduler' +# } +# # [*router_scheduler_driver*] # (optional) Driver to use for scheduling router to a default L3 agent. Could be: # neutron.scheduler.l3_agent_scheduler.ChanceScheduler to schedule a router in a random way # neutron.scheduler.l3_agent_scheduler.LeastRoutersScheduler to allocate on an L3 agent with the least number of routers bound. +# neutron.scheduler.l3_agent_scheduler.AZLeastRoutersScheduler to use availability zone hints. # Defaults to: neutron.scheduler.l3_agent_scheduler.ChanceScheduler # # [*router_distributed*] @@ -170,11 +117,38 @@ # Also can be the type of the router on the create request (admin-only attribute). # Defaults to $::os_service_default # +# [*dhcp_load_type*] +# (optional) The resource type whos load is being reported by the agent. +# The expected values are either 'networks', 'subnets', 'ports'. +# Defaults to $::os_service_default +# +# Example: +# +# class { 'neutron': +# dhcp_load_type => 'networks' +# } +# +# [*default_availability_zones*] +# (optional) A list of availability zones that are picked when availability zone is not specified +# The expected input is an array when specified. +# Defaults to $::os_service_default +# +# Example: +# +# class { 'neutron': +# default_availability_zones => ['zone1', 'zone2'] +# } +# # [*allow_automatic_l3agent_failover*] # (optional) Allow automatic rescheduling of routers from dead L3 agents with # admin_state_up set to True to alive agents. # Defaults to $::os_service_default # +# [*allow_automatic_dhcp_failover*] +# (optional) Allow automatic rescheduling of dhcp from dead dhcp agents with +# admin_state_up set to True to alive agents. +# Defaults to $::os_service_default +# # [*l3_ha*] # (optional) Enable high availability for virtual routers. # Defaults to false @@ -183,10 +157,6 @@ # (optional) Maximum number of l3 agents which a HA router will be scheduled on. If set to '0', a router will be scheduled on every agent. # Defaults to '3' # -# [*min_l3_agents_per_router*] -# (optional) Minimum number of l3 agents which a HA router will be scheduled on. -# Defaults to '2' -# # [*l3_ha_net_cidr*] # (optional) CIDR of the administrative network if HA mode is enabled. # Defaults to $::os_service_default @@ -199,6 +169,10 @@ # (optional) Drivers list to use to send the update notification # Defaults to $::os_service_default. # +# [*network_auto_schedule*] +# (optional) Allow auto scheduling networks to DHCP agent +# Defaults to $::os_service_default. +# # [*ensure_vpnaas_package*] # (optional) Ensures installation of VPNaaS package before starting API service. # Set to true to ensure installation of the package that is required to start neutron service if service_plugin is enabled. @@ -209,65 +183,104 @@ # Set to true to ensure installation of the package that is required to start neutron service if service_plugin is enabled. # Defaults to false. # -# [*ensure_lbaas_package*] -# (optional) Ensures installation of LBaaS package before starting API service. -# Set to true to ensure installation of the package that is required to start neutron service if service_plugin is enabled. -# Defaults to false. -# # [*vpnaas_agent_package*] # (optional) Use VPNaaS agent package instead of L3 agent package on debian platforms # RedHat platforms won't take care of this parameter # true/false # Defaults to false +# +# [*service_providers*] +# (optional) (Array) Configures the service providers for neutron server. +# This needs to be set for lbaas, vpnaas, and fwaas. +# Defaults to $::os_service_default +# +# Example: +# +# class { 'neutron::server': +# service_providers => [ +# 'LOADBALANCERV2:Octavia:neutron_lbaas.drivers.octavia.driver.OctaviaDriver:default', +# 'LOADBALANCER:Haproxy:neutron_lbaas.services.loadbalancer.drivers.haproxy.plugin_driver.HaproxyOnHostPluginDriver', +# 'VPN:openswan:neutron_vpnaas.services.vpn.service_drivers.ipsec.IPsecVPNDriver:default' +# ] +# } +# +# [*auth_strategy*] +# (optional) The strategy to use for authentication. +# Defaults to 'keystone' +# # === Deprecated Parameters # -# [*identity_uri*] -# Deprecated. Auth plugins based authentication should be used instead -# (optional) Complete admin Identity API endpoint. -# Defaults to: 'http://localhost:35357/' -# -# [*auth_region*] -# Deprecated. Auth plugins based authentication should be used instead -# (optional) The authentication region. Note this value is case-sensitive and -# must match the endpoint region defined in Keystone. +# [*ensure_lbaas_package*] +# Deprecated. Ensures installation of LBaaS package. +# LBaaS agent should be installed from neutron::agents::lbaas. +# Defaults to false. +# +# [*min_l3_agents_per_router*] +# Deprecated. (optional) Minimum number of l3 agents which a HA router will be scheduled on. +# Defaults to undef +# +# [*keystone_auth_type*] +# (optional) Deprecated Use neutron::keystone::authtoken::auth_type instead. +# Defaults to undef +# +# [*auth_uri*] +# (optional) Deprecated Use neutron::keystone::authtoken::auth_uri +# Defaults to undef +# +# [*auth_url*] +# (optional) Deprecated Use neutron::keystone::authtoken::auth_url instead +# Defaults to undef +# +# [*username*] +# (optional) Deprecated Use neutron::keystone::authtoken::username instead +# Defaults to undef +# +# [*password*] +# (optional) Deprecated Use neutron::keystone::authtoken::password +# Defaults to undef +# +# [*project_domain_id*] +# Deprecated. Auth user project's domain ID # Defaults to $::os_service_default # -# [*auth_tenant*] -# Deprecated. Auth plugins based authentication should be used instead -# (optional) The tenant of the auth user -# Defaults to services -# -# [*auth_user*] -# Deprecated. Auth plugins based authentication should be used instead -# (optional) The name of the auth user -# Defaults to neutron -# -# [*auth_password*] -# Deprecated. Auth plugins based authentication should be used instead -# (optional) The password to use for authentication (keystone) -# Defaults to false. Set a value unless you are using noauth -# -# [*auth_plugin*] -# Deprecated. keystone_auth_type should be used instead -# An authentication plugin to use with an OpenStack Identity server. -# Defaults to $::os_service_plugin +# [*project_domain_name*] +# (optional) Deprecated +# Use neutron::keystone::authtoken::project_domain_name instead +# Defaults to undef +# +# [*project_name*] +# (optional) Deprecated Use neutron::keystone::authtoken::project_name +# instead +# Defaults to undef +# +# [*user_domain_id*] +# (optional) Deprecated Use neutron::keystone::authtoken:: +# Defaults to $::os_service_default +# +# [*user_domain_name*] +# (optional) Deprecated Use neutron::keystone::authtoken::user_domain_name +# instead +# Defaults to undef +# +# [*region_name*] +# (optional) Deprecated Use neutron::keystone::authtoken::region_name +# instead. +# Defaults to undef +# +# [*memcached_servers*] +# (optional) Deprecated Use neutron::keystone::authtoken::memcached_servers +# instead +# Defaults to undef +# +# [*auth_type*] +# (optional) Deprecated Use auth_strategy instead. +# Defaults to undef # class neutron::server ( $package_ensure = 'present', $enabled = true, $manage_service = true, $service_name = $::neutron::params::server_service, - $auth_type = 'keystone', - $keystone_auth_type = 'password', - $auth_uri = 'http://localhost:5000/', - $auth_url = 'http://localhost:35357/', - $username = 'neutron', - $password = false, - $tenant_name = 'services', - $region_name = $::os_service_default, - $project_domain_id = 'Default', - $project_name = 'services', - $user_domain_id = 'Default', $database_connection = undef, $database_max_retries = undef, $database_idle_timeout = undef, @@ -281,35 +294,116 @@ $agent_down_time = $::os_service_default, $router_scheduler_driver = 'neutron.scheduler.l3_agent_scheduler.ChanceScheduler', $router_distributed = $::os_service_default, + $network_scheduler_driver = $::os_service_default, + $dhcp_load_type = $::os_service_default, + $default_availability_zones = $::os_service_default, $allow_automatic_l3agent_failover = $::os_service_default, + $allow_automatic_dhcp_failover = $::os_service_default, $l3_ha = false, $max_l3_agents_per_router = 3, - $min_l3_agents_per_router = 2, $l3_ha_net_cidr = $::os_service_default, $qos_notification_drivers = $::os_service_default, + $network_auto_schedule = $::os_service_default, $ensure_vpnaas_package = false, $ensure_fwaas_package = false, - $ensure_lbaas_package = false, $vpnaas_agent_package = false, + $service_providers = $::os_service_default, + $auth_strategy = 'keystone', # DEPRECATED PARAMETERS $log_dir = undef, $log_file = undef, $report_interval = undef, $state_path = undef, $lock_path = undef, - $auth_password = false, - $auth_region = $::os_service_default, - $auth_tenant = 'services', - $auth_user = 'neutron', - $identity_uri = 'http://localhost:35357/', - $auth_plugin = $::os_service_default, + $ensure_lbaas_package = false, + $min_l3_agents_per_router = undef, + $keystone_auth_type = undef, + $auth_uri = undef, + $auth_url = undef, + $username = undef, + $password = undef, + $region_name = undef, + $project_domain_name = undef, + $project_name = undef, + $user_domain_name = undef, + $memcached_servers = undef, + $project_domain_id = $::os_service_default, + $user_domain_id = $::os_service_default, + $auth_type = undef, ) inherits ::neutron::params { + include ::neutron::deps include ::neutron::db include ::neutron::policy # Work-around LP#1551974. neutron requires the keystoneclient to auth tokens include ::keystone::client + if $auth_type { + warning('neutron::server::auth_type is deprecated, use neutron::server::auth_strategy instead.') + } + + if $keystone_auth_type { + warning('neutron::server::keystone_auth_type is deprecated, use neutron::keystone::authtoken::auth_type instead.') + } + + if $auth_uri { + warning('neutron::server::auth_uri is deprecated, use neutron::keystone::authtoken::auth_uri instead.') + } + + if $auth_url { + warning('neutron::server::auth_url is deprecated, use neutron::keystone::authtoken::auth_url instead.') + } + + if $username { + warning('neutron::server::username is deprecated, use neutron::keystone::authtoken::username instead.') + } + + if $password { + warning('neutron::server::password is deprecated, use neutron::keystone::authtoken::password instead.') + } + + if ! is_service_default($project_domain_id) { + warning('neutron::server::project_domain_id is deprecated, use neutron::keystone::authtoken::project_domain_name instead.') + } + + if $project_domain_name { + warning('neutron::server::project_domain_name is deprecated, use neutron::keystone::authtoken::project_domain_name instead.') + } + + if $project_name { + warning('neutron::server::project_name is deprecated, use neutron::keystone::authtoken::project_name instead.') + } + + if ! is_service_default($user_domain_id) { + warning('neutron::server::user_domain_id is deprecated, use neutron::keystone::authtoken::user_domain_name instead.') + } + + if $user_domain_name { + warning('neutron::server::user_domain_name is deprecated, use neutron::keystone::authtoken::user_domain_name instead.') + } + + if $region_name { + warning('neutron::server::region_name is deprecated, use neutron::keystone::authtoken::region_name instead.') + } + + if $memcached_servers { + warning('neutron::server::memcached_servers is deprecated, use neutron::keystone::authtoken::memcached_servers instead') + } + + if !is_service_default($default_availability_zones) { + validate_array($default_availability_zones) + } + + if !is_service_default($dhcp_load_type) { + validate_re($dhcp_load_type, + ['^networks$', '^subnets$', '^ports$'], + 'Must pass either networks, subnets, or ports as values for dhcp_load_type') + } + + if !is_service_default($service_providers) { + validate_array($service_providers) + } + if $ensure_fwaas_package { if ($::osfamily == 'Debian') { # Debian platforms @@ -345,49 +439,38 @@ } if $ensure_lbaas_package { - ensure_resource( 'package', 'neutron-lbaas-agent', { + warning('$ensure_lbaas_package is deprecated. To install lbaas agent the neutron::agents::lbaas class should be used.') + ensure_resource( 'package', 'neutron-lbaasv2-agent', { 'ensure' => $package_ensure, - 'name' => $::neutron::params::lbaas_agent_package, + 'name' => $::neutron::params::lbaasv2_agent_package, 'tag' => ['openstack', 'neutron-package'], }) } - - - Neutron_config<||> ~> Service['neutron-server'] - Neutron_api_config<||> ~> Service['neutron-server'] - Class['neutron::policy'] ~> Service['neutron-server'] - Neutron_config<||> -> Neutron_network<||> - - if $l3_ha { - if $min_l3_agents_per_router <= $max_l3_agents_per_router or $max_l3_agents_per_router == 0 { - neutron_config { - 'DEFAULT/l3_ha': value => true; - 'DEFAULT/max_l3_agents_per_router': value => $max_l3_agents_per_router; - 'DEFAULT/min_l3_agents_per_router': value => $min_l3_agents_per_router; - 'DEFAULT/l3_ha_net_cidr': value => $l3_ha_net_cidr; - } - } else { - fail('min_l3_agents_per_router should be less than or equal to max_l3_agents_per_router.') - } - } else { - neutron_config { - 'DEFAULT/l3_ha': value => false; - } - } - - if $sync_db { include ::neutron::db::sync } + if $min_l3_agents_per_router { + warning('min_l3_agents_per_router is deprecated, has no effect and will be removed for the Ocata release.') + } + neutron_config { + 'DEFAULT/l3_ha': value => $l3_ha; + 'DEFAULT/max_l3_agents_per_router': value => $max_l3_agents_per_router; + 'DEFAULT/l3_ha_net_cidr': value => $l3_ha_net_cidr; 'DEFAULT/api_workers': value => $api_workers; 'DEFAULT/rpc_workers': value => $rpc_workers; 'DEFAULT/agent_down_time': value => $agent_down_time; 'DEFAULT/router_scheduler_driver': value => $router_scheduler_driver; 'DEFAULT/router_distributed': value => $router_distributed; 'DEFAULT/allow_automatic_l3agent_failover': value => $allow_automatic_l3agent_failover; + 'DEFAULT/allow_automatic_dhcp_failover': value => $allow_automatic_dhcp_failover; + 'DEFAULT/network_scheduler_driver': value => $network_scheduler_driver; + 'DEFAULT/dhcp_load_type': value => $dhcp_load_type; + 'DEFAULT/default_availability_zones': value => join(any2array($default_availability_zones), ','); + 'DEFAULT/network_auto_schedule': value => $network_auto_schedule; + 'service_providers/service_provider': value => $service_providers; } if $state_path { @@ -415,93 +498,27 @@ neutron_config { 'qos/notification_drivers': value => join(any2array($qos_notification_drivers), ',') } if ($::neutron::params::server_package) { - Package['neutron-server'] -> Neutron_api_config<||> - Package['neutron-server'] -> Neutron_config<||> - Package['neutron-server'] -> Service['neutron-server'] - Package['neutron-server'] -> Class['neutron::policy'] package { 'neutron-server': ensure => $package_ensure, name => $::neutron::params::server_package, tag => ['openstack', 'neutron-package'], } - } else { - # Some platforms (RedHat) does not provide a neutron-server package. - # The neutron api config file is provided by the neutron package. - Package['neutron'] -> Class['neutron::policy'] - Package['neutron'] -> Neutron_api_config<||> } neutron_config { 'DEFAULT/auth_type': value => $auth_type; } - if ($auth_type == 'keystone') { - - if ($auth_password == false) and ($password == false) { - fail('Either auth_password or password must be set when using keystone authentication.') - } elsif ($auth_password != false) and ($password != false) { - fail('auth_password and password must not be used together.') - } else { - neutron_config { - 'keystone_authtoken/auth_uri': value => $auth_uri; - } - neutron_api_config { - 'filter:authtoken/auth_uri': value => $auth_uri; - } - } - - if $auth_password { - - warning('identity_uri, auth_tenant, auth_user, auth_password, auth_region configuration options are deprecated in favor of auth_plugin and related options') - neutron_config { - 'keystone_authtoken/admin_tenant_name': value => $auth_tenant; - 'keystone_authtoken/admin_user': value => $auth_user; - 'keystone_authtoken/admin_password': value => $auth_password, secret => true; - 'keystone_authtoken/auth_region': value => $auth_region; - 'keystone_authtoken/identity_uri': value => $identity_uri; - } + $auth_strategy_real = pick($auth_type, $auth_strategy) + if ($auth_strategy_real == 'keystone') { - neutron_api_config { - 'filter:authtoken/admin_tenant_name': value => $auth_tenant; - 'filter:authtoken/admin_user': value => $auth_user; - 'filter:authtoken/admin_password': value => $auth_password, secret => true; - 'filter:authtoken/identity_uri': value => $identity_uri; - } + include ::neutron::keystone::authtoken - } else { - - neutron_config { - 'keystone_authtoken/auth_url': value => $auth_url; - 'keystone_authtoken/tenant_name': value => $tenant_name; - 'keystone_authtoken/username': value => $username; - 'keystone_authtoken/password': value => $password, secret => true; - 'keystone_authtoken/region_name': value => $region_name; - 'keystone_authtoken/project_domain_id': value => $project_domain_id; - 'keystone_authtoken/project_name': value => $project_name; - 'keystone_authtoken/user_domain_id': value => $user_domain_id; - 'keystone_authtoken/admin_tenant_name': ensure => absent; - 'keystone_authtoken/admin_user': ensure => absent; - 'keystone_authtoken/admin_password': ensure => absent; - 'keystone_authtoken/auth_region': ensure => absent; - 'keystone_authtoken/identity_uri': ensure => absent; - } - neutron_api_config { - 'filter:authtoken/admin_tenant_name': ensure => absent; - 'filter:authtoken/admin_user': ensure => absent; - 'filter:authtoken/admin_password': ensure => absent; - 'filter:authtoken/identity_uri': ensure => absent; - } - - if ! is_service_default ($auth_plugin) and ($auth_plugin) { - warning('auth_plugin parameter is deprecated, keystone_auth_type should be used instead') - neutron_config { - 'keystone_authtoken/auth_plugin': value => $auth_plugin; - } - } else { - neutron_config { - 'keystone_authtoken/auth_type': value => $keystone_auth_type; - } - } + neutron_api_config { + 'filter:authtoken/admin_tenant_name': ensure => absent; + 'filter:authtoken/admin_user': ensure => absent; + 'filter:authtoken/admin_password': ensure => absent; + 'filter:authtoken/identity_uri': ensure => absent; } } @@ -520,7 +537,6 @@ enable => $enabled, hasstatus => true, hasrestart => true, - require => Class['neutron'], tag => ['neutron-service', 'neutron-db-sync-service'], } } diff -Nru puppet-module-neutron-8.0.0/manifests/services/fwaas.pp puppet-module-neutron-9.4.0/manifests/services/fwaas.pp --- puppet-module-neutron-8.0.0/manifests/services/fwaas.pp 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/manifests/services/fwaas.pp 2016-09-26 21:11:55.000000000 +0000 @@ -36,32 +36,35 @@ # true/false # Defaults to false # +# [*purge_config*] +# (optional) Whether to set only the specified config options +# in the fwaas config. +# Defaults to false. +# class neutron::services::fwaas ( $enabled = $::os_service_default, $driver = $::os_service_default, - $vpnaas_agent_package = false + $vpnaas_agent_package = false, + $purge_config = false, ) { + include ::neutron::deps include ::neutron::params - # FWaaS needs to be enabled before starting Neutron L3 agent - Neutron_fwaas_service_config<||> ~> Service['neutron-l3'] - if ($::osfamily == 'Debian') { # Debian platforms if $vpnaas_agent_package { ensure_resource( 'package', $::neutron::params::vpnaas_agent_package, { 'ensure' => $neutron::package_ensure, - 'tag' => 'openstack' + 'tag' => ['neutron-package', 'openstack'], }) - Package[$::neutron::params::vpnaas_agent_package] -> Neutron_fwaas_service_config<||> } else { ensure_resource( 'package', 'neutron-fwaas' , { 'name' => $::neutron::params::fwaas_package, 'ensure' => $neutron::package_ensure, - 'tag' => 'openstack' + 'tag' => ['neutron-package', 'openstack'], }) } } elsif($::osfamily == 'Redhat') { @@ -69,10 +72,14 @@ ensure_resource( 'package', 'neutron-fwaas', { 'name' => $::neutron::params::fwaas_package, 'ensure' => $neutron::package_ensure, - 'tag' => 'openstack' + 'tag' => ['neutron-package', 'openstack'], }) } + resources { 'neutron_fwaas_service_config': + purge => $purge_config, + } + neutron_fwaas_service_config { 'fwaas/enabled': value => $enabled; 'fwaas/driver': value => $driver; diff -Nru puppet-module-neutron-8.0.0/manifests/services/lbaas/haproxy.pp puppet-module-neutron-9.4.0/manifests/services/lbaas/haproxy.pp --- puppet-module-neutron-8.0.0/manifests/services/lbaas/haproxy.pp 1970-01-01 00:00:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/manifests/services/lbaas/haproxy.pp 2016-09-26 21:11:55.000000000 +0000 @@ -0,0 +1,70 @@ +# +# Copyright (C) 2016 Matthew J. Black +# +# Author: Matthew J. Black +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +# == Class: neutron::services::lbaas::haproxy +# +# Configure the haproxy LBaaS service provider +# +# === Parameters: +# +# [*interface_driver*] +# (optional) The driver to manage the virtual interface +# Defaults to $::os_service_default +# +# [*periodic_interval*] +# (optional) Seconds between periodic task runs +# Defaults to $::os_service_default +# +# [*loadbalancer_state_path*] +# (optional) Location to store config and state files +# Defaults to $::os_service_default +# +# [*user_group*] +# (optional) The user/group to run haproxy. +# Defaults to $::os_service_default +# +# [*send_gratuitous_arp*] +# (optional) Send gratuitous arps to flush the arp cache +# when VIP is deleted and re-added. +# Defaults to $::os_service_default +# +# [*jinja_config_template*] +# (optional) The template location to be used for haproxy. +# Defaults to $::os_service_default +# +# + +class neutron::services::lbaas::haproxy( + $interface_driver = $::os_service_default, + $periodic_interval = $::os_service_default, + $loadbalancer_state_path = $::os_service_default, + $user_group = $::os_service_default, + $send_gratuitous_arp = $::os_service_default, + $jinja_config_template = $::os_service_default +) { + + include ::neutron::deps + + neutron_config { + 'haproxy/interface_driver': value => $interface_driver; + 'haproxy/periodic_interval': value => $periodic_interval; + 'haproxy/loadbalancer_state_path': value => $loadbalancer_state_path; + 'haproxy/user_group': value => $user_group; + 'haproxy/send_gratuitous_arp': value => $send_gratuitous_arp; + 'haproxy/jinja_config_template': value => $jinja_config_template; + } +} diff -Nru puppet-module-neutron-8.0.0/manifests/services/lbaas/octavia.pp puppet-module-neutron-9.4.0/manifests/services/lbaas/octavia.pp --- puppet-module-neutron-8.0.0/manifests/services/lbaas/octavia.pp 1970-01-01 00:00:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/manifests/services/lbaas/octavia.pp 2016-09-26 21:11:55.000000000 +0000 @@ -0,0 +1,59 @@ +# +# Copyright (C) 2016 Matthew J. Black +# +# Author: Matthew J. Black +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +# == Class: neutron::services::lbaas::octavia +# +# Configure the Octavia LBaaS service provider +# +# === Parameters: +# +# [*base_url*] +# (optional) The url endpoint for Octavia. +# Defaults to 'https://127.0.0.1:9876' +# +# [*request_poll_interval*] +# (optional) Interval in sections to poll octavia when +# entity is created, updated, or deleted +# Defaults to $::os_service_default +# +# [*request_poll_timeout*] +# (optional) Time to stop polling octavia when status +# of an entity does not change. +# Defaults to $::os_service_default +# +# [*allocates_vip*] +# (optional) Whether Octavia is responsible for allocating +# the VIP. +# Defaults to $::os_service_default +# + +class neutron::services::lbaas::octavia( + $base_url = 'http://127.0.0.1:9876', + $request_poll_interval = $::os_service_default, + $request_poll_timeout = $::os_service_default, + $allocates_vip = $::os_service_default +) { + + include ::neutron::deps + + neutron_config { + 'octavia/base_url': value => $base_url; + 'octavia/request_poll_interval': value => $request_poll_interval; + 'octavia/request_poll_timeout': value => $request_poll_timeout; + 'octavia/allocates_vip': value => $allocates_vip; + } +} diff -Nru puppet-module-neutron-8.0.0/manifests/services/lbaas.pp puppet-module-neutron-9.4.0/manifests/services/lbaas.pp --- puppet-module-neutron-8.0.0/manifests/services/lbaas.pp 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/manifests/services/lbaas.pp 2016-09-26 21:11:55.000000000 +0000 @@ -15,6 +15,9 @@ # License for the specific language governing permissions and limitations # under the License. # +# == DEPRECATED +# This class has been deprecated in favor of using the parameter in +# neutron::server::service_provider # # == Class: neutron::services::lbaas # @@ -22,9 +25,26 @@ # # === Parameters: # -# [*package_ensure*] -# (required) Whether or not to install the LBaaS Neutron plugin package -# present +# [*ensure_lbaas_driver_package*] +# (optional) Whether to install the lbaas driver package +# Defaults to 'present' +# +# [*cert_manager_type*] +# (optional) Certificate manager type to use for lbaas. +# Defaults to $::os_service_default +# Example: barbican +# +# [*cert_storage_path*] +# (optional) The location to store certificates locally. +# Defaults to $::os_service_default +# Example: /var/lib/neutron-lbaas/certificates/ +# +# [*barbican_auth*] +# (optional) Name of the barbican authentication method to use. +# Defaults to $::os_service_default +# Example: barbican_acl_auth +# +# === Deprecated Parameters # # [*service_providers*] # (optional) Array of allowed service types or ''. @@ -35,20 +55,51 @@ # Must be in form ::[:default]. # Defaults to $::os_service_default # +# [*package_ensure*] +# (optional) Deprecated. Used to install the lbaas v2 agent. This was moved into +# neutron::agents::lbaas as the lbaas services handles scheduling of new load balancers +# Defaults to false +# class neutron::services::lbaas ( - $package_ensure = 'present', - $service_providers = $::os_service_default, + $cert_manager_type = $::os_service_default, + $cert_storage_path = $::os_service_default, + $barbican_auth = $::os_service_default, + $ensure_lbaas_driver_package = 'present', + $service_providers = $::os_service_default, + # DEPRECATED + $package_ensure = false, ) { + include ::neutron::deps include ::neutron::params - # agent package contains both agent and service resources - ensure_resource( 'package', 'neutron-lbaas-agent', { - ensure => $package_ensure, - name => $::neutron::params::lbaas_agent_package, - tag => ['openstack', 'neutron-package'], - }) + if $ensure_lbaas_driver_package { + ensure_packages(['python-neutron-lbaas'], { + ensure => $ensure_lbaas_driver_package, + tag => ['openstack', 'neutron-package'] + }) + } + + neutron_config { + 'certificates/cert_manager_type': value => $cert_manager_type; + 'certificates/storage_path': value => $cert_storage_path; + 'certificates/barbican_auth': value => $barbican_auth; + } + + if !is_service_default($service_providers) { + warning("service_providers in neutron::services::lbaas is deprecated in newton \ +release, please use service provider in neutron::server class") + } + if $package_ensure { + warning('Package ensure is deprecated. The neutron::agents::lbaas class should be used to install the agent') + # agent package contains both agent and service resources + ensure_resource( 'package', 'neutron-lbaasv2-agent', { + ensure => $package_ensure, + name => $::neutron::params::lbaasv2_agent_package, + tag => ['openstack', 'neutron-package'], + }) + } if !is_service_default($service_providers) { # default value is uncommented setting, so we should not touch it at all neutron_lbaas_service_config { 'service_providers/service_provider': diff -Nru puppet-module-neutron-8.0.0/manifests/services/vpnaas.pp puppet-module-neutron-9.4.0/manifests/services/vpnaas.pp --- puppet-module-neutron-8.0.0/manifests/services/vpnaas.pp 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/manifests/services/vpnaas.pp 2016-09-26 21:11:55.000000000 +0000 @@ -15,6 +15,9 @@ # License for the specific language governing permissions and limitations # under the License. # +# == DEPRECATED +# This class has been deprecated in favor of using the parameter in +# neutron::server::service_provider # # == Class: neutron::services::vpnaas # @@ -41,6 +44,10 @@ ) { include ::neutron::params + if !is_service_default($service_providers) { + warning("service_providers in neutron::services::vpnaas is deprecated in newton release, \ +please use service provider in neutron::server class") + } # agent package contains both agent and service resources ensure_resource( 'package', 'neutron-vpnaas-agent', { diff -Nru puppet-module-neutron-8.0.0/metadata.json puppet-module-neutron-9.4.0/metadata.json --- puppet-module-neutron-8.0.0/metadata.json 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/metadata.json 2016-09-26 21:11:55.000000000 +0000 @@ -1,6 +1,6 @@ { "name": "openstack-neutron", - "version": "8.0.0", + "version": "9.4.0", "author": "OpenStack Contributors", "summary": "Puppet module for OpenStack Neutron", "license": "Apache-2.0", @@ -8,35 +8,76 @@ "project_page": "https://launchpad.net/puppet-neutron", "issues_url": "https://bugs.launchpad.net/puppet-neutron", "requirements": [ - { "name": "pe","version_requirement": "3.x" }, - { "name": "puppet","version_requirement": "3.x" } + { + "name": "pe", + "version_requirement": "3.x" + }, + { + "name": "puppet", + "version_requirement": "3.x" + } ], "operatingsystem_support": [ { "operatingsystem": "Debian", - "operatingsystemrelease": ["7"] + "operatingsystemrelease": [ + "7" + ] }, { "operatingsystem": "Fedora", - "operatingsystemrelease": ["20"] + "operatingsystemrelease": [ + "20" + ] }, { "operatingsystem": "RedHat", - "operatingsystemrelease": ["6.5","7"] + "operatingsystemrelease": [ + "6.5", + "7" + ] }, { "operatingsystem": "Ubuntu", - "operatingsystemrelease": ["12.04","14.04"] + "operatingsystemrelease": [ + "14.04", + "16.04" + ] } ], "description": "Installs and configures OpenStack Neutron (Networking).", "dependencies": [ - { "name": "puppetlabs/inifile", "version_requirement": ">=1.0.0 <2.0.0" }, - { "name": "openstack/keystone", "version_requirement": ">=8.0.0 <9.0.0" }, - { "name": "openstack/nova", "version_requirement": ">=8.0.0 <9.0.0" }, - { "name": "puppetlabs/stdlib", "version_requirement": ">=4.0.0 <5.0.0" }, - { "name": "openstack/vswitch", "version_requirement": ">=4.0.0 <5.0.0" }, - { "name": "duritong/sysctl", "version_requirement": ">=0.0.1 <1.0.0" }, - { "name": "openstack/openstacklib", "version_requirement": ">=8.0.0 <9.0.0" } + { + "name": "puppetlabs/inifile", + "version_requirement": ">=1.0.0 <2.0.0" + }, + { + "name": "openstack/keystone", + "version_requirement": ">=9.4.0 <10.0.0" + }, + { + "name": "openstack/nova", + "version_requirement": ">=9.4.0 <10.0.0" + }, + { + "name": "puppetlabs/stdlib", + "version_requirement": ">=4.0.0 <5.0.0" + }, + { + "name": "openstack/vswitch", + "version_requirement": ">=5.4.0 <6.0.0" + }, + { + "name": "duritong/sysctl", + "version_requirement": ">=0.0.1 <1.0.0" + }, + { + "name": "openstack/openstacklib", + "version_requirement": ">=9.4.0 <10.0.0" + }, + { + "name": "openstack/oslo", + "version_requirement": ">=9.4.0 <10.0.0" + } ] } diff -Nru puppet-module-neutron-8.0.0/README.md puppet-module-neutron-9.4.0/README.md --- puppet-module-neutron-8.0.0/README.md 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/README.md 2016-09-26 21:11:55.000000000 +0000 @@ -1,8 +1,6 @@ neutron =================================== -7.0.0 - 2015.2.0 - Liberty - #### Table of Contents 1. [Overview - What is the neutron module?](#overview) @@ -48,13 +46,11 @@ rabbit_host => '127.0.0.1', rabbit_user => 'neutron', rabbit_password => 'rabbit_secret', - verbose => false, debug => false, } # configure authentication class { 'neutron::server': - auth_host => '127.0.0.1', # the keystone host address auth_password => 'keystone_neutron_secret', sql_connection => 'mysql://neutron:neutron_sql_secret@127.0.0.1/neutron?charset=utf8', } @@ -101,12 +97,12 @@ The `neutron_config` provider is a children of the ini_setting provider. It allows one to write an entry in the `/etc/neutron/neutron.conf` file. ```puppet -neutron_config { 'DEFAULT/verbose' : - value => true, +neutron_config { 'DEFAULT/core_plugin' : + value => openvswitch, } ``` -This will write `verbose=true` in the `[DEFAULT]` section. +This will write `core_plugin=openvswitch` in the `[DEFAULT]` section. ##### name @@ -132,6 +128,7 @@ * Open vSwitch with ML2 * linuxbridge with ML2 +* Arista with ML2 * cisco-neutron with and without ML2 * NVP * PLUMgrid @@ -160,7 +157,7 @@ The puppet-openstack modules follow the OpenStack development model. Developer documentation for the entire puppet-openstack project is at: -* https://wiki.openstack.org/wiki/Puppet-openstack#Developerdocumentation +* http://docs.openstack.org/developer/puppet-openstack-guide/ Contributors ------------ diff -Nru puppet-module-neutron-8.0.0/releasenotes/notes/add_dnsmasq_dns_servers-2dd26f5c9383f836.yaml puppet-module-neutron-9.4.0/releasenotes/notes/add_dnsmasq_dns_servers-2dd26f5c9383f836.yaml --- puppet-module-neutron-8.0.0/releasenotes/notes/add_dnsmasq_dns_servers-2dd26f5c9383f836.yaml 1970-01-01 00:00:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/releasenotes/notes/add_dnsmasq_dns_servers-2dd26f5c9383f836.yaml 2016-09-26 21:11:55.000000000 +0000 @@ -0,0 +1,3 @@ +--- +features: + - Add 'dnsmasq_dns_servers' option support to dhcp agent settings. diff -Nru puppet-module-neutron-8.0.0/releasenotes/notes/added_arista_ml2_plugin-8bfd0c41981dac50.yaml puppet-module-neutron-9.4.0/releasenotes/notes/added_arista_ml2_plugin-8bfd0c41981dac50.yaml --- puppet-module-neutron-8.0.0/releasenotes/notes/added_arista_ml2_plugin-8bfd0c41981dac50.yaml 1970-01-01 00:00:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/releasenotes/notes/added_arista_ml2_plugin-8bfd0c41981dac50.yaml 2016-09-26 21:11:55.000000000 +0000 @@ -0,0 +1,6 @@ +--- +features: + - Added neutron::plugins::ml2::arista class to manage the arista + ml2 driver. + - Added neutron::plugins::ml2::arista::l3_arista class to manage + the arista ml2 l3 plugin. diff -Nru puppet-module-neutron-8.0.0/releasenotes/notes/added-rabbit_transient_queues_ttl-option-3a0926100bd05b01.yaml puppet-module-neutron-9.4.0/releasenotes/notes/added-rabbit_transient_queues_ttl-option-3a0926100bd05b01.yaml --- puppet-module-neutron-8.0.0/releasenotes/notes/added-rabbit_transient_queues_ttl-option-3a0926100bd05b01.yaml 1970-01-01 00:00:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/releasenotes/notes/added-rabbit_transient_queues_ttl-option-3a0926100bd05b01.yaml 2016-09-26 21:11:55.000000000 +0000 @@ -0,0 +1,3 @@ +--- +features: + - Add oslo.messaging rabbit_transient_queues_ttl parameter support. diff -Nru puppet-module-neutron-8.0.0/releasenotes/notes/add_geneve_type_driver_configs-e285075b3238b49d.yaml puppet-module-neutron-9.4.0/releasenotes/notes/add_geneve_type_driver_configs-e285075b3238b49d.yaml --- puppet-module-neutron-8.0.0/releasenotes/notes/add_geneve_type_driver_configs-e285075b3238b49d.yaml 1970-01-01 00:00:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/releasenotes/notes/add_geneve_type_driver_configs-e285075b3238b49d.yaml 2016-09-26 21:11:55.000000000 +0000 @@ -0,0 +1,4 @@ +--- +features: + - Added geneve config options in type_drivers. + - Added max_header_size parameter to ml2 plugin for use in geneve configuration. diff -Nru puppet-module-neutron-8.0.0/releasenotes/notes/add_lbaas_driver_package_to_lbaas_services_class-8d0f51e7be9b5f42.yaml puppet-module-neutron-9.4.0/releasenotes/notes/add_lbaas_driver_package_to_lbaas_services_class-8d0f51e7be9b5f42.yaml --- puppet-module-neutron-8.0.0/releasenotes/notes/add_lbaas_driver_package_to_lbaas_services_class-8d0f51e7be9b5f42.yaml 1970-01-01 00:00:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/releasenotes/notes/add_lbaas_driver_package_to_lbaas_services_class-8d0f51e7be9b5f42.yaml 2016-09-26 21:11:55.000000000 +0000 @@ -0,0 +1,5 @@ +--- +fixes: + - Added python-neutron-lbaas package to be installed with neutron::services::lbaas. + this removes a dependency of installing agent on neutron api server to enable + the lbaas service. diff -Nru puppet-module-neutron-8.0.0/releasenotes/notes/add_logging_class-f34440ca42c07a89.yaml puppet-module-neutron-9.4.0/releasenotes/notes/add_logging_class-f34440ca42c07a89.yaml --- puppet-module-neutron-8.0.0/releasenotes/notes/add_logging_class-f34440ca42c07a89.yaml 1970-01-01 00:00:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/releasenotes/notes/add_logging_class-f34440ca42c07a89.yaml 2016-09-26 21:11:55.000000000 +0000 @@ -0,0 +1,9 @@ +--- +features: + - | + Add logging class to manage olso.log related options + init class can still be used for managing the limited number of options + Add option _manage_logging_ for init class to make it possible to evaluate + logging class separately from init class in one catalog +deprecations: + - _verbose_ option is deprecated and will be removed in future diff -Nru puppet-module-neutron-8.0.0/releasenotes/notes/add_messaging_transport_url-15c22b42e7e929de.yaml puppet-module-neutron-9.4.0/releasenotes/notes/add_messaging_transport_url-15c22b42e7e929de.yaml --- puppet-module-neutron-8.0.0/releasenotes/notes/add_messaging_transport_url-15c22b42e7e929de.yaml 1970-01-01 00:00:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/releasenotes/notes/add_messaging_transport_url-15c22b42e7e929de.yaml 2016-09-26 21:11:55.000000000 +0000 @@ -0,0 +1,3 @@ +--- +features: + - Add oslo.messaging transport_url parameter via puppet-oslo resource \ No newline at end of file diff -Nru puppet-module-neutron-8.0.0/releasenotes/notes/add_name_to_uuid_transform.yaml puppet-module-neutron-9.4.0/releasenotes/notes/add_name_to_uuid_transform.yaml --- puppet-module-neutron-8.0.0/releasenotes/notes/add_name_to_uuid_transform.yaml 1970-01-01 00:00:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/releasenotes/notes/add_name_to_uuid_transform.yaml 2016-09-26 21:11:55.000000000 +0000 @@ -0,0 +1,4 @@ +--- +features: + - Add the ability to specify the a name string for the router_id in + neutron_l3_agent_config using the transform_to argument. diff -Nru puppet-module-neutron-8.0.0/releasenotes/notes/add_notification_opts-331f756075eaa50a.yaml puppet-module-neutron-9.4.0/releasenotes/notes/add_notification_opts-331f756075eaa50a.yaml --- puppet-module-neutron-8.0.0/releasenotes/notes/add_notification_opts-331f756075eaa50a.yaml 1970-01-01 00:00:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/releasenotes/notes/add_notification_opts-331f756075eaa50a.yaml 2016-09-26 21:11:55.000000000 +0000 @@ -0,0 +1,3 @@ +--- +features: + - Add oslo.messaging notitications related options diff -Nru puppet-module-neutron-8.0.0/releasenotes/notes/add_oslo_messaging_amqp-748568a8325ae49b.yaml puppet-module-neutron-9.4.0/releasenotes/notes/add_oslo_messaging_amqp-748568a8325ae49b.yaml --- puppet-module-neutron-8.0.0/releasenotes/notes/add_oslo_messaging_amqp-748568a8325ae49b.yaml 1970-01-01 00:00:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/releasenotes/notes/add_oslo_messaging_amqp-748568a8325ae49b.yaml 2016-09-26 21:11:55.000000000 +0000 @@ -0,0 +1,3 @@ +--- +features: + - Add support for oslo_messaging_amqp backend via puppet-oslo resource diff -Nru puppet-module-neutron-8.0.0/releasenotes/notes/add-overlay-ip-version-6759f0d61c50011c.yaml puppet-module-neutron-9.4.0/releasenotes/notes/add-overlay-ip-version-6759f0d61c50011c.yaml --- puppet-module-neutron-8.0.0/releasenotes/notes/add-overlay-ip-version-6759f0d61c50011c.yaml 1970-01-01 00:00:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/releasenotes/notes/add-overlay-ip-version-6759f0d61c50011c.yaml 2016-09-26 21:11:55.000000000 +0000 @@ -0,0 +1,3 @@ +--- +features: + - Add `overlay_ip_version` options support to ml2 plugin settings. diff -Nru puppet-module-neutron-8.0.0/releasenotes/notes/add-port-binding-support-3b8c56b65309db2e.yaml puppet-module-neutron-9.4.0/releasenotes/notes/add-port-binding-support-3b8c56b65309db2e.yaml --- puppet-module-neutron-8.0.0/releasenotes/notes/add-port-binding-support-3b8c56b65309db2e.yaml 1970-01-01 00:00:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/releasenotes/notes/add-port-binding-support-3b8c56b65309db2e.yaml 2016-09-26 21:11:55.000000000 +0000 @@ -0,0 +1,5 @@ +--- +features: + - Add 'binding_host_id' and 'binding_profile' + support to neutron_port custom type. + diff -Nru puppet-module-neutron-8.0.0/releasenotes/notes/authtoken-68ad3d80188e9f22.yaml puppet-module-neutron-9.4.0/releasenotes/notes/authtoken-68ad3d80188e9f22.yaml --- puppet-module-neutron-8.0.0/releasenotes/notes/authtoken-68ad3d80188e9f22.yaml 1970-01-01 00:00:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/releasenotes/notes/authtoken-68ad3d80188e9f22.yaml 2016-09-26 21:11:55.000000000 +0000 @@ -0,0 +1,15 @@ +--- +features: + - Configure keystonemiddleware in a consistent way using modern parameters +deprecations: + - neutron::server::keystone_auth_type is deprecated, use neutron::keystone::authtoken::auth_type instead + - neutron::server::auth_uri is deprecated, use neutron::keystone::authtoken::auth_uri instead + - neutron::server::auth_url is deprecated, use neutron::keystone::authtoken::auth_url instead + - neutron::server::username is deprecated, use neutron::keystone::authtoken::username instead + - neutron::server::password is deprecated, use neutron::keystone::authtoken::password instead + - neutron::server::project_domain_id is deprecated, use neutron::keystone::authtoken::project_domain_name instead + - neutron::server::project_domain_name is deprecated, use neutron::keystone::authtoken::project_domain_name instead + - neutron::server::project_name is deprecated, use neutron::keystone::authtoken::project_name instead + - neutron::server::user_domain_id is deprecated, use neutron::keystone::authtoken::user_domain_name instead + - neutron::server::user_domain_name is deprecated, use neutron::keystone::authtoken::user_domain_name instead + - neutron::server::region_name is deprecated, use neutron::keystone::authtoken::region_name instead diff -Nru puppet-module-neutron-8.0.0/releasenotes/notes/consolidate_service_provider_configuration-3ce48947a396ad25.yaml puppet-module-neutron-9.4.0/releasenotes/notes/consolidate_service_provider_configuration-3ce48947a396ad25.yaml --- puppet-module-neutron-8.0.0/releasenotes/notes/consolidate_service_provider_configuration-3ce48947a396ad25.yaml 1970-01-01 00:00:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/releasenotes/notes/consolidate_service_provider_configuration-3ce48947a396ad25.yaml 2016-09-26 21:11:55.000000000 +0000 @@ -0,0 +1,7 @@ +--- +features: + - service_providers are configured through neutron::server class. +issues: + - VPNaaS service_provider was being configured in a file not being loaded up + by neutron server. It has been consolidated with lbaas service configuration + into neutron.conf. diff -Nru puppet-module-neutron-8.0.0/releasenotes/notes/deprecate_advertise_mtu_option-a3d1893411c7ef89.yaml puppet-module-neutron-9.4.0/releasenotes/notes/deprecate_advertise_mtu_option-a3d1893411c7ef89.yaml --- puppet-module-neutron-8.0.0/releasenotes/notes/deprecate_advertise_mtu_option-a3d1893411c7ef89.yaml 1970-01-01 00:00:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/releasenotes/notes/deprecate_advertise_mtu_option-a3d1893411c7ef89.yaml 2016-09-26 21:11:55.000000000 +0000 @@ -0,0 +1,4 @@ +--- +deprecations: + - The advertise_mtu option is deprecated, has no effect + and will be removed in Ocata. diff -Nru puppet-module-neutron-8.0.0/releasenotes/notes/deprecate_allow_sorting_allow_pagination_options-451a3d961df892d2.yaml puppet-module-neutron-9.4.0/releasenotes/notes/deprecate_allow_sorting_allow_pagination_options-451a3d961df892d2.yaml --- puppet-module-neutron-8.0.0/releasenotes/notes/deprecate_allow_sorting_allow_pagination_options-451a3d961df892d2.yaml 1970-01-01 00:00:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/releasenotes/notes/deprecate_allow_sorting_allow_pagination_options-451a3d961df892d2.yaml 2016-09-26 21:11:55.000000000 +0000 @@ -0,0 +1,4 @@ +--- +deprecations: + - The ``allow_sorting`` and ``allow_pagination`` configuration options + are deprecated and will be removed in a future release. diff -Nru puppet-module-neutron-8.0.0/releasenotes/notes/deprecate_min_l3_agents_per_router-4923ad21523a87bf.yaml puppet-module-neutron-9.4.0/releasenotes/notes/deprecate_min_l3_agents_per_router-4923ad21523a87bf.yaml --- puppet-module-neutron-8.0.0/releasenotes/notes/deprecate_min_l3_agents_per_router-4923ad21523a87bf.yaml 1970-01-01 00:00:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/releasenotes/notes/deprecate_min_l3_agents_per_router-4923ad21523a87bf.yaml 2016-09-26 21:11:55.000000000 +0000 @@ -0,0 +1,4 @@ +--- +deprecations: + - min_l3_agents_per_router is deprecated, has no effect + and will be removed for the Ocata release. diff -Nru puppet-module-neutron-8.0.0/releasenotes/notes/deprecate_network_device_mtu-d7f15c98605ac2fb.yaml puppet-module-neutron-9.4.0/releasenotes/notes/deprecate_network_device_mtu-d7f15c98605ac2fb.yaml --- puppet-module-neutron-8.0.0/releasenotes/notes/deprecate_network_device_mtu-d7f15c98605ac2fb.yaml 1970-01-01 00:00:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/releasenotes/notes/deprecate_network_device_mtu-d7f15c98605ac2fb.yaml 2016-09-26 21:11:55.000000000 +0000 @@ -0,0 +1,6 @@ +--- +deprecations: + - | + [DEFAULT]/network_device_mtu option is deprecated and will be removed + in Newton. However, new [ml2]/segment_mtu is deprecated too according to + neutron/common/config.py. New [DEFAULT]/global_physnet_mtu should be used. diff -Nru puppet-module-neutron-8.0.0/releasenotes/notes/deprecate_quota_items-option-1892a3d1c323183e.yaml puppet-module-neutron-9.4.0/releasenotes/notes/deprecate_quota_items-option-1892a3d1c323183e.yaml --- puppet-module-neutron-8.0.0/releasenotes/notes/deprecate_quota_items-option-1892a3d1c323183e.yaml 1970-01-01 00:00:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/releasenotes/notes/deprecate_quota_items-option-1892a3d1c323183e.yaml 2016-09-26 21:11:55.000000000 +0000 @@ -0,0 +1,4 @@ +--- +deprecations: + - quota_items is deprecated, has no effect and + will be removed after Newton cycle. diff -Nru puppet-module-neutron-8.0.0/releasenotes/notes/domain_name-4070c4ee0f0357f4.yaml puppet-module-neutron-9.4.0/releasenotes/notes/domain_name-4070c4ee0f0357f4.yaml --- puppet-module-neutron-8.0.0/releasenotes/notes/domain_name-4070c4ee0f0357f4.yaml 1970-01-01 00:00:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/releasenotes/notes/domain_name-4070c4ee0f0357f4.yaml 2016-09-26 21:11:55.000000000 +0000 @@ -0,0 +1,3 @@ +--- +features: + - Add user_domain_name and project_domain_name parameters. diff -Nru puppet-module-neutron-8.0.0/releasenotes/notes/drop_qpid-e41ab45c36a910c3.yaml puppet-module-neutron-9.4.0/releasenotes/notes/drop_qpid-e41ab45c36a910c3.yaml --- puppet-module-neutron-8.0.0/releasenotes/notes/drop_qpid-e41ab45c36a910c3.yaml 1970-01-01 00:00:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/releasenotes/notes/drop_qpid-e41ab45c36a910c3.yaml 2016-09-26 21:11:55.000000000 +0000 @@ -0,0 +1,3 @@ +--- +other: + - Drop all Qpid support, it was removed from Oslo in Mitaka. diff -Nru puppet-module-neutron-8.0.0/releasenotes/notes/enable-dpdk-2f34825bbad4e69e.yaml puppet-module-neutron-9.4.0/releasenotes/notes/enable-dpdk-2f34825bbad4e69e.yaml --- puppet-module-neutron-8.0.0/releasenotes/notes/enable-dpdk-2f34825bbad4e69e.yaml 1970-01-01 00:00:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/releasenotes/notes/enable-dpdk-2f34825bbad4e69e.yaml 2016-09-26 21:11:55.000000000 +0000 @@ -0,0 +1,3 @@ +--- +features: + - Support configuration when DPDK is enabled with OVS. diff -Nru puppet-module-neutron-8.0.0/releasenotes/notes/external_install_mgmt_hook-263a7317dd90aa86.yaml puppet-module-neutron-9.4.0/releasenotes/notes/external_install_mgmt_hook-263a7317dd90aa86.yaml --- puppet-module-neutron-8.0.0/releasenotes/notes/external_install_mgmt_hook-263a7317dd90aa86.yaml 1970-01-01 00:00:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/releasenotes/notes/external_install_mgmt_hook-263a7317dd90aa86.yaml 2016-09-26 21:11:55.000000000 +0000 @@ -0,0 +1,10 @@ +--- +prelude: > + Add hooks for external install & svc management. +features: + - This adds defined anchor points for external modules to + hook into the software install, config and service dependency + chain. This allows external modules to manage software + installation (virtualenv, containers, etc) and service management + (pacemaker) without needing rely on resources that may change or + be renamed. diff -Nru puppet-module-neutron-8.0.0/releasenotes/notes/fix-neutron-port-creation-50818b9dc7a9cc05.yaml puppet-module-neutron-9.4.0/releasenotes/notes/fix-neutron-port-creation-50818b9dc7a9cc05.yaml --- puppet-module-neutron-8.0.0/releasenotes/notes/fix-neutron-port-creation-50818b9dc7a9cc05.yaml 1970-01-01 00:00:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/releasenotes/notes/fix-neutron-port-creation-50818b9dc7a9cc05.yaml 2016-09-26 21:11:55.000000000 +0000 @@ -0,0 +1,11 @@ +--- +fixes: + - Parameters of type dict must be at the end of the + shell command to not cause conflict with the network name. + Neutron cli picks up the network name as the first parameter + without "--" prefix, thus tresting type=dict as the network + name instead of the real network name because it comes before. + By providing the special dictionary type commands after the + network name the behaviour of the cli is bypassed and neutron + takes the network name and proceeds interpreting parameters + with special format ( not in the form of --= ) \ No newline at end of file diff -Nru puppet-module-neutron-8.0.0/releasenotes/notes/keystone-auth-name-8df71412ef6e0cef.yaml puppet-module-neutron-9.4.0/releasenotes/notes/keystone-auth-name-8df71412ef6e0cef.yaml --- puppet-module-neutron-8.0.0/releasenotes/notes/keystone-auth-name-8df71412ef6e0cef.yaml 1970-01-01 00:00:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/releasenotes/notes/keystone-auth-name-8df71412ef6e0cef.yaml 2016-09-26 21:11:55.000000000 +0000 @@ -0,0 +1,5 @@ +--- +fixes: + - The keystone auth class has been updated to provide a default service_name + to allow a user to specify a custom auth_name that may not contain the + name of the service. diff -Nru puppet-module-neutron-8.0.0/releasenotes/notes/keystone-authtoken-memcached-cf70cebad8b21492.yaml puppet-module-neutron-9.4.0/releasenotes/notes/keystone-authtoken-memcached-cf70cebad8b21492.yaml --- puppet-module-neutron-8.0.0/releasenotes/notes/keystone-authtoken-memcached-cf70cebad8b21492.yaml 1970-01-01 00:00:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/releasenotes/notes/keystone-authtoken-memcached-cf70cebad8b21492.yaml 2016-09-26 21:11:55.000000000 +0000 @@ -0,0 +1,4 @@ +--- +fixes: + - Adds the ability to manage the memcached servers for + keystone_authtoken in neutron::server diff -Nru puppet-module-neutron-8.0.0/releasenotes/notes/lbaas_certificates_configuration-470f7299e1ea136f.yaml puppet-module-neutron-9.4.0/releasenotes/notes/lbaas_certificates_configuration-470f7299e1ea136f.yaml --- puppet-module-neutron-8.0.0/releasenotes/notes/lbaas_certificates_configuration-470f7299e1ea136f.yaml 1970-01-01 00:00:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/releasenotes/notes/lbaas_certificates_configuration-470f7299e1ea136f.yaml 2016-09-26 21:11:55.000000000 +0000 @@ -0,0 +1,3 @@ +--- +features: + - Add certificates configuration options for lbaas service. diff -Nru puppet-module-neutron-8.0.0/releasenotes/notes/lbaasv2_agent_and_service-ca5e38a07566ad1e.yaml puppet-module-neutron-9.4.0/releasenotes/notes/lbaasv2_agent_and_service-ca5e38a07566ad1e.yaml --- puppet-module-neutron-8.0.0/releasenotes/notes/lbaasv2_agent_and_service-ca5e38a07566ad1e.yaml 1970-01-01 00:00:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/releasenotes/notes/lbaasv2_agent_and_service-ca5e38a07566ad1e.yaml 2016-09-26 21:11:55.000000000 +0000 @@ -0,0 +1,9 @@ +--- +features: + - Added octavia lbaas v2 services class. + - Added haproxy lbaas v2 services class. + - Added option to use either v1 or v2 agent in neutron agents lbaas. +deprecations: + - The lbaas v2 agent package ensure in neutron services lbaas + has been deprecated, the agent should be installed from + neutron agents lbaas. diff -Nru puppet-module-neutron-8.0.0/releasenotes/notes/lbaasv2-default-066d13cf24fc4c49.yaml puppet-module-neutron-9.4.0/releasenotes/notes/lbaasv2-default-066d13cf24fc4c49.yaml --- puppet-module-neutron-8.0.0/releasenotes/notes/lbaasv2-default-066d13cf24fc4c49.yaml 1970-01-01 00:00:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/releasenotes/notes/lbaasv2-default-066d13cf24fc4c49.yaml 2016-09-26 21:11:55.000000000 +0000 @@ -0,0 +1,9 @@ +--- +upgrade: + - Switch-on lbaasv2 by default instead of lbaasv2 to follow what upstream Neutron is doing + in https://review.openstack.org/286381 and also switch default device_driver to be + neutron_lbaas.drivers.haproxy.namespace_driver.HaproxyNSDriver + +deprecations: + - enable_v1 and enable_v2 are deprecated in neutron::agents::lbaas. + - LBaaS v1 deployment is not supported anymore. diff -Nru puppet-module-neutron-8.0.0/releasenotes/notes/log-deprecations-35671d11bd63d41c.yaml puppet-module-neutron-9.4.0/releasenotes/notes/log-deprecations-35671d11bd63d41c.yaml --- puppet-module-neutron-8.0.0/releasenotes/notes/log-deprecations-35671d11bd63d41c.yaml 1970-01-01 00:00:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/releasenotes/notes/log-deprecations-35671d11bd63d41c.yaml 2016-09-26 21:11:55.000000000 +0000 @@ -0,0 +1,3 @@ +--- +deprecations: + - log_facility is Deprecated and will be removed after Newton cycle. diff -Nru puppet-module-neutron-8.0.0/releasenotes/notes/missing_firewall_driver_ml2-24b48831f2d0e62b.yaml puppet-module-neutron-9.4.0/releasenotes/notes/missing_firewall_driver_ml2-24b48831f2d0e62b.yaml --- puppet-module-neutron-8.0.0/releasenotes/notes/missing_firewall_driver_ml2-24b48831f2d0e62b.yaml 1970-01-01 00:00:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/releasenotes/notes/missing_firewall_driver_ml2-24b48831f2d0e62b.yaml 2016-09-26 21:11:55.000000000 +0000 @@ -0,0 +1,7 @@ +--- +fixes: + - If Neutron is installed from Ubuntu packages, neutron-server and + openvswitch/linuxbridge agents use separate files to load configuration + related to ML2 plugin. So in order to use security groups firewall_driver + value should be passed to both configuration files + (ml2_conf.ini and openvswitch_agent.ini) diff -Nru puppet-module-neutron-8.0.0/releasenotes/notes/mitaka-dece9d43a565e6cb.yaml puppet-module-neutron-9.4.0/releasenotes/notes/mitaka-dece9d43a565e6cb.yaml --- puppet-module-neutron-8.0.0/releasenotes/notes/mitaka-dece9d43a565e6cb.yaml 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/releasenotes/notes/mitaka-dece9d43a565e6cb.yaml 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ ---- -prelude: > - This is the first Mitaka release for puppet-neutron module. diff -Nru puppet-module-neutron-8.0.0/releasenotes/notes/mitaka_metadata-77ebc004c9064934.yaml puppet-module-neutron-9.4.0/releasenotes/notes/mitaka_metadata-77ebc004c9064934.yaml --- puppet-module-neutron-8.0.0/releasenotes/notes/mitaka_metadata-77ebc004c9064934.yaml 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/releasenotes/notes/mitaka_metadata-77ebc004c9064934.yaml 2016-09-26 21:11:55.000000000 +0000 @@ -1,13 +1,6 @@ --- features: - Add SSL parameters to communicate with Nova. -upgrade: - - List upgrade notes here, or remove this section. - All of the list items in this section are combined - when the release notes are rendered, so the text - needs to be worded so that it does not depend on any - information only available in another section, such - as the prelude. This may mean repeating some details. deprecations: - Deprecate API parameters for metadata agent, not needed anymore in Mitaka. diff -Nru puppet-module-neutron-8.0.0/releasenotes/notes/neutron_availability_zones-80246c2af9a7be08.yaml puppet-module-neutron-9.4.0/releasenotes/notes/neutron_availability_zones-80246c2af9a7be08.yaml --- puppet-module-neutron-8.0.0/releasenotes/notes/neutron_availability_zones-80246c2af9a7be08.yaml 1970-01-01 00:00:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/releasenotes/notes/neutron_availability_zones-80246c2af9a7be08.yaml 2016-09-26 21:11:55.000000000 +0000 @@ -0,0 +1,6 @@ +--- +features: + - Added the configuration options to configure neutron availability zones + for server and agents. + - Providers updated to being able to configure router/network with availability + zone. diff -Nru puppet-module-neutron-8.0.0/releasenotes/notes/newton_deprecate_enable_tunneling-d7f6e2de1091b458.yaml puppet-module-neutron-9.4.0/releasenotes/notes/newton_deprecate_enable_tunneling-d7f6e2de1091b458.yaml --- puppet-module-neutron-8.0.0/releasenotes/notes/newton_deprecate_enable_tunneling-d7f6e2de1091b458.yaml 1970-01-01 00:00:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/releasenotes/notes/newton_deprecate_enable_tunneling-d7f6e2de1091b458.yaml 2016-09-26 21:11:55.000000000 +0000 @@ -0,0 +1,7 @@ +--- +deprecations: + - The option enable_tunneling has been deprecated as it is no longer used. + In order to enable tunneling, tunnel_types should be set to + the desired type. + If tunnel_types is not set, tunneling will be disabled. + diff -Nru puppet-module-neutron-8.0.0/releasenotes/notes/newton-deprecate-prevent-arp-spoofing-71ca70de4ba94b8b.yaml puppet-module-neutron-9.4.0/releasenotes/notes/newton-deprecate-prevent-arp-spoofing-71ca70de4ba94b8b.yaml --- puppet-module-neutron-8.0.0/releasenotes/notes/newton-deprecate-prevent-arp-spoofing-71ca70de4ba94b8b.yaml 1970-01-01 00:00:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/releasenotes/notes/newton-deprecate-prevent-arp-spoofing-71ca70de4ba94b8b.yaml 2016-09-26 21:11:55.000000000 +0000 @@ -0,0 +1,4 @@ +--- +deprecations: + - The option prevent_arp_spoofing has been deprecated + and will be removed in Ocata release. diff -Nru puppet-module-neutron-8.0.0/releasenotes/notes/newton_remove_deprecated_options-772c33dec894edb1.yaml puppet-module-neutron-9.4.0/releasenotes/notes/newton_remove_deprecated_options-772c33dec894edb1.yaml --- puppet-module-neutron-8.0.0/releasenotes/notes/newton_remove_deprecated_options-772c33dec894edb1.yaml 1970-01-01 00:00:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/releasenotes/notes/newton_remove_deprecated_options-772c33dec894edb1.yaml 2016-09-26 21:11:55.000000000 +0000 @@ -0,0 +1,12 @@ +--- +deprecations: + - Deprecated router_id option in l3 agent +other: + - | + Removed deprecated (for at least one cycle) options from agents: + + * use_namespaces option from l3/dhcp/lbaas agent + * allow_automatic_l3agent_failover from l3 agent + * network_device_mtu from l3 agent + * auth_password, auth_tenant, auth_user, auth_url, auth_insecure, auth_region from metadata agent + - Remove all other references to network_device_mtu diff -Nru puppet-module-neutron-8.0.0/releasenotes/notes/nova_url_deprec-b4a7a8896bbfb201.yaml puppet-module-neutron-9.4.0/releasenotes/notes/nova_url_deprec-b4a7a8896bbfb201.yaml --- puppet-module-neutron-8.0.0/releasenotes/notes/nova_url_deprec-b4a7a8896bbfb201.yaml 1970-01-01 00:00:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/releasenotes/notes/nova_url_deprec-b4a7a8896bbfb201.yaml 2016-09-26 21:11:55.000000000 +0000 @@ -0,0 +1,4 @@ +--- +deprecations: + - nova_url parameter is deprecated, will be removed after Newton + cycle. The parameter is not used anymore by Neutron. diff -Nru puppet-module-neutron-8.0.0/releasenotes/notes/ovn_ml2_upgrade-9bc64f0da70ca670.yaml puppet-module-neutron-9.4.0/releasenotes/notes/ovn_ml2_upgrade-9bc64f0da70ca670.yaml --- puppet-module-neutron-8.0.0/releasenotes/notes/ovn_ml2_upgrade-9bc64f0da70ca670.yaml 1970-01-01 00:00:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/releasenotes/notes/ovn_ml2_upgrade-9bc64f0da70ca670.yaml 2016-09-26 21:11:55.000000000 +0000 @@ -0,0 +1,10 @@ +--- +upgrade: + - Previously OVN plugin for Neutron used to be a core plugin. With + the recent changes in networking-ovn project, OVN is plugged in to + neutron as an ml2 mechanism driver. + +deprecations: + - neutron::plugins::ovn is deprecated as it was managing OVN as a + core-plugin. This is deprecated in favor of its ml2 equivalent + neutron::plugins::ml2::ovn diff -Nru puppet-module-neutron-8.0.0/releasenotes/notes/ovn_support-c404cdc8f8624632.yaml puppet-module-neutron-9.4.0/releasenotes/notes/ovn_support-c404cdc8f8624632.yaml --- puppet-module-neutron-8.0.0/releasenotes/notes/ovn_support-c404cdc8f8624632.yaml 1970-01-01 00:00:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/releasenotes/notes/ovn_support-c404cdc8f8624632.yaml 2016-09-26 21:11:55.000000000 +0000 @@ -0,0 +1,3 @@ +--- +features: + - Add support for OVN driver. diff -Nru puppet-module-neutron-8.0.0/releasenotes/notes/remove-deprecated-parameters-986fbfeaf482ef1d.yaml puppet-module-neutron-9.4.0/releasenotes/notes/remove-deprecated-parameters-986fbfeaf482ef1d.yaml --- puppet-module-neutron-8.0.0/releasenotes/notes/remove-deprecated-parameters-986fbfeaf482ef1d.yaml 1970-01-01 00:00:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/releasenotes/notes/remove-deprecated-parameters-986fbfeaf482ef1d.yaml 2016-09-26 21:11:55.000000000 +0000 @@ -0,0 +1,6 @@ +--- +other: + - Remove deprecated parameters for keystone::auth, including + port, public_protocol, public_address, public_port, internal_protocol, + internal_address, admin_protocol, admin_address. Use the new parameters + public_url, admin_url and internal_url instead. diff -Nru puppet-module-neutron-8.0.0/releasenotes/notes/remove_outdated_auth-2ecf8bdb729e48ef.yaml puppet-module-neutron-9.4.0/releasenotes/notes/remove_outdated_auth-2ecf8bdb729e48ef.yaml --- puppet-module-neutron-8.0.0/releasenotes/notes/remove_outdated_auth-2ecf8bdb729e48ef.yaml 1970-01-01 00:00:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/releasenotes/notes/remove_outdated_auth-2ecf8bdb729e48ef.yaml 2016-09-26 21:11:55.000000000 +0000 @@ -0,0 +1,3 @@ +--- +deprecations: + - Remove outdated auth options completely (admin_*) diff -Nru puppet-module-neutron-8.0.0/releasenotes/notes/remove_router_id-51df87135a4e1725.yaml puppet-module-neutron-9.4.0/releasenotes/notes/remove_router_id-51df87135a4e1725.yaml --- puppet-module-neutron-8.0.0/releasenotes/notes/remove_router_id-51df87135a4e1725.yaml 1970-01-01 00:00:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/releasenotes/notes/remove_router_id-51df87135a4e1725.yaml 2016-09-26 21:11:55.000000000 +0000 @@ -0,0 +1,4 @@ +--- +deprecations: + - Remove 'router_id' configuration option from the + l3_agent.ini file. diff -Nru puppet-module-neutron-8.0.0/releasenotes/notes/remove_tenant_name-baf2c2864deda6ce.yaml puppet-module-neutron-9.4.0/releasenotes/notes/remove_tenant_name-baf2c2864deda6ce.yaml --- puppet-module-neutron-8.0.0/releasenotes/notes/remove_tenant_name-baf2c2864deda6ce.yaml 1970-01-01 00:00:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/releasenotes/notes/remove_tenant_name-baf2c2864deda6ce.yaml 2016-09-26 21:11:55.000000000 +0000 @@ -0,0 +1,3 @@ +--- +deprecations: + - Deprecate tenant_name option. project_name should be used instead. diff -Nru puppet-module-neutron-8.0.0/releasenotes/notes/sriov-firewall-ccc21ac57c9dd796.yaml puppet-module-neutron-9.4.0/releasenotes/notes/sriov-firewall-ccc21ac57c9dd796.yaml --- puppet-module-neutron-8.0.0/releasenotes/notes/sriov-firewall-ccc21ac57c9dd796.yaml 1970-01-01 00:00:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/releasenotes/notes/sriov-firewall-ccc21ac57c9dd796.yaml 2016-09-26 21:11:55.000000000 +0000 @@ -0,0 +1,5 @@ +--- +features: + - Configured Noop firewall driver for SR-IOV agent config. + SR-IOV agent only work with NoopFirewallDriver when Security Groups are + enabled. diff -Nru puppet-module-neutron-8.0.0/releasenotes/notes/sriov-numvfs-configuration-3ae862cf09a9a813.yaml puppet-module-neutron-9.4.0/releasenotes/notes/sriov-numvfs-configuration-3ae862cf09a9a813.yaml --- puppet-module-neutron-8.0.0/releasenotes/notes/sriov-numvfs-configuration-3ae862cf09a9a813.yaml 1970-01-01 00:00:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/releasenotes/notes/sriov-numvfs-configuration-3ae862cf09a9a813.yaml 2016-09-26 21:11:55.000000000 +0000 @@ -0,0 +1,3 @@ +--- +features: + - Added a provider to configure VFs for SR-IOV interface diff -Nru puppet-module-neutron-8.0.0/releasenotes/notes/update_kombu_options-aaa1e16f5f4704ea.yaml puppet-module-neutron-9.4.0/releasenotes/notes/update_kombu_options-aaa1e16f5f4704ea.yaml --- puppet-module-neutron-8.0.0/releasenotes/notes/update_kombu_options-aaa1e16f5f4704ea.yaml 1970-01-01 00:00:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/releasenotes/notes/update_kombu_options-aaa1e16f5f4704ea.yaml 2016-09-26 21:11:55.000000000 +0000 @@ -0,0 +1,4 @@ +--- +features: + - Added additional kombu options which are supported by puppet-oslo module + Removed unneeded validation checks (covered by puppet-oslo) diff -Nru puppet-module-neutron-8.0.0/releasenotes/notes/update-midonet-neutron-plugin-to-v5-3111ed272c7d91e2.yaml puppet-module-neutron-9.4.0/releasenotes/notes/update-midonet-neutron-plugin-to-v5-3111ed272c7d91e2.yaml --- puppet-module-neutron-8.0.0/releasenotes/notes/update-midonet-neutron-plugin-to-v5-3111ed272c7d91e2.yaml 1970-01-01 00:00:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/releasenotes/notes/update-midonet-neutron-plugin-to-v5-3111ed272c7d91e2.yaml 2016-09-26 21:11:55.000000000 +0000 @@ -0,0 +1,7 @@ +--- +features: + - Midonet v5.x plugin doesn't rely anymore + on a custom DHCP agent, also it only uses + a subproject for db sync instead of the old + method of overriding the neutron-db-sync + completelly. diff -Nru puppet-module-neutron-8.0.0/releasenotes/notes/update_midonet_package_name-86a68308aa067cb8.yaml puppet-module-neutron-9.4.0/releasenotes/notes/update_midonet_package_name-86a68308aa067cb8.yaml --- puppet-module-neutron-8.0.0/releasenotes/notes/update_midonet_package_name-86a68308aa067cb8.yaml 1970-01-01 00:00:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/releasenotes/notes/update_midonet_package_name-86a68308aa067cb8.yaml 2016-09-26 21:11:55.000000000 +0000 @@ -0,0 +1,7 @@ +--- +fixes: + - The package name for the midonet neutron plugin previously used + an older naming syntax from times passed that no longer existed + in current repositories. To fix this issue the package name was + updated to "python-networking-midonet" which is provided by third + repository from Midokura. diff -Nru puppet-module-neutron-8.0.0/releasenotes/notes/update_plumgrid_config-82f3f631917f0e50.yaml puppet-module-neutron-9.4.0/releasenotes/notes/update_plumgrid_config-82f3f631917f0e50.yaml --- puppet-module-neutron-8.0.0/releasenotes/notes/update_plumgrid_config-82f3f631917f0e50.yaml 1970-01-01 00:00:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/releasenotes/notes/update_plumgrid_config-82f3f631917f0e50.yaml 2016-09-26 21:11:55.000000000 +0000 @@ -0,0 +1,10 @@ +--- +fixes: + - PLUMgrid neutron plugin assumes the default + keystone v2 for a given deployment. The issue + is fixed by switching the default config to + keystone v3. + - PLUMgrid neutron plugin isn't able to specify + nova metadata subnet, that is used by PLUMgrid + metadata implementation. The issue is fixed + by making nova_metadata_subnet configurable. diff -Nru puppet-module-neutron-8.0.0/releasenotes/notes/use_puppet_oslo-868298e248a64ab8.yaml puppet-module-neutron-9.4.0/releasenotes/notes/use_puppet_oslo-868298e248a64ab8.yaml --- puppet-module-neutron-8.0.0/releasenotes/notes/use_puppet_oslo-868298e248a64ab8.yaml 1970-01-01 00:00:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/releasenotes/notes/use_puppet_oslo-868298e248a64ab8.yaml 2016-09-26 21:11:55.000000000 +0000 @@ -0,0 +1,5 @@ +--- +features: + - Configure oslo related options (database, logging, messaging, policy) + using puppet-oslo module. + oslo.messaging related default values were changed to $::os_service_default diff -Nru puppet-module-neutron-8.0.0/releasenotes/notes/verbose-deprecation-c3933b9e4aa8f7ad.yaml puppet-module-neutron-9.4.0/releasenotes/notes/verbose-deprecation-c3933b9e4aa8f7ad.yaml --- puppet-module-neutron-8.0.0/releasenotes/notes/verbose-deprecation-c3933b9e4aa8f7ad.yaml 1970-01-01 00:00:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/releasenotes/notes/verbose-deprecation-c3933b9e4aa8f7ad.yaml 2016-09-26 21:11:55.000000000 +0000 @@ -0,0 +1,4 @@ +--- +deprecations: + - verbose option is now deprecated for removal, the + parameter has no effect. diff -Nru puppet-module-neutron-8.0.0/releasenotes/source/conf.py puppet-module-neutron-9.4.0/releasenotes/source/conf.py --- puppet-module-neutron-8.0.0/releasenotes/source/conf.py 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/releasenotes/source/conf.py 2016-09-26 21:11:55.000000000 +0000 @@ -52,9 +52,9 @@ # built documents. # # The short X.Y version. -version = '8.0.0' +version = '9.4.0' # The full version, including alpha/beta/rc tags. -release = '8.0.0' +release = '9.4.0' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff -Nru puppet-module-neutron-8.0.0/spec/acceptance/basic_neutron_spec.rb puppet-module-neutron-9.4.0/spec/acceptance/basic_neutron_spec.rb --- puppet-module-neutron-8.0.0/spec/acceptance/basic_neutron_spec.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/spec/acceptance/basic_neutron_spec.rb 2016-09-26 21:11:55.000000000 +0000 @@ -26,6 +26,7 @@ provider => 'rabbitmqctl', require => Class['rabbitmq'], } + Rabbitmq_user_permissions['neutron@/'] -> Service<| tag == 'neutron-service' |> # Neutron resources class { '::neutron': @@ -35,12 +36,7 @@ allow_overlapping_ips => true, core_plugin => 'ml2', debug => true, - verbose => true, - service_plugins => [ - 'neutron.services.l3_router.l3_router_plugin.L3RouterPlugin', - 'neutron_lbaas.services.loadbalancer.plugin.LoadBalancerPlugin', - 'neutron.services.metering.metering_plugin.MeteringPlugin', - ], + service_plugins => ['router', 'metering'], } class { '::neutron::db::mysql': password => 'a_big_secret', @@ -48,11 +44,19 @@ class { '::neutron::keystone::auth': password => 'a_big_secret', } + class { '::neutron::plugins::ml2': + type_drivers => ['vxlan'], + tenant_network_types => ['vxlan'], + mechanism_drivers => ['openvswitch'], + } class { '::neutron::server': database_connection => 'mysql+pymysql://neutron:a_big_secret@127.0.0.1/neutron?charset=utf8', - auth_password => 'a_big_secret', - identity_uri => 'http://127.0.0.1:35357/', + password => 'a_big_secret', + auth_url => 'http://127.0.0.1:35357/', sync_db => true, + service_providers => [ + 'LOADBALANCERV2:Haproxy:neutron_lbaas.drivers.haproxy.plugin_driver.HaproxyOnHostPluginDriver' + ], } class { '::neutron::client': } class { '::neutron::quota': } @@ -63,19 +67,18 @@ } class { '::neutron::agents::metering': debug => true } class { '::neutron::agents::ml2::ovs': - enable_tunneling => true, local_ip => '127.0.0.1', - tunnel_types => ['vxlan'], - } - class { '::neutron::plugins::ml2': - type_drivers => ['vxlan'], - tenant_network_types => ['vxlan'], - mechanism_drivers => ['openvswitch', 'sriovnicswitch'] - } - class { '::neutron::agents::ml2::sriov': } - class { '::neutron::services::lbaas': - service_providers => 'LOADBALANCER:Haproxy:neutron_lbaas.services.loadbalancer.drivers.haproxy.plugin_driver.HaproxyOnHostPluginDriver:default', + tunnel_types => ['vxlan'], + # Prior to Newton, the neutron-openvswitch-agent used 'ovs-ofctl' of_interface driver by default. + # In Newton, 'of_interface' defaults to 'native'. + # This mostly eliminates spawning ovs-ofctl and improves performance a little. + # Current openstack-selinux does not allow the Ryu controller to listen on 6633 port. + # So in the meantime, let's use old interface: + of_interface => 'ovs-ofctl', + ovsdb_interface => 'vsctl', } + class { '::neutron::services::lbaas::haproxy': } + class { '::neutron::services::lbaas::octavia': } EOS diff -Nru puppet-module-neutron-8.0.0/spec/acceptance/neutron_config_spec.rb puppet-module-neutron-9.4.0/spec/acceptance/neutron_config_spec.rb --- puppet-module-neutron-8.0.0/spec/acceptance/neutron_config_spec.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/spec/acceptance/neutron_config_spec.rb 2016-09-26 21:11:55.000000000 +0000 @@ -2,562 +2,577 @@ describe 'basic neutron_config resource' do - context 'default parameters' do - - it 'should work with no errors' do - pp= <<-EOS - Exec { logoutput => 'on_failure' } - - File <||> -> Neutron_config <||> - File <||> -> Neutron_api_config <||> - File <||> -> Neutron_dhcp_agent_config <||> - File <||> -> Neutron_fwaas_service_config <||> - File <||> -> Neutron_l3_agent_config <||> - File <||> -> Neutron_lbaas_agent_config <||> - File <||> -> Neutron_metadata_agent_config <||> - File <||> -> Neutron_metering_agent_config <||> - File <||> -> Neutron_plugin_cisco <||> - File <||> -> Neutron_plugin_cisco_credentials <||> - File <||> -> Neutron_plugin_cisco_db_conn <||> - File <||> -> Neutron_plugin_cisco_l2network <||> - File <||> -> Neutron_plugin_linuxbridge <||> - File <||> -> Neutron_plugin_ml2 <||> - File <||> -> Neutron_plugin_nvp <||> - File <||> -> Neutron_vpnaas_agent_config <||> - File <||> -> Neutron_plugin_midonet <||> - File <||> -> Neutron_plugin_opencontrail <||> - File <||> -> Neutron_agent_linuxbridge <||> - File <||> -> Neutron_agent_ovs <||> - File <||> -> Neutron_plugin_plumgrid <||> - File <||> -> Neutron_plumlib_plumgrid <||> - File <||> -> Neutron_plugin_sriov <||> - File <||> -> Neutron_sriov_agent_config <||> - - $neutron_directories = ['/etc/neutron', - '/etc/neutron/plugins', - '/etc/neutron/plugins/cisco', - '/etc/neutron/plugins/linuxbridge', - '/etc/neutron/plugins/ml2', - '/etc/neutron/plugins/nicira', - '/etc/neutron/plugins/midonet', - '/etc/neutron/plugins/opencontrail', - '/etc/neutron/plugins/plumgrid'] - - $neutron_files = [ '/etc/neutron/api-paste.ini', - '/etc/neutron/neutron.conf', - '/etc/neutron/dhcp_agent.ini', - '/etc/neutron/fwaas_driver.ini', - '/etc/neutron/l3_agent.ini', - '/etc/neutron/lbaas_agent.ini', - '/etc/neutron/metadata_agent.ini', - '/etc/neutron/metering_agent.ini', - '/etc/neutron/plugins/cisco/cisco_plugins.ini', - '/etc/neutron/plugins/cisco/credentials.ini', - '/etc/neutron/plugins/cisco/db_conn.ini', - '/etc/neutron/plugins/cisco/l2network_plugin.ini', - '/etc/neutron/plugins/linuxbridge/linuxbridge_conf.ini', - '/etc/neutron/plugins/ml2/ml2_conf.ini', - '/etc/neutron/plugins/nicira/nvp.ini', - '/etc/neutron/vpn_agent.ini', - '/etc/neutron/plugins/midonet/midonet.ini', - '/etc/neutron/plugins/opencontrail/ContrailPlugin.ini', - '/etc/neutron/plugins/plumgrid/plumgrid.ini', - '/etc/neutron/plugins/ml2/ml2_conf_sriov.ini', - '/etc/neutron/plugins/ml2/sriov_agent.ini'] - - file { $neutron_directories : - ensure => directory, - } - - file { $neutron_files : - ensure => file, - } - - neutron_api_config { 'DEFAULT/thisshouldexist' : - value => 'foo', - } - - neutron_api_config { 'DEFAULT/thisshouldnotexist' : - value => '', - } - - neutron_api_config { 'DEFAULT/thisshouldexist2' : - value => '', - ensure_absent_val => 'toto', - } - - neutron_api_config { 'DEFAULT/thisshouldnotexist2' : - value => 'toto', - ensure_absent_val => 'toto', - } - - neutron_config { 'DEFAULT/thisshouldexist' : - value => 'foo', - } - - neutron_config { 'DEFAULT/thisshouldnotexist' : - value => '', - } - - neutron_config { 'DEFAULT/thisshouldexist2' : - value => '', - ensure_absent_val => 'toto', - } - - neutron_config { 'DEFAULT/thisshouldnotexist2' : - value => 'toto', - ensure_absent_val => 'toto', - } - - neutron_dhcp_agent_config { 'DEFAULT/thisshouldexist' : - value => 'foo', - } - - neutron_dhcp_agent_config { 'DEFAULT/thisshouldnotexist' : - value => '', - } - - neutron_dhcp_agent_config { 'DEFAULT/thisshouldexist2' : - value => '', - ensure_absent_val => 'toto', - } - - neutron_dhcp_agent_config { 'DEFAULT/thisshouldnotexist2' : - value => 'toto', - ensure_absent_val => 'toto', - } - - neutron_fwaas_service_config { 'DEFAULT/thisshouldexist' : - value => 'foo', - } - - neutron_fwaas_service_config { 'DEFAULT/thisshouldnotexist' : - value => '', - } - - neutron_fwaas_service_config { 'DEFAULT/thisshouldexist2' : - value => '', - ensure_absent_val => 'toto', - } - - neutron_fwaas_service_config { 'DEFAULT/thisshouldnotexist2' : - value => 'toto', - ensure_absent_val => 'toto', - } - - neutron_l3_agent_config { 'DEFAULT/thisshouldexist' : - value => 'foo', - } - - neutron_l3_agent_config { 'DEFAULT/thisshouldnotexist' : - value => '', - } - - neutron_l3_agent_config { 'DEFAULT/thisshouldexist2' : - value => '', - ensure_absent_val => 'toto', - } - - neutron_l3_agent_config { 'DEFAULT/thisshouldnotexist2' : - value => 'toto', - ensure_absent_val => 'toto', - } - - neutron_lbaas_agent_config { 'DEFAULT/thisshouldexist' : - value => 'foo', - } - - neutron_lbaas_agent_config { 'DEFAULT/thisshouldnotexist' : - value => '', - } - - neutron_lbaas_agent_config { 'DEFAULT/thisshouldexist2' : - value => '', - ensure_absent_val => 'toto', - } - - neutron_lbaas_agent_config { 'DEFAULT/thisshouldnotexist2' : - value => 'toto', - ensure_absent_val => 'toto', - } - - neutron_metadata_agent_config { 'DEFAULT/thisshouldexist' : - value => 'foo', - } - - neutron_metadata_agent_config { 'DEFAULT/thisshouldnotexist' : - value => '', - } - - neutron_metadata_agent_config { 'DEFAULT/thisshouldexist2' : - value => '', - ensure_absent_val => 'toto', - } - - neutron_metadata_agent_config { 'DEFAULT/thisshouldnotexist2' : - value => 'toto', - ensure_absent_val => 'toto', - } - - neutron_metering_agent_config { 'DEFAULT/thisshouldexist' : - value => 'foo', - } - - neutron_metering_agent_config { 'DEFAULT/thisshouldnotexist' : - value => '', - } - - neutron_metering_agent_config { 'DEFAULT/thisshouldexist2' : - value => '', - ensure_absent_val => 'toto', - } - - neutron_metering_agent_config { 'DEFAULT/thisshouldnotexist2' : - value => 'toto', - ensure_absent_val => 'toto', - } - - neutron_plugin_cisco { 'DEFAULT/thisshouldexist' : - value => 'foo', - } - - neutron_plugin_cisco { 'DEFAULT/thisshouldnotexist' : - value => '', - } - - neutron_plugin_cisco { 'DEFAULT/thisshouldexist2' : - value => '', - ensure_absent_val => 'toto', - } - - neutron_plugin_cisco { 'DEFAULT/thisshouldnotexist2' : - value => 'toto', - ensure_absent_val => 'toto', - } - - neutron_plugin_cisco_credentials { 'DEFAULT/thisshouldexist' : - value => 'foo', - } - - neutron_plugin_cisco_credentials { 'DEFAULT/thisshouldnotexist' : - value => '', - } - - neutron_plugin_cisco_credentials { 'DEFAULT/thisshouldexist2' : - value => '', - ensure_absent_val => 'toto', - } - - neutron_plugin_cisco_credentials { 'DEFAULT/thisshouldnotexist2' : - value => 'toto', - ensure_absent_val => 'toto', - } - - neutron_plugin_cisco_db_conn { 'DEFAULT/thisshouldexist' : - value => 'foo', - } - - neutron_plugin_cisco_db_conn { 'DEFAULT/thisshouldnotexist' : - value => '', - } - - neutron_plugin_cisco_db_conn { 'DEFAULT/thisshouldexist2' : - value => '', - ensure_absent_val => 'toto', - } - - neutron_plugin_cisco_db_conn { 'DEFAULT/thisshouldnotexist2' : - value => 'toto', - ensure_absent_val => 'toto', - } - - neutron_plugin_cisco_l2network { 'DEFAULT/thisshouldexist' : - value => 'foo', - } - - neutron_plugin_cisco_l2network { 'DEFAULT/thisshouldnotexist' : - value => '', - } - - neutron_plugin_cisco_l2network { 'DEFAULT/thisshouldexist2' : - value => '', - ensure_absent_val => 'toto', - } - - neutron_plugin_cisco_l2network { 'DEFAULT/thisshouldnotexist2' : - value => 'toto', - ensure_absent_val => 'toto', - } - - neutron_plugin_linuxbridge { 'DEFAULT/thisshouldexist' : - value => 'foo', - } - - neutron_plugin_linuxbridge { 'DEFAULT/thisshouldnotexist' : - value => '', - } - - neutron_plugin_linuxbridge { 'DEFAULT/thisshouldexist2' : - value => '', - ensure_absent_val => 'toto', - } - - neutron_plugin_linuxbridge { 'DEFAULT/thisshouldnotexist2' : - value => 'toto', - ensure_absent_val => 'toto', - } - - neutron_plugin_ml2 { 'DEFAULT/thisshouldexist' : - value => 'foo', - } - - neutron_plugin_ml2 { 'DEFAULT/thisshouldnotexist' : - value => '', - } - - neutron_plugin_ml2 { 'DEFAULT/thisshouldexist2' : - value => '', - ensure_absent_val => 'toto', - } - - neutron_plugin_ml2 { 'DEFAULT/thisshouldnotexist2' : - value => 'toto', - ensure_absent_val => 'toto', - } - - neutron_plugin_nvp { 'DEFAULT/thisshouldexist' : - value => 'foo', - } - - neutron_plugin_nvp { 'DEFAULT/thisshouldnotexist' : - value => '', - } - - neutron_plugin_nvp { 'DEFAULT/thisshouldexist2' : - value => '', - ensure_absent_val => 'toto', - } - - neutron_plugin_nvp { 'DEFAULT/thisshouldnotexist2' : - value => 'toto', - ensure_absent_val => 'toto', - } - - neutron_vpnaas_agent_config { 'DEFAULT/thisshouldexist' : - value => 'foo', - } - - neutron_vpnaas_agent_config { 'DEFAULT/thisshouldnotexist' : - value => '', - } - - neutron_vpnaas_agent_config { 'DEFAULT/thisshouldexist2' : - value => '', - ensure_absent_val => 'toto', - } - - neutron_vpnaas_agent_config { 'DEFAULT/thisshouldnotexist2' : - value => 'toto', - ensure_absent_val => 'toto', - } - - neutron_plugin_midonet { 'DEFAULT/thisshouldexist' : - value => 'foo', - } - - neutron_plugin_midonet { 'DEFAULT/thisshouldnotexist' : - value => '', - } - - neutron_plugin_midonet { 'DEFAULT/thisshouldexist2' : - value => '', - ensure_absent_val => 'toto', - } - - neutron_plugin_midonet { 'DEFAULT/thisshouldnotexist2' : - value => 'toto', - ensure_absent_val => 'toto', - } - - neutron_plugin_opencontrail { 'DEFAULT/thisshouldexist' : - value => 'foo', - } - - neutron_plugin_opencontrail { 'DEFAULT/thisshouldnotexist' : - value => '', - } - - neutron_plugin_opencontrail { 'DEFAULT/thisshouldexist2' : - value => '', - ensure_absent_val => 'toto', - } - - neutron_plugin_opencontrail { 'DEFAULT/thisshouldnotexist2' : - value => 'toto', - ensure_absent_val => 'toto', - } - - neutron_agent_linuxbridge { 'DEFAULT/thisshouldexist' : - value => 'foo', - } - - neutron_agent_linuxbridge { 'DEFAULT/thisshouldnotexist' : - value => '', - } - - neutron_agent_linuxbridge { 'DEFAULT/thisshouldexist2' : - value => '', - ensure_absent_val => 'toto', - } - - neutron_agent_linuxbridge { 'DEFAULT/thisshouldnotexist2' : - value => 'toto', - ensure_absent_val => 'toto', - } - - neutron_agent_ovs { 'DEFAULT/thisshouldexist' : - value => 'foo', - } - - neutron_agent_ovs { 'DEFAULT/thisshouldnotexist' : - value => '', - } - - neutron_agent_ovs { 'DEFAULT/thisshouldexist2' : - value => '', - ensure_absent_val => 'toto', - } - - neutron_agent_ovs { 'DEFAULT/thisshouldnotexist2' : - value => 'toto', - ensure_absent_val => 'toto', - } - - neutron_plugin_plumgrid { 'DEFAULT/thisshouldexist' : - value => 'foo', - } - - neutron_plugin_plumgrid { 'DEFAULT/thisshouldnotexist' : - value => '', - } - - neutron_plugin_plumgrid { 'DEFAULT/thisshouldexist2' : - value => '', - ensure_absent_val => 'toto', - } - - neutron_plugin_plumgrid { 'DEFAULT/thisshouldnotexist2' : - value => 'toto', - ensure_absent_val => 'toto', - } - - neutron_plumlib_plumgrid { 'DEFAULT/thisshouldexist' : - value => 'foo', - } - - neutron_plumlib_plumgrid { 'DEFAULT/thisshouldnotexist' : - value => '', - } - - neutron_plumlib_plumgrid { 'DEFAULT/thisshouldexist2' : - value => '', - ensure_absent_val => 'toto', } - - neutron_plumlib_plumgrid { 'DEFAULT/thisshouldnotexist2' : - value => 'toto', - ensure_absent_val => 'toto', - } - - neutron_plugin_sriov { 'DEFAULT/thisshouldexist' : - value => 'foo', - } - - neutron_plugin_sriov { 'DEFAULT/thisshouldnotexist' : - value => '', - } - - neutron_plugin_sriov { 'DEFAULT/thisshouldexist2' : - value => '', - ensure_absent_val => 'toto', - } - - neutron_plugin_sriov { 'DEFAULT/thisshouldnotexist2' : - value => 'toto', - ensure_absent_val => 'toto', - } - - neutron_sriov_agent_config { 'DEFAULT/thisshouldexist' : - value => 'foo', - } - - neutron_sriov_agent_config { 'DEFAULT/thisshouldnotexist' : - value => '', - } - - neutron_sriov_agent_config { 'DEFAULT/thisshouldexist2' : - value => '', - ensure_absent_val => 'toto', - } - - neutron_sriov_agent_config { 'DEFAULT/thisshouldnotexist2' : - value => 'toto', - ensure_absent_val => 'toto', - } - - neutron_lbaas_service_config { 'DEFAULT/thisshouldexist' : - value => 'foo', - } - - neutron_lbaas_service_config { 'DEFAULT/thisshouldexist2' : - value => '', - ensure_absent_val => 'toto', - } - - neutron_lbaas_service_config { 'DEFAULT/thisshouldexist3' : - value => ['value1', 'value2'], - } - - neutron_lbaas_service_config { 'DEFAULT/thisshouldnotexist' : - value => '', - } - - neutron_lbaas_service_config { 'DEFAULT/thisshouldnotexist2' : - value => 'toto', - ensure_absent_val => 'toto', - } - - EOS - - - # Run it twice and test for idempotency + neutron_files = [ '/etc/neutron/api-paste.ini', + '/etc/neutron/neutron.conf', + '/etc/neutron/dhcp_agent.ini', + '/etc/neutron/fwaas_driver.ini', + '/etc/neutron/l3_agent.ini', + '/etc/neutron/lbaas_agent.ini', + '/etc/neutron/metadata_agent.ini', + '/etc/neutron/metering_agent.ini', + '/etc/neutron/plugins/cisco/cisco_plugins.ini', + '/etc/neutron/plugins/cisco/credentials.ini', + '/etc/neutron/plugins/cisco/db_conn.ini', + '/etc/neutron/plugins/cisco/l2network_plugin.ini', + '/etc/neutron/plugins/linuxbridge/linuxbridge_conf.ini', + '/etc/neutron/plugins/ml2/ml2_conf.ini', + '/etc/neutron/plugins/nicira/nvp.ini', + '/etc/neutron/vpn_agent.ini', + '/etc/neutron/plugins/midonet/midonet.ini', + '/etc/neutron/plugins/opencontrail/ContrailPlugin.ini', + '/etc/neutron/plugins/plumgrid/plumgrid.ini', + '/etc/neutron/plugins/ml2/ml2_conf_sriov.ini', + '/etc/neutron/plugins/ml2/sriov_agent.ini'] + + pp= <<-EOS + Exec { logoutput => 'on_failure' } + + File <||> -> Neutron_config <||> + File <||> -> Neutron_api_config <||> + File <||> -> Neutron_dhcp_agent_config <||> + File <||> -> Neutron_fwaas_service_config <||> + File <||> -> Neutron_l3_agent_config <||> + File <||> -> Neutron_lbaas_agent_config <||> + File <||> -> Neutron_metadata_agent_config <||> + File <||> -> Neutron_metering_agent_config <||> + File <||> -> Neutron_plugin_cisco <||> + File <||> -> Neutron_plugin_cisco_credentials <||> + File <||> -> Neutron_plugin_cisco_db_conn <||> + File <||> -> Neutron_plugin_cisco_l2network <||> + File <||> -> Neutron_plugin_linuxbridge <||> + File <||> -> Neutron_plugin_ml2 <||> + File <||> -> Neutron_plugin_nvp <||> + File <||> -> Neutron_vpnaas_agent_config <||> + File <||> -> Neutron_plugin_midonet <||> + File <||> -> Neutron_plugin_opencontrail <||> + File <||> -> Neutron_agent_linuxbridge <||> + File <||> -> Neutron_agent_ovs <||> + File <||> -> Neutron_plugin_plumgrid <||> + File <||> -> Neutron_plumlib_plumgrid <||> + File <||> -> Neutron_plugin_sriov <||> + File <||> -> Neutron_sriov_agent_config <||> + + $neutron_directories = ['/etc/neutron', + '/etc/neutron/plugins', + '/etc/neutron/plugins/cisco', + '/etc/neutron/plugins/linuxbridge', + '/etc/neutron/plugins/ml2', + '/etc/neutron/plugins/nicira', + '/etc/neutron/plugins/midonet', + '/etc/neutron/plugins/opencontrail', + '/etc/neutron/plugins/plumgrid'] + + $neutron_files = [ '/etc/neutron/api-paste.ini', + '/etc/neutron/neutron.conf', + '/etc/neutron/dhcp_agent.ini', + '/etc/neutron/fwaas_driver.ini', + '/etc/neutron/l3_agent.ini', + '/etc/neutron/lbaas_agent.ini', + '/etc/neutron/metadata_agent.ini', + '/etc/neutron/metering_agent.ini', + '/etc/neutron/plugins/cisco/cisco_plugins.ini', + '/etc/neutron/plugins/cisco/credentials.ini', + '/etc/neutron/plugins/cisco/db_conn.ini', + '/etc/neutron/plugins/cisco/l2network_plugin.ini', + '/etc/neutron/plugins/linuxbridge/linuxbridge_conf.ini', + '/etc/neutron/plugins/ml2/ml2_conf.ini', + '/etc/neutron/plugins/nicira/nvp.ini', + '/etc/neutron/vpn_agent.ini', + '/etc/neutron/plugins/midonet/midonet.ini', + '/etc/neutron/plugins/opencontrail/ContrailPlugin.ini', + '/etc/neutron/plugins/plumgrid/plumgrid.ini', + '/etc/neutron/plugins/ml2/ml2_conf_sriov.ini', + '/etc/neutron/plugins/ml2/sriov_agent.ini'] + + file { $neutron_directories : + ensure => directory, + } + + file { $neutron_files : + ensure => file, + } + neutron_api_config { 'DEFAULT/thisshouldexist' : + value => 'foo', + } + + neutron_api_config { 'DEFAULT/thisshouldnotexist' : + value => '', + } + + neutron_api_config { 'DEFAULT/thisshouldexist2' : + value => '', + ensure_absent_val => 'toto', + } + + neutron_api_config { 'DEFAULT/thisshouldnotexist2' : + value => 'toto', + ensure_absent_val => 'toto', + } + + neutron_config { 'DEFAULT/thisshouldexist' : + value => 'foo', + } + + neutron_config { 'DEFAULT/thisshouldnotexist' : + value => '', + } + + neutron_config { 'DEFAULT/thisshouldexist2' : + value => '', + ensure_absent_val => 'toto', + } + + neutron_config { 'DEFAULT/thisshouldnotexist2' : + value => 'toto', + ensure_absent_val => 'toto', + } + + neutron_dhcp_agent_config { 'DEFAULT/thisshouldexist' : + value => 'foo', + } + + neutron_dhcp_agent_config { 'DEFAULT/thisshouldnotexist' : + value => '', + } + + neutron_dhcp_agent_config { 'DEFAULT/thisshouldexist2' : + value => '', + ensure_absent_val => 'toto', + } + + neutron_dhcp_agent_config { 'DEFAULT/thisshouldnotexist2' : + value => 'toto', + ensure_absent_val => 'toto', + } + + neutron_fwaas_service_config { 'DEFAULT/thisshouldexist' : + value => 'foo', + } + + neutron_fwaas_service_config { 'DEFAULT/thisshouldnotexist' : + value => '', + } + + neutron_fwaas_service_config { 'DEFAULT/thisshouldexist2' : + value => '', + ensure_absent_val => 'toto', + } + + neutron_fwaas_service_config { 'DEFAULT/thisshouldnotexist2' : + value => 'toto', + ensure_absent_val => 'toto', + } + + neutron_l3_agent_config { 'DEFAULT/thisshouldexist' : + value => 'foo', + } + + neutron_l3_agent_config { 'DEFAULT/thisshouldnotexist' : + value => '', + } + + neutron_l3_agent_config { 'DEFAULT/thisshouldexist2' : + value => '', + ensure_absent_val => 'toto', + } + + neutron_l3_agent_config { 'DEFAULT/thisshouldnotexist2' : + value => 'toto', + ensure_absent_val => 'toto', + } + + neutron_lbaas_agent_config { 'DEFAULT/thisshouldexist' : + value => 'foo', + } + + neutron_lbaas_agent_config { 'DEFAULT/thisshouldnotexist' : + value => '', + } + + neutron_lbaas_agent_config { 'DEFAULT/thisshouldexist2' : + value => '', + ensure_absent_val => 'toto', + } + + neutron_lbaas_agent_config { 'DEFAULT/thisshouldnotexist2' : + value => 'toto', + ensure_absent_val => 'toto', + } + + neutron_metadata_agent_config { 'DEFAULT/thisshouldexist' : + value => 'foo', + } + + neutron_metadata_agent_config { 'DEFAULT/thisshouldnotexist' : + value => '', + } + + neutron_metadata_agent_config { 'DEFAULT/thisshouldexist2' : + value => '', + ensure_absent_val => 'toto', + } + + neutron_metadata_agent_config { 'DEFAULT/thisshouldnotexist2' : + value => 'toto', + ensure_absent_val => 'toto', + } + + neutron_metering_agent_config { 'DEFAULT/thisshouldexist' : + value => 'foo', + } + + neutron_metering_agent_config { 'DEFAULT/thisshouldnotexist' : + value => '', + } + + neutron_metering_agent_config { 'DEFAULT/thisshouldexist2' : + value => '', + ensure_absent_val => 'toto', + } + + neutron_metering_agent_config { 'DEFAULT/thisshouldnotexist2' : + value => 'toto', + ensure_absent_val => 'toto', + } + + neutron_plugin_cisco { 'DEFAULT/thisshouldexist' : + value => 'foo', + } + + neutron_plugin_cisco { 'DEFAULT/thisshouldnotexist' : + value => '', + } + + neutron_plugin_cisco { 'DEFAULT/thisshouldexist2' : + value => '', + ensure_absent_val => 'toto', + } + + neutron_plugin_cisco { 'DEFAULT/thisshouldnotexist2' : + value => 'toto', + ensure_absent_val => 'toto', + } + + neutron_plugin_cisco_credentials { 'DEFAULT/thisshouldexist' : + value => 'foo', + } + + neutron_plugin_cisco_credentials { 'DEFAULT/thisshouldnotexist' : + value => '', + } + + neutron_plugin_cisco_credentials { 'DEFAULT/thisshouldexist2' : + value => '', + ensure_absent_val => 'toto', + } + + neutron_plugin_cisco_credentials { 'DEFAULT/thisshouldnotexist2' : + value => 'toto', + ensure_absent_val => 'toto', + } + + neutron_plugin_cisco_db_conn { 'DEFAULT/thisshouldexist' : + value => 'foo', + } + + neutron_plugin_cisco_db_conn { 'DEFAULT/thisshouldnotexist' : + value => '', + } + + neutron_plugin_cisco_db_conn { 'DEFAULT/thisshouldexist2' : + value => '', + ensure_absent_val => 'toto', + } + + neutron_plugin_cisco_db_conn { 'DEFAULT/thisshouldnotexist2' : + value => 'toto', + ensure_absent_val => 'toto', + } + + neutron_plugin_cisco_l2network { 'DEFAULT/thisshouldexist' : + value => 'foo', + } + + neutron_plugin_cisco_l2network { 'DEFAULT/thisshouldnotexist' : + value => '', + } + + neutron_plugin_cisco_l2network { 'DEFAULT/thisshouldexist2' : + value => '', + ensure_absent_val => 'toto', + } + + neutron_plugin_cisco_l2network { 'DEFAULT/thisshouldnotexist2' : + value => 'toto', + ensure_absent_val => 'toto', + } + + neutron_plugin_linuxbridge { 'DEFAULT/thisshouldexist' : + value => 'foo', + } + + neutron_plugin_linuxbridge { 'DEFAULT/thisshouldnotexist' : + value => '', + } + + neutron_plugin_linuxbridge { 'DEFAULT/thisshouldexist2' : + value => '', + ensure_absent_val => 'toto', + } + + neutron_plugin_linuxbridge { 'DEFAULT/thisshouldnotexist2' : + value => 'toto', + ensure_absent_val => 'toto', + } + + neutron_plugin_ml2 { 'DEFAULT/thisshouldexist' : + value => 'foo', + } + + neutron_plugin_ml2 { 'DEFAULT/thisshouldnotexist' : + value => '', + } + + neutron_plugin_ml2 { 'DEFAULT/thisshouldexist2' : + value => '', + ensure_absent_val => 'toto', + } + + neutron_plugin_ml2 { 'DEFAULT/thisshouldnotexist2' : + value => 'toto', + ensure_absent_val => 'toto', + } + + neutron_plugin_nvp { 'DEFAULT/thisshouldexist' : + value => 'foo', + } + + neutron_plugin_nvp { 'DEFAULT/thisshouldnotexist' : + value => '', + } + + neutron_plugin_nvp { 'DEFAULT/thisshouldexist2' : + value => '', + ensure_absent_val => 'toto', + } + + neutron_plugin_nvp { 'DEFAULT/thisshouldnotexist2' : + value => 'toto', + ensure_absent_val => 'toto', + } + + neutron_vpnaas_agent_config { 'DEFAULT/thisshouldexist' : + value => 'foo', + } + + neutron_vpnaas_agent_config { 'DEFAULT/thisshouldnotexist' : + value => '', + } + + neutron_vpnaas_agent_config { 'DEFAULT/thisshouldexist2' : + value => '', + ensure_absent_val => 'toto', + } + + neutron_vpnaas_agent_config { 'DEFAULT/thisshouldnotexist2' : + value => 'toto', + ensure_absent_val => 'toto', + } + + neutron_plugin_midonet { 'DEFAULT/thisshouldexist' : + value => 'foo', + } + + neutron_plugin_midonet { 'DEFAULT/thisshouldnotexist' : + value => '', + } + + neutron_plugin_midonet { 'DEFAULT/thisshouldexist2' : + value => '', + ensure_absent_val => 'toto', + } + + neutron_plugin_midonet { 'DEFAULT/thisshouldnotexist2' : + value => 'toto', + ensure_absent_val => 'toto', + } + + neutron_plugin_opencontrail { 'DEFAULT/thisshouldexist' : + value => 'foo', + } + + neutron_plugin_opencontrail { 'DEFAULT/thisshouldnotexist' : + value => '', + } + + neutron_plugin_opencontrail { 'DEFAULT/thisshouldexist2' : + value => '', + ensure_absent_val => 'toto', + } + + neutron_plugin_opencontrail { 'DEFAULT/thisshouldnotexist2' : + value => 'toto', + ensure_absent_val => 'toto', + } + + neutron_agent_linuxbridge { 'DEFAULT/thisshouldexist' : + value => 'foo', + } + + neutron_agent_linuxbridge { 'DEFAULT/thisshouldnotexist' : + value => '', + } + + neutron_agent_linuxbridge { 'DEFAULT/thisshouldexist2' : + value => '', + ensure_absent_val => 'toto', + } + + neutron_agent_linuxbridge { 'DEFAULT/thisshouldnotexist2' : + value => 'toto', + ensure_absent_val => 'toto', + } + + neutron_agent_ovs { 'DEFAULT/thisshouldexist' : + value => 'foo', + } + + neutron_agent_ovs { 'DEFAULT/thisshouldnotexist' : + value => '', + } + + neutron_agent_ovs { 'DEFAULT/thisshouldexist2' : + value => '', + ensure_absent_val => 'toto', + } + + neutron_agent_ovs { 'DEFAULT/thisshouldnotexist2' : + value => 'toto', + ensure_absent_val => 'toto', + } + + neutron_plugin_plumgrid { 'DEFAULT/thisshouldexist' : + value => 'foo', + } + + neutron_plugin_plumgrid { 'DEFAULT/thisshouldnotexist' : + value => '', + } + + neutron_plugin_plumgrid { 'DEFAULT/thisshouldexist2' : + value => '', + ensure_absent_val => 'toto', + } + + neutron_plugin_plumgrid { 'DEFAULT/thisshouldnotexist2' : + value => 'toto', + ensure_absent_val => 'toto', + } + + neutron_plumlib_plumgrid { 'DEFAULT/thisshouldexist' : + value => 'foo', + } + + neutron_plumlib_plumgrid { 'DEFAULT/thisshouldnotexist' : + value => '', + } + + neutron_plumlib_plumgrid { 'DEFAULT/thisshouldexist2' : + value => '', + ensure_absent_val => 'toto', } + + neutron_plumlib_plumgrid { 'DEFAULT/thisshouldnotexist2' : + value => 'toto', + ensure_absent_val => 'toto', + } + + neutron_plugin_sriov { 'DEFAULT/thisshouldexist' : + value => 'foo', + } + + neutron_plugin_sriov { 'DEFAULT/thisshouldnotexist' : + value => '', + } + + neutron_plugin_sriov { 'DEFAULT/thisshouldexist2' : + value => '', + ensure_absent_val => 'toto', + } + + neutron_plugin_sriov { 'DEFAULT/thisshouldnotexist2' : + value => 'toto', + ensure_absent_val => 'toto', + } + + neutron_sriov_agent_config { 'DEFAULT/thisshouldexist' : + value => 'foo', + } + + neutron_sriov_agent_config { 'DEFAULT/thisshouldnotexist' : + value => '', + } + + neutron_sriov_agent_config { 'DEFAULT/thisshouldexist2' : + value => '', + ensure_absent_val => 'toto', + } + + neutron_sriov_agent_config { 'DEFAULT/thisshouldnotexist2' : + value => 'toto', + ensure_absent_val => 'toto', + } + + EOS + + resource_names = ['neutron_api_config', + 'neutron_config', + 'neutron_dhcp_agent_config', + 'neutron_fwaas_service_config', + 'neutron_l3_agent_config', + 'neutron_lbaas_agent_config', + 'neutron_metadata_agent_config', + 'neutron_plugin_cisco', + 'neutron_plugin_cisco_credentials', + 'neutron_plugin_cisco_db_conn', + 'neutron_plugin_cisco_l2network', + 'neutron_plugin_linuxbridge', + 'neutron_metering_agent_config', + 'neutron_plugin_ml2', + 'neutron_plugin_nvp', + 'neutron_vpnaas_agent_config', + 'neutron_plugin_midonet', + 'neutron_plugin_opencontrail', + 'neutron_agent_linuxbridge', + 'neutron_agent_ovs', + 'neutron_plugin_plumgrid', + 'neutron_plugin_sriov', + 'neutron_sriov_agent_config'] + + pp_resource_names = " $resource_names = [" + resource_names.collect { |r| " '#{r}'," }.join("\n") + " ]\n" + + pp_purge = pp + pp_resource_names + <<-EOS + + resources { $resource_names: + purge => true, + } + + EOS + + bogus_config = <<-EOS + $junk = {'DEFAULT/xyz_unsupported_value_123' => { value => false }, + 'DEFAULT/xyz_unsupported_value_569' => { value => 'some_string' } + } + EOS + + pp_bogus_config = bogus_config + resource_names.collect { |r| " create_resources('#{r}', $junk)" }.join("\n") + + context 'with default parameters' do + # Run it twice and test for idempotency + before :all do apply_manifest(pp, :catch_failures => true) apply_manifest(pp, :catch_changes => true) end - - $neutron_files = [ '/etc/neutron/api-paste.ini', - '/etc/neutron/neutron.conf', - '/etc/neutron/dhcp_agent.ini', - '/etc/neutron/fwaas_driver.ini', - '/etc/neutron/l3_agent.ini', - '/etc/neutron/lbaas_agent.ini', - '/etc/neutron/metadata_agent.ini', - '/etc/neutron/metering_agent.ini', - '/etc/neutron/plugins/cisco/cisco_plugins.ini', - '/etc/neutron/plugins/cisco/credentials.ini', - '/etc/neutron/plugins/cisco/db_conn.ini', - '/etc/neutron/plugins/cisco/l2network_plugin.ini', - '/etc/neutron/plugins/linuxbridge/linuxbridge_conf.ini', - '/etc/neutron/plugins/ml2/ml2_conf.ini', - '/etc/neutron/plugins/nicira/nvp.ini', - '/etc/neutron/vpn_agent.ini', - '/etc/neutron/plugins/midonet/midonet.ini', - '/etc/neutron/plugins/opencontrail/ContrailPlugin.ini', - '/etc/neutron/plugins/plumgrid/plumgrid.ini', - '/etc/neutron/plugins/ml2/ml2_conf_sriov.ini', - '/etc/neutron/plugins/ml2/sriov_agent.ini', - '/etc/neutron/neutron_lbaas.conf'] - - $neutron_files.each do |neutron_conf_file| + neutron_files.each do |neutron_conf_file| describe file(neutron_conf_file) do it { is_expected.to exist } it { is_expected.to contain('thisshouldexist=foo') } @@ -569,11 +584,27 @@ end end end + end - describe file('/etc/neutron/neutron_lbaas.conf') do - it { is_expected.to contain('thisshouldexist3=value1') } - it { is_expected.to contain('thisshouldexist3=value2') } + context 'purge unmanaged resources' do + before :all do + apply_manifest(pp_bogus_config, :catch_failures => true) + apply_manifest(pp_purge, :catch_failures => true) end + neutron_files.each do |neutron_conf_file| + describe file(neutron_conf_file) do + it { is_expected.to exist } + it { is_expected.to contain('thisshouldexist=foo') } + it { is_expected.to contain('thisshouldexist2=') } + + describe '#content' do + subject { super().content } + it { is_expected.to_not match /thisshouldnotexist/ } + it { is_expected.to_not match /xyz_unsupported_value/ } + end + end + end end + end diff -Nru puppet-module-neutron-8.0.0/spec/acceptance/nodesets/nodepool-xenial.yml puppet-module-neutron-9.4.0/spec/acceptance/nodesets/nodepool-xenial.yml --- puppet-module-neutron-8.0.0/spec/acceptance/nodesets/nodepool-xenial.yml 1970-01-01 00:00:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/spec/acceptance/nodesets/nodepool-xenial.yml 2016-09-26 21:11:55.000000000 +0000 @@ -0,0 +1,10 @@ +HOSTS: + ubuntu-16.04-amd64: + roles: + - master + platform: ubuntu-16.04-amd64 + hypervisor: none + ip: 127.0.0.1 +CONFIG: + type: foss + set_env: false diff -Nru puppet-module-neutron-8.0.0/spec/classes/neutron_agents_dhcp_spec.rb puppet-module-neutron-9.4.0/spec/classes/neutron_agents_dhcp_spec.rb --- puppet-module-neutron-8.0.0/spec/classes/neutron_agents_dhcp_spec.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/spec/classes/neutron_agents_dhcp_spec.rb 2016-09-26 21:11:55.000000000 +0000 @@ -19,7 +19,8 @@ :dhcp_driver => 'neutron.agent.linux.dhcp.Dnsmasq', :root_helper => 'sudo neutron-rootwrap /etc/neutron/rootwrap.conf', :enable_isolated_metadata => false, - :enable_metadata_network => false } + :enable_metadata_network => false, + :purge_config => false } end let :test_facts do @@ -49,6 +50,7 @@ is_expected.to contain_neutron_dhcp_agent_config('DEFAULT/force_metadata').with_value(''); is_expected.to contain_neutron_dhcp_agent_config('DEFAULT/enable_metadata_network').with_value(p[:enable_metadata_network]); is_expected.to contain_neutron_dhcp_agent_config('DEFAULT/dhcp_broadcast_reply').with_value(''); + is_expected.to contain_neutron_dhcp_agent_config('AGENT/availability_zone').with_value(''); end it 'installs neutron dhcp agent package' do @@ -58,11 +60,13 @@ :ensure => p[:package_ensure], :tag => ['openstack', 'neutron-package'], ) - is_expected.to contain_package('neutron').with_before(/Package\[neutron-dhcp-agent\]/) - is_expected.to contain_package('neutron-dhcp-agent').with_before(/Neutron_dhcp_agent_config\[.+\]/) - is_expected.to contain_package('neutron-dhcp-agent').with_before(/Neutron_config\[.+\]/) + is_expected.to contain_package('neutron').that_requires('Anchor[neutron::install::begin]') + is_expected.to contain_package('neutron').that_notifies('Anchor[neutron::install::end]') + is_expected.to contain_package('neutron-dhcp-agent').that_requires('Anchor[neutron::install::begin]') + is_expected.to contain_package('neutron-dhcp-agent').that_notifies('Anchor[neutron::install::end]') else - is_expected.to contain_package('neutron').with_before(/Neutron_dhcp_agent_config\[.+\]/) + is_expected.to contain_package('neutron').that_requires('Anchor[neutron::install::begin]') + is_expected.to contain_package('neutron').that_notifies('Anchor[neutron::install::end]') end end @@ -71,10 +75,16 @@ :name => platform_params[:dhcp_agent_service], :enable => true, :ensure => 'running', - :require => 'Class[Neutron]', :tag => 'neutron-service', ) - is_expected.to contain_service('neutron-dhcp-service').that_subscribes_to('Package[neutron]') + is_expected.to contain_service('neutron-dhcp-service').that_subscribes_to('Anchor[neutron::service::begin]') + is_expected.to contain_service('neutron-dhcp-service').that_notifies('Anchor[neutron::service::end]') + end + + it 'passes purge to resource' do + is_expected.to contain_resources('neutron_dhcp_agent_config').with({ + :purge => false + }) end context 'with manage_service as false' do @@ -134,12 +144,12 @@ end end - context 'with use_namespaces as false' do + context 'when availability zone is set' do before :each do - params.merge!(:use_namespaces => false) + params.merge!(:availability_zone => 'zone1') end - it 'should set use_namespaces option' do - is_expected.to contain_neutron_dhcp_agent_config('DEFAULT/use_namespaces').with_value(p[:use_namespaces]) + it 'should configure availability zone' do + is_expected.to contain_neutron_dhcp_agent_config('AGENT/availability_zone').with_value(p[:availability_zone]); end end end @@ -155,6 +165,17 @@ end end + shared_examples_for 'neutron dhcp agent with dnsmasq_dns_servers set' do + before do + params.merge!( + :dnsmasq_dns_servers => ['1.2.3.4','5.6.7.8'] + ) + end + it 'should set dnsmasq_dns_servers' do + is_expected.to contain_neutron_dhcp_agent_config('DEFAULT/dnsmasq_dns_servers').with_value(params[:dnsmasq_dns_servers].join(',')) + end + end + shared_examples_for 'dnsmasq dhcp_driver' do it 'installs dnsmasq packages' do if platform_params.has_key?(:dhcp_agent_package) @@ -189,8 +210,9 @@ it_configures 'neutron dhcp agent' it_configures 'neutron dhcp agent with dnsmasq_config_file specified' + it_configures 'neutron dhcp agent with dnsmasq_dns_servers set' it 'configures subscription to neutron-dhcp-agent package' do - is_expected.to contain_service('neutron-dhcp-service').that_subscribes_to('Package[neutron-dhcp-agent]') + is_expected.to contain_service('neutron-dhcp-service').that_subscribes_to('Anchor[neutron::service::begin]') end end @@ -210,5 +232,6 @@ it_configures 'neutron dhcp agent' it_configures 'neutron dhcp agent with dnsmasq_config_file specified' + it_configures 'neutron dhcp agent with dnsmasq_dns_servers set' end end diff -Nru puppet-module-neutron-8.0.0/spec/classes/neutron_agents_l3_spec.rb puppet-module-neutron-9.4.0/spec/classes/neutron_agents_l3_spec.rb --- puppet-module-neutron-8.0.0/spec/classes/neutron_agents_l3_spec.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/spec/classes/neutron_agents_l3_spec.rb 2016-09-26 21:11:55.000000000 +0000 @@ -14,7 +14,8 @@ :ha_enabled => false, :ha_vrrp_auth_type => 'PASS', :ha_vrrp_advert_int => '3', - :agent_mode => 'legacy' } + :agent_mode => 'legacy', + :purge_config => false } end let :test_facts do @@ -38,7 +39,6 @@ is_expected.to contain_neutron_l3_agent_config('DEFAULT/debug').with_value(p[:debug]) is_expected.to contain_neutron_l3_agent_config('DEFAULT/external_network_bridge').with_value('') is_expected.to contain_neutron_l3_agent_config('DEFAULT/interface_driver').with_value(p[:interface_driver]) - is_expected.to contain_neutron_l3_agent_config('DEFAULT/router_id').with_value('') is_expected.to contain_neutron_l3_agent_config('DEFAULT/gateway_external_network_id').with_value('') is_expected.to contain_neutron_l3_agent_config('DEFAULT/handle_internal_only_routers').with_value('') is_expected.to contain_neutron_l3_agent_config('DEFAULT/metadata_port').with_value('') @@ -46,7 +46,13 @@ is_expected.to contain_neutron_l3_agent_config('DEFAULT/periodic_interval').with_value('') is_expected.to contain_neutron_l3_agent_config('DEFAULT/periodic_fuzzy_delay').with_value('') is_expected.to contain_neutron_l3_agent_config('DEFAULT/enable_metadata_proxy').with_value('') - is_expected.to contain_neutron_l3_agent_config('DEFAULT/network_device_mtu').with_value('') + is_expected.to contain_neutron_l3_agent_config('AGENT/availability_zone').with_value('') + end + + it 'passes purge to resource' do + is_expected.to contain_resources('neutron_l3_agent_config').with({ + :purge => false + }) end it 'installs neutron l3 agent package' do @@ -54,32 +60,29 @@ is_expected.to contain_package('neutron-l3').with( :name => platform_params[:l3_agent_package], :ensure => p[:package_ensure], - :require => 'Package[neutron]', :tag => ['openstack', 'neutron-package'], ) - is_expected.to contain_package('neutron-l3').with_before(/Neutron_l3_agent_config\[.+\]/) + is_expected.to contain_package('neutron-l3').that_requires('Anchor[neutron::install::begin]') + is_expected.to contain_package('neutron-l3').that_notifies('Anchor[neutron::install::end]') else - is_expected.to contain_package('neutron').with_before(/Neutron_l3_agent_config\[.+\]/) + is_expected.to contain_package('neutron').that_requires('Anchor[neutron::install::begin]') + is_expected.to contain_package('neutron').that_notifies('Anchor[neutron::install::end]') end end - it 'configures neutron l3 agent service' do - is_expected.to contain_service('neutron-l3').with( - :name => platform_params[:l3_agent_service], - :enable => true, - :ensure => 'running', - :require => 'Class[Neutron]', - :tag => 'neutron-service', - ) - is_expected.to contain_service('neutron-l3').that_subscribes_to('Package[neutron]') - end - - context 'with manage_service as false' do + context 'with manage_service as true' do before :each do - params.merge!(:manage_service => false) + params.merge!(:manage_service => true) end - it 'should not start/stop service' do - is_expected.to contain_service('neutron-l3').without_ensure + it 'configures neutron l3 agent service' do + is_expected.to contain_service('neutron-l3').with( + :name => platform_params[:l3_agent_service], + :enable => true, + :ensure => 'running', + :tag => 'neutron-service', + ) + is_expected.to contain_service('neutron-l3').that_subscribes_to('Anchor[neutron::service::begin]') + is_expected.to contain_service('neutron-l3').that_notifies('Anchor[neutron::service::end]') end end @@ -104,24 +107,14 @@ end end - context 'with use_namespaces as false' do + context 'with availability zone' do before :each do - params.merge!(:use_namespaces => false) + params.merge!(:availability_zone => 'zone1') end - it 'should set use_namespaces option' do - is_expected.to contain_neutron_l3_agent_config('DEFAULT/use_namespaces').with_value(p[:use_namespaces]) - end - end - end - shared_examples_for 'neutron l3 agent with network_device_mtu specified' do - before do - params.merge!( - :network_device_mtu => 9999 - ) - end - it 'configures network_device_mtu' do - is_expected.to contain_neutron_l3_agent_config('DEFAULT/network_device_mtu').with_value(params[:network_device_mtu]) + it 'configures availability zone' do + is_expected.to contain_neutron_l3_agent_config('AGENT/availability_zone').with_value(p[:availability_zone]) + end end end @@ -138,9 +131,9 @@ end it_configures 'neutron l3 agent' - it_configures 'neutron l3 agent with network_device_mtu specified' it 'configures neutron-l3 package subscription' do - is_expected.to contain_service('neutron-l3').that_subscribes_to( [ 'Package[neutron]', 'Package[neutron-l3]' ] ) + is_expected.to contain_service('neutron-l3').that_subscribes_to('Anchor[neutron::service::begin]') + is_expected.to contain_service('neutron-l3').that_notifies('Anchor[neutron::service::end]') end end @@ -157,6 +150,5 @@ end it_configures 'neutron l3 agent' - it_configures 'neutron l3 agent with network_device_mtu specified' end end diff -Nru puppet-module-neutron-8.0.0/spec/classes/neutron_agents_lbaas_spec.rb puppet-module-neutron-9.4.0/spec/classes/neutron_agents_lbaas_spec.rb --- puppet-module-neutron-8.0.0/spec/classes/neutron_agents_lbaas_spec.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/spec/classes/neutron_agents_lbaas_spec.rb 2016-09-26 21:11:55.000000000 +0000 @@ -14,9 +14,9 @@ { :package_ensure => 'present', :enabled => true, :interface_driver => 'neutron.agent.linux.interface.OVSInterfaceDriver', - :device_driver => 'neutron_lbaas.services.loadbalancer.drivers.haproxy.namespace_driver.HaproxyNSDriver', - :use_namespaces => nil, - :manage_haproxy_package => true + :device_driver => 'neutron_lbaas.drivers.haproxy.namespace_driver.HaproxyNSDriver', + :manage_haproxy_package => true, + :purge_config => false } end @@ -37,6 +37,12 @@ it_configures 'haproxy lbaas_driver' it_configures 'haproxy lbaas_driver without package' + it 'passes purge to resource' do + is_expected.to contain_resources('neutron_lbaas_agent_config').with({ + :purge => false + }) + end + it 'configures lbaas_agent.ini' do is_expected.to contain_neutron_lbaas_agent_config('DEFAULT/debug').with_value(''); is_expected.to contain_neutron_lbaas_agent_config('DEFAULT/interface_driver').with_value(p[:interface_driver]); @@ -45,23 +51,23 @@ end it 'installs neutron lbaas agent package' do - is_expected.to contain_package('neutron-lbaas-agent').with( + is_expected.to contain_package('neutron-lbaasv2-agent').with( :name => platform_params[:lbaas_agent_package], :ensure => p[:package_ensure], :tag => ['openstack', 'neutron-package'], ) - is_expected.to contain_package('neutron').with_before(/Package\[neutron-lbaas-agent\]/) + is_expected.to contain_package('neutron').with_before(/Package\[neutron-lbaasv2-agent\]/) end it 'configures neutron lbaas agent service' do - is_expected.to contain_service('neutron-lbaas-service').with( + is_expected.to contain_service('neutron-lbaasv2-service').with( :name => platform_params[:lbaas_agent_service], :enable => true, :ensure => 'running', - :require => 'Class[Neutron]', :tag => 'neutron-service', ) - is_expected.to contain_service('neutron-lbaas-service').that_subscribes_to( [ 'Package[neutron]', 'Package[neutron-lbaas-agent]' ] ) + is_expected.to contain_service('neutron-lbaasv2-service').that_subscribes_to('Anchor[neutron::service::begin]') + is_expected.to contain_service('neutron-lbaasv2-service').that_notifies('Anchor[neutron::service::end]') end context 'with manage_service as false' do @@ -69,16 +75,9 @@ params.merge!(:manage_service => false) end it 'should not start/stop service' do - is_expected.to contain_service('neutron-lbaas-service').without_ensure - end - end - - context 'with use_namespaces as false' do - before :each do - params.merge!(:use_namespaces => false) - end - it 'should set use_namespaces option' do - is_expected.to contain_neutron_lbaas_agent_config('DEFAULT/use_namespaces').with_value(p[:use_namespaces]) + is_expected.to contain_service('neutron-lbaasv2-service').with( + :ensure => 'stopped', + ) end end end @@ -86,7 +85,7 @@ shared_examples_for 'haproxy lbaas_driver' do it 'installs haproxy packages' do if platform_params.has_key?(:lbaas_agent_package) - is_expected.to contain_package(platform_params[:haproxy_package]).with_before(['Package[neutron-lbaas-agent]']) + is_expected.to contain_package(platform_params[:haproxy_package]).with_before(['Package[neutron-lbaasv2-agent]']) end is_expected.to contain_package(platform_params[:haproxy_package]).with( :ensure => 'present' @@ -122,9 +121,9 @@ let :platform_params do { :haproxy_package => 'haproxy', - :lbaas_agent_package => 'neutron-lbaas-agent', + :lbaas_agent_package => 'neutron-lbaasv2-agent', :nobody_user_group => 'nogroup', - :lbaas_agent_service => 'neutron-lbaas-agent' } + :lbaas_agent_service => 'neutron-lbaasv2-agent' } end it_configures 'neutron lbaas agent' @@ -144,7 +143,7 @@ { :haproxy_package => 'haproxy', :lbaas_agent_package => 'openstack-neutron-lbaas', :nobody_user_group => 'nobody', - :lbaas_agent_service => 'neutron-lbaas-agent' } + :lbaas_agent_service => 'neutron-lbaasv2-agent' } end it_configures 'neutron lbaas agent' diff -Nru puppet-module-neutron-8.0.0/spec/classes/neutron_agents_metadata_spec.rb puppet-module-neutron-9.4.0/spec/classes/neutron_agents_metadata_spec.rb --- puppet-module-neutron-8.0.0/spec/classes/neutron_agents_metadata_spec.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/spec/classes/neutron_agents_metadata_spec.rb 2016-09-26 21:11:55.000000000 +0000 @@ -11,6 +11,7 @@ :debug => false, :enabled => true, :shared_secret => 'metadata-secret', + :purge_config => false, } end @@ -30,10 +31,10 @@ :name => platform_params[:metadata_agent_service], :enable => params[:enabled], :ensure => 'running', - :require => 'Class[Neutron]', :tag => 'neutron-service', ) - is_expected.to contain_service('neutron-metadata').that_subscribes_to('Package[neutron]') + is_expected.to contain_service('neutron-metadata').that_subscribes_to('Anchor[neutron::service::begin]') + is_expected.to contain_service('neutron-metadata').that_notifies('Anchor[neutron::service::end]') end context 'with manage_service as false' do @@ -45,6 +46,12 @@ end end + it 'passes purge to resource' do + is_expected.to contain_resources('neutron_metadata_agent_config').with({ + :purge => false + }) + end + it 'configures metadata_agent.ini' do is_expected.to contain_neutron_metadata_agent_config('DEFAULT/debug').with(:value => params[:debug]) is_expected.to contain_neutron_metadata_agent_config('DEFAULT/auth_ca_cert').with(:value => '') @@ -99,7 +106,8 @@ it_configures 'neutron metadata agent' it_configures 'neutron metadata agent with auth_ca_cert set' it 'configures subscription to neutron-metadata package' do - is_expected.to contain_service('neutron-metadata').that_subscribes_to('Package[neutron-metadata]') + is_expected.to contain_service('neutron-metadata').that_subscribes_to('Anchor[neutron::service::begin]') + is_expected.to contain_service('neutron-metadata').that_notifies('Anchor[neutron::service::end]') end end diff -Nru puppet-module-neutron-8.0.0/spec/classes/neutron_agents_metering_spec.rb puppet-module-neutron-9.4.0/spec/classes/neutron_agents_metering_spec.rb --- puppet-module-neutron-8.0.0/spec/classes/neutron_agents_metering_spec.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/spec/classes/neutron_agents_metering_spec.rb 2016-09-26 21:11:55.000000000 +0000 @@ -38,7 +38,7 @@ :debug => false, :interface_driver => 'neutron.agent.linux.interface.OVSInterfaceDriver', :driver => 'neutron.services.metering.drivers.noop.noop_driver.NoopMeteringDriver', - :use_namespaces => nil, + :purge_config => false, } end @@ -55,6 +55,12 @@ it { is_expected.to contain_class('neutron::params') } + it 'passes purge to resource' do + is_expected.to contain_resources('neutron_metering_agent_config').with({ + :purge => false + }) + end + it 'configures metering_agent.ini' do is_expected.to contain_neutron_metering_agent_config('DEFAULT/debug').with_value(p[:debug]); is_expected.to contain_neutron_metering_agent_config('DEFAULT/interface_driver').with_value(p[:interface_driver]); @@ -70,7 +76,8 @@ :ensure => p[:package_ensure], :tag => ['openstack', 'neutron-package'], ) - is_expected.to contain_package('neutron').with_before(/Package\[neutron-metering-agent\]/) + is_expected.to contain_package('neutron').that_requires('Anchor[neutron::install::begin]') + is_expected.to contain_package('neutron').that_notifies('Anchor[neutron::install::end]') end end @@ -79,10 +86,10 @@ :name => platform_params[:metering_agent_service], :enable => true, :ensure => 'running', - :require => 'Class[Neutron]', :tag => 'neutron-service', ) - is_expected.to contain_service('neutron-metering-service').that_subscribes_to('Package[neutron]') + is_expected.to contain_service('neutron-metering-service').that_subscribes_to('Anchor[neutron::service::begin]') + is_expected.to contain_service('neutron-metering-service').that_notifies('Anchor[neutron::service::end]') end context 'with manage_service as false' do @@ -94,15 +101,6 @@ end end - context 'with use_namespaces as false' do - before :each do - params.merge!(:use_namespaces => false) - end - it 'should set use_namespaces option' do - is_expected.to contain_neutron_metering_agent_config('DEFAULT/use_namespaces').with_value(p[:use_namespaces]) - end - end - context 'with non-default driver' do before :each do params.merge!(:driver => 'neutron.services.metering.drivers.iptables.iptables_driver.IptablesMeteringDriver') @@ -127,7 +125,8 @@ it_configures 'neutron metering agent' it 'configures subscription to neutron-metering-agent package' do - is_expected.to contain_service('neutron-metering-service').that_subscribes_to('Package[neutron-metering-agent]') + is_expected.to contain_service('neutron-metering-service').that_subscribes_to('Anchor[neutron::service::begin]') + is_expected.to contain_service('neutron-metering-service').that_notifies('Anchor[neutron::service::end]') end end diff -Nru puppet-module-neutron-8.0.0/spec/classes/neutron_agents_ml2_linuxbridge_spec.rb puppet-module-neutron-9.4.0/spec/classes/neutron_agents_ml2_linuxbridge_spec.rb --- puppet-module-neutron-8.0.0/spec/classes/neutron_agents_ml2_linuxbridge_spec.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/spec/classes/neutron_agents_ml2_linuxbridge_spec.rb 2016-09-26 21:11:55.000000000 +0000 @@ -13,7 +13,8 @@ :tunnel_types => [], :local_ip => false, :physical_interface_mappings => [], - :firewall_driver => 'neutron.agent.linux.iptables_firewall.IptablesFirewallDriver' } + :firewall_driver => 'neutron.agent.linux.iptables_firewall.IptablesFirewallDriver', + :purge_config => false,} end let :test_facts do @@ -31,10 +32,17 @@ context 'with default parameters' do it { is_expected.to contain_class('neutron::params') } + it 'passes purge to resource' do + is_expected.to contain_resources('neutron_agent_linuxbridge').with({ + :purge => false + }) + end + it 'configures ml2_conf.ini' do is_expected.to contain_neutron_agent_linuxbridge('agent/polling_interval').with_value('') is_expected.to contain_neutron_agent_linuxbridge('linux_bridge/physical_interface_mappings').with_value(default_params[:physical_interface_mappings].join(',')) is_expected.to contain_neutron_agent_linuxbridge('securitygroup/firewall_driver').with_value(default_params[:firewall_driver]) + is_expected.to contain_neutron_agent_linuxbridge('agent/tunnel_types').with_ensure('absent') end it 'installs neutron linuxbridge agent package' do @@ -57,10 +65,10 @@ :name => platform_params[:linuxbridge_agent_service], :enable => true, :ensure => 'running', - :require => 'Class[Neutron]', :tag => 'neutron-service', ) - is_expected.to contain_service('neutron-plugin-linuxbridge-agent').that_subscribes_to( [ 'Package[neutron]', 'Package[neutron-plugin-linuxbridge-agent]' ] ) + is_expected.to contain_service('neutron-plugin-linuxbridge-agent').that_subscribes_to('Anchor[neutron::service::begin]') + is_expected.to contain_service('neutron-plugin-linuxbridge-agent').that_notifies('Anchor[neutron::service::end]') end context 'with manage_service as false' do @@ -96,6 +104,7 @@ is_expected.to contain_neutron_agent_linuxbridge('vxlan/vxlan_ttl').with_value('') is_expected.to contain_neutron_agent_linuxbridge('vxlan/vxlan_tos').with_value('') is_expected.to contain_neutron_agent_linuxbridge('vxlan/l2_population').with_value('') + is_expected.to contain_neutron_agent_linuxbridge('agent/tunnel_types').with_value(params[:tunnel_types]) end end diff -Nru puppet-module-neutron-8.0.0/spec/classes/neutron_agents_ml2_ovs_spec.rb puppet-module-neutron-9.4.0/spec/classes/neutron_agents_ml2_ovs_spec.rb --- puppet-module-neutron-8.0.0/spec/classes/neutron_agents_ml2_ovs_spec.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/spec/classes/neutron_agents_ml2_ovs_spec.rb 2016-09-26 21:11:55.000000000 +0000 @@ -1,7 +1,6 @@ require 'spec_helper' describe 'neutron::agents::ml2::ovs' do - let :pre_condition do "class { 'neutron': rabbit_password => 'passw0rd' }" end @@ -12,12 +11,14 @@ :bridge_uplinks => [], :bridge_mappings => [], :integration_bridge => 'br-int', - :enable_tunneling => false, :local_ip => false, + :tunnel_types => [], :tunnel_bridge => 'br-tun', :drop_flows_on_start => false, :firewall_driver => 'neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver', :manage_vswitch => true, + :purge_config => false, + :enable_dpdk => false, } end @@ -38,6 +39,12 @@ it { is_expected.to contain_class('neutron::params') } + it 'passes purge to resource' do + is_expected.to contain_resources('neutron_agent_ovs').with({ + :purge => false + }) + end + it 'configures plugins/ml2/openvswitch_agent.ini' do is_expected.to contain_neutron_agent_ovs('agent/polling_interval').with_value('') is_expected.to contain_neutron_agent_ovs('agent/l2_population').with_value('') @@ -48,10 +55,10 @@ is_expected.to contain_neutron_agent_ovs('ovs/datapath_type').with_value(['']) is_expected.to contain_neutron_agent_ovs('ovs/vhostuser_socket_dir').with_value(['']) is_expected.to contain_neutron_agent_ovs('ovs/ovsdb_interface').with_value(['']) + is_expected.to contain_neutron_agent_ovs('ovs/of_interface').with_value(['']) is_expected.to contain_neutron_agent_ovs('ovs/integration_bridge').with_value(p[:integration_bridge]) is_expected.to contain_neutron_agent_ovs('securitygroup/firewall_driver').\ with_value(p[:firewall_driver]) - is_expected.to contain_neutron_agent_ovs('ovs/enable_tunneling').with_value(false) is_expected.to contain_neutron_agent_ovs('ovs/tunnel_bridge').with_ensure('absent') is_expected.to contain_neutron_agent_ovs('ovs/local_ip').with_ensure('absent') is_expected.to contain_neutron_agent_ovs('ovs/int_peer_patch_port').with_ensure('absent') @@ -74,10 +81,10 @@ :name => platform_params[:ovs_agent_service], :enable => true, :ensure => 'running', - :require => 'Class[Neutron]', - :tag => 'neutron-service', + :tag => ['neutron-service', 'neutron-db-sync-service'], ) - is_expected.to contain_service('neutron-ovs-agent-service').that_subscribes_to( [ 'Package[neutron]', 'Package[neutron-ovs-agent]' ] ) + is_expected.to contain_service('neutron-ovs-agent-service').that_subscribes_to('Anchor[neutron::service::begin]') + is_expected.to contain_service('neutron-ovs-agent-service').that_notifies('Anchor[neutron::service::end]') end context 'with manage_service as false' do @@ -202,17 +209,16 @@ context 'when enabling tunneling' do context 'without local ip address' do before :each do - params.merge!(:enable_tunneling => true) + params.merge!(:tunnel_types => ['vxlan']) end it_raises 'a Puppet::Error', /Local ip for ovs agent must be set when tunneling is enabled/ end context 'with default params' do before :each do - params.merge!(:enable_tunneling => true, :local_ip => '127.0.0.1' ) + params.merge!(:tunnel_types => ['vxlan'], :local_ip => '127.0.0.1' ) end it 'should configure ovs for tunneling' do - is_expected.to contain_neutron_agent_ovs('ovs/enable_tunneling').with_value(true) is_expected.to contain_neutron_agent_ovs('ovs/tunnel_bridge').with_value(default_params[:tunnel_bridge]) is_expected.to contain_neutron_agent_ovs('ovs/local_ip').with_value('127.0.0.1') is_expected.to contain_neutron_agent_ovs('ovs/int_peer_patch_port').with_value('') @@ -222,8 +228,7 @@ context 'with vxlan tunneling' do before :each do - params.merge!(:enable_tunneling => true, - :local_ip => '127.0.0.1', + params.merge!(:local_ip => '127.0.0.1', :tunnel_types => ['vxlan'], :vxlan_udp_port => '4789') end @@ -238,7 +243,7 @@ before :each do params.merge!(:enable_distributed_routing => true, :l2_population => false, - :enable_tunneling => true, + :tunnel_types => ['vxlan'], :local_ip => '127.0.0.1' ) end @@ -249,7 +254,7 @@ before :each do params.merge!(:enable_distributed_routing => true, :l2_population => false, - :enable_tunneling => false ) + :tunnel_types => [] ) end it 'should enable DVR without L2 population' do @@ -264,7 +269,7 @@ before :each do params.merge!(:ovsdb_interface => 'random') end - it_raises 'a Puppet::Error', /A value of \$ovsdb_interface is incorrect. The allowed values are ovs-ofctl and native/ + it_raises 'a Puppet::Error', /A value of \$ovsdb_interface is incorrect. The allowed values are vsctl and native/ end context 'with supported value' do @@ -276,6 +281,32 @@ end end end + + context 'when supplying of_interface' do + context 'with incorrect value' do + before :each do + params.merge!(:of_interface => 'random') + end + it_raises 'a Puppet::Error', /A value of \$of_interface is incorrect. The allowed values are ovs-ofctl and native/ + end + + context 'with supported value' do + before :each do + params.merge!(:of_interface => 'native') + end + it 'should configure of_interface for ovs' do + is_expected.to contain_neutron_agent_ovs('ovs/of_interface').with_value('native') + end + end + end + + context 'when enabling dpdk with manage vswitch disabled' do + before :each do + params.merge!(:enable_dpdk => true, :manage_vswitch => false) + end + + it_raises 'a Puppet::Error',/Enabling DPDK without manage vswitch does not have any effect/ + end end context 'on Debian platforms' do @@ -313,8 +344,24 @@ is_expected.to contain_service('ovs-cleanup-service').with( :name => platform_params[:ovs_cleanup_service], :enable => true - ) - is_expected.to contain_package('neutron-ovs-agent').with_before(/Service\[ovs-cleanup-service\]/) + ).that_requires('Package[neutron]') + is_expected.to contain_package('neutron-ovs-agent').that_requires('Anchor[neutron::install::begin]') + is_expected.to contain_package('neutron-ovs-agent').that_notifies('Anchor[neutron::install::end]') + end + + context 'when enabling dpdk with manage vswitch is default' do + let :pre_condition do + "class { 'vswitch::dpdk': core_list => '1,2', memory_channels => '1' }" + end + before :each do + params.merge!(:enable_dpdk => true, + :datapath_type => 'netdev', + :vhostuser_socket_dir => '/var/run/openvswitch') + end + + it 'should require vswitch::dpdk' do + is_expected.to contain_class('vswitch::dpdk') + end end end end diff -Nru puppet-module-neutron-8.0.0/spec/classes/neutron_agents_ml2_sriov_spec.rb puppet-module-neutron-9.4.0/spec/classes/neutron_agents_ml2_sriov_spec.rb --- puppet-module-neutron-8.0.0/spec/classes/neutron_agents_ml2_sriov_spec.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/spec/classes/neutron_agents_ml2_sriov_spec.rb 2016-09-26 21:11:55.000000000 +0000 @@ -10,10 +10,9 @@ { :package_ensure => 'present', :enabled => true, :manage_service => true, - :physical_device_mappings => [], - :exclude_devices => [], :polling_interval => 2, :supported_pci_vendor_devs => [], + :purge_config => false, } end @@ -34,14 +33,23 @@ it { is_expected.to contain_class('neutron::params') } + it 'passes purge to resource' do + is_expected.to contain_resources('neutron_sriov_agent_config').with({ + :purge => false + }) + end + it 'configures /etc/neutron/plugins/ml2/sriov_agent.ini' do is_expected.to contain_neutron_sriov_agent_config('sriov_nic/polling_interval').with_value(p[:polling_interval]) - is_expected.to contain_neutron_sriov_agent_config('sriov_nic/exclude_devices').with_value(p[:exclude_devices].join(',')) - is_expected.to contain_neutron_sriov_agent_config('sriov_nic/physical_device_mappings').with_value(p[:physical_device_mappings].join(',')) + is_expected.to contain_neutron_sriov_agent_config('sriov_nic/exclude_devices').with_value('') + is_expected.to contain_neutron_sriov_agent_config('sriov_nic/physical_device_mappings').with_value('') is_expected.to contain_neutron_sriov_agent_config('agent/extensions').with_value(['']) + is_expected.to contain_neutron_sriov_agent_config('securitygroup/firewall_driver').with_value('neutron.agent.firewall.NoopFirewallDriver') end - + it 'does not configure numvfs by default' do + is_expected.not_to contain_neutron_agents_ml2_sriov_numvfs('') + end it 'installs neutron sriov-nic agent package' do is_expected.to contain_package('neutron-sriov-nic-agent').with( @@ -49,7 +57,8 @@ :ensure => p[:package_ensure], :tag => ['openstack', 'neutron-package'], ) - is_expected.to contain_package('neutron-sriov-nic-agent').with_before(/Neutron_sriov_agent_config\[.+\]/) + is_expected.to contain_package('neutron-sriov-nic-agent').that_requires('Anchor[neutron::install::begin]') + is_expected.to contain_package('neutron-sriov-nic-agent').that_notifies('Anchor[neutron::install::end]') end it 'configures neutron sriov agent service' do @@ -57,10 +66,31 @@ :name => platform_params[:sriov_nic_agent_service], :enable => true, :ensure => 'running', - :require => 'Class[Neutron]', :tag => 'neutron-service', ) - is_expected.to contain_service('neutron-sriov-nic-agent-service').that_subscribes_to( [ 'Package[neutron]', 'Package[neutron-sriov-nic-agent]' ] ) + is_expected.to contain_service('neutron-sriov-nic-agent-service').that_subscribes_to('Anchor[neutron::service::begin]') + is_expected.to contain_service('neutron-sriov-nic-agent-service').that_notifies('Anchor[neutron::service::end]') + end + + context 'when number_of_vfs is empty' do + before :each do + params.merge!(:number_of_vfs => "") + end + + it 'does not configure numvfs ' do + is_expected.not_to contain_neutron_agents_ml2_sriov_numvfs('') + end + end + + context 'when number_of_vfs is configured' do + before :each do + params.merge!(:number_of_vfs => ['eth0:4','eth1:5']) + end + + it 'configures numvfs' do + is_expected.to contain_neutron_agent_sriov_numvfs('eth0:4').with( :ensure => 'present' ) + is_expected.to contain_neutron_agent_sriov_numvfs('eth1:5').with( :ensure => 'present') + end end context 'with manage_service as false' do @@ -84,6 +114,18 @@ end end + context 'when supplying empty device mapping' do + before :each do + params.merge!(:physical_device_mappings => "", + :exclude_devices => "") + end + + it 'configures physical device mappings with exclusion' do + is_expected.to contain_neutron_sriov_agent_config('sriov_nic/exclude_devices').with_value('') + is_expected.to contain_neutron_sriov_agent_config('sriov_nic/physical_device_mappings').with_value('') + end + end + context 'when supplying extensions for ML2 SR-IOV agent' do before :each do params.merge!(:extensions => ['qos']) diff -Nru puppet-module-neutron-8.0.0/spec/classes/neutron_agents_n1kv_vem_spec.rb puppet-module-neutron-9.4.0/spec/classes/neutron_agents_n1kv_vem_spec.rb --- puppet-module-neutron-8.0.0/spec/classes/neutron_agents_n1kv_vem_spec.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/spec/classes/neutron_agents_n1kv_vem_spec.rb 2016-09-26 21:11:55.000000000 +0000 @@ -3,9 +3,11 @@ describe 'neutron::agents::n1kv_vem' do let :facts do - { :operatingsystem => 'RedHat', - :operatingsystemrelease => '7', - :osfamily => 'RedHat' } + OSDefaults.get_facts({ + :operatingsystem => 'RedHat', + :operatingsystemrelease => '7', + :osfamily => 'RedHat', + }) end it 'should have a n1kv-vem config file' do @@ -18,7 +20,6 @@ end it 'install n1kv-vem' do - is_expected.to contain_package('libnl').with_before(['Package[nexus1000v]']) is_expected.to contain_service('openvswitch').with_notify(['Package[nexus1000v]']) is_expected.to contain_package('nexus1000v').with_notify(['Service[nexus1000v]']) is_expected.to contain_service('nexus1000v').with_ensure('running') diff -Nru puppet-module-neutron-8.0.0/spec/classes/neutron_agents_vpnaas_spec.rb puppet-module-neutron-9.4.0/spec/classes/neutron_agents_vpnaas_spec.rb --- puppet-module-neutron-8.0.0/spec/classes/neutron_agents_vpnaas_spec.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/spec/classes/neutron_agents_vpnaas_spec.rb 2016-09-26 21:11:55.000000000 +0000 @@ -35,6 +35,7 @@ :enabled => true, :vpn_device_driver => 'neutron.services.vpn.device_drivers.ipsec.OpenSwanDriver', :interface_driver => 'neutron.agent.linux.interface.OVSInterfaceDriver', + :purge_config => false, } end @@ -53,6 +54,12 @@ it_configures 'openswan vpnaas_driver' + it 'passes purge to resource' do + is_expected.to contain_resources('neutron_vpnaas_agent_config').with({ + :purge => false + }) + end + it 'configures vpnaas_agent.ini' do is_expected.to contain_neutron_vpnaas_agent_config('vpnagent/vpn_device_driver').with_value(p[:vpn_device_driver]); is_expected.to contain_neutron_vpnaas_agent_config('ipsec/ipsec_status_check_interval').with_value(''); @@ -79,7 +86,8 @@ :ensure => p[:package_ensure], :tag => ['openstack', 'neutron-package'], ) - is_expected.to contain_package('neutron').with_before(/Package\[neutron-vpnaas-agent\]/) + is_expected.to contain_package('neutron').that_requires('Anchor[neutron::install::begin]') + is_expected.to contain_package('neutron').that_notifies('Anchor[neutron::install::end]') end end @@ -88,10 +96,10 @@ :name => platform_params[:vpnaas_agent_service], :enable => true, :ensure => 'running', - :require => 'Class[Neutron]', :tag => 'neutron-service', ) - is_expected.to contain_service('neutron-vpnaas-service').that_subscribes_to('Package[neutron]') + is_expected.to contain_service('neutron-vpnaas-service').that_subscribes_to('Anchor[neutron::service::begin]') + is_expected.to contain_service('neutron-vpnaas-service').that_notifies('Anchor[neutron::service::end]') end context 'with manage_service as false' do @@ -107,7 +115,7 @@ shared_examples_for 'openswan vpnaas_driver' do it 'installs openswan packages' do if platform_params.has_key?(:vpnaas_agent_package) - is_expected.to contain_package('openswan').with_before(['Package[neutron-vpnaas-agent]']) + is_expected.to contain_package('openswan') end is_expected.to contain_package('openswan').with( :ensure => 'present', @@ -131,7 +139,8 @@ it_configures 'neutron vpnaas agent' it 'configures subscription to neutron-vpnaas-agent package' do - is_expected.to contain_service('neutron-vpnaas-service').that_subscribes_to('Package[neutron-vpnaas-agent]') + is_expected.to contain_service('neutron-vpnaas-service').that_subscribes_to('Anchor[neutron::service::begin]') + is_expected.to contain_service('neutron-vpnaas-service').that_notifies('Anchor[neutron::service::end]') end context 'when configuring the LibreSwan driver' do diff -Nru puppet-module-neutron-8.0.0/spec/classes/neutron_config_spec.rb puppet-module-neutron-9.4.0/spec/classes/neutron_config_spec.rb --- puppet-module-neutron-8.0.0/spec/classes/neutron_config_spec.rb 1970-01-01 00:00:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/spec/classes/neutron_config_spec.rb 2016-09-26 21:11:55.000000000 +0000 @@ -0,0 +1,163 @@ +require 'spec_helper' + +describe 'neutron::config' do + + let(:config_hash) do { + 'DEFAULT/foo' => { 'value' => 'fooValue' }, + 'DEFAULT/bar' => { 'value' => 'barValue' }, + 'DEFAULT/baz' => { 'ensure' => 'absent' } + } + end + + shared_examples_for 'neutron_config' do + let :params do + { :server_config => config_hash } + end + + it 'configures arbitrary neutron-config configurations' do + is_expected.to contain_neutron_config('DEFAULT/foo').with_value('fooValue') + is_expected.to contain_neutron_config('DEFAULT/bar').with_value('barValue') + is_expected.to contain_neutron_config('DEFAULT/baz').with_ensure('absent') + end + end + + shared_examples_for 'neutron_api_config' do + let :params do + { :api_config => config_hash } + end + + it 'configures arbitrary neutron-api-config configurations' do + is_expected.to contain_neutron_api_config('DEFAULT/foo').with_value('fooValue') + is_expected.to contain_neutron_api_config('DEFAULT/bar').with_value('barValue') + is_expected.to contain_neutron_api_config('DEFAULT/baz').with_ensure('absent') + end + end + + shared_examples_for 'neutron_agent_config' do + let :params do + { :l3_agent_config => config_hash, + :dhcp_agent_config => config_hash, + :metadata_agent_config => config_hash, + :metering_agent_config => config_hash, + :vpnaas_agent_config => config_hash, + } + end + + it 'configures arbitrary l3_agent_config configurations' do + is_expected.to contain_neutron_l3_agent_config('DEFAULT/foo').with_value('fooValue') + is_expected.to contain_neutron_l3_agent_config('DEFAULT/bar').with_value('barValue') + is_expected.to contain_neutron_l3_agent_config('DEFAULT/baz').with_ensure('absent') + end + + it 'configures arbitrary dhcp_agent_config configurations' do + is_expected.to contain_neutron_dhcp_agent_config('DEFAULT/foo').with_value('fooValue') + is_expected.to contain_neutron_dhcp_agent_config('DEFAULT/bar').with_value('barValue') + is_expected.to contain_neutron_dhcp_agent_config('DEFAULT/baz').with_ensure('absent') + end + + it 'configures arbitrary metadata_agent_config configurations' do + is_expected.to contain_neutron_metadata_agent_config('DEFAULT/foo').with_value('fooValue') + is_expected.to contain_neutron_metadata_agent_config('DEFAULT/bar').with_value('barValue') + is_expected.to contain_neutron_metadata_agent_config('DEFAULT/baz').with_ensure('absent') + end + + it 'configures arbitrary metering_agent_config configurations' do + is_expected.to contain_neutron_metering_agent_config('DEFAULT/foo').with_value('fooValue') + is_expected.to contain_neutron_metering_agent_config('DEFAULT/bar').with_value('barValue') + is_expected.to contain_neutron_metering_agent_config('DEFAULT/baz').with_ensure('absent') + end + + it 'configures arbitrary vpnaas_agent_config configurations' do + is_expected.to contain_neutron_vpnaas_agent_config('DEFAULT/foo').with_value('fooValue') + is_expected.to contain_neutron_vpnaas_agent_config('DEFAULT/bar').with_value('barValue') + is_expected.to contain_neutron_vpnaas_agent_config('DEFAULT/baz').with_ensure('absent') + end + + end + + shared_examples_for 'neutron_plugin_config' do + let :params do + { + :plugin_linuxbridge_config => config_hash, + :plugin_cisco_db_conn_config => config_hash, + :plugin_cisco_l2network_config => config_hash, + :plugin_cisco_config => config_hash, + :plugin_midonet_config => config_hash, + :plugin_plumgrid_config => config_hash, + :plugin_opencontrail_config => config_hash, + :plugin_nuage_config => config_hash, + :plugin_ml2_config => config_hash + } + end + + it 'configures arbitrary neutron_plugin_linuxbridge configurations' do + is_expected.to contain_neutron_plugin_linuxbridge('DEFAULT/foo').with_value('fooValue') + is_expected.to contain_neutron_plugin_linuxbridge('DEFAULT/bar').with_value('barValue') + is_expected.to contain_neutron_plugin_linuxbridge('DEFAULT/baz').with_ensure('absent') + end + + it 'configures arbitrary neutron_plugin_cisco_db_conn configurations' do + is_expected.to contain_neutron_plugin_cisco_db_conn('DEFAULT/foo').with_value('fooValue') + is_expected.to contain_neutron_plugin_cisco_db_conn('DEFAULT/bar').with_value('barValue') + is_expected.to contain_neutron_plugin_cisco_db_conn('DEFAULT/baz').with_ensure('absent') + end + + it 'configures arbitrary neutron_plugin_cisco_l2network configurations' do + is_expected.to contain_neutron_plugin_cisco_l2network('DEFAULT/foo').with_value('fooValue') + is_expected.to contain_neutron_plugin_cisco_l2network('DEFAULT/bar').with_value('barValue') + is_expected.to contain_neutron_plugin_cisco_l2network('DEFAULT/baz').with_ensure('absent') + end + + it 'configures arbitrary neutron_plugin_cisco configurations' do + is_expected.to contain_neutron_plugin_cisco('DEFAULT/foo').with_value('fooValue') + is_expected.to contain_neutron_plugin_cisco('DEFAULT/bar').with_value('barValue') + is_expected.to contain_neutron_plugin_cisco('DEFAULT/baz').with_ensure('absent') + end + + it 'configures arbitrary neutron_plugin_midonet configurations' do + is_expected.to contain_neutron_plugin_midonet('DEFAULT/foo').with_value('fooValue') + is_expected.to contain_neutron_plugin_midonet('DEFAULT/bar').with_value('barValue') + is_expected.to contain_neutron_plugin_midonet('DEFAULT/baz').with_ensure('absent') + end + + it 'configures arbitrary neutron_plugin_plumgrid configurations' do + is_expected.to contain_neutron_plugin_plumgrid('DEFAULT/foo').with_value('fooValue') + is_expected.to contain_neutron_plugin_plumgrid('DEFAULT/bar').with_value('barValue') + is_expected.to contain_neutron_plugin_plumgrid('DEFAULT/baz').with_ensure('absent') + end + + it 'configures arbitrary neutron_plugin_opencontrail configurations' do + is_expected.to contain_neutron_plugin_opencontrail('DEFAULT/foo').with_value('fooValue') + is_expected.to contain_neutron_plugin_opencontrail('DEFAULT/bar').with_value('barValue') + is_expected.to contain_neutron_plugin_opencontrail('DEFAULT/baz').with_ensure('absent') + end + + it 'configures arbitrary neutron_plugin_nuage configurations' do + is_expected.to contain_neutron_plugin_nuage('DEFAULT/foo').with_value('fooValue') + is_expected.to contain_neutron_plugin_nuage('DEFAULT/bar').with_value('barValue') + is_expected.to contain_neutron_plugin_nuage('DEFAULT/baz').with_ensure('absent') + end + + it 'configures arbitrary neutron_plugin_ml2 configurations' do + is_expected.to contain_neutron_plugin_ml2('DEFAULT/foo').with_value('fooValue') + is_expected.to contain_neutron_plugin_ml2('DEFAULT/bar').with_value('barValue') + is_expected.to contain_neutron_plugin_ml2('DEFAULT/baz').with_ensure('absent') + end + + end + + on_supported_os({ + :supported_os => OSDefaults.get_supported_os + }).each do |os,facts| + context "on #{os}" do + let (:facts) do + facts.merge!(OSDefaults.get_facts()) + end + + it_configures 'neutron_config' + it_configures 'neutron_api_config' + it_configures 'neutron_agent_config' + it_configures 'neutron_plugin_config' + end + end +end diff -Nru puppet-module-neutron-8.0.0/spec/classes/neutron_db_postgresql_spec.rb puppet-module-neutron-9.4.0/spec/classes/neutron_db_postgresql_spec.rb --- puppet-module-neutron-8.0.0/spec/classes/neutron_db_postgresql_spec.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/spec/classes/neutron_db_postgresql_spec.rb 2016-09-26 21:11:55.000000000 +0000 @@ -2,27 +2,19 @@ describe 'neutron::db::postgresql' do - let :req_params do - { :password => 'pw' } - end + shared_examples_for 'neutron::db::postgresql' do + let :req_params do + { :password => 'pw' } + end - let :pre_condition do - 'include postgresql::server' - end + let :pre_condition do + 'include postgresql::server' + end - let :test_facts do + let :test_facts do { :operatingsystem => 'default', :operatingsystemrelease => 'default' } - end - - context 'on a RedHat osfamily' do - let :facts do - @default_facts.merge(test_facts.merge({ - :osfamily => 'RedHat', - :operatingsystemrelease => '7.0', - :concat_basedir => '/var/lib/puppet/concat' - })) end context 'with only required parameters' do @@ -38,27 +30,19 @@ end - context 'on a Debian osfamily' do - let :facts do - @default_facts.merge(test_facts.merge({ - :operatingsystemrelease => '7.8', - :operatingsystem => 'Debian', - :osfamily => 'Debian', - :concat_basedir => '/var/lib/puppet/concat' - })) - end - - context 'with only required parameters' do - let :params do - req_params + on_supported_os({ + :supported_os => OSDefaults.get_supported_os + }).each do |os,facts| + context "on #{os}" do + let (:facts) do + facts.merge(OSDefaults.get_facts({ + :processorcount => 8, + :concat_basedir => '/var/lib/puppet/concat' + })) end - it { is_expected.to contain_postgresql__server__db('neutron').with( - :user => 'neutron', - :password => 'md5696acd1dd66513a556a18a1beccd03d1' - )} + it_configures 'neutron::db::postgresql' end - end end diff -Nru puppet-module-neutron-8.0.0/spec/classes/neutron_db_spec.rb puppet-module-neutron-9.4.0/spec/classes/neutron_db_spec.rb --- puppet-module-neutron-8.0.0/spec/classes/neutron_db_spec.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/spec/classes/neutron_db_spec.rb 2016-09-26 21:11:55.000000000 +0000 @@ -11,6 +11,7 @@ it { is_expected.to contain_neutron_config('database/min_pool_size').with_value('') } it { is_expected.to contain_neutron_config('database/max_retries').with_value('') } it { is_expected.to contain_neutron_config('database/retry_interval').with_value('') } + it { is_expected.to contain_neutron_config('database/db_max_retries').with_value('') } end @@ -20,7 +21,8 @@ :database_idle_timeout => '3601', :database_min_pool_size => '2', :database_max_retries => '11', - :database_retry_interval => '11', } + :database_retry_interval => '11', + :database_db_max_retries => '-1', } end it { is_expected.to contain_neutron_config('database/connection').with_value('mysql+pymysql://neutron:neutron@localhost/neutron').with_secret(true) } @@ -28,6 +30,7 @@ it { is_expected.to contain_neutron_config('database/min_pool_size').with_value('2') } it { is_expected.to contain_neutron_config('database/max_retries').with_value('11') } it { is_expected.to contain_neutron_config('database/retry_interval').with_value('11') } + it { is_expected.to contain_neutron_config('database/db_max_retries').with_value('-1') } end @@ -84,7 +87,7 @@ { :database_connection => 'mysql+pymysql://neutron:neutron@localhost/neutron' } end - it { is_expected.to contain_package('neutron-backend-package').with({ :ensure => 'present', :name => 'python-pymysql' }) } + it { is_expected.to contain_package('db_backend_package').with({ :ensure => 'present', :name => 'python-pymysql' }) } end end @@ -104,7 +107,7 @@ { :database_connection => 'mysql+pymysql://neutron:neutron@localhost/neutron' } end - it { is_expected.not_to contain_package('neutron-backend-package') } + it { is_expected.not_to contain_package('db_backend_package') } end end diff -Nru puppet-module-neutron-8.0.0/spec/classes/neutron_db_sync_spec.rb puppet-module-neutron-9.4.0/spec/classes/neutron_db_sync_spec.rb --- puppet-module-neutron-8.0.0/spec/classes/neutron_db_sync_spec.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/spec/classes/neutron_db_sync_spec.rb 2016-09-26 21:11:55.000000000 +0000 @@ -6,7 +6,7 @@ it 'runs neutron-db-sync' do is_expected.to contain_exec('neutron-db-sync').with( - :command => 'neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugin.ini upgrade head', + :command => 'neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugin.ini upgrade heads', :path => '/usr/bin', :refreshonly => 'true', :logoutput => 'on_failure' @@ -22,7 +22,7 @@ it { is_expected.to contain_exec('neutron-db-sync').with( - :command => 'neutron-db-manage --config-file /etc/neutron/neutron.conf upgrade head', + :command => 'neutron-db-manage --config-file /etc/neutron/neutron.conf upgrade heads', :path => '/usr/bin', :refreshonly => 'true', :logoutput => 'on_failure' @@ -32,29 +32,19 @@ end - context 'on a RedHat osfamily' do - let :facts do - { - :osfamily => 'RedHat', - :operatingsystemrelease => '7.0', - :concat_basedir => '/var/lib/puppet/concat' - } - end - - it_configures 'neutron-dbsync' - end + on_supported_os({ + :supported_os => OSDefaults.get_supported_os + }).each do |os,facts| + context "on #{os}" do + let (:facts) do + facts.merge(OSDefaults.get_facts({ + :processorcount => 8, + :concat_basedir => '/var/lib/puppet/concat' + })) + end - context 'on a Debian osfamily' do - let :facts do - { - :operatingsystemrelease => '7.8', - :operatingsystem => 'Debian', - :osfamily => 'Debian', - :concat_basedir => '/var/lib/puppet/concat' - } + it_configures 'neutron-dbsync' end - - it_configures 'neutron-dbsync' end end diff -Nru puppet-module-neutron-8.0.0/spec/classes/neutron_init_spec.rb puppet-module-neutron-9.4.0/spec/classes/neutron_init_spec.rb --- puppet-module-neutron-8.0.0/spec/classes/neutron_init_spec.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/spec/classes/neutron_init_spec.rb 2016-09-26 21:11:55.000000000 +0000 @@ -6,12 +6,9 @@ { :package_ensure => 'present', :core_plugin => 'linuxbridge', :auth_strategy => 'keystone', - :rabbit_hosts => false, - :rabbit_host => '127.0.0.1', - :rabbit_port => 5672, - :rabbit_user => 'guest', :rabbit_password => 'guest', :log_dir => '/var/log/neutron', + :purge_config => false, } end @@ -28,10 +25,6 @@ end context 'and if rabbit_hosts parameter is provided' do - before do - params.delete(:rabbit_host) - params.delete(:rabbit_port) - end context 'with one server' do before { params.merge!( :rabbit_hosts => ['127.0.0.1:5672'] ) } @@ -51,8 +44,15 @@ it_configures 'rabbit_ha_queues set to false' end + context 'with non-default notification options' do + before { params.merge!( :notification_driver => 'messagingv2', + :notification_topics => 'notifications', + :notification_transport_url => 'rabbit://me:passwd@host:5672/virtual_host' ) } + it_configures 'notification_driver and notification_topics' + end + it 'configures logging' do - is_expected.to contain_neutron_config('DEFAULT/log_file').with_ensure('absent') + is_expected.to contain_neutron_config('DEFAULT/log_file').with_value('') is_expected.to contain_neutron_config('DEFAULT/log_dir').with_value(params[:log_dir]) is_expected.to contain_neutron_config('DEFAULT/use_stderr').with_value('') end @@ -69,24 +69,34 @@ it_configures 'rabbit with durable queues' end + context 'with rabbitmq non default transient_queues_ttl' do + before { params.merge!( :rabbit_transient_queues_ttl => 20 ) } + it_configures 'rabbit with non default transient_queues_ttl' + end + + it_configures 'with SSL enabled with kombu' it_configures 'with SSL enabled without kombu' it_configures 'with SSL disabled' - it_configures 'with SSL wrongly configured' it_configures 'with SSL and kombu wrongly configured' it_configures 'with SSL socket options set' it_configures 'with SSL socket options set with wrong parameters' it_configures 'with SSL socket options left by default' it_configures 'with syslog disabled' it_configures 'with syslog enabled' - it_configures 'with syslog enabled and custom settings' it_configures 'with log_file specified' - it_configures 'with logging disabled' it_configures 'without service_plugins' it_configures 'with service_plugins' it_configures 'without memcache_servers' it_configures 'with memcache_servers' + it_configures 'with host defined' it_configures 'with dns_domain defined' + it_configures 'with transport_url defined' + it_configures 'with rootwrap daemon' + + context 'with amqp rpc_backend value' do + it_configures 'amqp support' + end end shared_examples_for 'a neutron base installation' do @@ -101,18 +111,32 @@ ) end + it 'passes purge to resource' do + is_expected.to contain_resources('neutron_config').with({ + :purge => false + }) + end + + it 'configures messaging notifications' do + is_expected.to contain_neutron_config('oslo_messaging_notifications/driver').with_value('') + is_expected.to contain_neutron_config('oslo_messaging_notifications/topics').with_value('') + is_expected.to contain_neutron_config('oslo_messaging_notifications/transport_url').with_value('') + end + it 'configures credentials for rabbit' do - is_expected.to contain_neutron_config('oslo_messaging_rabbit/rabbit_userid').with_value( params[:rabbit_user] ) + is_expected.to contain_neutron_config('oslo_messaging_rabbit/rabbit_userid').with_value( '' ) is_expected.to contain_neutron_config('oslo_messaging_rabbit/rabbit_password').with_value( params[:rabbit_password] ) is_expected.to contain_neutron_config('oslo_messaging_rabbit/rabbit_password').with_secret( true ) is_expected.to contain_neutron_config('oslo_messaging_rabbit/rabbit_virtual_host').with_value( '' ) - is_expected.to contain_neutron_config('oslo_messaging_rabbit/heartbeat_timeout_threshold').with_value('0') - is_expected.to contain_neutron_config('oslo_messaging_rabbit/heartbeat_rate').with_value('2') + is_expected.to contain_neutron_config('oslo_messaging_rabbit/heartbeat_timeout_threshold').with_value('') + is_expected.to contain_neutron_config('oslo_messaging_rabbit/heartbeat_rate').with_value('') is_expected.to contain_neutron_config('oslo_messaging_rabbit/kombu_reconnect_delay').with_value( '' ) + is_expected.to contain_neutron_config('oslo_messaging_rabbit/kombu_missing_consumer_retry_timeout').with_value( '' ) + is_expected.to contain_neutron_config('oslo_messaging_rabbit/kombu_failover_strategy').with_value( '' ) + is_expected.to contain_neutron_config('oslo_messaging_rabbit/kombu_compression').with_value( '' ) end it 'configures neutron.conf' do - is_expected.to contain_neutron_config('DEFAULT/verbose').with_value( '' ) is_expected.to contain_neutron_config('DEFAULT/bind_host').with_value('') is_expected.to contain_neutron_config('DEFAULT/bind_port').with_value('') is_expected.to contain_neutron_config('DEFAULT/auth_strategy').with_value('keystone') @@ -120,38 +144,38 @@ is_expected.to contain_neutron_config('DEFAULT/base_mac').with_value('') is_expected.to contain_neutron_config('DEFAULT/mac_generation_retries').with_value('') is_expected.to contain_neutron_config('DEFAULT/dhcp_lease_duration').with_value('') + is_expected.to contain_neutron_config('DEFAULT/host').with_value('') is_expected.to contain_neutron_config('DEFAULT/dns_domain').with_value('') is_expected.to contain_neutron_config('DEFAULT/dhcp_agents_per_network').with_value('') - is_expected.to contain_neutron_config('DEFAULT/network_device_mtu').with_value('') + is_expected.to contain_neutron_config('DEFAULT/global_physnet_mtu').with_value('') is_expected.to contain_neutron_config('DEFAULT/dhcp_agent_notification').with_value('') - is_expected.to contain_neutron_config('DEFAULT/advertise_mtu').with_value('') is_expected.to contain_neutron_config('DEFAULT/allow_bulk').with_value('') - is_expected.to contain_neutron_config('DEFAULT/allow_pagination').with_value('') - is_expected.to contain_neutron_config('DEFAULT/allow_sorting').with_value('') is_expected.to contain_neutron_config('DEFAULT/allow_overlapping_ips').with_value('') is_expected.to contain_neutron_config('DEFAULT/api_extensions_path').with_value('') is_expected.to contain_neutron_config('DEFAULT/control_exchange').with_value('neutron') is_expected.to contain_neutron_config('DEFAULT/state_path').with_value('') is_expected.to contain_neutron_config('oslo_concurrency/lock_path').with_value('$state_path/lock') + is_expected.to contain_neutron_config('DEFAULT/transport_url').with_value('') is_expected.to contain_neutron_config('DEFAULT/rpc_response_timeout').with_value( '' ) is_expected.to contain_neutron_config('agent/root_helper').with_value('sudo neutron-rootwrap /etc/neutron/rootwrap.conf') + is_expected.to contain_neutron_config('agent/root_helper_daemon').with_value('') is_expected.to contain_neutron_config('agent/report_interval').with_value('') end end shared_examples_for 'rabbit HA with a single virtual host' do it 'in neutron.conf' do - is_expected.not_to contain_neutron_config('oslo_messaging_rabbit/rabbit_host') - is_expected.not_to contain_neutron_config('oslo_messaging_rabbit/rabbit_port') + is_expected.to contain_neutron_config('oslo_messaging_rabbit/rabbit_host').with_value('') + is_expected.to contain_neutron_config('oslo_messaging_rabbit/rabbit_port').with_value('') is_expected.to contain_neutron_config('oslo_messaging_rabbit/rabbit_hosts').with_value( params[:rabbit_hosts] ) - is_expected.to contain_neutron_config('oslo_messaging_rabbit/rabbit_ha_queues').with_value(true) + is_expected.to contain_neutron_config('oslo_messaging_rabbit/rabbit_ha_queues').with_value('') end end shared_examples_for 'rabbit HA with multiple hosts' do it 'in neutron.conf' do - is_expected.not_to contain_neutron_config('oslo_messaging_rabbit/rabbit_host') - is_expected.not_to contain_neutron_config('oslo_messaging_rabbit/rabbit_port') + is_expected.to contain_neutron_config('oslo_messaging_rabbit/rabbit_host').with_value('') + is_expected.to contain_neutron_config('oslo_messaging_rabbit/rabbit_port').with_value('') is_expected.to contain_neutron_config('oslo_messaging_rabbit/rabbit_hosts').with_value( params[:rabbit_hosts].join(',') ) is_expected.to contain_neutron_config('oslo_messaging_rabbit/rabbit_ha_queues').with_value(true) end @@ -170,12 +194,26 @@ end end + shared_examples_for 'rabbit with non default transient_queues_ttl' do + it 'in neutron.conf' do + is_expected.to contain_neutron_config('oslo_messaging_rabbit/rabbit_transient_queues_ttl').with_value(20) + end + end + shared_examples_for 'rabbit_ha_queues set to false' do it 'in neutron.conf' do is_expected.to contain_neutron_config('oslo_messaging_rabbit/rabbit_ha_queues').with_value(false) end end + shared_examples_for 'notification_driver and notification_topics' do + it 'in neutron.conf' do + is_expected.to contain_neutron_config('oslo_messaging_notifications/driver').with_value( params[:notification_driver] ) + is_expected.to contain_neutron_config('oslo_messaging_notifications/topics').with_value( params[:notification_topics] ) + is_expected.to contain_neutron_config('oslo_messaging_notifications/transport_url').with_value( params[:notification_transport_url] ) + end + end + shared_examples_for 'with SSL socket options set' do before do params.merge!( @@ -247,6 +285,24 @@ it { is_expected.to contain_neutron_config('DEFAULT/use_syslog').with_value(false) } end + shared_examples_for 'with non-default kombu options' do + before do + params.merge!( + :kombu_missing_consumer_retry_timeout => '5', + :kombu_failover_strategy => 'shuffle', + :kombu_compression => 'gzip', + :kombu_reconnect_delay => '30', + ) + end + + it do + is_expected.to contain_neutron_config('oslo_messaging_rabbit/kombu_reconnect_delay').with_value('30') + is_expected.to contain_neutron_config('oslo_messaging_rabbit/kombu_missing_consumer_retry_timeout').with_value('5') + is_expected.to contain_neutron_config('oslo_messaging_rabbit/kombu_failover_strategy').with_value('shuffle') + is_expected.to contain_neutron_config('oslo_messaging_rabbit/kombu_compression').with_value('gzip') + end + end + shared_examples_for 'with SSL enabled with kombu' do before do params.merge!( @@ -279,51 +335,19 @@ is_expected.to contain_neutron_config('oslo_messaging_rabbit/kombu_ssl_ca_certs').with_value('') is_expected.to contain_neutron_config('oslo_messaging_rabbit/kombu_ssl_certfile').with_value('') is_expected.to contain_neutron_config('oslo_messaging_rabbit/kombu_ssl_keyfile').with_value('') - is_expected.to contain_neutron_config('oslo_messaging_rabbit/kombu_ssl_version').with_value('TLSv1') + is_expected.to contain_neutron_config('oslo_messaging_rabbit/kombu_ssl_version').with_value('') end end shared_examples_for 'with SSL disabled' do - before do - params.merge!( - :kombu_ssl_version => 'TLSv1' - ) - end it do is_expected.to contain_neutron_config('oslo_messaging_rabbit/rabbit_use_ssl').with_value('') is_expected.to contain_neutron_config('oslo_messaging_rabbit/kombu_ssl_ca_certs').with_value('') is_expected.to contain_neutron_config('oslo_messaging_rabbit/kombu_ssl_certfile').with_value('') is_expected.to contain_neutron_config('oslo_messaging_rabbit/kombu_ssl_keyfile').with_value('') - is_expected.to contain_neutron_config('oslo_messaging_rabbit/kombu_ssl_version').with_ensure('absent') - end - end - - shared_examples_for 'with SSL wrongly configured' do - before do - params.merge!( - :rabbit_use_ssl => false - ) - end - - context 'with SSL disabled' do - - context 'with kombu_ssl_ca_certs parameter' do - before { params.merge!(:kombu_ssl_ca_certs => '/path/to/ssl/ca/certs') } - it_raises 'a Puppet::Error', /The kombu_ssl_ca_certs parameter requires rabbit_use_ssl to be set to true/ - end - - context 'with kombu_ssl_certfile parameter' do - before { params.merge!(:kombu_ssl_certfile => '/path/to/ssl/cert/file') } - it_raises 'a Puppet::Error', /The kombu_ssl_certfile parameter requires rabbit_use_ssl to be set to true/ - end - - context 'with kombu_ssl_keyfile parameter' do - before { params.merge!(:kombu_ssl_keyfile => '/path/to/ssl/keyfile') } - it_raises 'a Puppet::Error', /The kombu_ssl_keyfile parameter requires rabbit_use_ssl to be set to true/ - end + is_expected.to contain_neutron_config('oslo_messaging_rabbit/kombu_ssl_version').with_value('') end - end shared_examples_for 'with SSL and kombu wrongly configured' do @@ -354,21 +378,6 @@ it do is_expected.to contain_neutron_config('DEFAULT/use_syslog').with_value(true) - is_expected.to contain_neutron_config('DEFAULT/syslog_log_facility').with_value('') - end - end - - shared_examples_for 'with syslog enabled and custom settings' do - before do - params.merge!( - :use_syslog => 'true', - :log_facility => 'LOG_LOCAL0' - ) - end - - it do - is_expected.to contain_neutron_config('DEFAULT/use_syslog').with_value(true) - is_expected.to contain_neutron_config('DEFAULT/syslog_log_facility').with_value('LOG_LOCAL0') end end @@ -385,17 +394,6 @@ end end - shared_examples_for 'with logging disabled' do - before { params.merge!( - :log_file => false, - :log_dir => false - )} - it { - is_expected.to contain_neutron_config('DEFAULT/log_file').with_ensure('absent') - is_expected.to contain_neutron_config('DEFAULT/log_dir').with_ensure('absent') - } - end - shared_examples_for 'with state and lock paths set' do before { params.merge!( :state_path => 'state_path', @@ -441,27 +439,27 @@ end - shared_examples_for 'with network_device_mtu defined' do + shared_examples_for 'with global_physnet_mtu defined' do before do params.merge!( - :network_device_mtu => 9000 + :global_physnet_mtu => 9000 ) end it do - is_expected.to contain_neutron_config('DEFAULT/network_device_mtu').with_value(params[:network_device_mtu]) + is_expected.to contain_neutron_config('DEFAULT/global_physnet_mtu').with_value(params[:global_physnet_mtu]) end end - shared_examples_for 'with advertise_mtu defined' do + shared_examples_for 'with host defined' do before do params.merge!( - :advertise_mtu => true + :host => 'test-001.example.org' ) end it do - is_expected.to contain_neutron_config('DEFAULT/advertise_mtu').with_value(params[:advertise_mtu]) + is_expected.to contain_neutron_config('DEFAULT/host').with_value(params[:host]) end end @@ -477,6 +475,84 @@ end end + shared_examples_for 'with transport_url defined' do + before do + params.merge!( + :default_transport_url => 'rabbit://rabbit_user:password@localhost:5673' + ) + end + + it do + is_expected.to contain_neutron_config('DEFAULT/transport_url').with_value(params[:default_transport_url]) + end + end + + shared_examples_for 'with rootwrap daemon' do + before do + params.merge!( + :root_helper_daemon => 'sudo neutron-rootwrap-daemon /etc/neutron/rootwrap.conf' + ) + end + + it do + is_expected.to contain_neutron_config('agent/root_helper_daemon').with_value(params[:root_helper_daemon]) + end + end + + shared_examples_for 'amqp support' do + context 'with default parameters' do + before { params.merge!( :rpc_backend => 'amqp' ) } + + it { is_expected.to contain_neutron_config('DEFAULT/rpc_backend').with_value('amqp') } + it { is_expected.to contain_neutron_config('oslo_messaging_amqp/server_request_prefix').with_value('') } + it { is_expected.to contain_neutron_config('oslo_messaging_amqp/broadcast_prefix').with_value('') } + it { is_expected.to contain_neutron_config('oslo_messaging_amqp/group_request_prefix').with_value('') } + it { is_expected.to contain_neutron_config('oslo_messaging_amqp/container_name').with_value('') } + it { is_expected.to contain_neutron_config('oslo_messaging_amqp/idle_timeout').with_value('') } + it { is_expected.to contain_neutron_config('oslo_messaging_amqp/trace').with_value('') } + it { is_expected.to contain_neutron_config('oslo_messaging_amqp/ssl_ca_file').with_value('') } + it { is_expected.to contain_neutron_config('oslo_messaging_amqp/ssl_cert_file').with_value('') } + it { is_expected.to contain_neutron_config('oslo_messaging_amqp/ssl_key_file').with_value('') } + it { is_expected.to contain_neutron_config('oslo_messaging_amqp/ssl_key_password').with_value('') } + it { is_expected.to contain_neutron_config('oslo_messaging_amqp/allow_insecure_clients').with_value('') } + it { is_expected.to contain_neutron_config('oslo_messaging_amqp/sasl_mechanisms').with_value('') } + it { is_expected.to contain_neutron_config('oslo_messaging_amqp/sasl_config_dir').with_value('') } + it { is_expected.to contain_neutron_config('oslo_messaging_amqp/sasl_config_name').with_value('') } + it { is_expected.to contain_neutron_config('oslo_messaging_amqp/username').with_value('') } + it { is_expected.to contain_neutron_config('oslo_messaging_amqp/password').with_value('') } + end + + context 'with overriden amqp parameters' do + before { params.merge!( + :rpc_backend => 'amqp', + :amqp_idle_timeout => '60', + :amqp_trace => true, + :amqp_ssl_ca_file => '/path/to/ca.cert', + :amqp_ssl_cert_file => '/path/to/certfile', + :amqp_ssl_key_file => '/path/to/key', + :amqp_username => 'amqp_user', + :amqp_password => 'password', + ) } + + it { is_expected.to contain_neutron_config('DEFAULT/rpc_backend').with_value('amqp') } + it { is_expected.to contain_neutron_config('oslo_messaging_amqp/server_request_prefix').with_value('') } + it { is_expected.to contain_neutron_config('oslo_messaging_amqp/broadcast_prefix').with_value('') } + it { is_expected.to contain_neutron_config('oslo_messaging_amqp/group_request_prefix').with_value('') } + it { is_expected.to contain_neutron_config('oslo_messaging_amqp/container_name').with_value('') } + it { is_expected.to contain_neutron_config('oslo_messaging_amqp/idle_timeout').with_value('60') } + it { is_expected.to contain_neutron_config('oslo_messaging_amqp/trace').with_value('true') } + it { is_expected.to contain_neutron_config('oslo_messaging_amqp/ssl_ca_file').with_value('/path/to/ca.cert') } + it { is_expected.to contain_neutron_config('oslo_messaging_amqp/ssl_cert_file').with_value('/path/to/certfile') } + it { is_expected.to contain_neutron_config('oslo_messaging_amqp/ssl_key_file').with_value('/path/to/key') } + it { is_expected.to contain_neutron_config('oslo_messaging_amqp/allow_insecure_clients').with_value('') } + it { is_expected.to contain_neutron_config('oslo_messaging_amqp/sasl_mechanisms').with_value('') } + it { is_expected.to contain_neutron_config('oslo_messaging_amqp/sasl_config_dir').with_value('') } + it { is_expected.to contain_neutron_config('oslo_messaging_amqp/sasl_config_name').with_value('') } + it { is_expected.to contain_neutron_config('oslo_messaging_amqp/username').with_value('amqp_user') } + it { is_expected.to contain_neutron_config('oslo_messaging_amqp/password').with_value('password') } + end + end + context 'on Debian platforms' do let :facts do @default_facts.merge(test_facts.merge({ diff -Nru puppet-module-neutron-8.0.0/spec/classes/neutron_keystone_auth_spec.rb puppet-module-neutron-9.4.0/spec/classes/neutron_keystone_auth_spec.rb --- puppet-module-neutron-8.0.0/spec/classes/neutron_keystone_auth_spec.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/spec/classes/neutron_keystone_auth_spec.rb 2016-09-26 21:11:55.000000000 +0000 @@ -42,7 +42,7 @@ describe 'when configuring neutron-server' do let :pre_condition do - "class { 'neutron::server': auth_password => 'test' }" + "class { 'neutron::server': password => 'test' }" end let :facts do @@ -79,29 +79,6 @@ ) } end - describe 'with deprecated endpoint parameters' do - let :params do - { - :password => 'neutron_password', - :public_protocol => 'https', - :public_port => '80', - :public_address => '10.10.10.10', - :port => '81', - :internal_protocol => 'https', - :internal_address => '10.10.10.11', - :admin_protocol => 'https', - :admin_address => '10.10.10.12' - } - end - - it { is_expected.to contain_keystone_endpoint('RegionOne/neutron::network').with( - :ensure => 'present', - :public_url => "https://10.10.10.10:80", - :internal_url => "https://10.10.10.11:81", - :admin_url => "https://10.10.10.12:81" - ) } - end - describe 'when overriding auth name' do let :params do @@ -115,9 +92,9 @@ it { is_expected.to contain_keystone_user_role('neutrony@services') } - it { is_expected.to contain_keystone_service('neutrony::network') } + it { is_expected.to contain_keystone_service('neutron::network') } - it { is_expected.to contain_keystone_endpoint('RegionOne/neutrony::network') } + it { is_expected.to contain_keystone_endpoint('RegionOne/neutron::network') } end diff -Nru puppet-module-neutron-8.0.0/spec/classes/neutron_keystone_authtoken_spec.rb puppet-module-neutron-9.4.0/spec/classes/neutron_keystone_authtoken_spec.rb --- puppet-module-neutron-8.0.0/spec/classes/neutron_keystone_authtoken_spec.rb 1970-01-01 00:00:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/spec/classes/neutron_keystone_authtoken_spec.rb 2016-09-26 21:11:55.000000000 +0000 @@ -0,0 +1,145 @@ +require 'spec_helper' + +describe 'neutron::keystone::authtoken' do + + let :params do + { :password => 'neutron_password', } + end + + shared_examples 'neutron authtoken' do + + context 'with default parameters' do + + it 'configure keystone_authtoken' do + is_expected.to contain_neutron_config('keystone_authtoken/username').with_value('neutron') + is_expected.to contain_neutron_config('keystone_authtoken/password').with_value('neutron_password') + is_expected.to contain_neutron_config('keystone_authtoken/auth_url').with_value('http://localhost:35357') + is_expected.to contain_neutron_config('keystone_authtoken/project_name').with_value('services') + is_expected.to contain_neutron_config('keystone_authtoken/user_domain_name').with_value('Default') + is_expected.to contain_neutron_config('keystone_authtoken/project_domain_name').with_value('Default') + is_expected.to contain_neutron_config('keystone_authtoken/insecure').with_value('') + is_expected.to contain_neutron_config('keystone_authtoken/auth_section').with_value('') + is_expected.to contain_neutron_config('keystone_authtoken/auth_type').with_value('password') + is_expected.to contain_neutron_config('keystone_authtoken/auth_uri').with_value('http://localhost:5000') + is_expected.to contain_neutron_config('keystone_authtoken/auth_version').with_value('') + is_expected.to contain_neutron_config('keystone_authtoken/cache').with_value('') + is_expected.to contain_neutron_config('keystone_authtoken/cafile').with_value('') + is_expected.to contain_neutron_config('keystone_authtoken/certfile').with_value('') + is_expected.to contain_neutron_config('keystone_authtoken/check_revocations_for_cached').with_value('') + is_expected.to contain_neutron_config('keystone_authtoken/delay_auth_decision').with_value('') + is_expected.to contain_neutron_config('keystone_authtoken/enforce_token_bind').with_value('') + is_expected.to contain_neutron_config('keystone_authtoken/hash_algorithms').with_value('') + is_expected.to contain_neutron_config('keystone_authtoken/http_connect_timeout').with_value('') + is_expected.to contain_neutron_config('keystone_authtoken/http_request_max_retries').with_value('') + is_expected.to contain_neutron_config('keystone_authtoken/include_service_catalog').with_value('') + is_expected.to contain_neutron_config('keystone_authtoken/keyfile').with_value('') + is_expected.to contain_neutron_config('keystone_authtoken/memcache_pool_conn_get_timeout').with_value('') + is_expected.to contain_neutron_config('keystone_authtoken/memcache_pool_dead_retry').with_value('') + is_expected.to contain_neutron_config('keystone_authtoken/memcache_pool_maxsize').with_value('') + is_expected.to contain_neutron_config('keystone_authtoken/memcache_pool_socket_timeout').with_value('') + is_expected.to contain_neutron_config('keystone_authtoken/memcache_pool_unused_timeout').with_value('') + is_expected.to contain_neutron_config('keystone_authtoken/memcache_secret_key').with_value('') + is_expected.to contain_neutron_config('keystone_authtoken/memcache_security_strategy').with_value('') + is_expected.to contain_neutron_config('keystone_authtoken/memcache_use_advanced_pool').with_value('') + is_expected.to contain_neutron_config('keystone_authtoken/memcached_servers').with_value('') + is_expected.to contain_neutron_config('keystone_authtoken/region_name').with_value('') + is_expected.to contain_neutron_config('keystone_authtoken/revocation_cache_time').with_value('') + is_expected.to contain_neutron_config('keystone_authtoken/signing_dir').with_value('') + is_expected.to contain_neutron_config('keystone_authtoken/token_cache_time').with_value('') + end + end + + context 'when overriding parameters' do + before do + params.merge!({ + :auth_uri => 'https://10.0.0.1:9999/', + :username => 'myuser', + :password => 'mypasswd', + :auth_url => 'https://127.0.0.1:35357', + :project_name => 'service_project', + :user_domain_name => 'domainX', + :project_domain_name => 'domainX', + :insecure => false, + :auth_section => 'new_section', + :auth_type => 'password', + :auth_version => 'v3', + :cache => 'somevalue', + :cafile => '/opt/stack/data/cafile.pem', + :certfile => 'certfile.crt', + :check_revocations_for_cached => false, + :delay_auth_decision => false, + :enforce_token_bind => 'permissive', + :hash_algorithms => 'md5', + :http_connect_timeout => '300', + :http_request_max_retries => '3', + :include_service_catalog => true, + :keyfile => 'keyfile', + :memcache_pool_conn_get_timeout => '9', + :memcache_pool_dead_retry => '302', + :memcache_pool_maxsize => '11', + :memcache_pool_socket_timeout => '2', + :memcache_pool_unused_timeout => '61', + :memcache_secret_key => 'secret_key', + :memcache_security_strategy => 'ENCRYPT', + :memcache_use_advanced_pool => true, + :memcached_servers => ['memcached01:11211','memcached02:11211'], + :region_name => 'region2', + :revocation_cache_time => '11', + :signing_dir => '/var/cache', + :token_cache_time => '301', + }) + end + + it 'configure keystone_authtoken' do + is_expected.to contain_neutron_config('keystone_authtoken/auth_uri').with_value('https://10.0.0.1:9999/') + is_expected.to contain_neutron_config('keystone_authtoken/username').with_value(params[:username]) + is_expected.to contain_neutron_config('keystone_authtoken/password').with_value(params[:password]).with_secret(true) + is_expected.to contain_neutron_config('keystone_authtoken/auth_url').with_value(params[:auth_url]) + is_expected.to contain_neutron_config('keystone_authtoken/project_name').with_value(params[:project_name]) + is_expected.to contain_neutron_config('keystone_authtoken/user_domain_name').with_value(params[:user_domain_name]) + is_expected.to contain_neutron_config('keystone_authtoken/project_domain_name').with_value(params[:project_domain_name]) + is_expected.to contain_neutron_config('keystone_authtoken/insecure').with_value(params[:insecure]) + is_expected.to contain_neutron_config('keystone_authtoken/auth_section').with_value(params[:auth_section]) + is_expected.to contain_neutron_config('keystone_authtoken/auth_type').with_value(params[:auth_type]) + is_expected.to contain_neutron_config('keystone_authtoken/auth_version').with_value(params[:auth_version]) + is_expected.to contain_neutron_config('keystone_authtoken/cache').with_value(params[:cache]) + is_expected.to contain_neutron_config('keystone_authtoken/cafile').with_value(params[:cafile]) + is_expected.to contain_neutron_config('keystone_authtoken/certfile').with_value(params[:certfile]) + is_expected.to contain_neutron_config('keystone_authtoken/check_revocations_for_cached').with_value(params[:check_revocations_for_cached]) + is_expected.to contain_neutron_config('keystone_authtoken/delay_auth_decision').with_value(params[:delay_auth_decision]) + is_expected.to contain_neutron_config('keystone_authtoken/enforce_token_bind').with_value(params[:enforce_token_bind]) + is_expected.to contain_neutron_config('keystone_authtoken/hash_algorithms').with_value(params[:hash_algorithms]) + is_expected.to contain_neutron_config('keystone_authtoken/http_connect_timeout').with_value(params[:http_connect_timeout]) + is_expected.to contain_neutron_config('keystone_authtoken/http_request_max_retries').with_value(params[:http_request_max_retries]) + is_expected.to contain_neutron_config('keystone_authtoken/include_service_catalog').with_value(params[:include_service_catalog]) + is_expected.to contain_neutron_config('keystone_authtoken/keyfile').with_value(params[:keyfile]) + is_expected.to contain_neutron_config('keystone_authtoken/memcache_pool_conn_get_timeout').with_value(params[:memcache_pool_conn_get_timeout]) + is_expected.to contain_neutron_config('keystone_authtoken/memcache_pool_dead_retry').with_value(params[:memcache_pool_dead_retry]) + is_expected.to contain_neutron_config('keystone_authtoken/memcache_pool_maxsize').with_value(params[:memcache_pool_maxsize]) + is_expected.to contain_neutron_config('keystone_authtoken/memcache_pool_socket_timeout').with_value(params[:memcache_pool_socket_timeout]) + is_expected.to contain_neutron_config('keystone_authtoken/memcache_pool_unused_timeout').with_value(params[:memcache_pool_unused_timeout]) + is_expected.to contain_neutron_config('keystone_authtoken/memcache_secret_key').with_value(params[:memcache_secret_key]) + is_expected.to contain_neutron_config('keystone_authtoken/memcache_security_strategy').with_value(params[:memcache_security_strategy]) + is_expected.to contain_neutron_config('keystone_authtoken/memcache_use_advanced_pool').with_value(params[:memcache_use_advanced_pool]) + is_expected.to contain_neutron_config('keystone_authtoken/memcached_servers').with_value('memcached01:11211,memcached02:11211') + is_expected.to contain_neutron_config('keystone_authtoken/region_name').with_value(params[:region_name]) + is_expected.to contain_neutron_config('keystone_authtoken/revocation_cache_time').with_value(params[:revocation_cache_time]) + is_expected.to contain_neutron_config('keystone_authtoken/signing_dir').with_value(params[:signing_dir]) + is_expected.to contain_neutron_config('keystone_authtoken/token_cache_time').with_value(params[:token_cache_time]) + end + end + end + + on_supported_os({ + :supported_os => OSDefaults.get_supported_os + }).each do |os,facts| + context "on #{os}" do + let (:facts) do + facts.merge!(OSDefaults.get_facts()) + end + + it_configures 'neutron authtoken' + end + end + +end diff -Nru puppet-module-neutron-8.0.0/spec/classes/neutron_logging_spec.rb puppet-module-neutron-9.4.0/spec/classes/neutron_logging_spec.rb --- puppet-module-neutron-8.0.0/spec/classes/neutron_logging_spec.rb 1970-01-01 00:00:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/spec/classes/neutron_logging_spec.rb 2016-09-26 21:11:55.000000000 +0000 @@ -0,0 +1,130 @@ +require 'spec_helper' + +describe 'neutron::logging' do + + let :params do + { + } + end + + let :log_params do + { + :logging_context_format_string => '%(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s [%(request_id)s %(user_identity)s] %(instance)s%(message)s', + :logging_default_format_string => '%(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s [-] %(instance)s%(message)s', + :logging_debug_format_suffix => '%(funcName)s %(pathname)s:%(lineno)d', + :logging_exception_prefix => '%(asctime)s.%(msecs)03d %(process)d TRACE %(name)s %(instance)s', + :logging_user_identity_format => '%(user)s %(tenant)s %(domain)s %(user_domain)s %(project_domain)s', + :log_config_append => '/etc/neutron/logging.conf', + :publish_errors => true, + :default_log_levels => { + 'amqp' => 'WARN', 'amqplib' => 'WARN', 'boto' => 'WARN', + 'sqlalchemy' => 'WARN', 'suds' => 'INFO', 'iso8601' => 'WARN', + 'requests.packages.urllib3.connectionpool' => 'WARN' }, + :fatal_deprecations => true, + :instance_format => '[instance: %(uuid)s] ', + :instance_uuid_format => '[instance: %(uuid)s] ', + :log_date_format => '%Y-%m-%d %H:%M:%S', + :use_syslog => false, + :use_stderr => false, + :syslog_log_facility => 'LOG_USER', + :log_dir => '/var/log', + :log_file => 'neutron.log', + :watch_log_file => true, + :debug => true, + } + end + + shared_examples_for 'neutron-logging' do + + context 'with basic logging options and default settings' do + it_configures 'basic default logging settings' + end + + context 'with basic logging options and non-default settings' do + before { params.merge!( log_params ) } + it_configures 'basic non-default logging settings' + end + + context 'with extended logging options' do + before { params.merge!( log_params ) } + it_configures 'logging params set' + end + + end + + shared_examples 'basic default logging settings' do + it 'configures neutron logging settins with default values' do + is_expected.to contain_neutron_config('DEFAULT/use_syslog').with(:value => '') + is_expected.to contain_neutron_config('DEFAULT/use_stderr').with(:value => '') + is_expected.to contain_neutron_config('DEFAULT/syslog_log_facility').with(:value => '') + is_expected.to contain_neutron_config('DEFAULT/log_dir').with(:value => '/var/log/neutron') + is_expected.to contain_neutron_config('DEFAULT/log_file').with(:value => '') + is_expected.to contain_neutron_config('DEFAULT/watch_log_file').with(:value => '') + is_expected.to contain_neutron_config('DEFAULT/debug').with(:value => '') + end + end + + shared_examples 'basic non-default logging settings' do + it 'configures neutron logging settins with non-default values' do + is_expected.to contain_neutron_config('DEFAULT/use_syslog').with(:value => 'false') + is_expected.to contain_neutron_config('DEFAULT/use_stderr').with(:value => 'false') + is_expected.to contain_neutron_config('DEFAULT/syslog_log_facility').with(:value => 'LOG_USER') + is_expected.to contain_neutron_config('DEFAULT/log_dir').with(:value => '/var/log') + is_expected.to contain_neutron_config('DEFAULT/log_file').with(:value => 'neutron.log') + is_expected.to contain_neutron_config('DEFAULT/watch_log_file').with(:value => 'true') + is_expected.to contain_neutron_config('DEFAULT/debug').with(:value => 'true') + end + end + + shared_examples_for 'logging params set' do + it 'enables logging params' do + is_expected.to contain_neutron_config('DEFAULT/logging_context_format_string').with_value( + '%(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s [%(request_id)s %(user_identity)s] %(instance)s%(message)s') + + is_expected.to contain_neutron_config('DEFAULT/logging_default_format_string').with_value( + '%(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s [-] %(instance)s%(message)s') + + is_expected.to contain_neutron_config('DEFAULT/logging_user_identity_format').with_value( + '%(user)s %(tenant)s %(domain)s %(user_domain)s %(project_domain)s') + + is_expected.to contain_neutron_config('DEFAULT/logging_debug_format_suffix').with_value( + '%(funcName)s %(pathname)s:%(lineno)d') + + is_expected.to contain_neutron_config('DEFAULT/logging_exception_prefix').with_value( + '%(asctime)s.%(msecs)03d %(process)d TRACE %(name)s %(instance)s') + + is_expected.to contain_neutron_config('DEFAULT/log_config_append').with_value( + '/etc/neutron/logging.conf') + is_expected.to contain_neutron_config('DEFAULT/publish_errors').with_value( + true) + + is_expected.to contain_neutron_config('DEFAULT/default_log_levels').with_value( + 'amqp=WARN,amqplib=WARN,boto=WARN,iso8601=WARN,requests.packages.urllib3.connectionpool=WARN,sqlalchemy=WARN,suds=INFO') + + is_expected.to contain_neutron_config('DEFAULT/fatal_deprecations').with_value( + true) + + is_expected.to contain_neutron_config('DEFAULT/instance_format').with_value( + '[instance: %(uuid)s] ') + + is_expected.to contain_neutron_config('DEFAULT/instance_uuid_format').with_value( + '[instance: %(uuid)s] ') + + is_expected.to contain_neutron_config('DEFAULT/log_date_format').with_value( + '%Y-%m-%d %H:%M:%S') + end + end + + on_supported_os({ + :supported_os => OSDefaults.get_supported_os + }).each do |os,facts| + context "on #{os}" do + let (:facts) do + facts.merge(OSDefaults.get_facts()) + end + + it_configures 'neutron-logging' + end + end + +end diff -Nru puppet-module-neutron-8.0.0/spec/classes/neutron_plugins_cisco_spec.rb puppet-module-neutron-9.4.0/spec/classes/neutron_plugins_cisco_spec.rb --- puppet-module-neutron-8.0.0/spec/classes/neutron_plugins_cisco_spec.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/spec/classes/neutron_plugins_cisco_spec.rb 2016-09-26 21:11:55.000000000 +0000 @@ -3,7 +3,7 @@ describe 'neutron::plugins::cisco' do let :pre_condition do - "class { 'neutron::server': auth_password => 'password'} + "class { 'neutron::server': password => 'password'} class { 'neutron': rabbit_password => 'passw0rd' }" end @@ -29,7 +29,8 @@ :max_ports => '100', :max_port_profiles => '65568', :max_networks => '65568', - :manager_class => 'neutron.plugins.cisco.segmentation.l2network_vlan_mgr_v2.L2NetworkVLANMgr' + :manager_class => 'neutron.plugins.cisco.segmentation.l2network_vlan_mgr_v2.L2NetworkVLANMgr', + :purge_config => false, } end @@ -49,8 +50,9 @@ is_expected.to contain_file('/etc/neutron/plugin.ini').with( :ensure => 'link', :target => '/etc/neutron/plugins/cisco/cisco_plugins.ini', - :require => 'Package[neutron-plugin-cisco]' ) + is_expected.to contain_file('/etc/neutron/plugin.ini').that_requires('Anchor[neutron::config::begin]') + is_expected.to contain_file('/etc/neutron/plugin.ini').that_notifies('Anchor[neutron::config::end]') end it 'should have a plugin config folder' do @@ -71,6 +73,30 @@ ) end + it 'passes purge to resource plugin_cisco' do + is_expected.to contain_resources('neutron_plugin_cisco').with({ + :purge => false + }) + end + + it 'passes purge to resource cisco_db_conn' do + is_expected.to contain_resources('neutron_plugin_cisco_db_conn').with({ + :purge => false + }) + end + + it 'passes purge to resource cisco_l2network' do + is_expected.to contain_resources('neutron_plugin_cisco_l2network').with({ + :purge => false + }) + end + + it 'passes purge to resource cisco_credentials' do + is_expected.to contain_resources('neutron_plugin_cisco_credentials').with({ + :purge => false + }) + end + it 'should perform default l2 configuration' do is_expected.to contain_neutron_plugin_cisco_l2network('VLANS/vlan_start').\ with_value(params[:vlan_start]) @@ -152,9 +178,11 @@ :path => '/etc/default/neutron-server', :match => '^NEUTRON_PLUGIN_CONFIG=(.*)$', :line => 'NEUTRON_PLUGIN_CONFIG=/etc/neutron/plugins/cisco/cisco_plugins.ini', - :require => ['Package[neutron-server]', 'Package[neutron-plugin-cisco]'], - :notify => 'Service[neutron-server]' + :tag => 'neutron-file-line', ) + is_expected.to contain_file_line('/etc/default/neutron-server:NEUTRON_PLUGIN_CONFIG').that_requires('Anchor[neutron::config::begin]') + is_expected.to contain_file_line('/etc/default/neutron-server:NEUTRON_PLUGIN_CONFIG').that_notifies('Anchor[neutron::config::end]') + end it_configures 'default cisco plugin' end diff -Nru puppet-module-neutron-8.0.0/spec/classes/neutron_plugins_midonet_spec.rb puppet-module-neutron-9.4.0/spec/classes/neutron_plugins_midonet_spec.rb --- puppet-module-neutron-8.0.0/spec/classes/neutron_plugins_midonet_spec.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/spec/classes/neutron_plugins_midonet_spec.rb 2016-09-26 21:11:55.000000000 +0000 @@ -3,9 +3,8 @@ describe 'neutron::plugins::midonet' do let :pre_condition do - "class { 'neutron::server': auth_password => 'password' } - class { 'neutron': rabbit_password => 'passw0rd' } - package { 'python-neutron-plugin-midonet': }" + "class { 'neutron::server': password => 'password' } + class { 'neutron': rabbit_password => 'passw0rd' }" end let :default_params do @@ -14,7 +13,8 @@ :midonet_api_port => '8080', :keystone_username => 'neutron', :keystone_password => 'test_midonet', - :keystone_tenant => 'services' + :keystone_tenant => 'services', + :purge_config => false, } end @@ -34,11 +34,23 @@ params.merge!(default_params) end + it 'should install package python-networking-midonet' do + is_expected.to contain_package('python-networking-midonet').with( + :ensure => 'present') + end + it 'should create plugin symbolic link' do is_expected.to contain_file('/etc/neutron/plugin.ini').with( :ensure => 'link', - :target => '/etc/neutron/plugins/midonet/midonet.ini', - :require => 'Package[python-neutron-plugin-midonet]') + :target => '/etc/neutron/plugins/midonet/midonet.ini') + is_expected.to contain_file('/etc/neutron/plugin.ini').that_requires('Anchor[neutron::config::begin]') + is_expected.to contain_file('/etc/neutron/plugin.ini').that_notifies('Anchor[neutron::config::end]') + end + + it 'passes purge to resource' do + is_expected.to contain_resources('neutron_plugin_midonet').with({ + :purge => false + }) end it 'should perform default configuration of' do @@ -62,9 +74,9 @@ :path => '/etc/default/neutron-server', :match => '^NEUTRON_PLUGIN_CONFIG=(.*)$', :line => 'NEUTRON_PLUGIN_CONFIG=/etc/neutron/plugins/midonet/midonet.ini', - :require => ['Package[neutron-server]', 'Package[python-neutron-plugin-midonet]'], - :notify => 'Service[neutron-server]' ) + is_expected.to contain_file_line('/etc/default/neutron-server:NEUTRON_PLUGIN_CONFIG').that_requires('Anchor[neutron::config::begin]') + is_expected.to contain_file_line('/etc/default/neutron-server:NEUTRON_PLUGIN_CONFIG').that_notifies('Anchor[neutron::config::end]') end it_configures 'neutron midonet plugin' end diff -Nru puppet-module-neutron-8.0.0/spec/classes/neutron_plugins_ml2_arista_l3_spec.rb puppet-module-neutron-9.4.0/spec/classes/neutron_plugins_ml2_arista_l3_spec.rb --- puppet-module-neutron-8.0.0/spec/classes/neutron_plugins_ml2_arista_l3_spec.rb 1970-01-01 00:00:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/spec/classes/neutron_plugins_ml2_arista_l3_spec.rb 2016-09-26 21:11:55.000000000 +0000 @@ -0,0 +1,87 @@ +# +# Copyright (C) 2016 Matthew J. Black +# +# Author: Matthew J. Black +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +# Unit tests for neutron::plugins::ml2::arista::l3 class +# +require 'spec_helper' + +describe 'neutron::plugins::ml2::arista::l3' do + + let :pre_condition do + "class { 'neutron::server': password => 'password'} + class { 'neutron': + rabbit_password => 'passw0rd', + core_plugin => 'neutron.plugins.ml2.plugin.Ml2Plugin' }" + end + + let :default_params do + { + :secondary_l3_host => '', + :mlag_config => '', + :l3_sync_interval => '', + :use_vrf => '' + } + end + + let :params do + { :primary_l3_host => '127.0.0.1', + :primary_l3_host_username => 'neutron', + :primary_l3_host_password => 'passw0rd', + } + end + + shared_examples_for 'neutron plugin ml2 arista l3_arista' do + before do + params.merge!(default_params) + end + + it 'configures ml2 arista l3_arista settings' do + is_expected.to contain_neutron_plugin_ml2('l3_arista/primary_l3_host').with_value(params[:primary_l3_host]) + is_expected.to contain_neutron_plugin_ml2('l3_arista/primary_l3_host_username').with_value(params[:primary_l3_host_username]) + is_expected.to contain_neutron_plugin_ml2('l3_arista/primary_l3_host_password').with_value(params[:primary_l3_host_password]) + end + end + + shared_examples_for 'ml2 l3_arista should fail when mlag is true and secondary is service default' do + let :params do + {} + end + + before do + params.merge!(default_params) + params[:mlag_config] = true + end + + it 'should fail when mlag is true and secondary l3 host is service default' do + is_expected.to raise_error(Puppet::Error, /Must set secondary_l3_host when mlag_config is true./) + end + end + + on_supported_os({ + :supported_os => OSDefaults.get_supported_os + }).each do |os,facts| + + context "on #{os}" do + let(:facts) do + facts.merge!(OSDefaults.get_facts({ + })) + end + + it_configures 'neutron plugin ml2 arista l3_arista' + end + end +end diff -Nru puppet-module-neutron-8.0.0/spec/classes/neutron_plugins_ml2_arista_spec.rb puppet-module-neutron-9.4.0/spec/classes/neutron_plugins_ml2_arista_spec.rb --- puppet-module-neutron-8.0.0/spec/classes/neutron_plugins_ml2_arista_spec.rb 1970-01-01 00:00:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/spec/classes/neutron_plugins_ml2_arista_spec.rb 2016-09-26 21:11:55.000000000 +0000 @@ -0,0 +1,71 @@ +# +# Copyright (C) 2016 Matthew J. Black +# +# Author: Matthew J. Black +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +# Unit tests for neutron::plugins::ml2::arista class +# +require 'spec_helper' + +describe 'neutron::plugins::ml2::arista' do + + let :pre_condition do + "class { 'neutron::server': password => 'password'} + class { 'neutron': + rabbit_password => 'passw0rd', + core_plugin => 'neutron.plugins.ml2.plugin.Ml2Plugin' }" + end + + let :default_params do + { + :region_name => '', + :sync_interval => '', + :use_fqdn => '' + } + end + + let :params do + { :eapi_host => '127.0.0.1', + :eapi_username => 'neutron', + :eapi_password => 'passw0rd' + } + end + + shared_examples_for 'neutron plugin ml2 arista' do + before do + params.merge!(default_params) + end + + it 'configures ml2 arista settings' do + is_expected.to contain_neutron_plugin_ml2('ml2_arista/eapi_host').with_value(params[:eapi_host]) + is_expected.to contain_neutron_plugin_ml2('ml2_arista/eapi_username').with_value(params[:eapi_username]) + is_expected.to contain_neutron_plugin_ml2('ml2_arista/eapi_password').with_value(params[:eapi_password]) + end + end + + on_supported_os({ + :supported_os => OSDefaults.get_supported_os + }).each do |os,facts| + + context "on #{os}" do + let(:facts) do + facts.merge!(OSDefaults.get_facts({ + })) + end + + it_configures 'neutron plugin ml2 arista' + end + end +end diff -Nru puppet-module-neutron-8.0.0/spec/classes/neutron_plugins_ml2_bigswitch_restproxy_spec.rb puppet-module-neutron-9.4.0/spec/classes/neutron_plugins_ml2_bigswitch_restproxy_spec.rb --- puppet-module-neutron-8.0.0/spec/classes/neutron_plugins_ml2_bigswitch_restproxy_spec.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/spec/classes/neutron_plugins_ml2_bigswitch_restproxy_spec.rb 2016-09-26 21:11:55.000000000 +0000 @@ -7,7 +7,7 @@ describe 'neutron::plugins::ml2::bigswitch::restproxy' do let :pre_condition do - "class { 'neutron::server': auth_password => 'password'} + "class { 'neutron::server': password => 'password'} class { 'neutron': rabbit_password => 'passw0rd', core_plugin => 'neutron.plugins.ml2.plugin.Ml2Plugin' }" diff -Nru puppet-module-neutron-8.0.0/spec/classes/neutron_plugins_ml2_bigswitch_spec.rb puppet-module-neutron-9.4.0/spec/classes/neutron_plugins_ml2_bigswitch_spec.rb --- puppet-module-neutron-8.0.0/spec/classes/neutron_plugins_ml2_bigswitch_spec.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/spec/classes/neutron_plugins_ml2_bigswitch_spec.rb 2016-09-26 21:11:55.000000000 +0000 @@ -3,7 +3,7 @@ describe 'neutron::plugins::ml2::bigswitch' do let :pre_condition do - "class { 'neutron::server': auth_password => 'password'} + "class { 'neutron::server': password => 'password'} class { 'neutron': rabbit_password => 'passw0rd', core_plugin => 'neutron.plugins.ml2.plugin.Ml2Plugin' }" diff -Nru puppet-module-neutron-8.0.0/spec/classes/neutron_plugins_ml2_cisco_nexus1000v_spec.rb puppet-module-neutron-9.4.0/spec/classes/neutron_plugins_ml2_cisco_nexus1000v_spec.rb --- puppet-module-neutron-8.0.0/spec/classes/neutron_plugins_ml2_cisco_nexus1000v_spec.rb 1970-01-01 00:00:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/spec/classes/neutron_plugins_ml2_cisco_nexus1000v_spec.rb 2016-09-26 21:11:55.000000000 +0000 @@ -0,0 +1,83 @@ +# +# Unit tests for neutron::plugins::ml2::cisco::nexus1000v class +# + +require 'spec_helper' + +describe 'neutron::plugins::ml2::cisco::nexus1000v' do + + let :pre_condition do + "class { 'neutron::server': password => 'password'} + class { 'neutron': + rabbit_password => 'passw0rd', + core_plugin => 'neutron.plugins.ml2.plugin.Ml2Plugin' }" + end + + let :default_params do + { + :n1kv_vsm_ip => '10.10.10.10', + :n1kv_vsm_username => 'admin', + :n1kv_vsm_password => 'password', + :default_policy_profile => 'default-pp', + :default_vlan_network_profile => 'default-vlan-np', + :default_vxlan_network_profile => 'default-vxlan-np', + :poll_duration => '60', + :http_pool_size => '4', + :http_timeout => '15', + :sync_interval => '300', + :max_vsm_retries => '2', + :restrict_policy_profiles => 'False', + :enable_vif_type_n1kv => 'False', + } + end + + let :params do + {} + end + + let :test_facts do + { :operatingsystem => 'default', + :operatingsystemrelease => 'default', + :concat_basedir => '/', + } + end + + shared_examples_for 'neutron cisco ml2 nexus1000v plugin' do + + before do + params.merge!(default_params) + end + + it { is_expected.to contain_class('neutron::params') } + + it do + is_expected.to contain_neutron_plugin_ml2('ml2_cisco_n1kv/n1kv_vsm_ips').with_value(params[:n1kv_vsm_ip]) + is_expected.to contain_neutron_plugin_ml2('ml2_cisco_n1kv/username').with_value(params[:n1kv_vsm_username]) + is_expected.to contain_neutron_plugin_ml2('ml2_cisco_n1kv/password').with_value(params[:n1kv_vsm_password]) + is_expected.to contain_neutron_plugin_ml2('ml2_cisco_n1kv/default_policy_profile').with_value(params[:default_policy_profile]) + is_expected.to contain_neutron_plugin_ml2('ml2_cisco_n1kv/default_vlan_network_profile').with_value(params[:default_vlan_network_profile]) + is_expected.to contain_neutron_plugin_ml2('ml2_cisco_n1kv/default_vxlan_network_profile').with_value(params[:default_vxlan_network_profile]) + is_expected.to contain_neutron_plugin_ml2('ml2_cisco_n1kv/poll_duration').with_value(params[:poll_duration]) + is_expected.to contain_neutron_plugin_ml2('ml2_cisco_n1kv/http_pool_size').with_value(params[:http_pool_size]) + is_expected.to contain_neutron_plugin_ml2('ml2_cisco_n1kv/http_timeout').with_value(params[:http_timeout]) + is_expected.to contain_neutron_plugin_ml2('ml2_cisco_n1kv/sync_interval').with_value(params[:sync_interval]) + is_expected.to contain_neutron_plugin_ml2('ml2_cisco_n1kv/max_vsm_retries').with_value(params[:max_vsm_retries]) + is_expected.to contain_neutron_plugin_ml2('ml2_cisco_n1kv/restrict_policy_profiles').with_value(params[:restrict_policy_profiles]) + is_expected.to contain_neutron_plugin_ml2('ml2_cisco_n1kv/enable_vif_type_n1kv').with_value(params[:enable_vif_type_n1kv]) + end + + end + + begin + context 'on RedHat platforms' do + let :facts do + @default_facts.merge(test_facts.merge({ + :osfamily => 'RedHat', + :operatingsystemrelease => '7', + })) + end + + it_configures 'neutron cisco ml2 nexus1000v plugin' + end + end +end diff -Nru puppet-module-neutron-8.0.0/spec/classes/neutron_plugins_ml2_cisco_nexus_spec.rb puppet-module-neutron-9.4.0/spec/classes/neutron_plugins_ml2_cisco_nexus_spec.rb --- puppet-module-neutron-8.0.0/spec/classes/neutron_plugins_ml2_cisco_nexus_spec.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/spec/classes/neutron_plugins_ml2_cisco_nexus_spec.rb 2016-09-26 21:11:55.000000000 +0000 @@ -7,7 +7,7 @@ describe 'neutron::plugins::ml2::cisco::nexus' do let :pre_condition do - "class { 'neutron::server': auth_password => 'password'} + "class { 'neutron::server': password => 'password'} class { 'neutron': rabbit_password => 'passw0rd', core_plugin => 'neutron.plugins.ml2.plugin.Ml2Plugin' }" diff -Nru puppet-module-neutron-8.0.0/spec/classes/neutron_plugins_ml2_cisco_spec.rb puppet-module-neutron-9.4.0/spec/classes/neutron_plugins_ml2_cisco_spec.rb --- puppet-module-neutron-8.0.0/spec/classes/neutron_plugins_ml2_cisco_spec.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/spec/classes/neutron_plugins_ml2_cisco_spec.rb 2016-09-26 21:11:55.000000000 +0000 @@ -3,7 +3,7 @@ describe 'neutron::plugins::ml2::cisco' do let :pre_condition do - "class { 'neutron::server': auth_password => 'password'} + "class { 'neutron::server': password => 'password'} class { 'neutron': rabbit_password => 'passw0rd', core_plugin => 'neutron.plugins.ml2.plugin.Ml2Plugin' }" diff -Nru puppet-module-neutron-8.0.0/spec/classes/neutron_plugins_ml2_cisco_type_nexus_vxlan_spec.rb puppet-module-neutron-9.4.0/spec/classes/neutron_plugins_ml2_cisco_type_nexus_vxlan_spec.rb --- puppet-module-neutron-8.0.0/spec/classes/neutron_plugins_ml2_cisco_type_nexus_vxlan_spec.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/spec/classes/neutron_plugins_ml2_cisco_type_nexus_vxlan_spec.rb 2016-09-26 21:11:55.000000000 +0000 @@ -7,7 +7,7 @@ describe 'neutron::plugins::ml2::cisco::type_nexus_vxlan' do let :pre_condition do - "class { 'neutron::server': auth_password => 'password'} + "class { 'neutron::server': password => 'password'} class { 'neutron': rabbit_password => 'passw0rd', core_plugin => 'neutron.plugins.ml2.plugin.Ml2Plugin' }" diff -Nru puppet-module-neutron-8.0.0/spec/classes/neutron_plugins_ml2_cisco_ucsm_spec.rb puppet-module-neutron-9.4.0/spec/classes/neutron_plugins_ml2_cisco_ucsm_spec.rb --- puppet-module-neutron-8.0.0/spec/classes/neutron_plugins_ml2_cisco_ucsm_spec.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/spec/classes/neutron_plugins_ml2_cisco_ucsm_spec.rb 2016-09-26 21:11:55.000000000 +0000 @@ -7,7 +7,7 @@ describe 'neutron::plugins::ml2::cisco::ucsm' do let :pre_condition do - "class { 'neutron::server': auth_password => 'password'} + "class { 'neutron::server': password => 'password'} class { 'neutron': rabbit_password => 'passw0rd', core_plugin => 'neutron.plugins.ml2.plugin.Ml2Plugin' }" @@ -58,7 +58,6 @@ @default_facts.merge(test_facts.merge({ :osfamily => 'RedHat', :operatingsystemrelease => '7', - :osfamily => 'RedHat' })) end diff -Nru puppet-module-neutron-8.0.0/spec/classes/neutron_plugins_ml2_midonet_spec.rb puppet-module-neutron-9.4.0/spec/classes/neutron_plugins_ml2_midonet_spec.rb --- puppet-module-neutron-8.0.0/spec/classes/neutron_plugins_ml2_midonet_spec.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/spec/classes/neutron_plugins_ml2_midonet_spec.rb 2016-09-26 21:11:55.000000000 +0000 @@ -7,7 +7,7 @@ describe 'neutron::plugins::ml2::midonet' do let :pre_condition do - "class { 'neutron::server': auth_password => 'password'} + "class { 'neutron::server': password => 'password'} class { 'neutron': rabbit_password => 'passw0rd', core_plugin => 'neutron.plugins.ml2.plugin.Ml2Plugin' }" diff -Nru puppet-module-neutron-8.0.0/spec/classes/neutron_plugins_ml2_opendaylight_spec.rb puppet-module-neutron-9.4.0/spec/classes/neutron_plugins_ml2_opendaylight_spec.rb --- puppet-module-neutron-8.0.0/spec/classes/neutron_plugins_ml2_opendaylight_spec.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/spec/classes/neutron_plugins_ml2_opendaylight_spec.rb 2016-09-26 21:11:55.000000000 +0000 @@ -3,7 +3,7 @@ describe 'neutron::plugins::ml2::opendaylight' do let :pre_condition do - "class { 'neutron::server': auth_password => 'password'} + "class { 'neutron::server': password => 'password'} class { 'neutron': rabbit_password => 'passw0rd', core_plugin => 'neutron.plugins.ml2.plugin.Ml2Plugin' }" diff -Nru puppet-module-neutron-8.0.0/spec/classes/neutron_plugins_ml2_ovn_spec.rb puppet-module-neutron-9.4.0/spec/classes/neutron_plugins_ml2_ovn_spec.rb --- puppet-module-neutron-8.0.0/spec/classes/neutron_plugins_ml2_ovn_spec.rb 1970-01-01 00:00:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/spec/classes/neutron_plugins_ml2_ovn_spec.rb 2016-09-26 21:11:55.000000000 +0000 @@ -0,0 +1,83 @@ +require 'spec_helper' + +describe 'neutron::plugins::ml2::ovn' do + + let :pre_condition do + "class { 'neutron::server': password => 'password' } + class { 'neutron': rabbit_password => 'passw0rd' }" + end + + let :default_params do + { + :ovn_nb_connection => 'tcp:127.0.0.1:6641', + :ovn_sb_connection => 'tcp:127.0.0.1:6642', + :ovsdb_connection_timeout => '60', + :neutron_sync_mode => 'log', + :ovn_l3_mode => true, + :vif_type => 'ovs', + } + end + + let :test_facts do + { :operatingsystem => 'default', + :operatingsystemrelease => 'default' + } + end + + shared_examples_for 'neutron ovn plugin' do + + let :params do + {} + end + + before do + params.merge!(default_params) + end + + it 'should perform default configuration of' do + is_expected.to contain_neutron_plugin_ml2('ml2_ovn/ovn_nb_connection').with_value(params[:ovn_nb_connection]) + is_expected.to contain_neutron_plugin_ml2('ml2_ovn/ovn_sb_connection').with_value(params[:ovn_sb_connection]) + is_expected.to contain_neutron_plugin_ml2('ml2_ovn/ovsdb_connection_timeout').with_value(params[:ovsdb_connection_timeout]) + is_expected.to contain_neutron_plugin_ml2('ml2_ovn/neutron_sync_mode').with_value(params[:neutron_sync_mode]) + is_expected.to contain_neutron_plugin_ml2('ml2_ovn/ovn_l3_mode').with_value(params[:ovn_l3_mode]) + is_expected.to contain_neutron_plugin_ml2('ml2_ovn/vif_type').with_value(params[:vif_type]) + end + + end + + shared_examples_for 'Validating parameters' do + let :params do + {} + end + + before :each do + params.clear + params.merge!(default_params) + end + + it 'should fail with invalid neutron_sync_mode' do + params[:neutron_sync_mode] = 'invalid' + is_expected.to raise_error(Puppet::Error, /Invalid value for neutron_sync_mode parameter/) + end + + it 'should fail with invalid vif_type' do + params[:vif_type] = 'invalid' + is_expected.to raise_error(Puppet::Error, /Invalid value for vif_type parameter/) + params.delete(:vif_type) + is_expected.to contain_neutron_plugin_ml2('ml2_ovn/vif_type').with_value('') + end + end + + on_supported_os({ + :supported_os => OSDefaults.get_supported_os + }).each do |os,facts| + context "on #{os}" do + let (:facts) do + facts.merge(OSDefaults.get_facts({:processorcount => 8})) + end + + it_configures 'neutron ovn plugin' + it_configures 'Validating parameters' + end + end +end diff -Nru puppet-module-neutron-8.0.0/spec/classes/neutron_plugins_ml2_spec.rb puppet-module-neutron-9.4.0/spec/classes/neutron_plugins_ml2_spec.rb --- puppet-module-neutron-8.0.0/spec/classes/neutron_plugins_ml2_spec.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/spec/classes/neutron_plugins_ml2_spec.rb 2016-09-26 21:11:55.000000000 +0000 @@ -39,7 +39,8 @@ :vni_ranges => '10:100', :path_mtu => '0', :physical_network_mtus => '', - :package_ensure => 'present' } + :package_ensure => 'present', + :purge_config => false, } end let :test_facts do @@ -63,6 +64,12 @@ is_expected.to contain_neutron_config('DEFAULT/core_plugin').with_value('neutron.plugins.ml2.plugin.Ml2Plugin') end + it 'passes purge to resource' do + is_expected.to contain_resources('neutron_plugin_ml2').with({ + :purge => false + }) + end + it 'configures ml2_conf.ini' do is_expected.to contain_neutron_plugin_ml2('ml2/type_drivers').with_value(p[:type_drivers].join(',')) is_expected.to contain_neutron_plugin_ml2('ml2/tenant_network_types').with_value(p[:tenant_network_types].join(',')) @@ -70,6 +77,9 @@ is_expected.to contain_neutron_plugin_ml2('ml2/extension_drivers').with_value('') is_expected.to contain_neutron_plugin_ml2('ml2/path_mtu').with_value(p[:path_mtu]) is_expected.to contain_neutron_plugin_ml2('ml2/physical_network_mtus').with_ensure('absent') + is_expected.to contain_neutron_plugin_ml2('ml2/overlay_ip_version').with_value('') + is_expected.to contain_neutron_plugin_ml2('securitygroup/firewall_driver').with_value('') + is_expected.to contain_neutron_plugin_ml2('securitygroup/enable_security_group').with_value('') end it 'creates plugin symbolic link' do @@ -84,9 +94,52 @@ is_expected.to contain_package('neutron-plugin-ml2').with( :name => platform_params[:ml2_server_package], :ensure => p[:package_ensure], - :tag => 'openstack' + :tag => ['neutron-package', 'openstack'], + ) + is_expected.to contain_package('neutron-plugin-ml2').that_requires('Anchor[neutron::install::begin]') + is_expected.to contain_package('neutron-plugin-ml2').that_notifies('Anchor[neutron::install::end]') + end + end + + + context 'when overriding security group options' do + before :each do + params.merge!( + :enable_security_group => true, + :firewall_driver => 'neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver', ) end + it 'configures enable_security_group and firewall_driver options' do + is_expected.to contain_neutron_plugin_ml2('securitygroup/enable_security_group').with_value('true') + is_expected.to contain_neutron_plugin_ml2('securitygroup/firewall_driver').with_value('neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver') + end + end + + context 'when specifying IPv4 overlays' do + before :each do + params.merge!(:overlay_ip_version => 4) + end + it 'configures as IPv4' do + is_expected.to contain_neutron_plugin_ml2('ml2/overlay_ip_version').with_value(4) + end + end + + context 'when specifying IPv6 overlays' do + before :each do + params.merge!(:overlay_ip_version => 6) + end + it 'configures as IPv6' do + is_expected.to contain_neutron_plugin_ml2('ml2/overlay_ip_version').with_value(6) + end + end + + context 'when specifying an invalid overlay IP versions' do + before :each do + params.merge!(:overlay_ip_version => 10) + end + it 'fails to accept value' do + is_expected.to raise_error(Puppet::Error) + end end context 'when using extension drivers for ML2 plugin' do @@ -184,6 +237,21 @@ it_raises 'a Puppet::Error', /vni ranges are invalid./ end + context 'when using geneve driver' do + before :each do + params.merge!(:type_drivers => ['local', 'flat', 'vlan', 'gre', 'vxlan', 'geneve'], + :vni_ranges => ['40:300','500:1000'], + :max_header_size => 50 + ) + end + + it 'configures geneve with valid values' do + is_expected.to contain_neutron_plugin_ml2('ml2/type_drivers').with_value(p[:type_drivers].join(',')) + is_expected.to contain_neutron_plugin_ml2('ml2_type_geneve/vni_ranges').with_value([p[:vni_ranges].join(',')]) + is_expected.to contain_neutron_plugin_ml2('ml2_type_geneve/max_header_size').with_value(p[:max_header_size]) + end + end + context 'with path_mtu set' do before :each do params.merge!(:path_mtu => '9000') @@ -213,7 +281,7 @@ is_expected.to contain_package('neutron-plugin-ml2').with( :name => platform_params[:ml2_server_package], :ensure => params[:package_ensure], - :tag => 'openstack' + :tag => ['neutron-package', 'openstack'], ) end end @@ -223,11 +291,9 @@ before :each do params.merge!( :mechanism_drivers => ['openvswitch', 'sriovnicswitch'], - :sriov_agent_required => true, ) end - it 'configures sriov mechanism driver with agent_enabled' do - is_expected.to contain_neutron_plugin_sriov('ml2_sriov/agent_required').with_value('true') + it 'configures sriov mechanism driver' do is_expected.to contain_neutron_plugin_sriov('ml2_sriov/supported_pci_vendor_devs').with_value(['15b3:1004,8086:10ca']) end end @@ -242,8 +308,9 @@ :path => '/etc/default/neutron-server', :match => '^NEUTRON_PLUGIN_CONFIG=(.*)$', :line => 'NEUTRON_PLUGIN_CONFIG=/etc/neutron/plugin.ini', - :require => ['File[/etc/default/neutron-server]','File[/etc/neutron/plugin.ini]'] ) + is_expected.to contain_file_line('/etc/default/neutron-server:NEUTRON_PLUGIN_CONFIG').that_requires('Anchor[neutron::config::begin]') + is_expected.to contain_file_line('/etc/default/neutron-server:NEUTRON_PLUGIN_CONFIG').that_notifies('Anchor[neutron::config::end]') end end end diff -Nru puppet-module-neutron-8.0.0/spec/classes/neutron_plugins_nuage_spec.rb puppet-module-neutron-9.4.0/spec/classes/neutron_plugins_nuage_spec.rb --- puppet-module-neutron-8.0.0/spec/classes/neutron_plugins_nuage_spec.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/spec/classes/neutron_plugins_nuage_spec.rb 2016-09-26 21:11:55.000000000 +0000 @@ -6,7 +6,7 @@ "class { 'neutron': rabbit_password => 'passw0rd', core_plugin => 'neutron.plugins.nuage.plugin.NuagePlugin' } - class { 'neutron::server': auth_password => 'password' }" + class { 'neutron::server': password => 'password' }" end let :test_facts do @@ -23,7 +23,8 @@ :nuage_vsd_organization => 'vsd', :nuage_net_partition_name => 'test', :nuage_base_uri_version => 'v3.0', - :nuage_cms_id => '7488fae2-7e51-11e5-8bcf-feff819cdc9f'} + :nuage_cms_id => '7488fae2-7e51-11e5-8bcf-feff819cdc9f', + :purge_config => false,} end shared_examples_for 'neutron plugin nuage' do @@ -43,6 +44,12 @@ is_expected.to contain_neutron_config('DEFAULT/core_plugin').with_value('neutron.plugins.nuage.plugin.NuagePlugin') end + it 'passes purge to resource' do + is_expected.to contain_resources('neutron_plugin_nuage').with({ + :purge => false + }) + end + it 'should configure plugin.ini' do is_expected.to contain_neutron_plugin_nuage('RESTPROXY/default_net_partition_name').with_value(params[:nuage_net_partition_name]) is_expected.to contain_neutron_plugin_nuage('RESTPROXY/server').with_value(params[:nuage_vsd_ip]) @@ -95,8 +102,9 @@ :path => '/etc/default/neutron-server', :match => '^NEUTRON_PLUGIN_CONFIG=(.*)$', :line => 'NEUTRON_PLUGIN_CONFIG=/etc/neutron/plugins/nuage/plugin.ini', - :notify => 'Service[neutron-server]' ) + is_expected.to contain_file_line('/etc/default/neutron-server:NEUTRON_PLUGIN_CONFIG').that_requires('Anchor[neutron::config::begin]') + is_expected.to contain_file_line('/etc/default/neutron-server:NEUTRON_PLUGIN_CONFIG').that_notifies('Anchor[neutron::config::end]') end it_configures 'neutron plugin nuage' diff -Nru puppet-module-neutron-8.0.0/spec/classes/neutron_plugins_nvp_spec.rb puppet-module-neutron-9.4.0/spec/classes/neutron_plugins_nvp_spec.rb --- puppet-module-neutron-8.0.0/spec/classes/neutron_plugins_nvp_spec.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/spec/classes/neutron_plugins_nvp_spec.rb 2016-09-26 21:11:55.000000000 +0000 @@ -11,7 +11,8 @@ let :default_params do { :metadata_mode => 'access_network', - :package_ensure => 'present'} + :package_ensure => 'present', + :purge_config => false,} end let :test_facts do @@ -43,7 +44,7 @@ is_expected.to contain_package('neutron-plugin-nvp').with( :name => platform_params[:nvp_server_package], :ensure => p[:package_ensure], - :tag => 'openstack' + :tag => ['neutron-package', 'openstack'], ) end @@ -55,8 +56,15 @@ is_expected.to contain_file('/etc/neutron/plugin.ini').with( :ensure => 'link', :target => '/etc/neutron/plugins/nicira/nvp.ini', - :require => 'Package[neutron-plugin-nvp]' ) + is_expected.to contain_file('/etc/neutron/plugin.ini').that_requires('Anchor[neutron::config::begin]') + is_expected.to contain_file('/etc/neutron/plugin.ini').that_notifies('Anchor[neutron::config::end]') + end + + it 'passes purge to resource' do + is_expected.to contain_resources('neutron_plugin_nvp').with({ + :purge => false + }) end it 'should configure nvp.ini' do diff -Nru puppet-module-neutron-8.0.0/spec/classes/neutron_plugins_opencontrail_spec.rb puppet-module-neutron-9.4.0/spec/classes/neutron_plugins_opencontrail_spec.rb --- puppet-module-neutron-8.0.0/spec/classes/neutron_plugins_opencontrail_spec.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/spec/classes/neutron_plugins_opencontrail_spec.rb 2016-09-26 21:11:55.000000000 +0000 @@ -3,7 +3,7 @@ describe 'neutron::plugins::opencontrail' do let :pre_condition do - "class { 'neutron::server': auth_password => 'password' } + "class { 'neutron::server': password => 'password' } class { 'neutron': rabbit_password => 'passw0rd' }" end @@ -16,7 +16,8 @@ :keystone_admin_user => 'admin', :keystone_admin_tenant_name => 'admin', :keystone_admin_password => 'admin', - :keystone_admin_token => 'token1' + :keystone_admin_token => 'token1', + :purge_config => false, } end @@ -36,6 +37,12 @@ params.merge!(default_params) end + it 'passes purge to resource' do + is_expected.to contain_resources('neutron_plugin_opencontrail').with({ + :purge => false + }) + end + it 'should perform default configuration of' do is_expected.to contain_neutron_plugin_opencontrail('APISERVER/api_server_ip').with_value(params[:api_server_ip]) is_expected.to contain_neutron_plugin_opencontrail('APISERVER/api_server_port').with_value(params[:api_server_port]) @@ -66,9 +73,10 @@ :path => '/etc/default/neutron-server', :match => '^NEUTRON_PLUGIN_CONFIG=(.*)$', :line => 'NEUTRON_PLUGIN_CONFIG=/etc/neutron/plugins/opencontrail/ContrailPlugin.ini', - :require => ['Package[neutron-server]', 'Package[neutron-plugin-contrail]'], - :notify => 'Service[neutron-server]' + :tag => 'neutron-file-line', ) + is_expected.to contain_file_line('/etc/default/neutron-server:NEUTRON_PLUGIN_CONFIG').that_requires('Anchor[neutron::config::begin]') + is_expected.to contain_file_line('/etc/default/neutron-server:NEUTRON_PLUGIN_CONFIG').that_notifies('Anchor[neutron::config::end]') end it_configures 'neutron opencontrail plugin' end diff -Nru puppet-module-neutron-8.0.0/spec/classes/neutron_plugins_ovs_opendaylight_spec.rb puppet-module-neutron-9.4.0/spec/classes/neutron_plugins_ovs_opendaylight_spec.rb --- puppet-module-neutron-8.0.0/spec/classes/neutron_plugins_ovs_opendaylight_spec.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/spec/classes/neutron_plugins_ovs_opendaylight_spec.rb 2016-09-26 21:11:55.000000000 +0000 @@ -3,7 +3,7 @@ describe 'neutron::plugins::ovs::opendaylight' do let :pre_condition do - "class { 'neutron::server': auth_password => 'password'} + "class { 'neutron::server': password => 'password'} class { 'neutron': rabbit_password => 'passw0rd', core_plugin => 'neutron.plugins.ml2.plugin.Ml2Plugin' }" diff -Nru puppet-module-neutron-8.0.0/spec/classes/neutron_plugins_plumgrid_spec.rb puppet-module-neutron-9.4.0/spec/classes/neutron_plugins_plumgrid_spec.rb --- puppet-module-neutron-8.0.0/spec/classes/neutron_plugins_plumgrid_spec.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/spec/classes/neutron_plugins_plumgrid_spec.rb 2016-09-26 21:11:55.000000000 +0000 @@ -3,7 +3,7 @@ describe 'neutron::plugins::plumgrid' do let :pre_condition do - "class { 'neutron::server': auth_password => 'password' } + "class { 'neutron::server': password => 'password' } class { 'neutron': rabbit_password => 'passw0rd' }" end @@ -15,10 +15,13 @@ :connection => 'http://127.0.0.1:35357/v2.0', :controller_priv_host => '127.0.0.1', :auth_protocol => 'http', - :identity_version => 'v2.0', + :identity_version => 'v3', + :user_domain_name => 'Default', :nova_metadata_ip => '127.0.0.1', :nova_metadata_port => '8775', + :nova_metadata_subnet => '127.0.0.1/24', :connector_type => 'distributed', + :purge_config => false, } end @@ -50,6 +53,18 @@ ) end + it 'passes purge to resource plugin_plumgrid' do + is_expected.to contain_resources('neutron_plugin_plumgrid').with({ + :purge => false + }) + end + + it 'passes purge to resource plumlib_plumgrid' do + is_expected.to contain_resources('neutron_plumlib_plumgrid').with({ + :purge => false + }) + end + it 'should perform default configuration of plumgrid plugin' do is_expected.to contain_neutron_plugin_plumgrid('PLUMgridDirector/director_server').with_value(params[:director_server]) is_expected.to contain_neutron_plugin_plumgrid('PLUMgridDirector/director_server_port').with_value(params[:director_server_port]) @@ -57,6 +72,9 @@ is_expected.to contain_neutron_plugin_plumgrid('PLUMgridDirector/password').with_value('') is_expected.to contain_neutron_plugin_plumgrid('PLUMgridDirector/servertimeout').with_value(params[:servertimeout]) is_expected.to contain_neutron_plugin_plumgrid('database/connection').with_value(params[:connection]) + is_expected.to contain_neutron_plugin_plumgrid('l2gateway/vendor').with_value('') + is_expected.to contain_neutron_plugin_plumgrid('l2gateway/sw_username').with_value('') + is_expected.to contain_neutron_plugin_plumgrid('l2gateway/sw_password').with_value('') end it 'should perform default configuration of plumgrid plumlib' do @@ -66,15 +84,14 @@ auth_uri = params[:auth_protocol] + "://" + params[:controller_priv_host] + ":" + "35357/" + params[:identity_version]; is_expected.to contain_neutron_plumlib_plumgrid('keystone_authtoken/auth_uri').with_value(auth_uri) is_expected.to contain_neutron_plumlib_plumgrid('keystone_authtoken/identity_version').with_value(params[:identity_version]) + is_expected.to contain_neutron_plumlib_plumgrid('keystone_authtoken/user_domain_name').with_value(params[:user_domain_name]) is_expected.to contain_neutron_plumlib_plumgrid('PLUMgridMetadata/enable_pg_metadata').with_value('True') is_expected.to contain_neutron_plumlib_plumgrid('PLUMgridMetadata/metadata_mode').with_value('local') is_expected.to contain_neutron_plumlib_plumgrid('PLUMgridMetadata/nova_metadata_ip').with_value(params[:nova_metadata_ip]) is_expected.to contain_neutron_plumlib_plumgrid('PLUMgridMetadata/nova_metadata_port').with_value(params[:nova_metadata_port]) + is_expected.to contain_neutron_plumlib_plumgrid('PLUMgridMetadata/nova_metadata_subnet').with_value(params[:nova_metadata_subnet]) is_expected.to contain_neutron_plumlib_plumgrid('PLUMgridMetadata/metadata_proxy_shared_secret').with_value('') is_expected.to contain_neutron_plumlib_plumgrid('ConnectorType/connector_type').with_value('distributed') - is_expected.to contain_neutron_plumlib_plumgrid('l2gateway/vendor').with_value('') - is_expected.to contain_neutron_plumlib_plumgrid('l2gateway/sw_username').with_value('') - is_expected.to contain_neutron_plumlib_plumgrid('l2gateway/sw_password').with_value('') end end @@ -91,9 +108,10 @@ :path => '/etc/default/neutron-server', :match => '^NEUTRON_PLUGIN_CONFIG=(.*)$', :line => 'NEUTRON_PLUGIN_CONFIG=/etc/neutron/plugins/plumgrid/plumgrid.ini', - :require => ['Package[neutron-server]', 'Package[neutron-plugin-plumgrid]'], - :notify => 'Service[neutron-server]' + :tag => 'neutron-file-line', ) + is_expected.to contain_file_line('/etc/default/neutron-server:NEUTRON_PLUGIN_CONFIG').that_requires('Anchor[neutron::config::begin]') + is_expected.to contain_file_line('/etc/default/neutron-server:NEUTRON_PLUGIN_CONFIG').that_notifies('Anchor[neutron::config::end]') end it_configures 'neutron plumgrid plugin' @@ -111,7 +129,9 @@ is_expected.to contain_file('/etc/neutron/plugin.ini').with( :ensure => 'link', :target => '/etc/neutron/plugins/plumgrid/plumgrid.ini', - :require => 'Package[neutron-plugin-plumgrid]') + :tag => 'neutron-config-file') + is_expected.to contain_file('/etc/neutron/plugin.ini').that_requires('Anchor[neutron::config::begin]') + is_expected.to contain_file('/etc/neutron/plugin.ini').that_notifies('Anchor[neutron::config::end]') end it_configures 'neutron plumgrid plugin' diff -Nru puppet-module-neutron-8.0.0/spec/classes/neutron_policy_spec.rb puppet-module-neutron-9.4.0/spec/classes/neutron_policy_spec.rb --- puppet-module-neutron-8.0.0/spec/classes/neutron_policy_spec.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/spec/classes/neutron_policy_spec.rb 2016-09-26 21:11:55.000000000 +0000 @@ -27,26 +27,22 @@ :value => 'foo:bar' }) end - end - context 'on Debian platforms' do - let :facts do - @default_facts.merge(test_facts.merge({ - :osfamily => 'Debian' - })) + it 'set policy_file in neutron.conf' do + is_expected.to contain_neutron_config('oslo_policy/policy_file').with_value(params[:policy_path]) end - - it_configures 'neutron policies' end - context 'on RedHat platforms' do - let :facts do - @default_facts.merge(test_facts.merge({ - :osfamily => 'RedHat', - :operatingsystemrelease => '7' - })) - end + on_supported_os({ + :supported_os => OSDefaults.get_supported_os + }).each do |os,facts| + context "on #{os}" do + let (:facts) do + facts.merge!(OSDefaults.get_facts()) + end - it_configures 'neutron policies' + it_configures 'neutron policies' + end end + end diff -Nru puppet-module-neutron-8.0.0/spec/classes/neutron_quota_spec.rb puppet-module-neutron-9.4.0/spec/classes/neutron_quota_spec.rb --- puppet-module-neutron-8.0.0/spec/classes/neutron_quota_spec.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/spec/classes/neutron_quota_spec.rb 2016-09-26 21:11:55.000000000 +0000 @@ -48,7 +48,6 @@ :quota_firewall_policy => 1, :quota_firewall_rule => -1, :quota_health_monitor => -1, - :quota_items => 'network,subnet,port', :quota_member => -1, :quota_network_gateway => 5, :quota_packet_filter => 100, diff -Nru puppet-module-neutron-8.0.0/spec/classes/neutron_server_notifications_spec.rb puppet-module-neutron-9.4.0/spec/classes/neutron_server_notifications_spec.rb --- puppet-module-neutron-8.0.0/spec/classes/neutron_server_notifications_spec.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/spec/classes/neutron_server_notifications_spec.rb 2016-09-26 21:11:55.000000000 +0000 @@ -24,7 +24,6 @@ { :notify_nova_on_port_status_changes => true, :notify_nova_on_port_data_changes => true, - :nova_url => 'http://127.0.0.1:8774/v2', :auth_type => 'password', :username => 'nova', :tenant_name => 'services', @@ -59,7 +58,6 @@ is_expected.to contain_neutron_config('DEFAULT/notify_nova_on_port_status_changes').with_value(true) is_expected.to contain_neutron_config('DEFAULT/notify_nova_on_port_data_changes').with_value(true) is_expected.to contain_neutron_config('DEFAULT/send_events_interval').with_value('') - is_expected.to contain_neutron_config('DEFAULT/nova_url').with_value('http://127.0.0.1:8774/v2') is_expected.to contain_neutron_config('nova/auth_type').with_value('password') is_expected.to contain_neutron_config('nova/auth_url').with_value('http://127.0.0.1:35357') is_expected.to contain_neutron_config('nova/username').with_value('nova') diff -Nru puppet-module-neutron-8.0.0/spec/classes/neutron_server_spec.rb puppet-module-neutron-9.4.0/spec/classes/neutron_server_spec.rb --- puppet-module-neutron-8.0.0/spec/classes/neutron_server_spec.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/spec/classes/neutron_server_spec.rb 2016-09-26 21:11:55.000000000 +0000 @@ -7,13 +7,12 @@ end let :params do - { :password => 'passw0rd', - :username => 'neutron', - :keystone_auth_type => 'password', - :project_domain_id => 'Default', - :project_name => 'services', - :user_domain_id => 'Default', - :tenant_name => 'services' } + { :password => 'passw0rd', + :username => 'neutron', + :keystone_auth_type => 'password', + :project_domain_name => 'Default', + :project_name => 'services', + :user_domain_name => 'Default'} end let :default_params do @@ -31,7 +30,6 @@ :router_scheduler_driver => 'neutron.scheduler.l3_agent_scheduler.ChanceScheduler', :l3_ha => false, :max_l3_agents_per_router => 3, - :min_l3_agents_per_router => 2, } end @@ -50,23 +48,6 @@ it { is_expected.to contain_class('neutron::params') } it { is_expected.to contain_class('neutron::policy') } - it 'configures authentication middleware' do - is_expected.to contain_neutron_config('keystone_authtoken/auth_type').with_value(p[:keystone_auth_type]); - is_expected.to contain_neutron_config('keystone_authtoken/tenant_name').with_value(p[:tenant_name]); - is_expected.to contain_neutron_config('keystone_authtoken/username').with_value(p[:username]); - is_expected.to contain_neutron_config('keystone_authtoken/password').with_value(p[:password]); - is_expected.to contain_neutron_config('keystone_authtoken/password').with_secret( true ) - is_expected.to contain_neutron_config('keystone_authtoken/auth_uri').with_value("http://localhost:5000/"); - is_expected.to contain_neutron_config('keystone_authtoken/auth_url').with_value("http://localhost:35357/"); - is_expected.to contain_neutron_config('keystone_authtoken/project_domain_id').with_value(p[:project_domain_id]); - is_expected.to contain_neutron_config('keystone_authtoken/project_name').with_value(p[:project_name]); - is_expected.to contain_neutron_config('keystone_authtoken/user_domain_id').with_value(p[:user_domain_id]); - is_expected.to contain_neutron_config('keystone_authtoken/admin_tenant_name').with_ensure('absent'); - is_expected.to contain_neutron_config('keystone_authtoken/admin_user').with_ensure('absent'); - is_expected.to contain_neutron_config('keystone_authtoken/admin_password').with_ensure('absent'); - is_expected.to contain_neutron_config('keystone_authtoken/identity_uri').with_ensure('absent'); - end - it 'installs neutron server package' do if platform_params.has_key?(:server_package) is_expected.to contain_package('neutron-server').with( @@ -74,11 +55,11 @@ :ensure => p[:package_ensure], :tag => ['openstack', 'neutron-package'], ) - is_expected.to contain_package('neutron-server').with_before(/Neutron_api_config\[.+\]/) - is_expected.to contain_package('neutron-server').with_before(/Neutron_config\[.+\]/) - is_expected.to contain_package('neutron-server').with_before(/Service\[neutron-server\]/) + is_expected.to contain_package('neutron-server').that_requires('Anchor[neutron::install::begin]') + is_expected.to contain_package('neutron-server').that_notifies('Anchor[neutron::install::end]') else - is_expected.to contain_package('neutron').with_before(/Neutron_api_config\[.+\]/) + is_expected.to contain_package('neutron').that_requires('Anchor[neutron::install::begin]') + is_expected.to contain_package('neutron').that_notifies('Anchor[neutron::install::end]') end end @@ -87,9 +68,10 @@ :name => platform_params[:server_service], :enable => true, :ensure => 'running', - :require => 'Class[Neutron]', :tag => ['neutron-service', 'neutron-db-sync-service'], ) + is_expected.to contain_service('neutron-server').that_subscribes_to('Anchor[neutron::service::begin]') + is_expected.to contain_service('neutron-server').that_notifies('Anchor[neutron::service::end]') is_expected.not_to contain_class('neutron::db::sync') is_expected.to contain_service('neutron-server').with_name('neutron-server') is_expected.to contain_neutron_config('DEFAULT/api_workers').with_value(facts[:processorcount]) @@ -124,7 +106,6 @@ it 'should enable HA routers' do is_expected.to contain_neutron_config('DEFAULT/l3_ha').with_value(true) is_expected.to contain_neutron_config('DEFAULT/max_l3_agents_per_router').with_value(3) - is_expected.to contain_neutron_config('DEFAULT/min_l3_agents_per_router').with_value(2) is_expected.to contain_neutron_config('DEFAULT/l3_ha_net_cidr').with_value('') end end @@ -135,6 +116,8 @@ end it 'should disable HA routers' do is_expected.to contain_neutron_config('DEFAULT/l3_ha').with_value(false) + is_expected.to contain_neutron_config('DEFAULT/max_l3_agents_per_router').with_value(3) + is_expected.to contain_neutron_config('DEFAULT/l3_ha_net_cidr').with_value('') end end @@ -148,16 +131,6 @@ end end - context 'with HA routers enabled and wrong parameters' do - before :each do - params.merge!(:l3_ha => true, - :max_l3_agents_per_router => 2, - :min_l3_agents_per_router => 3 ) - end - - it_raises 'a Puppet::Error', /min_l3_agents_per_router should be less than or equal to max_l3_agents_per_router./ - end - context 'with custom service name' do before :each do params.merge!(:service_name => 'custom-service-name') @@ -184,6 +157,12 @@ end end + context 'with allow_automatic_dhcp_failover in neutron.conf' do + it 'should configure allow_automatic_dhcp_failover' do + is_expected.to contain_neutron_config('DEFAULT/allow_automatic_dhcp_failover').with_value('') + end + end + context 'with qos_notification_drivers parameter' do before :each do params.merge!(:qos_notification_drivers => 'message_queue') @@ -193,61 +172,58 @@ end end - context 'with deprecated auth_plugin parameter' do - before :each do - params.merge!(:auth_plugin => 'v2password') + context 'with network_auto_schedule in neutron.conf' do + it 'should configure network_auto_schedule' do + is_expected.to contain_neutron_config('DEFAULT/network_auto_schedule').with_value('') end - it 'should configure auth_plugin' do - is_expected.to contain_neutron_config('keystone_authtoken/auth_plugin').with_value('v2password') - is_expected.not_to contain_neutron_config('keystone_authtoken/auth_type') + end + + context 'with a bad dhcp_load_type value' do + before :each do + params.merge!(:dhcp_load_type => 'badvalue') end + + it_raises 'a Puppet::Error', /Must pass either networks, subnets, or ports as values for dhcp_load_type/ end - end - shared_examples_for 'a neutron server with broken authentication' do - before do - params.delete(:password) + context 'with multiple service providers' do + before :each do + params.merge!( + { :service_providers => ['provider1', 'provider2'] } + ) + end + + it 'configures neutron.conf' do + is_expected.to contain_neutron_config( + 'service_providers/service_provider' + ).with_value(['provider1', 'provider2']) + end end - it_raises 'a Puppet::Error', /Either auth_password or password must be set when using keystone authentication/ - end - shared_examples_for 'a neutron server with incompatible authentication params' do - before do - params.merge!( - :auth_password => "passw0rd" - ) + context 'with availability zone hints set' do + before :each do + params.merge!(:dhcp_load_type => 'networks', + :router_scheduler_driver => 'neutron.scheduler.l3_agent_scheduler.AZLeastRoutersScheduler', + :network_scheduler_driver => 'neutron.scheduler.dhcp_agent_scheduler.AZAwareWeightScheduler', + :default_availability_zones => ['zone1', 'zone2'] + ) + end + + it 'should configure neutron server for availability zones' do + is_expected.to contain_neutron_config('DEFAULT/default_availability_zones').with_value('zone1,zone2') + is_expected.to contain_neutron_config('DEFAULT/router_scheduler_driver').with_value('neutron.scheduler.l3_agent_scheduler.AZLeastRoutersScheduler') + is_expected.to contain_neutron_config('DEFAULT/network_scheduler_driver').with_value('neutron.scheduler.dhcp_agent_scheduler.AZAwareWeightScheduler') + is_expected.to contain_neutron_config('DEFAULT/dhcp_load_type').with_value('networks') + end + end - it_raises 'a Puppet::Error', /auth_password and password must not be used together/ end - shared_examples_for 'a neutron server with deprecated authentication params' do + shared_examples_for 'a neutron server with broken authentication' do before do - params.merge!( - :auth_user => "neutron", - :auth_password => "passw0rd", - :auth_tenant => "services", - :auth_region => "MyRegion", - :identity_uri => "https://foo.bar:5000/" - ) params.delete(:password) end - it 'configures authentication middleware' do - is_expected.to contain_neutron_api_config('filter:authtoken/admin_tenant_name').with_value('services'); - is_expected.to contain_neutron_api_config('filter:authtoken/admin_user').with_value('neutron'); - is_expected.to contain_neutron_api_config('filter:authtoken/admin_password').with_value('passw0rd'); - is_expected.to contain_neutron_api_config('filter:authtoken/admin_password').with_secret( true ) - is_expected.to contain_neutron_api_config('filter:authtoken/identity_uri').with_value('https://foo.bar:5000/'); - is_expected.to contain_neutron_config('keystone_authtoken/admin_tenant_name').with_value('services'); - is_expected.to contain_neutron_config('keystone_authtoken/admin_user').with_value('neutron'); - is_expected.to contain_neutron_config('keystone_authtoken/admin_password').with_value('passw0rd'); - is_expected.to contain_neutron_config('keystone_authtoken/admin_password').with_secret( true ) - is_expected.to contain_neutron_config('keystone_authtoken/identity_uri').with_value('https://foo.bar:5000/'); - is_expected.to contain_neutron_config('keystone_authtoken/auth_region').with_value('MyRegion'); - is_expected.not_to contain_neutron_config('keystone_authtoken/tenant_name'); - is_expected.not_to contain_neutron_config('keystone_authtoken/username'); - is_expected.not_to contain_neutron_config('keystone_authtoken/password'); - is_expected.not_to contain_neutron_config('keystone_authtoken/auth_url'); - end + it_raises 'a Puppet::Error', /Please set password for neutron service user/ end shared_examples_for 'VPNaaS, FWaaS and LBaaS package installation' do @@ -259,7 +235,7 @@ ) end it 'should install *aaS packages' do - is_expected.to contain_package('neutron-lbaas-agent') + is_expected.to contain_package('neutron-lbaasv2-agent') is_expected.to contain_package('neutron-fwaas') is_expected.to contain_package('neutron-vpnaas-agent') end @@ -276,49 +252,6 @@ end end - describe "with custom keystone authentication params" do - let :facts do - @default_facts.merge(test_facts.merge({ - :osfamily => 'RedHat', - :operatingsystemrelease => '7' - })) - end - before do - params.merge!({ - :auth_uri => 'https://foo.bar:5000/', - :auth_url => 'https://foo.bar:35357/v3', - :keystone_auth_type => 'v3password', - :project_domain_id => 'non_default', - :project_name => 'new_services', - :user_domain_id => 'non_default' - }) - end - it 'configures keystone authentication params' do - is_expected.to contain_neutron_config('keystone_authtoken/auth_uri').with_value("https://foo.bar:5000/"); - is_expected.to contain_neutron_config('keystone_authtoken/auth_url').with_value("https://foo.bar:35357/v3"); - is_expected.to contain_neutron_config('keystone_authtoken/project_domain_id').with_value("non_default"); - is_expected.to contain_neutron_config('keystone_authtoken/project_name').with_value("new_services"); - is_expected.to contain_neutron_config('keystone_authtoken/user_domain_id').with_value("non_default"); - end - end - - describe "with custom auth region" do - let :facts do - @default_facts.merge(test_facts.merge({ - :osfamily => 'RedHat', - :operatingsystemrelease => '7' - })) - end - before do - params.merge!({ - :region_name => 'MyRegion', - }) - end - it 'configures region_name' do - is_expected.to contain_neutron_config('keystone_authtoken/region_name').with_value('MyRegion'); - end - end - context 'on Debian platforms' do let :facts do @default_facts.merge(test_facts.merge({ @@ -334,8 +267,6 @@ it_configures 'a neutron server' it_configures 'a neutron server with broken authentication' - it_configures 'a neutron server with incompatible authentication params' - it_configures 'a neutron server with deprecated authentication params' it_configures 'a neutron server without database synchronization' end @@ -354,8 +285,6 @@ it_configures 'a neutron server' it_configures 'a neutron server with broken authentication' - it_configures 'a neutron server with incompatible authentication params' - it_configures 'a neutron server with deprecated authentication params' it_configures 'a neutron server without database synchronization' end end diff -Nru puppet-module-neutron-8.0.0/spec/classes/neutron_services_fwaas_spec.rb puppet-module-neutron-9.4.0/spec/classes/neutron_services_fwaas_spec.rb --- puppet-module-neutron-8.0.0/spec/classes/neutron_services_fwaas_spec.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/spec/classes/neutron_services_fwaas_spec.rb 2016-09-26 21:11:55.000000000 +0000 @@ -37,7 +37,8 @@ end let :default_params do - { :vpnaas_agent_package => false } + { :vpnaas_agent_package => false, + :purge_config => false, } end shared_examples_for 'neutron fwaas service plugin' do @@ -45,6 +46,12 @@ default_params.merge(params) end + it 'passes purge to resource' do + is_expected.to contain_resources('neutron_fwaas_service_config').with({ + :purge => false + }) + end + it 'configures driver in fwaas_driver.ini' do is_expected.to contain_neutron_fwaas_service_config('fwaas/driver').with_value('') is_expected.to contain_neutron_fwaas_service_config('fwaas/enabled').with_value('') @@ -65,7 +72,7 @@ it 'installs neutron fwaas package' do is_expected.to contain_package('neutron-fwaas').with( :ensure => 'present', - :tag => 'openstack', + :tag => ['neutron-package', 'openstack'], :name => 'python-neutron-fwaas', ) end @@ -85,7 +92,7 @@ it 'installs neutron fwaas package' do is_expected.to contain_package('neutron-fwaas').with( :ensure => 'present', - :tag => 'openstack', + :tag => ['neutron-package', 'openstack'], :name => 'python-neutron-fwaas', ) end @@ -107,7 +114,7 @@ it 'installs neutron vpnaas agent package' do is_expected.to contain_package('neutron-vpn-agent').with( :ensure => 'present', - :tag => 'openstack' + :tag => ['neutron-package', 'openstack'], ) end end diff -Nru puppet-module-neutron-8.0.0/spec/classes/neutron_services_lbaas_haproxy_spec.rb puppet-module-neutron-9.4.0/spec/classes/neutron_services_lbaas_haproxy_spec.rb --- puppet-module-neutron-8.0.0/spec/classes/neutron_services_lbaas_haproxy_spec.rb 1970-01-01 00:00:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/spec/classes/neutron_services_lbaas_haproxy_spec.rb 2016-09-26 21:11:55.000000000 +0000 @@ -0,0 +1,63 @@ +# +# Copyright (C) 2016 Matthew J. Black +# +# Author: Matthew J. Black +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +# Unit tests for neutron::services::lbaas::haproxy class +# + +require 'spec_helper' + +describe 'neutron::services::lbaas::haproxy' do + + let :default_params do + { :interface_driver => '', + :periodic_interval => '', + :loadbalancer_state_path => '', + :user_group => '', + :send_gratuitous_arp => '', + :jinja_config_template => ''} + end + + context 'with default params' do + let :params do + default_params + end + + it 'configures haproxy service plugin' do + is_expected.to contain_neutron_config('haproxy/interface_driver').with_value('') + is_expected.to contain_neutron_config('haproxy/periodic_interval').with_value('') + is_expected.to contain_neutron_config('haproxy/loadbalancer_state_path').with_value('') + is_expected.to contain_neutron_config('haproxy/user_group').with_value('') + is_expected.to contain_neutron_config('haproxy/send_gratuitous_arp').with_value('') + is_expected.to contain_neutron_config('haproxy/jinja_config_template').with_value('') + end + end + + context 'when interface driver and gratuitous arp is set' do + let :params do + default_params.merge( + { :interface_driver => 'neutron.agent.linux.interface.OVSInterfaceDriver', + :send_gratuitous_arp => true, + } + ) + end + + it 'configures haproxy service plugin custom parameters' do + is_expected.to contain_neutron_config('haproxy/interface_driver').with_value('neutron.agent.linux.interface.OVSInterfaceDriver') + is_expected.to contain_neutron_config('haproxy/send_gratuitous_arp').with_value(true) + end + end +end diff -Nru puppet-module-neutron-8.0.0/spec/classes/neutron_services_lbaas_octavia_spec.rb puppet-module-neutron-9.4.0/spec/classes/neutron_services_lbaas_octavia_spec.rb --- puppet-module-neutron-8.0.0/spec/classes/neutron_services_lbaas_octavia_spec.rb 1970-01-01 00:00:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/spec/classes/neutron_services_lbaas_octavia_spec.rb 2016-09-26 21:11:55.000000000 +0000 @@ -0,0 +1,63 @@ +# +# Copyright (C) 2016 Matthew J. Black +# +# Author: Matthew J. Black +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +# Unit tests for neutron::services::lbaas::octavia class +# + +require 'spec_helper' + +describe 'neutron::services::lbaas::octavia' do + + let :default_params do + { :base_url => 'http://127.0.0.1:9876', + :request_poll_interval => '', + :request_poll_timeout => '', + :allocates_vip => ''} + end + + context 'with default params' do + let :params do + default_params + end + + it 'configures octavia service plugin' do + is_expected.to contain_neutron_config('octavia/base_url').with_value('http://127.0.0.1:9876') + is_expected.to contain_neutron_config('octavia/request_poll_interval').with_value('') + is_expected.to contain_neutron_config('octavia/request_poll_timeout').with_value('') + is_expected.to contain_neutron_config('octavia/allocates_vip').with_value('') + end + end + + context 'when base_url is set' do + let :params do + default_params.merge( + { :base_url => 'http://octavia.example.org:9876', + :request_poll_interval => '3', + :request_poll_timeout => '100', + :allocates_vip => 'false' + } + ) + end + + it 'configures octavia service plugin custom parameters' do + is_expected.to contain_neutron_config('octavia/base_url').with_value('http://octavia.example.org:9876') + is_expected.to contain_neutron_config('octavia/request_poll_interval').with_value('3') + is_expected.to contain_neutron_config('octavia/request_poll_timeout').with_value('100') + is_expected.to contain_neutron_config('octavia/allocates_vip').with_value('false') + end + end +end diff -Nru puppet-module-neutron-8.0.0/spec/classes/neutron_services_lbaas_spec.rb puppet-module-neutron-9.4.0/spec/classes/neutron_services_lbaas_spec.rb --- puppet-module-neutron-8.0.0/spec/classes/neutron_services_lbaas_spec.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/spec/classes/neutron_services_lbaas_spec.rb 2016-09-26 21:11:55.000000000 +0000 @@ -23,8 +23,7 @@ describe 'neutron::services::lbaas' do let :default_params do - { :package_ensure => 'present', - :service_providers => ''} + { :service_providers => ''} end shared_examples_for 'neutron lbaas service plugin' do @@ -34,11 +33,31 @@ default_params end - it 'installs lbaas package' do - is_expected.to contain_package('neutron-lbaas-agent').with( - :ensure => params[:package_ensure], - :name => platform_params[:lbaas_package_name], + it 'should contain python-neutron-lbaas package' do + is_expected.to contain_package('python-neutron-lbaas').with({ :ensure => 'present' }) + end + + it 'should set certificates options with service defaults' do + is_expected.to contain_neutron_config('certificates/cert_manager_type').with_value('') + is_expected.to contain_neutron_config('certificates/storage_path').with_value('') + is_expected.to contain_neutron_config('certificates/barbican_auth').with_value('') + end + end + + context 'with certificate manager options' do + before :each do + params.merge!( + { :cert_manager_type => 'barbican', + :cert_storage_path => '/var/lib/neutron-lbaas/certificates/', + :barbican_auth => 'barbican_acl_auth' + } ) + + it 'should configure certificates section' do + is_expected.to contain_neutron_config('certificates/cert_manager_type').with_value('barbican') + is_expected.to contain_neutron_config('certificates/storage_path').with_value('/var/lib/neutron-lbaas/certificates/') + is_expected.to contain_neutron_config('certificates/barbican_auth').with_value('barbican_acl_auth') + end end end @@ -49,13 +68,12 @@ ) end - it 'configures neutron_lbaas.conf' do + it 'configures neutron.conf' do is_expected.to contain_neutron_lbaas_service_config( 'service_providers/service_provider' ).with_value(['provider1', 'provider2']) end end - end context 'on Debian platforms' do @@ -66,7 +84,7 @@ end let :platform_params do - { :lbaas_package_name => 'neutron-lbaas-agent'} + {} end it_configures 'neutron lbaas service plugin' @@ -81,10 +99,9 @@ end let :platform_params do - { :lbaas_package_name => 'openstack-neutron-lbaas'} + {} end it_configures 'neutron lbaas service plugin' end - end diff -Nru puppet-module-neutron-8.0.0/spec/defines/neutron_plugins_ml2_mechdriver_spec.rb puppet-module-neutron-9.4.0/spec/defines/neutron_plugins_ml2_mechdriver_spec.rb --- puppet-module-neutron-8.0.0/spec/defines/neutron_plugins_ml2_mechdriver_spec.rb 1970-01-01 00:00:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/spec/defines/neutron_plugins_ml2_mechdriver_spec.rb 2016-09-26 21:11:55.000000000 +0000 @@ -0,0 +1,50 @@ +require 'spec_helper' + +describe 'neutron::plugins::ml2::mech_driver' do + + let :title do + 'mech_driver' + end + + let :params do { + :name => 'sriovnicswitch', + :supported_pci_vendor_devs => '8086:10ed', + } + end + + describe 'provide sriov configuration for Debian' do + let :facts do + @default_facts.merge({ :osfamily => 'Debian' }) + end + + it 'configures supported_pci_vendor_devs' do + is_expected.to contain_neutron_plugin_sriov('ml2_sriov/supported_pci_vendor_devs').with_value('8086:10ed') + end + + it 'adds ml2_conf_sriov.ini to neutron_server' do + is_expected.to contain_file_line('DAEMON_ARGS').with( + :path => '/etc/default/neutron-server', + :line => 'DAEMON_ARGS="$DAEMON_ARGS --config-file /etc/neutron/plugins/ml2/ml2_conf_sriov.ini"', + ) + end + end + + describe 'provide sriov configuration for Redhat' do + let :facts do + @default_facts.merge({ :osfamily => 'RedHat' }) + end + + it 'configures supported_pci_vendor_devs' do + is_expected.to contain_neutron_plugin_sriov('ml2_sriov/supported_pci_vendor_devs').with_value('8086:10ed') + end + + it 'creates symbolic link for ml2_conf_sriov.ini config.d directory' do + is_expected.to contain_file('/etc/neutron/conf.d/neutron-server/ml2_conf_sriov.conf').with( + :ensure => 'link', + :target => '/etc/neutron/plugins/ml2/ml2_conf_sriov.ini' + ) + end + end + +end + diff -Nru puppet-module-neutron-8.0.0/spec/unit/provider/neutron_agent_sriov_numvfs/sriov_numvfs_spec.rb puppet-module-neutron-9.4.0/spec/unit/provider/neutron_agent_sriov_numvfs/sriov_numvfs_spec.rb --- puppet-module-neutron-8.0.0/spec/unit/provider/neutron_agent_sriov_numvfs/sriov_numvfs_spec.rb 1970-01-01 00:00:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/spec/unit/provider/neutron_agent_sriov_numvfs/sriov_numvfs_spec.rb 2016-09-26 21:11:55.000000000 +0000 @@ -0,0 +1,36 @@ +require 'puppet' +require 'spec_helper' +require 'puppet/provider/neutron_agent_sriov_numvfs/sriov_numvfs' + +provider_class = Puppet::Type.type(:neutron_agent_sriov_numvfs). + provider(:sriov_numvfs) + +describe provider_class do + + let :numvfs_conf do + { + :name => 'eth0:10', + :ensure => 'present', + } + end + + describe 'when setting the attributes' do + let :resource do + Puppet::Type::Neutron_agent_sriov_numvfs.new(numvfs_conf) + end + + let :provider do + provider_class.new(resource) + end + + it 'should return the correct interface name' do + expect(provider.sriov_get_interface).to eql('eth0') + end + + it 'should return the correct numvfs value' do + expect(provider.sriov_numvfs_value).to eql(10) + end + + end + +end diff -Nru puppet-module-neutron-8.0.0/spec/unit/provider/neutron_port/neutron_spec.rb puppet-module-neutron-9.4.0/spec/unit/provider/neutron_port/neutron_spec.rb --- puppet-module-neutron-8.0.0/spec/unit/provider/neutron_port/neutron_spec.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/spec/unit/provider/neutron_port/neutron_spec.rb 2016-09-26 21:11:55.000000000 +0000 @@ -16,7 +16,7 @@ :ensure => 'present', :admin_state_up => 'True', :tenant_id => '60f9544eb94c42a6b7e8e98c2be981b1', - :network_name => 'net1' + :network_name => 'net1', } end @@ -49,9 +49,62 @@ provider.expects(:auth_neutron).with('port-create', '--format=shell', "--name=#{port_attrs[:name]}", ["--tenant_id=#{port_attrs[:tenant_id]}"], - port_attrs[:network_name]).returns(output) + port_attrs[:network_name], + []).returns(output) provider.create end end + + describe 'when creating a port with binding profile and host_id' do + + let :port_attrs do + { + :name => port_name, + :ensure => 'present', + :admin_state_up => 'True', + :tenant_id => '60f9544eb94c42a6b7e8e98c2be981b1', + :network_name => 'net1', + :binding_host_id => 'edge1', + :binding_profile => { 'interface_name' => 'eth1' }, + } + end + + let :resource do + Puppet::Type::Neutron_port.new(port_attrs) + end + + it 'should call port-create with appropriate command line options' do + + provider.class.stubs(:get_tenant_id).returns(port_attrs[:tenant_id]) + provider.class.stubs(:get_binding_host_id).returns(port_attrs[:binding_host_id]) + provider.class.stubs(:get_binding_profile).returns(port_attrs[:binding_profile]) + + output = 'Created a new port: +admin_state_up="True" +device_id="" +device_owner="" +fixed_ips="{\"subnet_id\": \"40af01ac-52c7-4235-bbcf-d9c02325ab5e\", \"ip_address\": \"192.168.0.39\"}" +id="5222573b-314d-45f9-b6bd-299288ba667a" +mac_address="fa:16:3e:45:3c:10" +name="port1" +network_id="98873773-aa34-4b87-af05-70903659246f" +security_groups="f1f0c3a3-9f2c-46b9-b2a5-b97d9a87bd7e" +status="ACTIVE" +tenant_id="60f9544eb94c42a6b7e8e98c2be981b1" +binding_host_id="edge1" +binding_profile="{\"interface_name\": \"eth1\"}"' + + provider.expects(:auth_neutron).with('port-create', + '--format=shell', "--name=#{port_attrs[:name]}", + ["--tenant_id=#{port_attrs[:tenant_id]}", + "--binding:host_id=#{port_attrs[:binding_host_id]}", + ], + port_attrs[:network_name], + ['--binding:profile','type=dict','interface_name=eth1']).returns(output) + + provider.create + end + end + end diff -Nru puppet-module-neutron-8.0.0/spec/unit/provider/neutron_router/neutron_spec.rb puppet-module-neutron-9.4.0/spec/unit/provider/neutron_router/neutron_spec.rb --- puppet-module-neutron-8.0.0/spec/unit/provider/neutron_router/neutron_spec.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/spec/unit/provider/neutron_router/neutron_spec.rb 2016-09-26 21:11:55.000000000 +0000 @@ -13,12 +13,13 @@ let :router_attrs do { - :name => router_name, - :ensure => 'present', - :admin_state_up => 'True', - :distributed => 'True', - :ha => 'False', - :tenant_id => '60f9544eb94c42a6b7e8e98c2be981b1', + :name => router_name, + :ensure => 'present', + :admin_state_up => 'True', + :distributed => 'True', + :ha => 'False', + :tenant_id => '60f9544eb94c42a6b7e8e98c2be981b1', + :availability_zone_hint => 'zone1', } end @@ -43,12 +44,14 @@ status="ACTIVE" distributed="True" ha="False" -tenant_id="60f9544eb94c42a6b7e8e98c2be981b1"' +tenant_id="60f9544eb94c42a6b7e8e98c2be981b1" +availability-zone-hint="zone1"' provider.expects(:auth_neutron).with('router-create', '--format=shell', ["--tenant_id=#{router_attrs[:tenant_id]}", "--distributed=#{router_attrs[:distributed]}", - "--ha=#{router_attrs[:ha]}"], + "--ha=#{router_attrs[:ha]}", + "--availability-zone-hint=#{router_attrs[:availability_zone_hint]}"], router_name).returns(output) provider.create diff -Nru puppet-module-neutron-8.0.0/spec/unit/provider/neutron_spec.rb puppet-module-neutron-9.4.0/spec/unit/provider/neutron_spec.rb --- puppet-module-neutron-8.0.0/spec/unit/provider/neutron_spec.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/spec/unit/provider/neutron_spec.rb 2016-09-26 21:11:55.000000000 +0000 @@ -11,20 +11,10 @@ let :credential_hash do { - 'tenant_name' => 'admin_tenant', - 'username' => 'admin', - 'password' => 'password', - 'auth_url' => 'https://192.168.56.210:35357' - } - end - - let :deprecated_credential_hash do - { - 'admin_tenant_name' => 'new_tenant', - 'admin_user' => 'new_user', - 'admin_password' => 'new_password', - 'identity_uri' => 'https://192.168.56.210:35357/v2.0', - 'nova_region_name' => 'NEW_REGION', + 'project_name' => 'admin_tenant', + 'username' => 'admin', + 'password' => 'password', + 'auth_url' => 'https://192.168.56.210:35357' } end @@ -66,51 +56,29 @@ end.to raise_error(Puppet::Error, credential_error) end - it 'should find region_name if specified' do - conf = { - 'keystone_authtoken' => credential_hash, - 'DEFAULT' => { 'nova_region_name' => 'REGION_NAME' } - } - klass.expects(:neutron_conf).returns(conf) - klass.neutron_credentials['nova_region_name'] == 'REGION_NAME' - end - end describe 'when invoking the neutron cli' do it 'should set auth credentials in the environment' do authenv = { - :OS_AUTH_URL => credential_hash['auth_url'], - :OS_USERNAME => credential_hash['username'], - :OS_TENANT_NAME => credential_hash['tenant_name'], - :OS_PASSWORD => credential_hash['password'], + :OS_AUTH_URL => credential_hash['auth_url'], + :OS_USERNAME => credential_hash['username'], + :OS_PROJECT_NAME => credential_hash['project_name'], + :OS_PASSWORD => credential_hash['password'], } klass.expects(:get_neutron_credentials).with().returns(credential_hash) klass.expects(:withenv).with(authenv) klass.auth_neutron('test_retries') end - it 'should set deprecated auth credentials in the environment' do - authenv = { - :OS_AUTH_URL => deprecated_credential_hash['identity_uri'], - :OS_USERNAME => deprecated_credential_hash['admin_user'], - :OS_TENANT_NAME => deprecated_credential_hash['admin_tenant_name'], - :OS_PASSWORD => deprecated_credential_hash['admin_password'], - :OS_REGION_NAME => 'NEW_REGION', - } - klass.expects(:get_neutron_credentials).with().returns(deprecated_credential_hash) - klass.expects(:withenv).with(authenv) - klass.auth_neutron('test_retries') - end - it 'should set region in the environment if needed' do authenv = { - :OS_AUTH_URL => credential_hash['auth_url'], - :OS_USERNAME => credential_hash['username'], - :OS_TENANT_NAME => credential_hash['tenant_name'], - :OS_PASSWORD => credential_hash['password'], - :OS_REGION_NAME => 'REGION_NAME', + :OS_AUTH_URL => credential_hash['auth_url'], + :OS_USERNAME => credential_hash['username'], + :OS_PROJECT_NAME => credential_hash['project_name'], + :OS_PASSWORD => credential_hash['password'], + :OS_REGION_NAME => 'REGION_NAME', } cred_hash = credential_hash.merge({'region_name' => 'REGION_NAME'}) diff -Nru puppet-module-neutron-8.0.0/spec/unit/type/neutron_agent_sriov_numvfs_spec.rb puppet-module-neutron-9.4.0/spec/unit/type/neutron_agent_sriov_numvfs_spec.rb --- puppet-module-neutron-8.0.0/spec/unit/type/neutron_agent_sriov_numvfs_spec.rb 1970-01-01 00:00:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/spec/unit/type/neutron_agent_sriov_numvfs_spec.rb 2016-09-26 21:11:55.000000000 +0000 @@ -0,0 +1,47 @@ +require 'puppet' +require 'puppet/type/neutron_agent_sriov_numvfs' + +describe 'Puppet::Type.type(:neutron_agent_sriov_numvfs)' do + it 'should allow name to be passed' do + expect{Puppet::Type.type(:neutron_agent_sriov_numvfs).new( + :name => 'eth0:10', + :ensure => 'present' + )}.not_to raise_error + end + it 'should allow name to be passed with -' do + expect{Puppet::Type.type(:neutron_agent_sriov_numvfs).new( + :name => 'eth-0:10', + :ensure => 'present' + )}.not_to raise_error + end + it 'should allow name to be passed with _' do + expect{Puppet::Type.type(:neutron_agent_sriov_numvfs).new( + :name => 'eth_0:10', + :ensure => 'present' + )}.not_to raise_error + end + it 'should throw error for invalid format' do + expect{Puppet::Type.type(:neutron_agent_sriov_numvfs).new( + :name => 'eth0', + :ensure => 'present' + )}.to raise_error(Puppet::ResourceError) + end + it 'should throw error for invalid format without interface name' do + expect{Puppet::Type.type(:neutron_agent_sriov_numvfs).new( + :name => ':9', + :ensure => 'present' + )}.to raise_error(Puppet::ResourceError) + end + it 'should throw error for invalid format for numvfs' do + expect{Puppet::Type.type(:neutron_agent_sriov_numvfs).new( + :name => 'eth8:none', + :ensure => 'present' + )}.to raise_error(Puppet::ResourceError) + end + it 'should throw error for invalid format without numvfs' do + expect{Puppet::Type.type(:neutron_agent_sriov_numvfs).new( + :name => 'eth0:', + :ensure => 'present' + )}.to raise_error(Puppet::ResourceError) + end +end diff -Nru puppet-module-neutron-8.0.0/spec/unit/type/neutron_config_spec.rb puppet-module-neutron-9.4.0/spec/unit/type/neutron_config_spec.rb --- puppet-module-neutron-8.0.0/spec/unit/type/neutron_config_spec.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/spec/unit/type/neutron_config_spec.rb 2016-09-26 21:11:55.000000000 +0000 @@ -7,6 +7,51 @@ @neutron_config = Puppet::Type.type(:neutron_config).new(:name => 'DEFAULT/foo', :value => 'bar') end + it 'should require a name' do + expect { + Puppet::Type.type(:neutron_config).new({}) + }.to raise_error(Puppet::Error, 'Title or name must be provided') + end + + it 'should not expect a name with whitespace' do + expect { + Puppet::Type.type(:neutron_config).new(:name => 'f oo') + }.to raise_error(Puppet::Error, /Parameter name failed/) + end + + it 'should fail when there is no section' do + expect { + Puppet::Type.type(:neutron_config).new(:name => 'foo') + }.to raise_error(Puppet::Error, /Parameter name failed/) + end + + it 'should not require a value when ensure is absent' do + Puppet::Type.type(:neutron_config).new(:name => 'DEFAULT/foo', :ensure => :absent) + end + + it 'should accept a valid value' do + @neutron_config[:value] = 'bar' + expect(@neutron_config[:value]).to eq(['bar']) + end + + it 'should not accept a value with whitespace' do + @neutron_config[:value] = 'b ar' + expect(@neutron_config[:value]).to eq(['b ar']) + end + + it 'should accept valid ensure values' do + @neutron_config[:ensure] = :present + expect(@neutron_config[:ensure]).to eq(:present) + @neutron_config[:ensure] = :absent + expect(@neutron_config[:ensure]).to eq(:absent) + end + + it 'should not accept invalid ensure values' do + expect { + @neutron_config[:ensure] = :latest + }.to raise_error(Puppet::Error, /Invalid value/) + end + it 'should autorequire the package that install the file' do catalog = Puppet::Resource::Catalog.new package = Puppet::Type.type(:package).new(:name => 'neutron') diff -Nru puppet-module-neutron-8.0.0/spec/unit/type/neutron_plugin_midonet_spec.rb puppet-module-neutron-9.4.0/spec/unit/type/neutron_plugin_midonet_spec.rb --- puppet-module-neutron-8.0.0/spec/unit/type/neutron_plugin_midonet_spec.rb 2016-03-24 22:50:00.000000000 +0000 +++ puppet-module-neutron-9.4.0/spec/unit/type/neutron_plugin_midonet_spec.rb 2016-09-26 21:11:55.000000000 +0000 @@ -9,7 +9,7 @@ it 'should autorequire the package that install the file' do catalog = Puppet::Resource::Catalog.new - package = Puppet::Type.type(:package).new(:name => 'python-neutron-plugin-midonet') + package = Puppet::Type.type(:package).new(:name => 'python-networking-midonet') catalog.add_resource package, @neutron_plugin_midonet dependency = @neutron_plugin_midonet.autorequire expect(dependency.size).to eq(1)