Merge "Remove deprecated params and drivers"

This commit is contained in:
Zuul 2019-09-10 12:58:57 +00:00 committed by Gerrit Code Review
commit d004949ac8
16 changed files with 54 additions and 651 deletions

View File

@ -124,40 +124,6 @@
# Example of valid value: castellan.key_manager.barbican_key_manager.BarbicanKeyManager # Example of valid value: castellan.key_manager.barbican_key_manager.BarbicanKeyManager
# Defaults to 'cinder.keymgr.conf_key_mgr.ConfKeyManager'. # Defaults to 'cinder.keymgr.conf_key_mgr.ConfKeyManager'.
# #
# DEPRECATED PARAMETERS
#
# [*keymgr_api_class*]
# (optional) Deprecated. Key Manager service class.
# Example of valid value: castellan.key_manager.barbican_key_manager.BarbicanKeyManager
# Defaults to undef.
#
# [*nova_catalog_info*]
# (optional) Match this value when searching for nova in the service
# catalog.
# Defaults to undef.
#
# [*os_privileged_user_name*]
# (optional) OpenStack privileged account username. Used for requests to
# other services (such as Nova) that require an account with
# special rights.
# Defaults to undef.
#
# [*os_privileged_user_password*]
# (optional) Password associated with the OpenStack privileged account.
# Defaults to undef.
#
# [*os_privileged_user_tenant*]
# (optional) Tenant name associated with the OpenStack privileged account.
# Defaults to undef.
#
# [*os_privileged_user_auth_url*]
# (optional) Auth URL associated with the OpenStack privileged account.
# Defaults to undef.
#
# [*privileged_user*]
# (optional) Enables OpenStack privileged account.
# Defaults to undef.
#
class cinder::api ( class cinder::api (
$os_region_name = $::os_service_default, $os_region_name = $::os_service_default,
$keymgr_encryption_api_url = $::os_service_default, $keymgr_encryption_api_url = $::os_service_default,
@ -186,14 +152,6 @@ class cinder::api (
$auth_strategy = 'keystone', $auth_strategy = 'keystone',
$osapi_volume_listen_port = $::os_service_default, $osapi_volume_listen_port = $::os_service_default,
$keymgr_backend = 'cinder.keymgr.conf_key_mgr.ConfKeyManager', $keymgr_backend = 'cinder.keymgr.conf_key_mgr.ConfKeyManager',
# DEPRECATED PARAMETERS
$keymgr_api_class = undef,
$nova_catalog_info = undef,
$os_privileged_user_name = undef,
$os_privileged_user_password = undef,
$os_privileged_user_tenant = undef,
$os_privileged_user_auth_url = undef,
$privileged_user = undef,
) inherits cinder::params { ) inherits cinder::params {
include ::cinder::deps include ::cinder::deps
@ -203,21 +161,6 @@ class cinder::api (
validate_legacy(Boolean, 'validate_bool', $manage_service) validate_legacy(Boolean, 'validate_bool', $manage_service)
validate_legacy(Boolean, 'validate_bool', $enabled) validate_legacy(Boolean, 'validate_bool', $enabled)
$deprecated_param_names = [
'nova_catalog_info',
'privileged_user',
'os_privileged_user_name',
'os_privileged_user_password',
'os_privileged_user_tenant',
'os_privileged_user_auth_url',
]
$deprecated_param_names.each |$param_name| {
$param = getvar($param_name)
if $param != undef{
warning("The ${param_name} parameter is deprecated, has no effect and will be removed in the future release.")
}
}
if $use_ssl { if $use_ssl {
if is_service_default($cert_file) { if is_service_default($cert_file) {
fail('The cert_file parameter is required when use_ssl is set to true') fail('The cert_file parameter is required when use_ssl is set to true')
@ -227,13 +170,6 @@ class cinder::api (
} }
} }
if $keymgr_api_class {
warning('The keymgr_api_class parameter is deprecated, use keymgr_backend')
$keymgr_backend_real = $keymgr_api_class
} else {
$keymgr_backend_real = $keymgr_backend
}
if $::cinder::params::api_package { if $::cinder::params::api_package {
package { 'cinder-api': package { 'cinder-api':
ensure => $package_ensure, ensure => $package_ensure,
@ -300,7 +236,7 @@ running as a standalone service, or httpd for being run by a httpd server")
} }
cinder_config { cinder_config {
'key_manager/backend': value => $keymgr_backend_real; 'key_manager/backend': value => $keymgr_backend;
'barbican/barbican_endpoint': value => $keymgr_encryption_api_url; 'barbican/barbican_endpoint': value => $keymgr_encryption_api_url;
'barbican/auth_endpoint': value => $keymgr_encryption_auth_url; 'barbican/auth_endpoint': value => $keymgr_encryption_auth_url;
} }

View File

@ -1,200 +0,0 @@
#
# Define: cinder::backend::bdd
#
# This class activate Cinder Block Device driver backend
#
# === Parameters:
#
# [*available_devices*]
# (Required) List of all available devices. Real hard disks.
# Should be a string.
#
# [*target_ip_address*]
# (optional) The IP address that the iSCSI daemon is listening on.
# If not set, the iscsi_ip_address must be specified. The target_ip_address
# will be required once the deprecated iscsi_ip_address parameter is
# removed in a future release.
# Defaults to undef.
#
# [*volume_backend_name*]
# (optional) Allows for the volume_backend_name to be separate of $name.
# Defaults to: $name
#
# [*backend_availability_zone*]
# (Optional) Availability zone for this volume backend.
# If not set, the storage_availability_zone option value
# is used as the default for all backends.
# Defaults to $::os_service_default.
#
# [*volume_driver*]
# (Optional) Driver to use for volume creation
# Defaults to 'cinder.volume.drivers.block_device.BlockDeviceDriver'.
#
# [*volume_group*]
# (Optional) Name for the VG that will contain exported volumes
# Defaults to $::os_service_default
#
# [*volumes_dir*]
# (Optional) Volume configuration file storage directory
# Defaults to '/var/lib/cinder/volumes'.
#
# [*target_helper*]
# (Optional) iSCSI target user-land tool to use.
# Defaults to tgtadm.
#
# [*target_protocol*]
# (Optional) Protocol to use as iSCSI driver
# Defaults to $::os_service_default.
#
# [*volume_clear*]
# (Optional) Method used to wipe old volumes
# Defaults to $::os_service_default.
#
# [*manage_volume_type*]
# (Optional) Whether or not manage Cinder Volume type.
# If set to true, a Cinder Volume type will be created
# with volume_backend_name=$volume_backend_name key/value.
# Defaults to false.
#
# [*extra_options*]
# (optional) Hash of extra options to pass to the backend
# Defaults to: {}
# Example :
# { 'bdd_backend/param1' => { 'value' => value1 } }
#
# === Examples
#
# cinder::backend::bdd { 'myBDDbackend':
# iscsi_ip_address => '10.20.0.2',
# available_devices => '/dev/sda,/dev/sdb'
# }
#
# DEPRECATED PARAMETERS
#
# [*iscsi_ip_address*]
# (Optional) The IP address that the iSCSI daemon is listening on
# Defaults to undef.
#
# [*iscsi_helper*]
# (Optional) iSCSI target user-land tool to use.
# Defaults to undef.
#
# [*iscsi_protocol*]
# (Optional) Protocol to use as iSCSI driver
# Defaults to undef.
#
# === Authors
#
# Denis Egorenko <degorenko@mirantis.com>
#
define cinder::backend::bdd (
$available_devices,
$target_ip_address = undef,
$volume_backend_name = $name,
$backend_availability_zone = $::os_service_default,
$volume_driver = 'cinder.volume.drivers.block_device.BlockDeviceDriver',
$volume_group = $::os_service_default,
$volumes_dir = '/var/lib/cinder/volumes',
$target_helper = 'tgtadm',
$target_protocol = $::os_service_default,
$volume_clear = $::os_service_default,
$manage_volume_type = false,
$extra_options = {},
# DEPRECATED PARAMETERS
$iscsi_ip_address = undef,
$iscsi_helper = undef,
$iscsi_protocol = undef,
) {
include ::cinder::deps
include ::cinder::params
if ($volume_driver == 'cinder.volume.drivers.block_device.BlockDeviceDriver') {
warning('Cinder block device driver is deprecated. Please use LVM backend')
}
if $target_ip_address or $iscsi_ip_address {
if $iscsi_ip_address {
warning('The iscsi_ip_address parameter is deprecated, use target_ip_address instead.')
}
$target_ip_address_real = pick($target_ip_address, $iscsi_ip_address)
} else {
fail('A target_ip_address or iscsi_ip_address must be specified.')
}
if $iscsi_helper {
warning('The iscsi_helper parameter is deprecated, use target_helper instead.')
$target_helper_real = $iscsi_helper
} else {
$target_helper_real = $target_helper
}
if $iscsi_protocol {
warning('The iscsi_protocol parameter is deprecated, use target_protocol instead.')
$target_protocol_real = $iscsi_protocol
} else {
$target_protocol_real = $target_protocol
}
cinder_config {
"${name}/available_devices": value => $available_devices;
"${name}/volume_backend_name": value => $volume_backend_name;
"${name}/backend_availability_zone": value => $backend_availability_zone;
"${name}/volume_driver": value => $volume_driver;
"${name}/target_ip_address": value => $target_ip_address_real;
"${name}/target_helper": value => $target_helper_real;
"${name}/volume_group": value => $volume_group;
"${name}/volumes_dir": value => $volumes_dir;
"${name}/target_protocol": value => $target_protocol_real;
"${name}/volume_clear": value => $volume_clear;
}
if $manage_volume_type {
cinder_type { $volume_backend_name:
ensure => present,
properties => ["volume_backend_name=${volume_backend_name}"],
}
}
create_resources('cinder_config', $extra_options)
case $target_helper_real {
'tgtadm': {
ensure_packages('tgt', {
ensure => present,
name => $::cinder::params::tgt_package_name,
tag => 'cinder-support-package'})
ensure_resource('service', 'tgtd', {
ensure => running,
name => $::cinder::params::tgt_service_name,
tag => 'cinder-support-service'})
if($::osfamily == 'RedHat') {
ensure_resource('file_line', 'cinder include', {
path => '/etc/tgt/targets.conf',
line => "include ${volumes_dir}/*",
match => '#?include /',
require => Anchor['cinder::install::end'],
notify => Anchor['cinder::service::begin']})
}
}
'lioadm': {
ensure_packages('targetcli', {
ensure => present,
name => $::cinder::params::lio_package_name,
tag => 'cinder-support-package'})
ensure_resource('service', 'target', {
ensure => running,
enable => true,
tag => 'cinder-support-service'})
}
default: {
fail("Unsupported target helper: ${target_helper_real}.")
}
}
}

View File

@ -18,9 +18,6 @@
# #
# [*target_ip_address*] # [*target_ip_address*]
# (optional) The IP address that the iSCSI daemon is listening on. # (optional) The IP address that the iSCSI daemon is listening on.
# If not set, the iscsi_ip_address must be specified. The target_ip_address
# will be required once the deprecated iscsi_ip_address parameter is
# removed in a future release.
# Defaults to undef. # Defaults to undef.
# #
# [*volume_backend_name*] # [*volume_backend_name*]
@ -90,19 +87,6 @@
# (Optional) Enables multipath configuration. # (Optional) Enables multipath configuration.
# Defaults to true. # Defaults to true.
# #
# DEPRECATED PARAMETERS
# [*excluded_domain_ip*]
# (optional) Domain IP to be excluded from iSCSI returns of Storage Center.
# Defaults to undef.
#
# [*iscsi_ip_address*]
# (Optional) The IP address that the iSCSI daemon is listening on
# Defaults to undef.
#
# [*iscsi_port*]
# (Optional) iSCSI target user-land tool to use.
# Defaults to undef.
#
define cinder::backend::dellsc_iscsi ( define cinder::backend::dellsc_iscsi (
$san_ip, $san_ip,
$san_login, $san_login,
@ -124,10 +108,6 @@ define cinder::backend::dellsc_iscsi (
$manage_volume_type = false, $manage_volume_type = false,
$use_multipath_for_image_xfer = true, $use_multipath_for_image_xfer = true,
$extra_options = {}, $extra_options = {},
# DEPRECATED PARAMETERS
$excluded_domain_ip = undef,
$iscsi_ip_address = undef,
$iscsi_port = undef,
) { ) {
include ::cinder::deps include ::cinder::deps
@ -142,22 +122,6 @@ default of \"srv\" and will be changed to the upstream OpenStack default in N-re
default of \"vol\" and will be changed to the upstream OpenStack default in N-release.") default of \"vol\" and will be changed to the upstream OpenStack default in N-release.")
} }
if $target_ip_address or $iscsi_ip_address {
if $iscsi_ip_address {
warning('The iscsi_ip_address parameter is deprecated, use target_ip_address instead.')
}
$target_ip_address_real = pick($target_ip_address, $iscsi_ip_address)
} else {
fail('A target_ip_address or iscsi_ip_address must be specified.')
}
if $iscsi_port {
warning('The iscsi_port parameter is deprecated, use target_port instead.')
$target_port_real = $iscsi_port
} else {
$target_port_real = $target_port
}
$driver = 'dell_emc.sc.storagecenter_iscsi.SCISCSIDriver' $driver = 'dell_emc.sc.storagecenter_iscsi.SCISCSIDriver'
cinder_config { cinder_config {
"${name}/volume_backend_name": value => $volume_backend_name; "${name}/volume_backend_name": value => $volume_backend_name;
@ -166,13 +130,13 @@ default of \"vol\" and will be changed to the upstream OpenStack default in N-re
"${name}/san_ip": value => $san_ip; "${name}/san_ip": value => $san_ip;
"${name}/san_login": value => $san_login; "${name}/san_login": value => $san_login;
"${name}/san_password": value => $san_password, secret => true; "${name}/san_password": value => $san_password, secret => true;
"${name}/target_ip_address": value => $target_ip_address_real; "${name}/target_ip_address": value => $target_ip_address;
"${name}/dell_sc_ssn": value => $dell_sc_ssn; "${name}/dell_sc_ssn": value => $dell_sc_ssn;
"${name}/dell_sc_api_port": value => $dell_sc_api_port; "${name}/dell_sc_api_port": value => $dell_sc_api_port;
"${name}/dell_sc_server_folder": value => $dell_sc_server_folder; "${name}/dell_sc_server_folder": value => $dell_sc_server_folder;
"${name}/dell_sc_verify_cert": value => $dell_sc_verify_cert; "${name}/dell_sc_verify_cert": value => $dell_sc_verify_cert;
"${name}/dell_sc_volume_folder": value => $dell_sc_volume_folder; "${name}/dell_sc_volume_folder": value => $dell_sc_volume_folder;
"${name}/target_port": value => $target_port_real; "${name}/target_port": value => $target_port;
"${name}/excluded_domain_ips": value => $excluded_domain_ips; "${name}/excluded_domain_ips": value => $excluded_domain_ips;
"${name}/secondary_san_ip": value => $secondary_san_ip; "${name}/secondary_san_ip": value => $secondary_san_ip;
"${name}/secondary_san_login": value => $secondary_san_login; "${name}/secondary_san_login": value => $secondary_san_login;
@ -181,11 +145,9 @@ default of \"vol\" and will be changed to the upstream OpenStack default in N-re
"${name}/use_multipath_for_image_xfer": value => $use_multipath_for_image_xfer; "${name}/use_multipath_for_image_xfer": value => $use_multipath_for_image_xfer;
} }
if $excluded_domain_ip { # TODO(tobias-urdin): Remove this in U release.
warning('The excluded_domain_ip is deprecated. Please use excluded_domain_ips instead.') cinder_config {
cinder_config { "${name}/excluded_domain_ip": ensure => absent;
"${name}/excluded_domain_ip": value => $excluded_domain_ip;
}
} }
if $manage_volume_type { if $manage_volume_type {

View File

@ -79,11 +79,6 @@
# with volume_backend_name=$volume_backend_name key/value. # with volume_backend_name=$volume_backend_name key/value.
# Defaults to false. # Defaults to false.
# #
# DEPRECATED PARAMETERS
#
# [*storage_vnx_pool_name*]
# (required) Storage pool name.
#
define cinder::backend::emc_vnx ( define cinder::backend::emc_vnx (
$san_ip, $san_ip,
$san_password, $san_password,
@ -102,18 +97,11 @@ define cinder::backend::emc_vnx (
$storage_vnx_security_file_dir = $::os_service_default, $storage_vnx_security_file_dir = $::os_service_default,
$naviseccli_path = $::os_service_default, $naviseccli_path = $::os_service_default,
$manage_volume_type = false, $manage_volume_type = false,
# DEPRECATED PARAMETERS
$storage_vnx_pool_name = undef,
) { ) {
include ::cinder::deps include ::cinder::deps
include ::cinder::params include ::cinder::params
if $storage_vnx_pool_name {
warning('The storage_vnx_pool_name parameter is deprecated. Please use storage_vnx_pool_names instead.')
}
$storage_vnx_pool_names_real = pick($storage_vnx_pool_name, $storage_vnx_pool_names)
cinder_config { cinder_config {
"${name}/default_timeout": value => $default_timeout; "${name}/default_timeout": value => $default_timeout;
"${name}/max_luns_per_storage_group": value => $max_luns_per_storage_group; "${name}/max_luns_per_storage_group": value => $max_luns_per_storage_group;
@ -121,7 +109,7 @@ define cinder::backend::emc_vnx (
"${name}/san_ip": value => $san_ip; "${name}/san_ip": value => $san_ip;
"${name}/san_login": value => $san_login; "${name}/san_login": value => $san_login;
"${name}/san_password": value => $san_password, secret => true; "${name}/san_password": value => $san_password, secret => true;
"${name}/storage_vnx_pool_names": value => $storage_vnx_pool_names_real; "${name}/storage_vnx_pool_names": value => $storage_vnx_pool_names;
"${name}/volume_backend_name": value => $volume_backend_name; "${name}/volume_backend_name": value => $volume_backend_name;
"${name}/backend_availability_zone": value => $backend_availability_zone; "${name}/backend_availability_zone": value => $backend_availability_zone;
"${name}/volume_driver": value => $volume_driver; "${name}/volume_driver": value => $volume_driver;

View File

@ -5,9 +5,6 @@
# #
# [*target_ip_address*] # [*target_ip_address*]
# (optional) The IP address that the iSCSI daemon is listening on. # (optional) The IP address that the iSCSI daemon is listening on.
# If not set, the iscsi_ip_address must be specified. The target_ip_address
# will be required once the deprecated iscsi_ip_address parameter is
# removed in a future release.
# Defaults to undef. # Defaults to undef.
# #
# [*volume_backend_name*] # [*volume_backend_name*]
@ -52,20 +49,6 @@
# Example : # Example :
# { 'iscsi_backend/param1' => { 'value' => value1 } } # { 'iscsi_backend/param1' => { 'value' => value1 } }
# #
# DEPRECATED PARAMETERS
#
# [*iscsi_ip_address*]
# (Optional) The IP address that the iSCSI daemon is listening on
# Defaults to undef.
#
# [*iscsi_helper*]
# (Optional) iSCSI target user-land tool to use.
# Defaults to undef.
#
# [*iscsi_protocol*]
# (Optional) Protocol to use as iSCSI driver
# Defaults to undef.
#
define cinder::backend::iscsi ( define cinder::backend::iscsi (
$target_ip_address = undef, $target_ip_address = undef,
$volume_backend_name = $name, $volume_backend_name = $name,
@ -77,10 +60,6 @@ define cinder::backend::iscsi (
$target_protocol = $::os_service_default, $target_protocol = $::os_service_default,
$manage_volume_type = false, $manage_volume_type = false,
$extra_options = {}, $extra_options = {},
# DEPRECATED PARAMETERS
$iscsi_ip_address = undef,
$iscsi_helper = undef,
$iscsi_protocol = undef,
) { ) {
include ::cinder::deps include ::cinder::deps
@ -97,38 +76,15 @@ define cinder::backend::iscsi (
} }
} }
if $target_ip_address or $iscsi_ip_address {
if $iscsi_ip_address {
warning('The iscsi_ip_address parameter is deprecated, use target_ip_address instead.')
}
$target_ip_address_real = pick($target_ip_address, $iscsi_ip_address)
} else {
fail('A target_ip_address or iscsi_ip_address must be specified.')
}
if $iscsi_helper {
warning('The iscsi_helper parameter is deprecated, use target_helper instead.')
$target_helper_real = $iscsi_helper
} else {
$target_helper_real = $target_helper
}
if $iscsi_protocol {
warning('The iscsi_protocol parameter is deprecated, use target_protocol instead.')
$target_protocol_real = $iscsi_protocol
} else {
$target_protocol_real = $target_protocol
}
cinder_config { cinder_config {
"${name}/volume_backend_name": value => $volume_backend_name; "${name}/volume_backend_name": value => $volume_backend_name;
"${name}/backend_availability_zone": value => $backend_availability_zone; "${name}/backend_availability_zone": value => $backend_availability_zone;
"${name}/volume_driver": value => $volume_driver; "${name}/volume_driver": value => $volume_driver;
"${name}/target_ip_address": value => $target_ip_address_real; "${name}/target_ip_address": value => $target_ip_address;
"${name}/target_helper": value => $target_helper_real; "${name}/target_helper": value => $target_helper;
"${name}/volume_group": value => $volume_group; "${name}/volume_group": value => $volume_group;
"${name}/volumes_dir": value => $volumes_dir; "${name}/volumes_dir": value => $volumes_dir;
"${name}/target_protocol": value => $target_protocol_real; "${name}/target_protocol": value => $target_protocol;
} }
if $manage_volume_type { if $manage_volume_type {
@ -140,7 +96,7 @@ define cinder::backend::iscsi (
create_resources('cinder_config', $extra_options) create_resources('cinder_config', $extra_options)
case $target_helper_real { case $target_helper {
'tgtadm': { 'tgtadm': {
package { 'tgt': package { 'tgt':
ensure => present, ensure => present,
@ -181,7 +137,7 @@ define cinder::backend::iscsi (
} }
default: { default: {
fail("Unsupported target helper: ${target_helper_real}.") fail("Unsupported target helper: ${target_helper}.")
} }
} }

View File

@ -1,26 +1,21 @@
# == Class: cinder::ceilometer # == Class: cinder::ceilometer
# #
# Setup Cinder to enable ceilometer can retrieve volume samples # Setup Cinder to enable ceilometer can retrieve volume samples
# Ref: https://docs.openstack.org/ceilometer/latest/install/manual.html
# #
# === Parameters # === Parameters
# #
# [*notification_transport_url*] # [*notification_transport_url*]
# (optional) A URL representing the messaging driver to use for notifications # (Optional) A URL representing the messaging driver to use for notifications
# and its full configuration. Transport URLs take the form: # and its full configuration. Transport URLs take the form:
# transport://user:pass@host1:port[,hostN:portN]/virtual_host # transport://user:pass@host1:port[,hostN:portN]/virtual_host
# Defaults to $::os_service_default # Defaults to $::os_service_default
# #
# [*notification_driver*] # [*notification_driver*]
# (option) Driver or drivers to handle sending notifications. # (Option) Driver or drivers to handle sending notifications.
# The default value of 'messagingv2' is for enabling notifications via # Defaults to 'messagingv2'
# oslo.messaging. 'cinder.openstack.common.notifier.rpc_notifier' is the
# backwards compatible option that will be deprecated. Prior to Grizzly,
# 'cinder.openstack.common.notifier.rabbit_notifier' was used. oslo.messaging
# was adopted in icehouse/juno. See LP#1425713.
# #
# [*notification_topics*] # [*notification_topics*]
# (optional) AMQP topic used for OpenStack notifications # (Optional) AMQP topic used for OpenStack notifications
# Defaults to $::os_service_default # Defaults to $::os_service_default
# #
class cinder::ceilometer ( class cinder::ceilometer (

View File

@ -29,12 +29,6 @@
# (optional) http/https timeout value for glance operations. # (optional) http/https timeout value for glance operations.
# Defaults to $::os_service_default # Defaults to $::os_service_default
# #
# DEPRECATED PARAMETERS
#
# [*glance_api_version*]
# (optional) Glance API version.
# Defaults to undef.
#
# === Author(s) # === Author(s)
# #
# Emilien Macchi <emilien.macchi@enovance.com> # Emilien Macchi <emilien.macchi@enovance.com>
@ -61,16 +55,10 @@ class cinder::glance (
$glance_api_insecure = $::os_service_default, $glance_api_insecure = $::os_service_default,
$glance_api_ssl_compression = $::os_service_default, $glance_api_ssl_compression = $::os_service_default,
$glance_request_timeout = $::os_service_default, $glance_request_timeout = $::os_service_default,
# DEPRECATED PARAMETERS
$glance_api_version = undef,
) { ) {
include ::cinder::deps include ::cinder::deps
if $glance_api_version != undef {
warning('The glance_api_version parameter is deprecated, has no effect and will be removed in the future release.')
}
cinder_config { cinder_config {
'DEFAULT/glance_api_servers': value => join(any2array($glance_api_servers), ','); 'DEFAULT/glance_api_servers': value => join(any2array($glance_api_servers), ',');
'DEFAULT/glance_num_retries': value => $glance_num_retries; 'DEFAULT/glance_num_retries': value => $glance_num_retries;

View File

@ -161,40 +161,6 @@
# admin_url => 'https://10.0.0.30:8776/v3/%(tenant_id)s', # admin_url => 'https://10.0.0.30:8776/v3/%(tenant_id)s',
# } # }
# #
# DEPRECATED PARAMETERS
#
# [*configure_endpoint*]
# (Optional) Should Cinder v1 endpoint be configured?
# API v1 was removed in Queens.
# Defaults to undef
#
# [*public_url*]
# (Optional) The endpoint's public url. (Defaults to 'http://127.0.0.1:8776/v1/%(tenant_id)s')
# This url should *not* contain any trailing '/'.
# Defaults to undef
#
# [*internal_url*]
# (Optional) The endpoint's internal url.
# This url should *not* contain any trailing '/'.
# Defaults to undef
#
# [*admin_url*]
# (Optional) The endpoint's admin url.
# This url should *not* contain any trailing '/'.
# Defaults to undef
#
# [*service_name*]
# (Optional) Name of the service.
# Defaults to undef
#
# [*service_type*]
# (Optional) Type of service.
# Defaults to undef
#
# [*service_description*]
# (Optional) Description for keystone service.
# Defaults to undef
#
class cinder::keystone::auth ( class cinder::keystone::auth (
$password, $password,
$password_user_v2 = undef, $password_user_v2 = undef,
@ -232,34 +198,10 @@ class cinder::keystone::auth (
$service_description_v2 = 'Cinder Service v2', $service_description_v2 = 'Cinder Service v2',
$service_description_v3 = 'Cinder Service v3', $service_description_v3 = 'Cinder Service v3',
$region = 'RegionOne', $region = 'RegionOne',
# DEPRECATED PARAMETERS
$configure_endpoint = undef,
$public_url = undef,
$internal_url = undef,
$admin_url = undef,
$service_name = undef,
$service_type = undef,
$service_description = undef,
) { ) {
include ::cinder::deps include ::cinder::deps
$deprecated_param_names = [
'configure_endpoint',
'public_url',
'internal_url',
'admin_url',
'service_name',
'service_type',
'service_description',
]
$deprecated_param_names.each |$param_name| {
$param = getvar($param_name)
if $param != undef{
warning("The ${param_name} parameter is deprecated, has no effect and will be removed in the future release.")
}
}
if $configure_endpoint_v2 { if $configure_endpoint_v2 {
Keystone_endpoint["${region}/${service_name_v2}::${service_type_v2}"] -> Anchor['cinder::service::end'] Keystone_endpoint["${region}/${service_name_v2}::${service_type_v2}"] -> Anchor['cinder::service::end']
} }

View File

@ -24,6 +24,8 @@ define cinder::type (
include ::cinder::deps include ::cinder::deps
warning('The cinder::type is deprecated, please use the cinder_type resource.')
if ($set_value and $set_key) { if ($set_value and $set_key) {
if is_array($set_value) { if is_array($set_value) {
$value = join($set_value, ',') $value = join($set_value, ',')

View File

@ -24,6 +24,8 @@ define cinder::type_set (
include ::cinder::deps include ::cinder::deps
warning('The cinder::type_set class is deprecated, please use the cinder_type resource instead.')
cinder_type { $type: cinder_type { $type:
ensure => present, ensure => present,
properties => ["${key}=${value}"], properties => ["${key}=${value}"],

View File

@ -0,0 +1,34 @@
---
upgrade:
- |
The deprecated parameter cinder::api::keymgr_api_class is removed.
Please use the cinder::api::keymgr_backend parameter.
- |
The deprecated parameters nova_catalog_info, os_privileged_user_name,
os_privileged_user_password, os_privileged_user_tenant, os_privileged_user_auth_url
and privileged_user in cinder::api is removed.
- |
The deprecated cinder::backend::bdd block device driver is removed.
- |
The deprecated parameters excluded_domain_ip, iscsi_ip_address and iscsi_port in
cinder::backend::dellsc_iscsi is removed.
Please use the excluded_domain_ips, target_ip_address and target_port parameters.
- |
The deprecated parameter storage_vnx_pool_name in cinder::backend::emc_vnx is removed.
Please use the storage_vnx_pool_names parameter.
- |
The deprecated parameters iscsi_ip_address, iscsi_helper and iscsi_protocol in
cinder::backend::iscsi is removed. Please use target_ip_address, target_helper
and target_protocol.
- |
The deprecated parameter cinder::glance::glance_api_version is removed.
- |
The deprecated parameters configure_endpoint, public_url, internal_url, admin_url,
service_name, service_type and service_description in cinder::keystone::auth is removed.
These were used to configure Cinder V1 which is removed, see corresponding parameters
for Cinder V2 and Cinder V3.
deprecations:
- |
The cinder::type_set class is deprecated, please use the cinder_type resource.
- |
The cinder::type class is deprecated, please use the cinder_type resource.

View File

@ -30,8 +30,6 @@ describe 'cinder::api' do
is_expected.to contain_cinder_config('DEFAULT/osapi_volume_workers').with( is_expected.to contain_cinder_config('DEFAULT/osapi_volume_workers').with(
:value => '8' :value => '8'
) )
# nova_catalog_info has been deprecated
is_expected.not_to contain_cinder_config('DEFAULT/nova_catalog_info')
is_expected.to contain_cinder_config('DEFAULT/default_volume_type').with( is_expected.to contain_cinder_config('DEFAULT/default_volume_type').with(
:value => '<SERVICE DEFAULT>' :value => '<SERVICE DEFAULT>'
) )
@ -62,26 +60,6 @@ describe 'cinder::api' do
end end
end end
context 'with deprecated parameters' do
let :params do
req_params.merge({
'nova_catalog_info' => 'compute:nova:publicURL',
'os_privileged_user_name' => 'admin',
'os_privileged_user_password' => 'password',
'os_privileged_user_tenant' => 'admin',
'os_privileged_user_auth_url' => 'http://localhost:8080',
})
end
it 'should not add them to the config' do
is_expected.not_to contain_cinder_config('DEFAULT/nova_catalog_info')
is_expected.not_to contain_cinder_config('DEFAULT/os_privileged_user_name')
is_expected.not_to contain_cinder_config('DEFAULT/os_privileged_user_password')
is_expected.not_to contain_cinder_config('DEFAULT/os_privileged_user_tenant')
is_expected.not_to contain_cinder_config('DEFAULT/os_privileged_user_auth_url')
end
end
context 'with a custom region for nova' do context 'with a custom region for nova' do
let :params do let :params do
req_params.merge({'os_region_name' => 'MyRegion'}) req_params.merge({'os_region_name' => 'MyRegion'})
@ -293,17 +271,6 @@ describe 'cinder::api' do
end end
end end
context 'with barbican deprecated parameters' do
let :params do
req_params.merge!({
:keymgr_api_class => 'castellan.key_manager.barbican_key_manager.BarbicanKeyManager',
})
end
it 'should set keymgr parameter' do
is_expected.to contain_cinder_config('key_manager/backend').with_value('castellan.key_manager.barbican_key_manager.BarbicanKeyManager')
end
end
end end
on_supported_os({ on_supported_os({

View File

@ -22,7 +22,6 @@ require 'spec_helper'
describe 'cinder::glance' do describe 'cinder::glance' do
let :default_params do let :default_params do
{ {
:glance_api_version => '2',
:glance_num_retries => '<SERVICE DEFAULT>', :glance_num_retries => '<SERVICE DEFAULT>',
:glance_api_insecure => '<SERVICE DEFAULT>', :glance_api_insecure => '<SERVICE DEFAULT>',
:glance_api_ssl_compression => '<SERVICE DEFAULT>', :glance_api_ssl_compression => '<SERVICE DEFAULT>',
@ -40,8 +39,6 @@ describe 'cinder::glance' do
end end
it 'configures cinder.conf with default params' do it 'configures cinder.conf with default params' do
# glance_api_version is fully deprecated from cinder, and should not be added to the config.
is_expected.not_to contain_cinder_config('DEFAULT/glance_api_version')
is_expected.to contain_cinder_config('DEFAULT/glance_num_retries').with_value(p[:glance_num_retries]) is_expected.to contain_cinder_config('DEFAULT/glance_num_retries').with_value(p[:glance_num_retries])
is_expected.to contain_cinder_config('DEFAULT/glance_api_insecure').with_value(p[:glance_api_insecure]) is_expected.to contain_cinder_config('DEFAULT/glance_api_insecure').with_value(p[:glance_api_insecure])
is_expected.to contain_cinder_config('DEFAULT/glance_api_ssl_compression').with_value(p[:glance_api_ssl_compression]) is_expected.to contain_cinder_config('DEFAULT/glance_api_ssl_compression').with_value(p[:glance_api_ssl_compression])

View File

@ -1,127 +0,0 @@
require 'spec_helper'
describe 'cinder::backend::bdd' do
let(:title) { 'hippo' }
let :params do
{
:target_ip_address => '127.0.0.2',
:available_devices => '/dev/sda',
}
end
shared_examples 'cinder block device' do
context 'with default parameters' do
it {
is_expected.to contain_cinder_config('hippo/volume_backend_name').with_value('hippo')
is_expected.to contain_cinder_config('hippo/volume_driver').with_value('cinder.volume.drivers.block_device.BlockDeviceDriver')
is_expected.to contain_cinder_config('hippo/available_devices').with_value('/dev/sda')
is_expected.to contain_cinder_config('hippo/target_helper').with_value('tgtadm')
is_expected.to contain_cinder_config('hippo/volumes_dir').with_value('/var/lib/cinder/volumes')
is_expected.to contain_cinder_config('hippo/target_ip_address').with_value('127.0.0.2')
is_expected.to contain_cinder_config('hippo/volume_group').with_value('<SERVICE DEFAULT>')
is_expected.to contain_cinder_config('hippo/target_protocol').with_value('<SERVICE DEFAULT>')
is_expected.to contain_cinder_config('hippo/volume_clear').with_value('<SERVICE DEFAULT>')
is_expected.to contain_cinder_config('hippo/backend_availability_zone').with_value('<SERVICE DEFAULT>')
}
end
context 'with optional parameters' do
before :each do
params.merge!({
:target_ip_address => '10.20.0.2',
:available_devices => '/dev/sdb,/dev/sdc',
:volumes_dir => '/var/lib/cinder/bdd-volumes',
:volume_clear => 'zero',
:volume_group => 'cinder',
:target_helper => 'lioadm',
:manage_volume_type => true,
:backend_availability_zone => 'my_zone',
})
end
it {
is_expected.to contain_cinder_config('hippo/available_devices').with_value('/dev/sdb,/dev/sdc')
is_expected.to contain_cinder_config('hippo/volumes_dir').with_value('/var/lib/cinder/bdd-volumes')
is_expected.to contain_cinder_config('hippo/target_ip_address').with_value('10.20.0.2')
is_expected.to contain_cinder_config('hippo/target_helper').with_value('lioadm')
is_expected.to contain_cinder_config('hippo/volume_group').with_value('cinder')
is_expected.to contain_cinder_config('hippo/volume_clear').with_value('zero')
is_expected.to contain_cinder_config('hippo/backend_availability_zone').with_value('my_zone')
}
it { is_expected.to contain_cinder_type('hippo').with(
:ensure => 'present',
:properties => ['volume_backend_name=hippo']
)}
end
context 'block device backend with additional configuration' do
before do
params.merge!( :extra_options => {'hippo/param1' => { 'value' => 'value1' }} )
end
it { is_expected.to contain_cinder_config('hippo/param1').with_value('value1') }
end
context 'with deprecated iscsi_ip_address' do
before do
params.merge!({
:target_ip_address => :undef,
:iscsi_ip_address => '127.0.0.42',
})
end
it { is_expected.to contain_cinder_config('hippo/target_ip_address').with_value('127.0.0.42') }
end
context 'with no target_ip_address or iscsi_ip_address' do
before do
params.delete(:target_ip_address)
end
it { is_expected.to raise_error(Puppet::Error, /A target_ip_address or iscsi_ip_address must be specified./) }
end
end
shared_examples 'check needed daemons' do
context 'tgtadm helper' do
it {
is_expected.to contain_package('tgt').with_ensure('present')
is_expected.to contain_service('tgtd').with_ensure('running')
}
end
context 'lioadm helper' do
before do
params.merge!( :target_helper => 'lioadm' )
end
it {
is_expected.to contain_package('targetcli').with_ensure('present')
is_expected.to contain_service('target').with_ensure('running')
}
end
context 'wrong helper' do
before do
params.merge!( :target_helper => 'fake' )
end
it { is_expected.to raise_error(Puppet::Error, /Unsupported target helper: fake/) }
end
end
on_supported_os({
:supported_os => OSDefaults.get_supported_os
}).each do |os,facts|
context "on #{os}" do
let (:facts) do
facts.merge!(OSDefaults.get_facts())
end
it_behaves_like 'cinder block device'
it_behaves_like 'check needed daemons'
end
end
end

View File

@ -40,7 +40,6 @@ describe 'cinder::backend::dellsc_iscsi' do
:dell_sc_verify_cert => true, :dell_sc_verify_cert => true,
:dell_sc_volume_folder => 'other_vol', :dell_sc_volume_folder => 'other_vol',
:target_port => 222, :target_port => 222,
:excluded_domain_ip => '127.0.0.2',
:secondary_san_ip => '127.0.0.3', :secondary_san_ip => '127.0.0.3',
:secondary_san_login => 'Foo', :secondary_san_login => 'Foo',
:secondary_san_password => 'Bar', :secondary_san_password => 'Bar',
@ -95,25 +94,6 @@ describe 'cinder::backend::dellsc_iscsi' do
it { is_expected.to contain_cinder_type('dellsc_iscsi').with(:ensure => :present, :properties => ['volume_backend_name=dellsc_iscsi']) } it { is_expected.to contain_cinder_type('dellsc_iscsi').with(:ensure => :present, :properties => ['volume_backend_name=dellsc_iscsi']) }
end end
context 'with deprecated iscsi_ip_address' do
before do
params.merge!({
:target_ip_address => :undef,
:iscsi_ip_address => '127.0.0.42',
})
end
it { is_expected.to contain_cinder_config('dellsc_iscsi/target_ip_address').with_value('127.0.0.42') }
end
context 'with no target_ip_address or iscsi_ip_address' do
before do
params.delete(:target_ip_address)
end
it { is_expected.to raise_error(Puppet::Error, /A target_ip_address or iscsi_ip_address must be specified./) }
end
end end
on_supported_os({ on_supported_os({

View File

@ -76,25 +76,6 @@ describe 'cinder::backend::iscsi' do
:value => 'value1', :value => 'value1',
)} )}
end end
context 'with deprecated iscsi_ip_address' do
before :each do
params.merge!({
:target_ip_address => :undef,
:iscsi_ip_address => '127.0.0.42',
})
end
it { is_expected.to contain_cinder_config('hippo/target_ip_address').with_value('127.0.0.42') }
end
context 'with no target_ip_address or iscsi_ip_address' do
before :each do
params.delete(:target_ip_address)
end
it { is_expected.to raise_error(Puppet::Error, /A target_ip_address or iscsi_ip_address must be specified./) }
end
end end
shared_examples 'cinder::backend::iscsi on RedHat' do shared_examples 'cinder::backend::iscsi on RedHat' do