Merge "Remove code deprecated in liberty cycle"
This commit is contained in:
commit
52e6d98d0d
@ -65,11 +65,11 @@ define cinder::backend::dellsc_iscsi (
|
||||
) {
|
||||
|
||||
if $dell_sc_server_folder == 'srv' {
|
||||
warning('The OpenStack default value of dell_sc_server_folder differs from the puppet module default of "srv" and may change in later versions of the module.')
|
||||
warning('The OpenStack default value of dell_sc_server_folder differs from the puppet module default of "srv" and will be changed to the upstream OpenStack default in N-release.')
|
||||
}
|
||||
|
||||
if $dell_sc_volume_folder == 'vol' {
|
||||
warning('The OpenStack default value of dell_sc_volume_folder differs from the puppet module default of "vol" and may change in later versions of the module.')
|
||||
warning('The OpenStack default value of dell_sc_volume_folder differs from the puppet module default of "vol" and will be changed to the upstream OpenStack default in N-release.')
|
||||
}
|
||||
|
||||
$driver = 'dell.dell_storagecenter_iscsi.DellStorageCenterISCSIDriver'
|
||||
|
@ -82,11 +82,11 @@ define cinder::backend::eqlx (
|
||||
}
|
||||
|
||||
if $eqlx_chap_login == 'chapadmin' {
|
||||
warning('The OpenStack default value of eqlx_chap_login differs from the puppet module default of "chapadmin" and may change in later versions of the module.')
|
||||
warning('The OpenStack default value of eqlx_chap_login differs from the puppet module default of "chapadmin" and will be changed to the upstream OpenStack default in N-release.')
|
||||
}
|
||||
|
||||
if $eqlx_chap_password == '12345' {
|
||||
warning('The OpenStack default value of eqlx_chap_password differs from the puppet module default of "12345" and may change in later versions of the module.')
|
||||
warning('The OpenStack default value of eqlx_chap_password differs from the puppet module default of "12345" and will be changed to the upstream OpenStack default in N-release.')
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,5 +1,3 @@
|
||||
# == Define: cinder::backend::hp3par_iscsi
|
||||
#
|
||||
# Configures Cinder volume HP 3par ISCSI driver.
|
||||
# Parameters are particular to each volume driver.
|
||||
#
|
||||
|
@ -70,11 +70,11 @@ define cinder::backend::vmdk (
|
||||
) {
|
||||
|
||||
if $volume_folder == 'cinder-volumes' {
|
||||
warning('The OpenStack default value of volume_folder differs from the puppet module default of "cinder-volumes" and may change in later versions of the module.')
|
||||
warning('The OpenStack default value of volume_folder differs from the puppet module default of "cinder-volumes" and will be changed to the upstream OpenStack default in N-release.')
|
||||
}
|
||||
|
||||
if $task_poll_interval == 5 {
|
||||
warning('The OpenStack default value of task_poll_interval differs from the puppet module default of "5" and may change in later versions of the module.')
|
||||
warning('The OpenStack default value of task_poll_interval differs from the puppet module default of "5" and will be changed to the upstream OpenStack default in N-release.')
|
||||
}
|
||||
|
||||
cinder_config {
|
||||
|
@ -17,17 +17,10 @@
|
||||
# Author: Andrew Woodward <awoodward@mirantis.com>
|
||||
class cinder::backends (
|
||||
$enabled_backends = undef,
|
||||
# DEPRECATED
|
||||
$default_volume_type = false
|
||||
){
|
||||
) {
|
||||
|
||||
# Maybe this could be extented to dynamicly find the enabled names
|
||||
cinder_config {
|
||||
'DEFAULT/enabled_backends': value => join($enabled_backends, ',');
|
||||
}
|
||||
|
||||
if $default_volume_type {
|
||||
fail('The default_volume_type parameter is deprecated in this class, you should declare it in cinder::api.')
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -71,7 +71,7 @@ class cinder::backup::swift (
|
||||
) {
|
||||
|
||||
if ($backup_swift_container == 'volumes_backup') {
|
||||
warning('WARNING: The default backup_swift_container value in puppet differs from the OpenStack default and may change in future releases')
|
||||
warning('The OpenStack default value of backup_swift_container differs from the puppet module default of "volumes_backup" and will be changed to the upstream OpenStack default in N-release.')
|
||||
}
|
||||
|
||||
cinder_config {
|
||||
|
@ -47,7 +47,7 @@ class cinder::db::mysql (
|
||||
validate_string($password)
|
||||
|
||||
if $cluster_id != 'localzone' {
|
||||
warning('The cluster_id parameter is deprecated and has no affect. It will be removed in the next release')
|
||||
warning('The cluster_id parameter is deprecated and has no affect. It will be completely removed from puppet-cinder in the N-release')
|
||||
}
|
||||
|
||||
::openstacklib::db::mysql { 'cinder':
|
||||
|
@ -372,7 +372,7 @@ class cinder (
|
||||
}
|
||||
|
||||
if $rpc_backend == 'cinder.openstack.common.rpc.impl_qpid' or $rpc_backend == 'qpid' {
|
||||
warning('Qpid driver is removed from Oslo.messaging in the Mitaka release')
|
||||
warning('Qpid driver is removed from Oslo.messaging in the Mitaka release and puppet-cinder no longer attempts to configure it. All qpid related parameters will be removed from puppet-cinder in the N-release.')
|
||||
}
|
||||
|
||||
if ! $default_availability_zone {
|
||||
|
@ -112,51 +112,6 @@
|
||||
# (optional) The v2 endpoint's admin url. (Defaults to 'http://127.0.0.1:8776/v2/%(tenant_id)s')
|
||||
# This url should *not* contain any trailing '/'.
|
||||
#
|
||||
# [*volume_version*]
|
||||
# (optional) DEPRECATED: Use public_url, internal_url and admin_url instead.
|
||||
# Cinder API version. (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.
|
||||
# Port for endpoint. (Defaults to 8776)
|
||||
# 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.
|
||||
#
|
||||
# [*internal_protocol*]
|
||||
# (optional) DEPRECATED: Use internal_url and internal_url_v2 instead.
|
||||
# Protocol for internal endpoint. (Defaults to 'http')
|
||||
# Setting this parameter overrides internal_url and internal_url_v2 parameter.
|
||||
#
|
||||
# [*admin_protocol*]
|
||||
# (optional) DEPRECATED: Use admin_url and admin_url_v2 instead.
|
||||
# Protocol for admin endpoint. (Defaults to 'http')
|
||||
# Setting this parameter overrides admin_url and admin_url_v2 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 and public_url_v2 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 and internal_url_v2 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 and admin_url_v2 parameter.
|
||||
#
|
||||
# === Deprecation notes
|
||||
#
|
||||
# If any value is provided for public_protocol, public_address or public_port parameters,
|
||||
# public_url will be completely ignored. The same applies for internal and admin parameters.
|
||||
#
|
||||
# === Examples
|
||||
#
|
||||
# class { 'cinder::keystone::auth':
|
||||
@ -194,48 +149,8 @@ class cinder::keystone::auth (
|
||||
$service_description_v2 = 'Cinder Service v2',
|
||||
$region = 'RegionOne',
|
||||
# DEPRECATED PARAMETERS
|
||||
$port = undef,
|
||||
$volume_version = undef,
|
||||
$public_address = undef,
|
||||
$admin_address = undef,
|
||||
$internal_address = undef,
|
||||
$public_protocol = undef,
|
||||
$admin_protocol = undef,
|
||||
$internal_protocol = undef
|
||||
) {
|
||||
|
||||
if $volume_version {
|
||||
warning('The volume_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.')
|
||||
}
|
||||
|
||||
$real_service_name = pick($service_name, $auth_name)
|
||||
$real_service_name_v2 = pick($service_name_v2, $auth_name_v2)
|
||||
|
||||
@ -243,63 +158,6 @@ class cinder::keystone::auth (
|
||||
fail('cinder::keystone::auth parameters service_name and service_name_v2 must be different.')
|
||||
}
|
||||
|
||||
if ($public_protocol or $public_address or $port or $volume_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, '8776'),
|
||||
pick($volume_version, 'v1'))
|
||||
} else {
|
||||
$public_url_real = $public_url
|
||||
}
|
||||
|
||||
if ($internal_protocol or $internal_address or $port or $volume_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, '8776'),
|
||||
pick($volume_version, 'v1'))
|
||||
} else {
|
||||
$internal_url_real = $internal_url
|
||||
}
|
||||
|
||||
if ($admin_protocol or $admin_address or $port or $volume_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, '8776'),
|
||||
pick($volume_version, 'v1'))
|
||||
} else {
|
||||
$admin_url_real = $admin_url
|
||||
}
|
||||
|
||||
if ($public_protocol or $public_address or $port) {
|
||||
$public_url_v2_real = sprintf('%s://%s:%s/v2/%%(tenant_id)s',
|
||||
pick($public_protocol, 'http'),
|
||||
pick($public_address, '127.0.0.1'),
|
||||
pick($port, '8776'))
|
||||
} else {
|
||||
$public_url_v2_real = $public_url_v2
|
||||
}
|
||||
|
||||
if ($internal_protocol or $internal_address or $port) {
|
||||
$internal_url_v2_real = sprintf('%s://%s:%s/v2/%%(tenant_id)s',
|
||||
pick($internal_protocol, 'http'),
|
||||
pick($internal_address, '127.0.0.1'),
|
||||
pick($port, '8776'))
|
||||
} else {
|
||||
$internal_url_v2_real = $internal_url_v2
|
||||
}
|
||||
|
||||
if ($admin_protocol or $admin_address or $port) {
|
||||
$admin_url_v2_real = sprintf('%s://%s:%s/v2/%%(tenant_id)s',
|
||||
pick($admin_protocol, 'http'),
|
||||
pick($admin_address, '127.0.0.1'),
|
||||
pick($port, '8776'))
|
||||
} else {
|
||||
$admin_url_v2_real = $admin_url_v2
|
||||
}
|
||||
|
||||
keystone::resource::service_identity { 'cinder':
|
||||
configure_user => $configure_user,
|
||||
configure_user_role => $configure_user_role,
|
||||
@ -312,9 +170,9 @@ class cinder::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,
|
||||
}
|
||||
|
||||
keystone::resource::service_identity { 'cinderv2':
|
||||
@ -329,9 +187,9 @@ class cinder::keystone::auth (
|
||||
password => $password_user_v2,
|
||||
email => $email_user_v2,
|
||||
tenant => $tenant_user_v2,
|
||||
public_url => $public_url_v2_real,
|
||||
admin_url => $admin_url_v2_real,
|
||||
internal_url => $internal_url_v2_real,
|
||||
public_url => $public_url_v2,
|
||||
admin_url => $admin_url_v2,
|
||||
internal_url => $internal_url_v2,
|
||||
}
|
||||
|
||||
if $configure_user_role {
|
||||
|
@ -32,5 +32,5 @@ class cinder::qpid (
|
||||
$realm = undef
|
||||
) {
|
||||
|
||||
warning('Qpid driver is removed from Oslo.messaging in the Mitaka release')
|
||||
warning('Qpid driver is removed from Oslo.messaging in the Mitaka release and puppet-cinder no longer attempts to configure it. This class will be completely removed from puppet-cinder in the N-release.')
|
||||
}
|
||||
|
@ -22,41 +22,30 @@
|
||||
# (optional) The virtual host to use when connecting to Rabbit
|
||||
# Defaults to '/'
|
||||
#
|
||||
# [*enabled*]
|
||||
# (optional) Deprecated. Whether to enable the Rabbit resources
|
||||
# This parameter keeps backward compatibility when we used to manage
|
||||
# RabbitMQ service.
|
||||
# Defaults to true
|
||||
#
|
||||
class cinder::rabbitmq(
|
||||
$userid = 'guest',
|
||||
$password = 'guest',
|
||||
$virtual_host = '/',
|
||||
# DEPRECATED PARAMETER
|
||||
$port = '5672',
|
||||
$enabled = true,
|
||||
) {
|
||||
|
||||
if ($enabled) {
|
||||
if $userid == 'guest' {
|
||||
$delete_guest_user = false
|
||||
} else {
|
||||
$delete_guest_user = true
|
||||
rabbitmq_user { $userid:
|
||||
admin => true,
|
||||
password => $password,
|
||||
provider => 'rabbitmqctl',
|
||||
}
|
||||
# I need to figure out the appropriate permissions
|
||||
rabbitmq_user_permissions { "${userid}@${virtual_host}":
|
||||
configure_permission => '.*',
|
||||
write_permission => '.*',
|
||||
read_permission => '.*',
|
||||
provider => 'rabbitmqctl',
|
||||
}->Anchor<| title == 'cinder-start' |>
|
||||
}
|
||||
rabbitmq_vhost { $virtual_host:
|
||||
if $userid == 'guest' {
|
||||
$delete_guest_user = false
|
||||
} else {
|
||||
$delete_guest_user = true
|
||||
rabbitmq_user { $userid:
|
||||
admin => true,
|
||||
password => $password,
|
||||
provider => 'rabbitmqctl',
|
||||
}
|
||||
# I need to figure out the appropriate permissions
|
||||
rabbitmq_user_permissions { "${userid}@${virtual_host}":
|
||||
configure_permission => '.*',
|
||||
write_permission => '.*',
|
||||
read_permission => '.*',
|
||||
provider => 'rabbitmqctl',
|
||||
}->Anchor<| title == 'cinder-start' |>
|
||||
}
|
||||
rabbitmq_vhost { $virtual_host:
|
||||
provider => 'rabbitmqctl',
|
||||
}
|
||||
}
|
||||
|
@ -40,7 +40,6 @@ describe 'cinder::backends' do
|
||||
before :each do
|
||||
params.merge!(
|
||||
:enabled_backends => ['lowcost', 'regular', 'premium'],
|
||||
:default_volume_type => false
|
||||
)
|
||||
end
|
||||
|
||||
@ -48,18 +47,6 @@ describe 'cinder::backends' do
|
||||
is_expected.to contain_cinder_config('DEFAULT/enabled_backends').with_value(p[:enabled_backends].join(','))
|
||||
end
|
||||
end
|
||||
|
||||
context 'configure cinder with a default volume type' do
|
||||
before :each do
|
||||
params.merge!(
|
||||
:enabled_backends => ['foo', 'bar'],
|
||||
:default_volume_type => 'regular'
|
||||
)
|
||||
end
|
||||
|
||||
it_raises 'a Puppet::Error', /The default_volume_type parameter is deprecated in this class, you should declare it in cinder::api./
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
on_supported_os({
|
||||
|
@ -77,39 +77,6 @@ describe 'cinder::keystone::auth' do
|
||||
end
|
||||
end
|
||||
|
||||
context 'with deprecated parameters' do
|
||||
before do
|
||||
params.merge!({
|
||||
:public_address => '10.0.42.1',
|
||||
:admin_address => '10.0.42.2',
|
||||
:internal_address => '10.0.42.3',
|
||||
:region => 'RegionThree',
|
||||
:port => '4242',
|
||||
:admin_protocol => 'https',
|
||||
:internal_protocol => 'https',
|
||||
:public_protocol => 'https',
|
||||
:volume_version => 'v42'
|
||||
})
|
||||
end
|
||||
|
||||
it 'configures keystone endpoints' do
|
||||
is_expected.to contain_keystone_endpoint('RegionThree/cinder::volume').with(
|
||||
:ensure => 'present',
|
||||
:public_url => 'https://10.0.42.1:4242/v42/%(tenant_id)s',
|
||||
:admin_url => 'https://10.0.42.2:4242/v42/%(tenant_id)s',
|
||||
:internal_url => 'https://10.0.42.3:4242/v42/%(tenant_id)s'
|
||||
)
|
||||
|
||||
is_expected.to contain_keystone_endpoint('RegionThree/cinderv2::volumev2').with(
|
||||
:ensure => 'present',
|
||||
:public_url => 'https://10.0.42.1:4242/v2/%(tenant_id)s',
|
||||
:admin_url => 'https://10.0.42.2:4242/v2/%(tenant_id)s',
|
||||
:internal_url => 'https://10.0.42.3:4242/v2/%(tenant_id)s'
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
describe 'when endpoint is_expected.to not be configured' do
|
||||
before do
|
||||
params.merge!(
|
||||
|
@ -3,7 +3,7 @@ require 'spec_helper'
|
||||
describe 'cinder::rabbitmq' do
|
||||
|
||||
let :facts do
|
||||
{ :puppetversion => '2.7',
|
||||
{
|
||||
:osfamily => 'Debian',
|
||||
}
|
||||
end
|
||||
@ -47,22 +47,4 @@ describe 'cinder::rabbitmq' do
|
||||
|
||||
end
|
||||
|
||||
describe 'when disabled' do
|
||||
let :params do
|
||||
{
|
||||
:userid => 'dan',
|
||||
:password => 'pass',
|
||||
:enabled => false
|
||||
}
|
||||
end
|
||||
|
||||
it 'should be disabled' do
|
||||
|
||||
is_expected.to_not contain_rabbitmq_user('dan')
|
||||
is_expected.to_not contain_rabbitmq_user_permissions('dan@/')
|
||||
is_expected.to_not contain_rabbitmq_vhost('/')
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user