Remove deprecated parameters

Removes deprecated parameters that has been
deprecated for one cycle or more.

Change-Id: I0c29a346e0df44bce5e4c661b4b8a77f9e126fc7
This commit is contained in:
Tobias Urdin 2018-06-12 21:38:58 +02:00
parent f2005af615
commit 2ad9190159
11 changed files with 47 additions and 152 deletions

View File

@ -65,12 +65,6 @@
# HTTPProxyToWSGI middleware. # HTTPProxyToWSGI middleware.
# Defaults to $::os_service_default. # Defaults to $::os_service_default.
# #
# DEPRECATED
#
# [*neutron_url*]
# (optional) The Neutron URL to be used for requests from ironic
# Defaults to undef
#
class ironic::api ( class ironic::api (
$package_ensure = 'present', $package_ensure = 'present',
$enabled = true, $enabled = true,
@ -81,8 +75,6 @@ class ironic::api (
$workers = $::os_service_default, $workers = $::os_service_default,
$public_endpoint = $::os_service_default, $public_endpoint = $::os_service_default,
$enable_proxy_headers_parsing = $::os_service_default, $enable_proxy_headers_parsing = $::os_service_default,
# DEPRECATED
$neutron_url = undef,
) inherits ironic::params { ) inherits ironic::params {
include ::ironic::deps include ::ironic::deps
@ -90,13 +82,6 @@ class ironic::api (
include ::ironic::policy include ::ironic::policy
include ::ironic::api::authtoken include ::ironic::api::authtoken
# For backward compatibility only, remove when neutron_url is removed
include ::ironic::neutron
if $neutron_url {
warning('Using ironic::api::neutron_url is deprecated, use ironic::neutron::api_endpoint instead')
}
# Configure ironic.conf # Configure ironic.conf
ironic_config { ironic_config {
'api/host_ip': value => $host_ip; 'api/host_ip': value => $host_ip;

View File

@ -140,31 +140,6 @@
# so that the baremetal node is in the desired new power state. # so that the baremetal node is in the desired new power state.
# Defaults to $::os_service_default # Defaults to $::os_service_default
# #
# DEPRECATED
#
# [*cleaning_network_uuid*]
# (optional) Use cleaning_network instead.
# Defaults to undef
#
# [*provisioning_network_uuid*]
# (optional) Use provisioning_network instead.
# Defaults to undef
#
# [*swift_account*]
# (optional) The account that Glance uses to communicate with Swift.
# The format is "AUTH_uuid"
# Defaults to $::os_service_default
#
# [*swift_temp_url_key*]
# (optional) The secret token given to Swift to allow temporary URL
# downloads. Required for several drivers (e.g. agent_ipmitool).
# Defaults to $::os_service_default
#
# [*swift_temp_url_duration*]
# (optional) The length of time in seconds that the temporary URL will be
# valid for.
# Defaults to $::os_service_default
#
class ironic::conductor ( class ironic::conductor (
$package_ensure = 'present', $package_ensure = 'present',
$enabled = true, $enabled = true,
@ -190,12 +165,6 @@ class ironic::conductor (
$provisioning_network_name = undef, $provisioning_network_name = undef,
$rescuing_network_name = undef, $rescuing_network_name = undef,
$power_state_change_timeout = $::os_service_default, $power_state_change_timeout = $::os_service_default,
# DEPRECATED
$cleaning_network_uuid = undef,
$provisioning_network_uuid = undef,
$swift_account = undef,
$swift_temp_url_key = undef,
$swift_temp_url_duration = undef,
) { ) {
include ::ironic::deps include ::ironic::deps
@ -204,34 +173,18 @@ class ironic::conductor (
# For backward compatibility # For backward compatibility
include ::ironic::glance include ::ironic::glance
if $cleaning_network_uuid { if ($cleaning_network_name and !is_service_default($cleaning_network)) {
warning('cleaning_network_uuid is deprecated, use cleaning_network') fail('cleaning_network_name and cleaning_network can not be specified at the same time.')
}
if $provisioning_network_uuid {
warning('provisioning_network_uuid is deprecated, use provisioning_network')
}
$cleaning_network_real = pick($cleaning_network_uuid, $cleaning_network)
$provisioning_network_real = pick($provisioning_network_uuid, $provisioning_network)
if ($cleaning_network_name and !is_service_default($cleaning_network_real)) {
fail("cleaning_network_name and cleaning_network or cleaning_network_uuid can not be \
specified in the same time.")
} }
if ($provisioning_network_name and !is_service_default($provisioning_network_real)) { if ($provisioning_network_name and !is_service_default($provisioning_network)) {
fail("provisioning_network_name and provisioning_network or provisioning_network_uuid can not be \ fail('provisioning_network_name and provisioning_network can not be specified in the same time.')
specified in the same time.")
} }
if ($rescuing_network_name and !is_service_default($rescuing_network)) { if ($rescuing_network_name and !is_service_default($rescuing_network)) {
fail('rescuing_network_name and rescuing_network can not be specified in the same time.') fail('rescuing_network_name and rescuing_network can not be specified in the same time.')
} }
if $swift_account or $swift_temp_url_key or $swift_temp_url_duration {
warning("swift_account, swift_temp_url_key and swift_temp_url_duration were \
moved to ironic::glance manifest")
}
validate_array($enabled_drivers) validate_array($enabled_drivers)
validate_array($enabled_hardware_types) validate_array($enabled_hardware_types)
@ -301,7 +254,7 @@ moved to ironic::glance manifest")
} }
} else { } else {
ironic_config { ironic_config {
'neutron/cleaning_network': value => $cleaning_network_real; 'neutron/cleaning_network': value => $cleaning_network;
} }
} }
@ -311,7 +264,7 @@ moved to ironic::glance manifest")
} }
} else { } else {
ironic_config { ironic_config {
'neutron/provisioning_network': value => $provisioning_network_real; 'neutron/provisioning_network': value => $provisioning_network;
} }
} }

View File

@ -24,32 +24,15 @@
# Should be an interger value # Should be an interger value
# Defaults to $::os_service_default # Defaults to $::os_service_default
# #
# DEPRECATED PARAMETERS
#
# [*retry_timeout*]
# (optional) Maximum time in seconds to retry IPMI operations.
# Should be an interger value
# Defaults to undef.
#
class ironic::drivers::ipmi ( class ironic::drivers::ipmi (
$command_retry_timeout = $::os_service_default, $command_retry_timeout = $::os_service_default,
# DEPRECATED PARAMETERS
$retry_timeout = undef
) { ) {
include ::ironic::deps include ::ironic::deps
if $retry_timeout {
warning('retry_timeout parameter is replaced by command_retry_timeout and power_state_change_timeout, will be removed in the future.')
$_command_retry_timeout = $retry_timeout
}
else {
$_command_retry_timeout = $command_retry_timeout
}
# Configure ironic.conf # Configure ironic.conf
ironic_config { ironic_config {
'ipmi/command_retry_timeout': value => $_command_retry_timeout; 'ipmi/command_retry_timeout': value => $command_retry_timeout;
} }
} }

View File

@ -104,22 +104,13 @@ class ironic::glance (
$swift_account_project_name = undef, $swift_account_project_name = undef,
) { ) {
$api_servers_real = pick($::ironic::glance_api_servers, $api_servers) if is_array($api_servers) {
if is_array($api_servers_real) { $api_servers_converted = join($api_servers, ',')
$api_servers_converted = join($api_servers_real, ',')
} else { } else {
$api_servers_converted = $api_servers_real $api_servers_converted = $api_servers
} }
$num_retries_real = pick($::ironic::glance_num_retries, $num_retries) if ($swift_account_project_name and !is_service_default($swift_account)) {
$api_insecure_real = pick($::ironic::glance_api_insecure, $api_insecure)
$swift_account_real = pick($::ironic::conductor::swift_account, $swift_account)
$swift_temp_url_key_real = pick($::ironic::conductor::swift_temp_url_key, $swift_temp_url_key)
$swift_temp_url_duration_real = pick($::ironic::conductor::swift_temp_url_duration, $swift_temp_url_duration)
if ($swift_account_project_name and !is_service_default($swift_account_real)) {
fail('swift_account_project_name and swift_account can not be specified in the same time.') fail('swift_account_project_name and swift_account can not be specified in the same time.')
} }
@ -132,12 +123,12 @@ class ironic::glance (
'glance/user_domain_name': value => $user_domain_name; 'glance/user_domain_name': value => $user_domain_name;
'glance/project_domain_name': value => $project_domain_name; 'glance/project_domain_name': value => $project_domain_name;
'glance/glance_api_servers': value => $api_servers_converted; 'glance/glance_api_servers': value => $api_servers_converted;
'glance/glance_num_retries': value => $num_retries_real; 'glance/glance_num_retries': value => $num_retries;
'glance/glance_api_insecure': value => $api_insecure_real; 'glance/glance_api_insecure': value => $api_insecure;
'glance/swift_container': value => $swift_container; 'glance/swift_container': value => $swift_container;
'glance/swift_endpoint_url': value => $swift_endpoint_url; 'glance/swift_endpoint_url': value => $swift_endpoint_url;
'glance/swift_temp_url_key': value => $swift_temp_url_key_real, secret => true; 'glance/swift_temp_url_key': value => $swift_temp_url_key, secret => true;
'glance/swift_temp_url_duration': value => $swift_temp_url_duration_real; 'glance/swift_temp_url_duration': value => $swift_temp_url_duration;
} }
if $swift_account_project_name { if $swift_account_project_name {
@ -146,7 +137,7 @@ class ironic::glance (
} }
} else { } else {
ironic_config { ironic_config {
'glance/swift_account': value => $swift_account_real; 'glance/swift_account': value => $swift_account;
} }
} }
} }

View File

@ -251,21 +251,6 @@
# in the ironic config. # in the ironic config.
# Defaults to false. # Defaults to false.
# #
# DEPRECATED PARAMETERS
#
# [*glance_api_servers*]
# (optional) A list of the glance api servers available to ironic.
# Should be an array with [hostname|ip]:port
# Defaults to undef
#
# [*glance_num_retries*]
# (optional) Number retries when downloading an image from glance.
# Defaults to undef
#
# [*glance_api_insecure*]
# (optional) Allow to perform insecure SSL (https) requests to glance.
# Defaults to undef
#
class ironic ( class ironic (
$enabled = true, $enabled = true,
$package_ensure = 'present', $package_ensure = 'present',
@ -319,10 +304,6 @@ class ironic (
$sync_db = true, $sync_db = true,
$db_online_data_migrations = false, $db_online_data_migrations = false,
$purge_config = false, $purge_config = false,
# DEPRECATED PARAMETERS
$glance_api_servers = undef,
$glance_num_retries = undef,
$glance_api_insecure = undef,
) { ) {
include ::ironic::deps include ::ironic::deps
@ -333,12 +314,6 @@ class ironic (
include ::ironic::glance include ::ironic::glance
include ::ironic::neutron include ::ironic::neutron
if $glance_api_servers or $glance_api_insecure or $glance_num_retries {
warning("ironic::glance_api_servers, ironic::glance_api_insecure, \
ironic::glance_num_retries are deprecated in favor of ironic::glance::api_servers, \
ironic::glance::api_insecure and ironic::glance::num_retries accordingly")
}
ensure_resource( 'package', 'ironic-common', { ensure_resource( 'package', 'ironic-common', {
ensure => $package_ensure, ensure => $package_ensure,
name => $::ironic::params::common_package_name, name => $::ironic::params::common_package_name,

View File

@ -221,12 +221,6 @@
# Requires node_not_found_hook set to "enroll". # Requires node_not_found_hook set to "enroll".
# Defaults to $::os_service_default # Defaults to $::os_service_default
# #
# DEPRECATED
#
# [*dnsmasq_ip_range*]
# (optional) IP range to use for nodes being introspected
# Defaults to undef
#
class ironic::inspector ( class ironic::inspector (
$package_ensure = 'present', $package_ensure = 'present',
$enabled = true, $enabled = true,
@ -274,8 +268,6 @@ class ironic::inspector (
$http_root = '/httpboot', $http_root = '/httpboot',
$node_not_found_hook = $::os_service_default, $node_not_found_hook = $::os_service_default,
$discovery_default_driver = $::os_service_default, $discovery_default_driver = $::os_service_default,
# DEPRECATED
$dnsmasq_ip_range = undef,
) { ) {
include ::ironic::deps include ::ironic::deps
@ -292,14 +284,6 @@ class ironic::inspector (
fail('Invalid data type, parameter dnsmasq_ip_subnets must be Array type') fail('Invalid data type, parameter dnsmasq_ip_subnets must be Array type')
} }
if $dnsmasq_ip_range {
warning('dnsmasq_ip_range is deprecated, replaced by dnsmasq_ip_subnets')
$dnsmasq_ip_subnets_real = concat($dnsmasq_ip_subnets,
{'ip_range' => $dnsmasq_ip_range})
} else {
$dnsmasq_ip_subnets_real = $dnsmasq_ip_subnets
}
$tftp_root_real = pick($::ironic::pxe::common::tftp_root, $tftp_root) $tftp_root_real = pick($::ironic::pxe::common::tftp_root, $tftp_root)
$http_root_real = pick($::ironic::pxe::common::http_root, $http_root) $http_root_real = pick($::ironic::pxe::common::http_root, $http_root)
$http_port_real = pick($::ironic::pxe::common::http_port, $http_port) $http_port_real = pick($::ironic::pxe::common::http_port, $http_port)

View File

@ -55,10 +55,8 @@ class ironic::neutron (
$project_domain_name = 'Default', $project_domain_name = 'Default',
) { ) {
$api_endpoint_real = pick($::ironic::api::neutron_url, $api_endpoint)
ironic_config { ironic_config {
'neutron/url': value => $api_endpoint_real; 'neutron/url': value => $api_endpoint;
'neutron/auth_type': value => $auth_type; 'neutron/auth_type': value => $auth_type;
'neutron/username': value => $username; 'neutron/username': value => $username;
'neutron/password': value => $password, secret => true; 'neutron/password': value => $password, secret => true;

View File

@ -0,0 +1,27 @@
---
upgrade:
- |
The deprecated parameter ironic::api::neutron_url is now removed.
Please use the ironic::neutron::api_endpoint parameter instead.
- |
The deprecated parameter ironic::conductor::cleaning_network_uuid is now removed.
Please use the ironic::conductor::cleaning_network parameter instead.
- |
The deprecated parameters swift_account, swift_temp_url_key and swift_temp_url_duration
in ironic::conductor is removed. Please set these in ironic::glance instead.
- |
The deprecated parameter ironic::drivers::ipmi::retry_timeout is now removed.
Please use ironic::drivers::ipmi::command_retry_timeout instead.
- |
The deprecated parameter ironic::inspector::dnsmasq_ip_range is now removed.
Please use ironic::inspector::dnsmasq_ip_subnets.
If you are using dnsmasq_ip_range please change, example::
$dnsmasq_ip_range = '192.168.0.100,192.168.0.120'
Replace with::
$dnsmasq_ip_subnets = [{'ip_range' => '192.168.0.100,192.168.0.120'}]
- |
The deprecated parameters glance_api_services, glance_api_insecure and
glance_num_retries in ::ironic is now removed. Please set these in ::ironic::glance instead.

View File

@ -194,8 +194,7 @@ describe 'ironic::inspector' do
:detect_boot_mode => true, :detect_boot_mode => true,
:node_not_found_hook => 'enroll', :node_not_found_hook => 'enroll',
:discovery_default_driver => 'pxe_ipmitool', :discovery_default_driver => 'pxe_ipmitool',
:dnsmasq_ip_subnets => [], :dnsmasq_ip_subnets => [{'ip_range' => '192.168.0.100,192.168.0.120'}],
:dnsmasq_ip_range => '192.168.0.100,192.168.0.120',
:add_ports => 'all', :add_ports => 'all',
:always_store_ramdisk_logs => true, :always_store_ramdisk_logs => true,
) )

View File

@ -5,7 +5,7 @@ bind-interfaces
log-dhcp log-dhcp
log-queries log-queries
<% end %> <% end %>
<% @dnsmasq_ip_subnets_real.each do |s| -%> <% @dnsmasq_ip_subnets.each do |s| -%>
<% if s['tag'] and s['netmask'] -%> <% if s['tag'] and s['netmask'] -%>
dhcp-range=set:<%= s['tag'] -%>,<%= s['ip_range'] -%>,<%= s['netmask'] -%>,10m dhcp-range=set:<%= s['tag'] -%>,<%= s['ip_range'] -%>,<%= s['netmask'] -%>,10m
<% elsif s['tag'] -%> <% elsif s['tag'] -%>

View File

@ -5,7 +5,7 @@ bind-interfaces
log-dhcp log-dhcp
log-queries log-queries
<% end %> <% end %>
<% @dnsmasq_ip_subnets_real.each do |s| -%> <% @dnsmasq_ip_subnets.each do |s| -%>
<% if s['tag'] and s['netmask'] -%> <% if s['tag'] and s['netmask'] -%>
dhcp-range=set:<%= s['tag'] -%>,<%= s['ip_range'] -%>,<%= s['netmask'] -%>,10m dhcp-range=set:<%= s['tag'] -%>,<%= s['ip_range'] -%>,<%= s['netmask'] -%>,10m
<% elsif s['tag'] -%> <% elsif s['tag'] -%>