From 4700a450beece8fa009ea78b15c88792ab018c5f Mon Sep 17 00:00:00 2001 From: Tobias Urdin Date: Mon, 21 May 2018 23:56:15 +0200 Subject: [PATCH] Remove deprecated parameters Removes deprecated parameters that has been deprecated for one cycle or more. Change-Id: I9f433ec89f8990a0f0c670389a301bdb732a989a --- manifests/api.pp | 38 ++------ manifests/backend/cinder.pp | 13 --- manifests/backend/file.pp | 12 --- manifests/backend/rbd.pp | 22 ----- manifests/backend/s3.pp | 22 ----- manifests/backend/swift.pp | 13 --- manifests/backend/vsphere.pp | 57 +----------- manifests/config.pp | 18 ---- manifests/glare.pp | 47 ---------- manifests/glare/authtoken.pp | 87 ------------------- manifests/glare/db.pp | 29 ------- manifests/glare/logging.pp | 49 ----------- manifests/keystone/glare_auth.pp | 43 --------- manifests/notify/rabbitmq.pp | 54 ------------ ...ve-deprecated-params-6fa3d35be3371c74.yaml | 47 ++++++++++ spec/classes/glance_api_spec.rb | 16 +--- spec/classes/glance_notify_rabbitmq_spec.rb | 69 +-------------- 17 files changed, 63 insertions(+), 573 deletions(-) delete mode 100644 manifests/glare.pp delete mode 100644 manifests/glare/authtoken.pp delete mode 100644 manifests/glare/db.pp delete mode 100644 manifests/glare/logging.pp delete mode 100644 manifests/keystone/glare_auth.pp create mode 100644 releasenotes/notes/remove-deprecated-params-6fa3d35be3371c74.yaml diff --git a/manifests/api.pp b/manifests/api.pp index e37298f1..4fb28274 100644 --- a/manifests/api.pp +++ b/manifests/api.pp @@ -290,15 +290,6 @@ # http://auth_url:5000/v3 # Defaults to undef # -# === deprecated parameters: -# -# [*known_stores*] -# (optional) DEPRECATED List of which store classes and store class -# locations are currently known to glance at startup. This parameter -# should be removed in the N release. -# Defaults to false. -# Example: ['file','http'] -# class glance::api( $package_ensure = 'present', $debug = undef, @@ -362,8 +353,6 @@ class glance::api( $keymgr_backend = undef, $keymgr_encryption_api_url = undef, $keymgr_encryption_auth_url = undef, - # DEPRECATED PARAMETERS - $known_stores = false, ) inherits glance { include ::glance::deps @@ -416,33 +405,24 @@ class glance::api( 'taskflow_executor/conversion_format': value => $conversion_format, } - # stores config - if $stores and $known_stores { - fail('known_stores and stores cannot both be assigned values') - } elsif $stores { - $stores_real = $stores - } elsif $known_stores { - warning('The known_stores parameter is deprecated, use stores instead') - $stores_real = $known_stores - } if $default_store { $default_store_real = $default_store } - if !empty($stores_real) { + if ($stores and !empty($stores)) { # determine value for glance_store/stores - if size(any2array($stores_real)) > 1 { - $final_stores_real = join($stores_real, ',') + if size(any2array($stores)) > 1 { + $stores_real = join($stores, ',') } else { - $final_stores_real = $stores_real[0] + $stores_real = $stores[0] } if !$default_store_real { # set default store based on provided stores when it isn't explicitly set - warning("default_store not provided, it will be automatically set to ${stores_real[0]}") - $default_store_real = $stores_real[0] + warning("default_store not provided, it will be automatically set to ${stores[0]}") + $default_store_real = $stores[0] } } elsif $default_store_real { # set stores based on default_store if only default_store is provided - $final_stores_real = $default_store + $stores_real = $default_store } else { warning('Glance-api is being provisioned without any stores configured') } @@ -457,9 +437,9 @@ class glance::api( } } - if $final_stores_real { + if $stores_real { glance_api_config { - 'glance_store/stores': value => $final_stores_real; + 'glance_store/stores': value => $stores_real; } } else { glance_api_config { diff --git a/manifests/backend/cinder.pp b/manifests/backend/cinder.pp index 866b4363..a8fe7e54 100644 --- a/manifests/backend/cinder.pp +++ b/manifests/backend/cinder.pp @@ -56,12 +56,6 @@ # (optional) Boolean describing if multiple backends will be configured # Defaults to false # -# === Deprecated parameters -# -# [*glare_enabled*] -# (optional) Whether enabled Glance Glare API. -# Defaults to undef -# class glance::backend::cinder( $os_region_name = undef, $cinder_ca_certificates_file = $::os_service_default, @@ -70,8 +64,6 @@ class glance::backend::cinder( $cinder_endpoint_template = $::os_service_default, $cinder_http_retries = $::os_service_default, $multi_store = false, - # deprecated - $glare_enabled = undef, ) { include ::glance::deps @@ -100,9 +92,4 @@ class glance::backend::cinder( 'glance_store/cinder_ca_certificates_file': value => $cinder_ca_certificates_file; } - if $glare_enabled != undef { - warning("Since Glare was removed from Glance and now it is separate project, \ -you should use puppet-glare module for configuring Glare service.") - } - } diff --git a/manifests/backend/file.pp b/manifests/backend/file.pp index 6c75c87e..f56f4c22 100644 --- a/manifests/backend/file.pp +++ b/manifests/backend/file.pp @@ -13,16 +13,9 @@ # (optional) Boolean describing if multiple backends will be configured # Defaults to false # -# === Deprecated parameters: -# -# [*glare_enabled*] -# (optional) Whether enabled Glance Glare API. -# Defaults to undef -# class glance::backend::file( $filesystem_store_datadir = '/var/lib/glance/images/', $multi_store = false, - $glare_enabled = undef, ) { include ::glance::deps @@ -31,11 +24,6 @@ class glance::backend::file( 'glance_store/filesystem_store_datadir': value => $filesystem_store_datadir; } - if $glare_enabled != undef { - warning("Since Glare was removed from Glance and now it is separate project, \ -you should use puppet-glare module for configuring Glare service.") - } - if !$multi_store { glance_api_config { 'glance_store/default_store': value => 'file'; } } diff --git a/manifests/backend/rbd.pp b/manifests/backend/rbd.pp index 831c883f..918c2f8f 100644 --- a/manifests/backend/rbd.pp +++ b/manifests/backend/rbd.pp @@ -17,10 +17,6 @@ # [*rbd_store_chunk_size*] # Optional. Default: $::os_service_default. # -# [*show_image_direct_url*] -# Optional. Enables direct COW from glance to rbd -# DEPRECATED, use show_image_direct_url in glance::api -# # [*manage_packages*] # Optional. Whether we should manage the packages. # Defaults to true, @@ -40,33 +36,20 @@ # Optional. Boolean describing if multiple backends will be configured # Defaults to false # -# === Deprecated parameters: -# -# [*glare_enabled*] -# (optional) Whether enabled Glance Glare API. -# Defaults to undef -# class glance::backend::rbd( $rbd_store_user = $::os_service_default, $rbd_store_ceph_conf = $::os_service_default, $rbd_store_pool = $::os_service_default, $rbd_store_chunk_size = $::os_service_default, - $show_image_direct_url = undef, $manage_packages = true, $package_ensure = 'present', $rados_connect_timeout = $::os_service_default, $multi_store = false, - # deprecated - $glare_enabled = undef, ) { include ::glance::deps include ::glance::params - if $show_image_direct_url { - notice('parameter show_image_direct_url is deprecated, use parameter in glance::api') - } - glance_api_config { 'glance_store/rbd_store_ceph_conf': value => $rbd_store_ceph_conf; 'glance_store/rbd_store_user': value => $rbd_store_user; @@ -75,11 +58,6 @@ class glance::backend::rbd( 'glance_store/rados_connect_timeout': value => $rados_connect_timeout; } - if $glare_enabled != undef { - warning("Since Glare was removed from Glance and now it is separate project, \ -you should use puppet-glare module for configuring Glare service.") - } - if !$multi_store { glance_api_config { 'glance_store/default_store': value => 'rbd'; } } diff --git a/manifests/backend/s3.pp b/manifests/backend/s3.pp index 73959b1e..961d0942 100644 --- a/manifests/backend/s3.pp +++ b/manifests/backend/s3.pp @@ -50,15 +50,6 @@ # (optional) Boolean describing if multiple backends will be configured # Defaults to false # -# === deprecated parameters: -# -# [*default_store*] -# (Optional) DEPRECATED Whether to set S3 as the default backend store. -# Default: undef -# [*glare_enabled*] -# (optional) Whether enabled Glance Glare API. -# Defaults to undef -# class glance::backend::s3( $access_key, $secret_key, @@ -71,9 +62,6 @@ class glance::backend::s3( $object_buffer_dir = $::os_service_default, $thread_pools = $::os_service_default, $multi_store = false, - # deprecated parameters - $default_store = undef, - $glare_enabled = undef, ) { include ::glance::deps @@ -84,22 +72,12 @@ class glance::backend::s3( } } - if !is_service_default($bucket_url_format){ if !($bucket_url_format in ['subdomain', 'path']) { fail('glance::backend::s3::bucket_url_format must be either "subdomain" or "path"') } } - if $default_store { - warning('The default_store parameter is deprecated in glance::backend::s3, you should declare it in glance::api') - } - - if $glare_enabled != undef { - warning("Since Glare was removed from Glance and now it is separate project, \ -you should use puppet-glare module for configuring Glare service.") - } - glance_api_config { 'glance_store/s3_store_access_key': value => $access_key; 'glance_store/s3_store_secret_key': value => $secret_key; diff --git a/manifests/backend/swift.pp b/manifests/backend/swift.pp index c24c8dcd..c791464d 100644 --- a/manifests/backend/swift.pp +++ b/manifests/backend/swift.pp @@ -56,12 +56,6 @@ # (optional) Boolean describing if multiple backends will be configured # Defaults to false # -# === Deprecated parameters -# -# [*glare_enabled*] -# (optional) Whether enabled Glance Glare API. -# Defaults to undef -# class glance::backend::swift( $swift_store_user, $swift_store_key, @@ -77,8 +71,6 @@ class glance::backend::swift( $swift_store_region = $::os_service_default, $default_swift_reference = 'ref1', $multi_store = false, - # deprecated - $glare_enabled = undef, ) { include ::glance::deps @@ -86,11 +78,6 @@ class glance::backend::swift( Class['swift::client'] -> Anchor['glance::install::end'] Service<| tag == 'swift-service' |> -> Service['glance-api'] - if $glare_enabled != undef { - warning("Since Glare was removed from Glance and now it is separate project, \ -you should use puppet-glare module for configuring Glare service.") - } - glance_api_config { 'glance_store/swift_store_region': value => $swift_store_region; 'glance_store/swift_store_container': value => $swift_store_container; diff --git a/manifests/backend/vsphere.pp b/manifests/backend/vsphere.pp index dec9ccc6..f2e98a01 100644 --- a/manifests/backend/vsphere.pp +++ b/manifests/backend/vsphere.pp @@ -78,30 +78,6 @@ # (optional) Boolean describing if multiple backends will be configured # Defaults to false. # -# DEPRECATED PARAMETERS -# -# [*vcenter_api_insecure*] -# (optional) DEPRECATED. Allow to perform insecure SSL requests to ESX/VC. -# Defaults to undef. -# -# [*vcenter_datacenter*] -# (optional) DEPRECATED. Inventory path to a datacenter. -# If the vmware_server_host specified is an ESX/ESXi, -# the vcenter_datacenter is optional. If specified, -# it should be "ha-datacenter". This option is deprecated -# in favor of vcenter_datastores and will be removed. -# Defaults to undef. -# -# [*vcenter_datastore*] -# (optional) DEPRECATED. Datastore associated with the datacenter. -# This option is deprecated in favor of vcenter_datastores -# and will be removed. -# Defaults to undef. -# -# [*glare_enabled*] -# (optional) Whether enabled Glance Glare API. -# Defaults to undef. -# class glance::backend::vsphere( $vcenter_host, $vcenter_user, @@ -113,41 +89,12 @@ class glance::backend::vsphere( $vcenter_task_poll_interval = $::os_service_default, $vcenter_api_retry_count = $::os_service_default, $multi_store = false, - # DEPRECATED PARAMETERS - $vcenter_datacenter = undef, - $vcenter_datastore = undef, - $vcenter_api_insecure = undef, - $glare_enabled = undef, ) { include ::glance::deps - if $glare_enabled != undef { - warning("Since Glare was removed from Glance and now it is separate project, \ -you should use puppet-glare module for configuring Glare service.") - } - - if $vcenter_api_insecure { - warning('The vcenter_api_insecure parameter is deprecated, use parameter vcenter_insecure') - $vmware_insecure_real = $vcenter_api_insecure - } - else { - $vmware_insecure_real = $vcenter_insecure - } - - if $vcenter_datacenter and $vcenter_datastore { - warning('The vcenter_datacenter and vcenter_datastore parameters is deprecated, use parameter vcenter_datastores') - $vmware_datastores_real = "${vcenter_datacenter}:${vcenter_datastore}" - } - elsif !is_service_default($vcenter_datastores) { - $vmware_datastores_real = $vcenter_datastores - } - else { - fail('Parameter vcenter_datastores or vcenter_datacenter and vcenter_datastore must be provided') - } - glance_api_config { - 'glance_store/vmware_insecure': value => $vmware_insecure_real; + 'glance_store/vmware_insecure': value => $vcenter_insecure; 'glance_store/vmware_ca_file': value => $vcenter_ca_file; 'glance_store/vmware_server_host': value => $vcenter_host; 'glance_store/vmware_server_username': value => $vcenter_user; @@ -155,7 +102,7 @@ you should use puppet-glare module for configuring Glare service.") 'glance_store/vmware_store_image_dir': value => $vcenter_image_dir; 'glance_store/vmware_task_poll_interval': value => $vcenter_task_poll_interval; 'glance_store/vmware_api_retry_count': value => $vcenter_api_retry_count; - 'glance_store/vmware_datastores': value => $vmware_datastores_real; + 'glance_store/vmware_datastores': value => $vcenter_datastores; } if !$multi_store { diff --git a/manifests/config.pp b/manifests/config.pp index f40aa73a..ab06fa58 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -35,34 +35,16 @@ # NOTE: The configuration MUST NOT be already handled by this module # or Puppet catalog compilation will fail with duplicate resources. # -# === Deprecated parameters -# -# [*glare_config*] -# (optional) Allow configuration of glance-glare.conf configurations. -# Defaults to undef. -# -# [*glare_paste_ini_config*] -# (optional) Allow configuration of glance-glare-paste.ini configurations. -# Defaults to undef. -# class glance::config ( $api_config = {}, $api_paste_ini_config = {}, $registry_config = {}, $registry_paste_ini_config = {}, $cache_config = {}, - # deprecated - $glare_config = undef, - $glare_paste_ini_config = undef, ) { include ::glance::deps - if $glare_config != undef or $glare_paste_ini_config != undef{ - warning("Since Glare was removed from Glance and now it is separate project, \ -you should use puppet-glare module for configuring Glare service.") - } - validate_hash($api_config) validate_hash($api_paste_ini_config) validate_hash($registry_config) diff --git a/manifests/glare.pp b/manifests/glare.pp deleted file mode 100644 index f99a6e6e..00000000 --- a/manifests/glare.pp +++ /dev/null @@ -1,47 +0,0 @@ -# == Class glance::glare -# -# Configure Glare Glare service in glance. Deprecated. -# -# == Deprecated parameters -# -# [*package_ensure*] -# [*bind_host*] -# [*bind_port*] -# [*backlog*] -# [*workers*] -# [*auth_strategy*] -# [*pipeline*] -# [*manage_service*] -# [*enabled*] -# [*cert_file*] -# [*key_file*] -# [*ca_file*] -# [*stores*] -# [*default_store*] -# [*multi_store*] -# [*os_region_name*] -# -class glance::glare( - $package_ensure = undef, - $bind_host = undef, - $bind_port = undef, - $backlog = undef, - $workers = undef, - $auth_strategy = undef, - $pipeline = undef, - $manage_service = undef, - $enabled = undef, - $cert_file = undef, - $key_file = undef, - $ca_file = undef, - $stores = undef, - $default_store = undef, - $multi_store = undef, - $os_region_name = undef, -) { - - warning("Class ::glance::glare is deprecated since Glare was removed from Glance. \ -Now Glare is separated project and all configuration was moved to \ -puppet-glare module as well.") - -} diff --git a/manifests/glare/authtoken.pp b/manifests/glare/authtoken.pp deleted file mode 100644 index 8a032dda..00000000 --- a/manifests/glare/authtoken.pp +++ /dev/null @@ -1,87 +0,0 @@ -# class: glance::glare::authtoken -# -# Configure the keystone_authtoken section in the Glance Glare configuration file. Deprecated. -# -# === Deprecated parameters -# -# [*username*] -# [*password*] -# [*auth_url*] -# [*project_name*] -# [*user_domain_name*] -# [*project_domain_name*] -# [*insecure*] -# [*auth_section*] -# [*auth_type*] -# [*auth_uri*] -# [*auth_version*] -# [*cache*] -# [*cafile*] -# [*certfile*] -# [*check_revocations_for_cached*] -# [*delay_auth_decision*] -# [*enforce_token_bind*] -# [*hash_algorithms*] -# [*http_connect_timeout*] -# [*http_request_max_retries*] -# [*include_service_catalog*] -# [*keyfile*] -# [*memcache_pool_conn_get_timeout*] -# [*memcache_pool_dead_retry*] -# [*memcache_pool_maxsize*] -# [*memcache_pool_socket_timeout*] -# [*memcache_pool_unused_timeout*] -# [*memcache_secret_key*] -# [*memcache_security_strategy*] -# [*memcache_use_advanced_pool*] -# [*memcached_servers*] -# [*manage_memcache_package*] -# [*region_name*] -# [*revocation_cache_time*] -# [*token_cache_time*] -# [*signing_dir*] -# -class glance::glare::authtoken( - $username = undef, - $password = undef, - $auth_url = undef, - $project_name = undef, - $user_domain_name = undef, - $project_domain_name = undef, - $insecure = undef, - $auth_section = undef, - $auth_type = undef, - $auth_uri = undef, - $auth_version = undef, - $cache = undef, - $cafile = undef, - $certfile = undef, - $check_revocations_for_cached = undef, - $delay_auth_decision = undef, - $enforce_token_bind = undef, - $hash_algorithms = undef, - $http_connect_timeout = undef, - $http_request_max_retries = undef, - $include_service_catalog = undef, - $keyfile = undef, - $memcache_pool_conn_get_timeout = undef, - $memcache_pool_dead_retry = undef, - $memcache_pool_maxsize = undef, - $memcache_pool_socket_timeout = undef, - $memcache_pool_unused_timeout = undef, - $memcache_secret_key = undef, - $memcache_security_strategy = undef, - $memcache_use_advanced_pool = undef, - $memcached_servers = undef, - $manage_memcache_package = undef, - $region_name = undef, - $revocation_cache_time = undef, - $token_cache_time = undef, - $signing_dir = undef, -) { - - warning("Class ::glance::glare::authtoken is deprecated since Glare was removed \ -from Glance. Now Glare is separated project and all configuration was moved to \ -puppet-glare module as well.") - -} diff --git a/manifests/glare/db.pp b/manifests/glare/db.pp deleted file mode 100644 index 10bacdd9..00000000 --- a/manifests/glare/db.pp +++ /dev/null @@ -1,29 +0,0 @@ -# == Class: glance::glare::db -# -# Configure the Glance Glare database. Deprecated. -# -# === Deprecated parameters -# -# [*database_connection*] -# [*database_idle_timeout*] -# [*database_min_pool_size*] -# [*database_max_pool_size*] -# [*database_max_retries*] -# [*database_retry_interval*] -# [*database_max_overflow*] -# -class glance::glare::db ( - $database_connection = undef, - $database_idle_timeout = undef, - $database_min_pool_size = undef, - $database_max_pool_size = undef, - $database_max_retries = undef, - $database_retry_interval = undef, - $database_max_overflow = undef, -) { - - warning("Class ::glance::glare::db is deprecated since Glare was removed from Glance. \ -Now Glare is separated project and all configuration was moved to \ -puppet-glare module as well.") - -} diff --git a/manifests/glare/logging.pp b/manifests/glare/logging.pp deleted file mode 100644 index 103c96da..00000000 --- a/manifests/glare/logging.pp +++ /dev/null @@ -1,49 +0,0 @@ -# == Class glance::glare::logging -# -# glance glare extended logging configuration. Deprecated. -# -# === Deprecated parameters -# -# [*debug*] -# [*use_syslog*] -# [*use_stderr*] -# [*log_facility*] -# [*log_dir*] -# [*log_file*] -# [*logging_context_format_string*] -# [*logging_default_format_string*] -# [*logging_debug_format_suffix*] -# [*logging_exception_prefix*] -# [*log_config_append*] -# [*default_log_levels*] -# [*publish_errors*] -# [*fatal_deprecations*] -# [*instance_format*] -# [*instance_uuid_format*] -# [*log_date_format*] -# -class glance::glare::logging( - $use_syslog = undef, - $use_stderr = undef, - $log_facility = undef, - $log_dir = undef, - $log_file = undef, - $debug = undef, - $logging_context_format_string = undef, - $logging_default_format_string = undef, - $logging_debug_format_suffix = undef, - $logging_exception_prefix = undef, - $log_config_append = undef, - $default_log_levels = undef, - $publish_errors = undef, - $fatal_deprecations = undef, - $instance_format = undef, - $instance_uuid_format = undef, - $log_date_format = undef, -) { - - warning("Class ::glance::glare::logging is deprecated since Glare was \ -removed from Glance. Now Glare is separated project and all configuration \ -was moved to puppet-glare module as well.") - -} diff --git a/manifests/keystone/glare_auth.pp b/manifests/keystone/glare_auth.pp deleted file mode 100644 index 30d9640d..00000000 --- a/manifests/keystone/glare_auth.pp +++ /dev/null @@ -1,43 +0,0 @@ -# == Class: glance::keystone::glare_auth -# -# Sets up glare users, service and endpoint for Glance Glare. Deprecated. -# -# == Deprecated parameters -# -# [*password*] -# [*email*] -# [*auth_name*] -# [*configure_endpoint*] -# [*configure_user*] -# [*configure_user_role*] -# [*service_name*] -# [*service_type*] -# [*service_description*] -# [*region*] -# [*tenant*] -# [*public_url*] -# [*admin_url*] -# [*internal_url*] -# -class glance::keystone::glare_auth( - $password = undef, - $email = undef, - $auth_name = undef, - $configure_endpoint = undef, - $configure_user = undef, - $configure_user_role = undef, - $service_name = undef, - $service_type = undef, - $region = undef, - $tenant = undef, - $service_description = undef, - $public_url = undef, - $admin_url = undef, - $internal_url = undef, -) { - - warning("Class ::glance::keystone::glare_auth is deprecated since Glare was \ -removed from Glance. Now Glare is separated project and all configuration was \ -moved to puppet-glare module as well.") - -} diff --git a/manifests/notify/rabbitmq.pp b/manifests/notify/rabbitmq.pp index 28dc710c..594c21dd 100644 --- a/manifests/notify/rabbitmq.pp +++ b/manifests/notify/rabbitmq.pp @@ -97,34 +97,6 @@ # messaging, messagingv2, routing, log, test, noop (multi valued) # Defaults to $::os_service_default # -# === DEPRECATED PARAMTERS -# -# [*rabbit_password*] -# (Optional) The RabbitMQ password. (string value) -# Defaults to $::os_service_default -# -# [*rabbit_userid*] -# (Optional) The RabbitMQ userid. (string value) -# Defaults to $::os_service_default -# -# [*rabbit_host*] -# (Optional) The RabbitMQ broker address where a single node is used. -# (string value) -# Defaults to $::os_service_default -# -# [*rabbit_hosts*] -# (Optional) RabbitMQ HA cluster host:port pairs. (array value) -# Defaults to $::os_service_default -# -# [*rabbit_port*] -# (Optional) The RabbitMQ broker port where a single node is used. -# (port value) -# Defaults to $::os_service_default -# -# [*rabbit_virtual_host*] -# (Optional) The RabbitMQ virtual host. (string value) -# Defaults to $::os_service_default -# class glance::notify::rabbitmq( $default_transport_url = $::os_service_default, $rpc_response_timeout = $::os_service_default, @@ -145,37 +117,11 @@ class glance::notify::rabbitmq( $amqp_durable_queues = $::os_service_default, $kombu_compression = $::os_service_default, $notification_driver = $::os_service_default, - # DEPRECATED PARAMETERS - $rabbit_password = $::os_service_default, - $rabbit_userid = $::os_service_default, - $rabbit_host = $::os_service_default, - $rabbit_port = $::os_service_default, - $rabbit_hosts = $::os_service_default, - $rabbit_virtual_host = $::os_service_default, ) { include ::glance::deps - if !is_service_default($rabbit_host) or - !is_service_default($rabbit_hosts) or - !is_service_default($rabbit_password) or - !is_service_default($rabbit_port) or - !is_service_default($rabbit_userid) or - !is_service_default($rabbit_virtual_host) { - warning("glance::notify::rabbitmq::rabbit_host, \ -glance::notify::rabbitmq::rabbit_hosts, glance::notify::rabbitmq::rabbit_password, \ -glance::notify::rabbitmq::rabbit_port, glance::notify::rabbitmq::rabbit_userid \ -and glance::notify::rabbitmq::rabbit_virtual_host are \ -deprecated. Please use glance::notify::rabbitmq::default_transport_url instead.") - } - oslo::messaging::rabbit { ['glance_api_config', 'glance_registry_config']: - rabbit_password => $rabbit_password, - rabbit_userid => $rabbit_userid, - rabbit_host => $rabbit_host, - rabbit_port => $rabbit_port, - rabbit_hosts => $rabbit_hosts, - rabbit_virtual_host => $rabbit_virtual_host, rabbit_ha_queues => $rabbit_ha_queues, heartbeat_timeout_threshold => $rabbit_heartbeat_timeout_threshold, heartbeat_rate => $rabbit_heartbeat_rate, diff --git a/releasenotes/notes/remove-deprecated-params-6fa3d35be3371c74.yaml b/releasenotes/notes/remove-deprecated-params-6fa3d35be3371c74.yaml new file mode 100644 index 00000000..abd17344 --- /dev/null +++ b/releasenotes/notes/remove-deprecated-params-6fa3d35be3371c74.yaml @@ -0,0 +1,47 @@ +--- +upgrade: + - | + The deprecated parameter glance::api::known_stores is removed. + Please use glance::api::stores instead. + - | + The deprecated parameter glance::backend::vsphere::glare_enabled is removed. + Please use the puppet-glare module instead. + - | + The deprecated parameter glance::backend::vsphere::vcenter_api_insecure is removed. + Please use vcenter_insecure. + - | + The deprecated parameters vcenter_datacenter and vcenter_datastore in glance::backend::vsphere + is removed. Please use vcenter_datastores instead. + - | + The deprecated parameter glance::backend::s3::default_store is removed. + Please set this in glance::api. + - | + The deprecated parameter glance::backend::s3::glare_enabled is removed. + Please use the puppet-glare module instead. + - | + The deprecated parameter glance::backend::rbd::glare_enabled is removed. + Please use the puppet-glare module instead. + - | + The deprecated parameter glance::backend::rbd::show_image_direct_url is removed. + Please set this parameter in glance::api. + - | + The deprecated parameters glance::notify::rabbitmq::rabbit_host, glance::notify::rabbitmq::rabbit_hosts, + glance::notify::rabbitmq::rabbit_password, glance::notify::rabbitmq::rabbit_port, glance::notify::rabbitmq::rabbit_userid + and glance::notify::rabbitmq::rabbit_virtual_host is removed. + Please use glance::notify::rabbitmq::default_transport_url instead. + - | + The deprecated parameters glance::config::clare_config and glance::config::glare_paste_ini_config + is removed. Please use the puppet-glare module instead. + - | + The deprecated parameter glance::backend::file::glare_enabled is removed. + Please use the puppet-glare module instead. + - | + The deprecated parameter glance::backend::cinder::glare_enabled is removed. + Please use the puppet-glare module instead. + - | + The deprecated parameter glance::backend::swift::glare_enabled is removed. + Please use the puppet-glare module instead. + - | + The deprecated classes glance::glare, glance::keystone::glare_auth, glance::glare::authtoken, + glance::glare::db, glance::glare::logging is removed. + Please use the puppet-glare module instead. diff --git a/spec/classes/glance_api_spec.rb b/spec/classes/glance_api_spec.rb index df38d274..3bbb1a04 100644 --- a/spec/classes/glance_api_spec.rb +++ b/spec/classes/glance_api_spec.rb @@ -27,7 +27,6 @@ describe 'glance::api' do :show_multiple_locations => '', :location_strategy => '', :purge_config => false, - :known_stores => false, :delayed_delete => '', :scrub_time => '', :default_store => false, @@ -278,7 +277,7 @@ describe 'glance::api' do default_params end - it { is_expected.to_not contain_glance_api_config('glance_store/stores').with_value('false') } + it { is_expected.to_not contain_glance_api_config('glance_store/stores').with_value('') } end describe 'with stores override' do @@ -318,18 +317,7 @@ describe 'glance::api' do it { is_expected.to contain_glance_api_config('glance_store/stores').with_value('file,http') } end - describe 'with both stores and known_stores provided' do - let :params do - default_params.merge({ - :stores => ['file'], - :known_stores => ['glance.store.http.store'], - }) - end - - it { is_expected.to raise_error(Puppet::Error, /known_stores and stores cannot both be assigned values/) } - end - - describe 'with known_stores not set but with default_store' do + describe 'with default_store' do let :params do default_params.merge({ :default_store => 'file', diff --git a/spec/classes/glance_notify_rabbitmq_spec.rb b/spec/classes/glance_notify_rabbitmq_spec.rb index 7260d053..5b086d1e 100644 --- a/spec/classes/glance_notify_rabbitmq_spec.rb +++ b/spec/classes/glance_notify_rabbitmq_spec.rb @@ -8,15 +8,8 @@ describe 'glance::notify::rabbitmq' do it { is_expected.to contain_glance_api_config('DEFAULT/control_exchange').with_value('') } it { is_expected.to contain_glance_api_config('oslo_messaging_notifications/transport_url').with_value('') } it { is_expected.to contain_glance_api_config('oslo_messaging_notifications/driver').with_value('') } - it { is_expected.to contain_glance_api_config('oslo_messaging_rabbit/rabbit_password').with_value('') } - it { is_expected.to contain_glance_api_config('oslo_messaging_rabbit/rabbit_password').with_value('').with_secret(true) } - it { is_expected.to contain_glance_api_config('oslo_messaging_rabbit/rabbit_userid').with_value('') } - it { is_expected.to contain_glance_api_config('oslo_messaging_rabbit/rabbit_host').with_value('') } - it { is_expected.to contain_glance_api_config('oslo_messaging_rabbit/rabbit_port').with_value('') } - it { is_expected.to contain_glance_api_config('oslo_messaging_rabbit/rabbit_hosts').with_value('') } it { is_expected.to contain_glance_api_config('oslo_messaging_rabbit/rabbit_ha_queues').with_value('') } it { is_expected.to contain_glance_api_config('oslo_messaging_rabbit/amqp_durable_queues').with_value('') } - it { is_expected.to contain_glance_api_config('oslo_messaging_rabbit/rabbit_virtual_host').with_value('') } it { is_expected.to contain_glance_api_config('oslo_messaging_rabbit/default_notification_exchange').with_value('') } it { is_expected.to contain_glance_api_config('oslo_messaging_notifications/topics').with_value('') } it { is_expected.to contain_glance_api_config('oslo_messaging_rabbit/heartbeat_timeout_threshold').with_value('') } @@ -29,15 +22,8 @@ describe 'glance::notify::rabbitmq' do it { is_expected.to contain_glance_registry_config('DEFAULT/control_exchange').with_value('') } it { is_expected.to contain_glance_registry_config('oslo_messaging_notifications/transport_url').with_value('') } it { is_expected.to contain_glance_registry_config('oslo_messaging_notifications/driver').with_value('') } - it { is_expected.to contain_glance_registry_config('oslo_messaging_rabbit/rabbit_password').with_value('') } - it { is_expected.to contain_glance_registry_config('oslo_messaging_rabbit/rabbit_password').with_value('').with_secret(true) } - it { is_expected.to contain_glance_registry_config('oslo_messaging_rabbit/rabbit_userid').with_value('') } - it { is_expected.to contain_glance_registry_config('oslo_messaging_rabbit/rabbit_host').with_value('') } - it { is_expected.to contain_glance_registry_config('oslo_messaging_rabbit/rabbit_port').with_value('') } - it { is_expected.to contain_glance_registry_config('oslo_messaging_rabbit/rabbit_hosts').with_value('') } it { is_expected.to contain_glance_registry_config('oslo_messaging_rabbit/rabbit_ha_queues').with_value('') } it { is_expected.to contain_glance_registry_config('oslo_messaging_rabbit/amqp_durable_queues').with_value('') } - it { is_expected.to contain_glance_registry_config('oslo_messaging_rabbit/rabbit_virtual_host').with_value('') } it { is_expected.to contain_glance_registry_config('oslo_messaging_rabbit/default_notification_exchange').with_value('') } it { is_expected.to contain_glance_registry_config('oslo_messaging_notifications/topics').with_value('') } it { is_expected.to contain_glance_registry_config('oslo_messaging_rabbit/heartbeat_timeout_threshold').with_value('') } @@ -49,25 +35,15 @@ describe 'glance::notify::rabbitmq' do describe 'when passing params and use ssl' do let :params do { - :rabbit_password => 'pass', - :rabbit_userid => 'guest2', - :rabbit_host => 'localhost2', - :rabbit_port => '5673', :rabbit_use_ssl => true, :rabbit_durable_queues => true, :kombu_reconnect_delay => '5.0', :kombu_failover_strategy => 'shuffle', } - it { is_expected.to contain_glance_api_config('oslo_messaging_rabbit/rabbit_userid').with_value('guest2') } - it { is_expected.to contain_glance_api_config('oslo_messaging_rabbit/rabbit_host').with_value('localhost2') } - it { is_expected.to contain_glance_api_config('oslo_messaging_rabbit/rabbit_port').with_value('5673') } it { is_expected.to contain_glance_api_config('oslo_messaging_rabbit/rabbit_durable_queues').with_value(true) } it { is_expected.to contain_glance_api_config('oslo_messaging_rabbit/kombu_reconnect_delay').with_value('5.0') } it { is_expected.to contain_glance_api_config('oslo_messaging_rabbit/kombu_failover_strategy').with_value('shuffle') } - it { is_expected.to contain_glance_registry_config('oslo_messaging_rabbit/rabbit_userid').with_value('guest2') } - it { is_expected.to contain_glance_registry_config('oslo_messaging_rabbit/rabbit_host').with_value('localhost2') } - it { is_expected.to contain_glance_registry_config('oslo_messaging_rabbit/rabbit_port').with_value('5673') } it { is_expected.to contain_glance_registry_config('oslo_messaging_rabbit/rabbit_durable_queues').with_value(true) } it { is_expected.to contain_glance_registry_config('oslo_messaging_rabbit/kombu_reconnect_delay').with_value('5.0') } it { is_expected.to contain_glance_registry_config('oslo_messaging_rabbit/kombu_failover_strategy').with_value('shuffle') } @@ -113,68 +89,29 @@ describe 'glance::notify::rabbitmq' do describe 'when passing params for single rabbit host' do let :params do { - :rabbit_password => 'pass', - :rabbit_userid => 'guest2', - :rabbit_host => 'localhost2', - :rabbit_port => '5673', :rabbit_use_ssl => true, :amqp_durable_queues => true, } end - it { is_expected.to contain_glance_api_config('oslo_messaging_rabbit/rabbit_userid').with_value('guest2') } - it { is_expected.to contain_glance_api_config('oslo_messaging_rabbit/rabbit_host').with_value('localhost2') } - it { is_expected.to contain_glance_api_config('oslo_messaging_rabbit/rabbit_port').with_value('5673') } - it { is_expected.to contain_glance_api_config('oslo_messaging_rabbit/rabbit_hosts').with_value('') } it { is_expected.to contain_glance_api_config('oslo_messaging_rabbit/amqp_durable_queues').with_value(true) } it { is_expected.to contain_oslo__messaging__rabbit('glance_api_config').with( :rabbit_use_ssl => true, )} - it { is_expected.to contain_glance_registry_config('oslo_messaging_rabbit/rabbit_userid').with_value('guest2') } - it { is_expected.to contain_glance_registry_config('oslo_messaging_rabbit/rabbit_host').with_value('localhost2') } - it { is_expected.to contain_glance_registry_config('oslo_messaging_rabbit/rabbit_port').with_value('5673') } - it { is_expected.to contain_glance_registry_config('oslo_messaging_rabbit/rabbit_hosts').with_value('') } it { is_expected.to contain_glance_registry_config('oslo_messaging_rabbit/amqp_durable_queues').with_value(true) } it { is_expected.to contain_oslo__messaging__rabbit('glance_registry_config').with( :rabbit_use_ssl => true, )} end - describe 'when passing params for multiple rabbit hosts' do + describe 'when setting rabbit_ha_queues' do let :params do { - :rabbit_password => 'pass', - :rabbit_userid => 'guest3', - :rabbit_hosts => ['nonlocalhost3:5673', 'nonlocalhost4:5673'] + :rabbit_ha_queues => true, } end - it { is_expected.to contain_glance_api_config('oslo_messaging_rabbit/rabbit_userid').with_value('guest3') } - it { is_expected.to contain_glance_api_config('oslo_messaging_rabbit/rabbit_hosts').with_value('nonlocalhost3:5673,nonlocalhost4:5673') } + it { is_expected.to contain_glance_api_config('oslo_messaging_rabbit/rabbit_ha_queues').with_value(true) } - it { is_expected.to contain_glance_api_config('oslo_messaging_rabbit/rabbit_port').with_value('') } - it { is_expected.to contain_glance_api_config('oslo_messaging_rabbit/rabbit_host').with_value('') } - - it { is_expected.to contain_glance_registry_config('oslo_messaging_rabbit/rabbit_userid').with_value('guest3') } - it { is_expected.to contain_glance_registry_config('oslo_messaging_rabbit/rabbit_hosts').with_value('nonlocalhost3:5673,nonlocalhost4:5673') } - it { is_expected.to contain_glance_registry_config('oslo_messaging_rabbit/rabbit_ha_queues').with_value(true) } - it { is_expected.to contain_glance_registry_config('oslo_messaging_rabbit/rabbit_port').with_value('') } - it { is_expected.to contain_glance_registry_config('oslo_messaging_rabbit/rabbit_host').with_value('') } - end - - describe 'a single rabbit_host with enable ha queues' do - let :params do - { - :rabbit_password => 'pass', - :rabbit_userid => 'guest3', - :rabbit_ha_queues => true, - } - end - - it 'should contain rabbit_ha_queues' do - is_expected.to contain_glance_api_config('oslo_messaging_rabbit/rabbit_ha_queues').with_value('true') - - is_expected.to contain_glance_registry_config('oslo_messaging_rabbit/rabbit_ha_queues').with_value('true') - end end describe 'when passing params for rabbitmq heartbeat' do