Drop all current deprecated parameters for heat

Change-Id: I71ef16d9467230c9430458971266c67ae2def238
This commit is contained in:
iberezovskiy 2016-04-20 20:40:06 +03:00
parent a70877902c
commit 3b49812852
7 changed files with 6 additions and 356 deletions

View File

@ -34,11 +34,6 @@
# Only used with mysql modules >= 2.2.
# Defaults to 'utf8_general_ci'
#
# === Deprecated Parameters
#
# [*mysql_module*]
# (Optional) Does nothing.
#
class heat::db::mysql(
$password = false,
$dbname = 'heat',
@ -47,15 +42,10 @@ class heat::db::mysql(
$allowed_hosts = undef,
$charset = 'utf8',
$collate = 'utf8_general_ci',
$mysql_module = undef
) {
include ::heat::deps
if $mysql_module {
warning('The mysql_module parameter is deprecated. The latest 2.x mysql module will be used.')
}
validate_string($password)
::openstacklib::db::mysql { 'heat':

View File

@ -205,13 +205,6 @@
# default region name that heat talks to service endpoints on.
# Defaults to $::os_service_default.
#
# [*instance_user*]
# (Optional) The default user for new instances. Although heat claims that
# this feature is deprecated, it still sets the users to ec2-user if
# you leave this unset. If you want heat to not set instance_user to
# ec2-user, you need to set this to an empty string. This feature has been
# deprecated for some time and will likely be removed in L or M.
#
# [*enable_stack_adopt*]
# (Optional) Enable the stack-adopt feature.
# Defaults to $::os_service_default.
@ -224,14 +217,6 @@
# (Optional) Run db sync on nodes after connection setting has been set.
# Defaults to true
#
# === Deprecated Parameters
#
# [*mysql_module*]
# Deprecated. Does nothing.
#
# [*sql_connection*]
# Deprecated. Use database_connection instead.
#
class heat(
$auth_uri = 'http://127.0.0.1:5000/',
$identity_uri = 'http://127.0.0.1:35357/',
@ -283,10 +268,6 @@ class heat(
$max_template_size = $::os_service_default,
$max_json_body_size = $::os_service_default,
$notification_driver = $::os_service_default,
# Deprecated parameters
$mysql_module = undef,
$sql_connection = undef,
$instance_user = undef,
) {
include ::heat::logging
@ -294,10 +275,6 @@ class heat(
include ::heat::deps
include ::heat::params
if $mysql_module {
warning('The mysql_module parameter is deprecated. The latest 2.x mysql module will be used.')
}
package { 'heat-common':
ensure => $package_ensure,
name => $::heat::params::common_package_name,
@ -390,14 +367,4 @@ class heat(
rpc_response_timeout => $rpc_response_timeout,
}
# instance_user
# special case for empty string since it's a valid value
if $instance_user == '' {
heat_config { 'DEFAULT/instance_user': value => ''; }
} elsif $instance_user {
heat_config { 'DEFAULT/instance_user': value => $instance_user; }
} else {
heat_config { 'DEFAULT/instance_user': ensure => absent; }
}
}

View File

@ -71,46 +71,6 @@
# (optional) The endpoint's internal url. (Defaults to 'http://127.0.0.1:8004/v1/%(tenant_id)s')
# This url should *not* contain any trailing '/'.
#
# [*version*]
# (optional) DEPRECATED: Use public_url, internal_url and admin_url instead.
# API version endpoint. (Defaults to 'v1')
# Setting this parameter overrides public_url, internal_url and admin_url parameters.
#
# [*port*]
# (optional) DEPRECATED: Use public_url, internal_url and admin_url instead.
# Default port for endpoints. (Defaults to 9001)
# Setting this parameter overrides public_url, internal_url and admin_url parameters.
#
# [*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.
#
# [*heat_stack_user_role*]
# (optional) Keystone role for heat template-defined users.
# In this context this will create the role for the heat_stack_user.
@ -124,10 +84,6 @@
# $heat_stack_user_role.
# Defaults to true
#
# === 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
#
@ -157,83 +113,12 @@ class heat::keystone::auth (
$internal_url = 'http://127.0.0.1:8004/v1/%(tenant_id)s',
$heat_stack_user_role = 'heat_stack_user',
$manage_heat_stack_user_role = true,
# DEPRECATED PARAMETERS
$version = undef,
$port = undef,
$public_protocol = undef,
$public_address = undef,
$internal_protocol = undef,
$internal_address = undef,
$admin_protocol = undef,
$admin_address = undef,
) {
include ::heat::deps
validate_string($password)
if $version {
warning('The version parameter is deprecated, use public_url, internal_url and admin_url instead.')
}
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 $version) {
$public_url_real = sprintf('%s://%s:%s/%s/%%(tenant_id)s',
pick($public_protocol, 'http'),
pick($public_address, '127.0.0.1'),
pick($port, '8004'),
pick($version, 'v1'))
} else {
$public_url_real = $public_url
}
if ($admin_protocol or $admin_address or $port or $version) {
$admin_url_real = sprintf('%s://%s:%s/%s/%%(tenant_id)s',
pick($admin_protocol, 'http'),
pick($admin_address, '127.0.0.1'),
pick($port, '8004'),
pick($version, 'v1'))
} else {
$admin_url_real = $admin_url
}
if ($internal_protocol or $internal_address or $port or $version) {
$internal_url_real = sprintf('%s://%s:%s/%s/%%(tenant_id)s',
pick($internal_protocol, 'http'),
pick($internal_address, '127.0.0.1'),
pick($port, '8004'),
pick($version, 'v1'))
} else {
$internal_url_real = $internal_url
}
$real_service_name = pick($service_name, $auth_name)
keystone::resource::service_identity { $auth_name:
@ -248,9 +133,9 @@ class heat::keystone::auth (
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,
}
if $configure_user_role {

View File

@ -58,51 +58,6 @@
# (optional) The endpoint's internal url. (Defaults to 'http://127.0.0.1:8000/v1')
# This url should *not* contain any trailing '/'.
#
# [*version*]
# (optional) DEPRECATED: Use public_url, internal_url and admin_url instead.
# API version endpoint. (Defaults to 'v1')
# Setting this parameter overrides public_url, internal_url and admin_url parameters.
#
# [*port*]
# (optional) DEPRECATED: Use public_url, internal_url and admin_url instead.
# Default port for endpoints. (Defaults to 8000)
# Setting this parameter overrides public_url, internal_url and admin_url parameters.
#
# [*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 { 'heat::keystone::auth_cfn':
@ -126,83 +81,12 @@ class heat::keystone::auth_cfn (
$public_url = 'http://127.0.0.1:8000/v1',
$admin_url = 'http://127.0.0.1:8000/v1',
$internal_url = 'http://127.0.0.1:8000/v1',
# DEPRECATED PARAMETERS
$version = undef,
$port = undef,
$public_protocol = undef,
$public_address = undef,
$internal_protocol = undef,
$internal_address = undef,
$admin_protocol = undef,
$admin_address = undef,
) {
include ::heat::deps
validate_string($password)
if $version {
warning('The version parameter is deprecated, use public_url, internal_url and admin_url instead.')
}
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 $version) {
$public_url_real = sprintf('%s://%s:%s/%s',
pick($public_protocol, 'http'),
pick($public_address, '127.0.0.1'),
pick($port, '8000'),
pick($version, 'v1'))
} else {
$public_url_real = $public_url
}
if ($admin_protocol or $admin_address or $port or $version) {
$admin_url_real = sprintf('%s://%s:%s/%s',
pick($admin_protocol, 'http'),
pick($admin_address, '127.0.0.1'),
pick($port, '8000'),
pick($version, 'v1'))
} else {
$admin_url_real = $admin_url
}
if ($internal_protocol or $internal_address or $port or $version) {
$internal_url_real = sprintf('%s://%s:%s/%s',
pick($internal_protocol, 'http'),
pick($internal_address, '127.0.0.1'),
pick($port, '8000'),
pick($version, 'v1'))
} else {
$internal_url_real = $internal_url
}
$real_service_name = pick($service_name, $auth_name)
keystone::resource::service_identity { $auth_name:
@ -217,9 +101,9 @@ class heat::keystone::auth_cfn (
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,
}
if $configure_user_role {

View File

@ -30,20 +30,6 @@
# Whether manage or not the user role creation.
# Defaults to 'true'.
#
# === Deprecated Parameters
#
# [*auth_url*]
# Keystone auth url
#
# [*keystone_admin*]
# Keystone admin user
#
# [*keystone_password*]
# Keystone admin password
#
# [*keystone_tenant*]
# Keystone admin tenant name
#
class heat::keystone::domain (
$domain_name = 'heat',
$domain_admin = 'heat_admin',
@ -52,29 +38,11 @@ class heat::keystone::domain (
$manage_domain = true,
$manage_user = true,
$manage_role = true,
# DEPRECATED PARAMETERS
$auth_url = undef,
$keystone_admin = undef,
$keystone_password = undef,
$keystone_tenant = undef,
) {
include ::heat::deps
include ::heat::params
if $auth_url {
warning('The auth_url parameter is deprecated and will be removed in future releases')
}
if $keystone_admin {
warning('The keystone_admin parameter is deprecated and will be removed in future releases')
}
if $keystone_password {
warning('The keystone_password parameter is deprecated and will be removed in future releases')
}
if $keystone_tenant {
warning('The keystone_tenant parameter is deprecated and will be removed in future releases')
}
if $manage_domain {
ensure_resource('keystone_domain', $domain_name, {
'ensure' => 'present',

View File

@ -70,28 +70,6 @@ describe 'heat::keystone::auth_cfn' do
end
end
context 'with deprecated endpoint parameters' do
before do
params.merge!({
:public_protocol => 'https',
:public_address => '10.10.10.10',
:port => '81',
:version => 'v2',
:internal_protocol => 'http',
:internal_address => '10.10.10.11',
:admin_protocol => 'http',
:admin_address => '10.10.10.12'
})
end
it { is_expected.to contain_keystone_endpoint('RegionOne/heat-cfn::cloudformation').with(
:ensure => 'present',
:public_url => "#{params[:public_protocol]}://#{params[:public_address]}:#{params[:port]}/#{params[:version]}",
:admin_url => "#{params[:admin_protocol]}://#{params[:admin_address]}:#{params[:port]}/#{params[:version]}",
:internal_url => "#{params[:internal_protocol]}://#{params[:internal_address]}:#{params[:port]}/#{params[:version]}"
) }
end
context 'when overriding service name' do
before do
params.merge!({

View File

@ -77,28 +77,6 @@ describe 'heat::keystone::auth' do
end
end
context 'with deprecated endpoint parameters' do
before do
params.merge!({
:public_protocol => 'https',
:public_address => '10.10.10.10',
:port => '81',
:version => 'v2',
:internal_protocol => 'http',
:internal_address => '10.10.10.11',
:admin_protocol => 'http',
:admin_address => '10.10.10.12'
})
end
it { is_expected.to contain_keystone_endpoint('RegionOne/heat::orchestration').with(
:ensure => 'present',
:public_url => "#{params[:public_protocol]}://#{params[:public_address]}:#{params[:port]}/#{params[:version]}/%(tenant_id)s",
:admin_url => "#{params[:admin_protocol]}://#{params[:admin_address]}:#{params[:port]}/#{params[:version]}/%(tenant_id)s",
:internal_url => "#{params[:internal_protocol]}://#{params[:internal_address]}:#{params[:port]}/#{params[:version]}/%(tenant_id)s"
) }
end
context 'when overriding service name' do
before do
params.merge!({