Browse Source

Deprecate nova-network code

Nova will be removing nova-network soon, this deprecates all
the classes and parameters that are related to nova-network
and will be removed when nova removes it's support.

Please see references in nova.conf [1] and the nova release notes. [2]

[1] https://docs.openstack.org/nova/rocky/configuration/sample-config.html
[2] https://docs.openstack.org/releasenotes/nova/rocky.html

Depends-On: https://review.openstack.org/#/c/614577/
Change-Id: If87ad30e1be62cb767d98045d075340c9513bc90
changes/22/613522/6
Tobias Urdin 4 years ago
parent
commit
1296187b85
  1. 5
      lib/puppet/type/nova_network.rb
  2. 6
      manifests/compute/neutron.pp
  3. 20
      manifests/init.pp
  4. 4
      manifests/manage/network.pp
  5. 4
      manifests/network/bridge.pp
  6. 4
      manifests/network/flat.pp
  7. 4
      manifests/network/flatdhcp.pp
  8. 45
      manifests/network/neutron.pp
  9. 4
      manifests/network/vlan.pp
  10. 23
      releasenotes/notes/deprecated-nova-network-1480284ccb3b93cf.yaml
  11. 2
      spec/classes/nova_compute_neutron_spec.rb
  12. 1
      spec/classes/nova_init_spec.rb
  13. 1
      spec/classes/nova_network_flat_spec.rb
  14. 1
      spec/classes/nova_network_flatdhcp_spec.rb
  15. 1
      spec/classes/nova_network_vlan_spec.rb
  16. 1
      spec/unit/provider/nova_network/nova_spec.rb
  17. 1
      spec/unit/type/nova_network_spec.rb

5
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

6
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;
}

20
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

4
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,

4
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': {

4
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 }
}

4
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,

45
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;

4
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,

23
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.

2
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

1
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('<SERVICE DEFAULT>')
is_expected.to contain_nova_config('DEFAULT/ovsdb_connection').with_value('<SERVICE DEFAULT>')
is_expected.to contain_nova_config('DEFAULT/transport_url').with_value('<SERVICE DEFAULT>')
is_expected.to contain_nova_config('DEFAULT/rpc_response_timeout').with_value('<SERVICE DEFAULT>')

1
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

1
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

1
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

1
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'

1
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

Loading…
Cancel
Save