diff --git a/lib/puppet/type/nova_network.rb b/lib/puppet/type/nova_network.rb index 0fde60950..4e1c9599c 100644 --- a/lib/puppet/type/nova_network.rb +++ b/lib/puppet/type/nova_network.rb @@ -16,6 +16,11 @@ Puppet::Type.newtype(:nova_network) do newparam(:label) do desc "The Nova network label" defaultto "novanetwork" + + munge do |value| + Puppet.deprecation_warning('nova_network is deprecated and will be removed in a future release') + value + end end newparam(:num_networks) do diff --git a/manifests/compute/neutron.pp b/manifests/compute/neutron.pp index 3dff22d91..2660f27c0 100644 --- a/manifests/compute/neutron.pp +++ b/manifests/compute/neutron.pp @@ -4,6 +4,8 @@ # This will use virtio for VM guests and the # specified driver for the VIF # +# DEPRECATED! +# # === Parameters # # [*libvirt_vif_driver*] @@ -21,6 +23,10 @@ class nova::compute::neutron ( ) { include ::nova::deps + # NOTE(tobias-urdin): libvirt/vif_driver option does not exist and force_snat_range is + # a nova-network specific config which is deprecated. + warning('nova::compute::network class is deprecated and will be removed in a future release') + nova_config { 'libvirt/vif_driver': value => $libvirt_vif_driver; } diff --git a/manifests/init.pp b/manifests/init.pp index 071fec95e..3946a6cc4 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -364,10 +364,6 @@ # (optional) Sets a version cap for messages sent to scheduler services # Defaults to $::os_service_default # -# [*use_ipv6*] -# (optional) Use IPv6 or not. -# Defaults to $::os_service_default -# # [*purge_config*] # (optional) Whether to set only the specified config options # in the nova config. @@ -442,6 +438,10 @@ # exceptions in the API service # Defaults to undef # +# [*use_ipv6*] +# (optional) Use IPv6 or not. +# Defaults to undef +# class nova( $ensure_package = 'present', $database_connection = undef, @@ -527,7 +527,6 @@ class nova( $upgrade_level_intercell = $::os_service_default, $upgrade_level_network = $::os_service_default, $upgrade_level_scheduler = $::os_service_default, - $use_ipv6 = $::os_service_default, $cpu_allocation_ratio = $::os_service_default, $ram_allocation_ratio = $::os_service_default, $disk_allocation_ratio = $::os_service_default, @@ -542,6 +541,7 @@ class nova( $debug = undef, $image_service = undef, $notify_on_api_faults = undef, + $use_ipv6 = undef, ) inherits nova::params { include ::nova::deps @@ -557,6 +557,10 @@ class nova( and nova::debug is deprecated and has been moved to nova::logging class, please set them there.') } + if $use_ipv6 { + warning('nova::use_ipv6 is deprecated and will be removed in a future release') + } + validate_array($enabled_ssl_apis) if empty($enabled_ssl_apis) and $use_ssl { warning('enabled_ssl_apis is empty but use_ssl is set to true') @@ -751,9 +755,13 @@ but should be one of: ssh-rsa, ssh-dsa, ssh-ecdsa.") topics => $notification_topics, } + # TODO(tobias-urdin): Remove when use_ipv6 params is removed. + nova_config { + 'os_vif_linux_bridge/use_ipv6': value => $use_ipv6; + } + nova_config { 'cinder/catalog_info': value => $cinder_catalog_info; - 'os_vif_linux_bridge/use_ipv6': value => $use_ipv6; 'DEFAULT/ovsdb_connection': value => $ovsdb_connection; 'notifications/notification_format': value => $notification_format; # Following may need to be broken out to different nova services diff --git a/manifests/manage/network.pp b/manifests/manage/network.pp index cb66686b3..482f3710f 100644 --- a/manifests/manage/network.pp +++ b/manifests/manage/network.pp @@ -1,5 +1,7 @@ # === Parameters: # +# DEPRECATED! +# # [*network*] # (required) IPv4 CIDR of network to create. # @@ -54,6 +56,8 @@ define nova::manage::network ( include ::nova::deps + warning('nova::manage::network is deprecated and will be removed in a future release') + nova_network { $name: ensure => present, network => $network, diff --git a/manifests/network/bridge.pp b/manifests/network/bridge.pp index f01b17221..28e5fd006 100644 --- a/manifests/network/bridge.pp +++ b/manifests/network/bridge.pp @@ -1,5 +1,7 @@ # bridge.pp # +# DEPRECATED! +# # === Parameters: # # [*ip*] @@ -15,6 +17,8 @@ define nova::network::bridge ( ) { include ::nova::deps + warning('nova::network::bridge is deprecated and will be removed in a future release') + case $::osfamily { 'Debian': { diff --git a/manifests/network/flat.pp b/manifests/network/flat.pp index ad2870e14..5f97e41b2 100644 --- a/manifests/network/flat.pp +++ b/manifests/network/flat.pp @@ -2,6 +2,8 @@ # # Configuration settings for nova flat network # +# DEPRECATED! +# # === Parameters: # # [*fixed_range*] @@ -28,6 +30,8 @@ class nova::network::flat ( include ::nova::deps + warning('nova::network::flat is deprecated and nova-network will be removed in a future release') + if $public_interface { nova_config { 'DEFAULT/public_interface': value => $public_interface } } diff --git a/manifests/network/flatdhcp.pp b/manifests/network/flatdhcp.pp index 73d89d76a..0406ce0fd 100644 --- a/manifests/network/flatdhcp.pp +++ b/manifests/network/flatdhcp.pp @@ -2,6 +2,8 @@ # # Configures nova-network with flat dhcp option # +# DEPRECATED! +# # === Parameters: # # [*fixed_range*] @@ -53,6 +55,8 @@ class nova::network::flatdhcp ( include ::nova::deps + warning('nova::network::flatdhcp is deprecated and nova-network will be removed in a future release') + if $::osfamily == 'RedHat' and $::operatingsystem != 'Fedora' { package { 'dnsmasq-utils': ensure => present, diff --git a/manifests/network/neutron.pp b/manifests/network/neutron.pp index c00042df6..86f2b4115 100644 --- a/manifests/network/neutron.pp +++ b/manifests/network/neutron.pp @@ -59,13 +59,6 @@ # and not the Identity service API IP and port. # Defaults to 'http://127.0.0.1:5000/v3' # -# [*firewall_driver*] -# (optional) Firewall driver. -# This prevents nova from maintaining a firewall so it does not interfere -# with Neutron's. Set to 'nova.virt.firewall.IptablesFirewallDriver' -# to re-enable the Nova firewall. -# Defaults to 'nova.virt.firewall.NoopFirewallDriver' -# # [*vif_plugging_is_fatal*] # (optional) Fail to boot instance if vif plugging fails. # This prevents nova from booting an instance if vif plugging notification @@ -78,14 +71,23 @@ # notification is not being used. # Defaults to '300' # -# [*dhcp_domain*] -# (optional) domain to use for building the hostnames -# Defaults to 'novalocal' -# # [*default_floating_pool*] # (optional) Default pool for floating IPs # Defaults to 'nova' # +### DEPRECATED PARAMS +# +# [*firewall_driver*] +# (optional) Firewall driver. +# This prevents nova from maintaining a firewall so it does not interfere +# with Neutron's. Set to 'nova.virt.firewall.IptablesFirewallDriver' +# to re-enable the Nova firewall. +# Defaults to 'nova.virt.firewall.NoopFirewallDriver' +# +# [*dhcp_domain*] +# (optional) domain to use for building the hostnames +# Defaults to 'novalocal' +# class nova::network::neutron ( $neutron_password = false, $neutron_auth_type = 'v3password', @@ -99,18 +101,31 @@ class nova::network::neutron ( $neutron_region_name = 'RegionOne', $neutron_ovs_bridge = 'br-int', $neutron_extension_sync_interval = '600', - $firewall_driver = 'nova.virt.firewall.NoopFirewallDriver', $vif_plugging_is_fatal = true, $vif_plugging_timeout = '300', - $dhcp_domain = 'novalocal', $default_floating_pool = 'nova', + # DEPRECATED PARAMS + $firewall_driver = 'nova.virt.firewall.NoopFirewallDriver', + $dhcp_domain = 'novalocal', ) { include ::nova::deps + if $firewall_driver { + warning('nova::network::neutron::firewall_driver is deprecated and will be removed in a future release') + } + + if $dhcp_domain { + warning('nova::network::neutron::dhcp_domain is deprecated and will be removed in a future release') + } + + # TODO(tobias-urdin): Remove these in the T release. + nova_config { + 'DEFAULT/dhcp_domain': value => $dhcp_domain; + 'DEFAULT/firewall_driver': value => $firewall_driver; + } + nova_config { - 'DEFAULT/dhcp_domain': value => $dhcp_domain; - 'DEFAULT/firewall_driver': value => $firewall_driver; 'DEFAULT/vif_plugging_is_fatal': value => $vif_plugging_is_fatal; 'DEFAULT/vif_plugging_timeout': value => $vif_plugging_timeout; 'neutron/default_floating_pool': value => $default_floating_pool; diff --git a/manifests/network/vlan.pp b/manifests/network/vlan.pp index f3261b8b8..6cd48d3ce 100644 --- a/manifests/network/vlan.pp +++ b/manifests/network/vlan.pp @@ -2,6 +2,8 @@ # # Configures nova network to use vlans # +# DEPRECATED! +# # === Parameters: # # [*fixed_range*] @@ -47,6 +49,8 @@ class nova::network::vlan ( include ::nova::deps + warning('nova::network::vlan is deprecated and nova-network will be removed in a future release') + if $::osfamily == 'RedHat' and $::operatingsystem != 'Fedora' { package { 'dnsmasq-utils': ensure => present, diff --git a/releasenotes/notes/deprecated-nova-network-1480284ccb3b93cf.yaml b/releasenotes/notes/deprecated-nova-network-1480284ccb3b93cf.yaml new file mode 100644 index 000000000..b1d91ac5a --- /dev/null +++ b/releasenotes/notes/deprecated-nova-network-1480284ccb3b93cf.yaml @@ -0,0 +1,23 @@ +--- +deprecations: + - | + nova::network::bridge class is deprecated and will be removed in a future release + because it doesn't align with this modules purpose to configure nova nad not networking + interfaces. + - | + nova::network::flat, nova::network::flatdhcp and nova::network::vlan classes is now + deprecated and will be removed in a future release. Nova-network is deprecated in nova + and will be removed in a future release. + - | + firewall_driver and dhcp_domain parameters in nova::network::neutron is deprecated and will + be removed in a future release. These are replaced by use_neutron and DNS domain functionality + in neutron, these were focused on supporting nova-network and will be removed when nova-network + support is removed from nova. + - | + nova_network resource is deprecated and will be removed in a future release. + - | + nova::compute::neutron class is deprecated and will be removed in a future release. + - | + nova::manage::network is deprecated and will be removed in a future release. + - | + nova::use_ipv6 is deprecated and will be removed in a future release. diff --git a/spec/classes/nova_compute_neutron_spec.rb b/spec/classes/nova_compute_neutron_spec.rb index 1c117a816..b34442481 100644 --- a/spec/classes/nova_compute_neutron_spec.rb +++ b/spec/classes/nova_compute_neutron_spec.rb @@ -1,4 +1,6 @@ +# TODO(tobias-urdin): This is deprecated and should be removed in T release. require 'spec_helper' + describe 'nova::compute::neutron' do context 'with default parameters' do diff --git a/spec/classes/nova_init_spec.rb b/spec/classes/nova_init_spec.rb index e8a5f8278..26a52b727 100644 --- a/spec/classes/nova_init_spec.rb +++ b/spec/classes/nova_init_spec.rb @@ -52,7 +52,6 @@ describe 'nova' do is_expected.to contain_nova_config('DEFAULT/service_down_time').with_value('60') is_expected.to contain_nova_config('DEFAULT/rootwrap_config').with_value('/etc/nova/rootwrap.conf') is_expected.to contain_nova_config('DEFAULT/report_interval').with_value('10') - is_expected.to contain_nova_config('os_vif_linux_bridge/use_ipv6').with_value('') is_expected.to contain_nova_config('DEFAULT/ovsdb_connection').with_value('') is_expected.to contain_nova_config('DEFAULT/transport_url').with_value('') is_expected.to contain_nova_config('DEFAULT/rpc_response_timeout').with_value('') diff --git a/spec/classes/nova_network_flat_spec.rb b/spec/classes/nova_network_flat_spec.rb index 6e095b3ca..42c53d47b 100644 --- a/spec/classes/nova_network_flat_spec.rb +++ b/spec/classes/nova_network_flat_spec.rb @@ -1,3 +1,4 @@ +# TODO(tobias-urdin): This is deprecated and should be removed in T release. require 'spec_helper' describe 'nova::network::flat' do diff --git a/spec/classes/nova_network_flatdhcp_spec.rb b/spec/classes/nova_network_flatdhcp_spec.rb index d2f9d2308..82b56b117 100644 --- a/spec/classes/nova_network_flatdhcp_spec.rb +++ b/spec/classes/nova_network_flatdhcp_spec.rb @@ -1,3 +1,4 @@ +# TODO(tobias-urdin): This is deprecated and should be removed in T release. require 'spec_helper' describe 'nova::network::flatdhcp' do diff --git a/spec/classes/nova_network_vlan_spec.rb b/spec/classes/nova_network_vlan_spec.rb index 89803c24b..7f6ca989d 100644 --- a/spec/classes/nova_network_vlan_spec.rb +++ b/spec/classes/nova_network_vlan_spec.rb @@ -1,3 +1,4 @@ +# TODO(tobias-urdin): This is deprecated and should be removed in T release. require 'spec_helper' describe 'nova::network::vlan' do diff --git a/spec/unit/provider/nova_network/nova_spec.rb b/spec/unit/provider/nova_network/nova_spec.rb index fdcce24bd..5e531732a 100644 --- a/spec/unit/provider/nova_network/nova_spec.rb +++ b/spec/unit/provider/nova_network/nova_spec.rb @@ -1,3 +1,4 @@ +# TODO(tobias-urdin): This is deprecated and should be removed in T release. require 'puppet' require 'puppet/provider/nova_network/nova' require 'tempfile' diff --git a/spec/unit/type/nova_network_spec.rb b/spec/unit/type/nova_network_spec.rb index 943716d0d..3d638c62a 100644 --- a/spec/unit/type/nova_network_spec.rb +++ b/spec/unit/type/nova_network_spec.rb @@ -1,3 +1,4 @@ +# TODO(tobias-urdin): This is deprecated and should be removed in T release. require 'puppet' require 'puppet/type/nova_network' describe 'Puppet::Type.type(:nova_network)' do