Remove deprecated parameters
Removes deprecated parameters that has been deprecated for one cycle or more. Change-Id: I286a593f0e68dc9e60852674d2fa14551acb1bbb
This commit is contained in:
parent
264886f674
commit
5c5a7dbf95
|
@ -149,22 +149,6 @@
|
|||
#
|
||||
# DEPRECATED PARAMETERS
|
||||
#
|
||||
# [*validation_options*]
|
||||
# (optional) Service validation options
|
||||
# Should be a hash of options defined in openstacklib::service_validation
|
||||
# If empty, defaults values are taken from openstacklib function.
|
||||
# Default command list volumes.
|
||||
# Require validate set at True.
|
||||
# Example:
|
||||
# glance::api::validation_options:
|
||||
# glance-api:
|
||||
# command: check_cinder-api.py
|
||||
# path: /usr/bin:/bin:/usr/sbin:/sbin
|
||||
# provider: shell
|
||||
# tries: 5
|
||||
# try_sleep: 10
|
||||
# Defaults to {}
|
||||
#
|
||||
# [*keymgr_api_class*]
|
||||
# (optional) Deprecated. Key Manager service class.
|
||||
# Example of valid value: castellan.key_manager.barbican_key_manager.BarbicanKeyManager
|
||||
|
@ -208,7 +192,6 @@ class cinder::api (
|
|||
$osapi_volume_listen_port = $::os_service_default,
|
||||
$keymgr_backend = 'cinder.keymgr.conf_key_mgr.ConfKeyManager',
|
||||
# DEPRECATED PARAMETERS
|
||||
$validation_options = {},
|
||||
$keymgr_api_class = undef,
|
||||
$nova_catalog_admin_info = 'compute:Compute Service:adminURL',
|
||||
) inherits cinder::params {
|
||||
|
@ -220,21 +203,15 @@ class cinder::api (
|
|||
validate_bool($manage_service)
|
||||
validate_bool($enabled)
|
||||
|
||||
# Keep backwards compatibility with SSL values being set in init.pp
|
||||
$use_ssl_real = pick($::cinder::use_ssl, $use_ssl)
|
||||
$cert_file_real = pick($::cinder::cert_file, $cert_file)
|
||||
$key_file_real = pick($::cinder::key_file, $key_file)
|
||||
$ca_file_real = pick($::cinder::ca_file, $ca_file)
|
||||
|
||||
if $nova_catalog_admin_info {
|
||||
warning('The nova_catalog_admin_info parameter has been deprecated and will be removed in the future release.')
|
||||
}
|
||||
|
||||
if $use_ssl_real {
|
||||
if is_service_default($cert_file_real) {
|
||||
if $use_ssl {
|
||||
if is_service_default($cert_file) {
|
||||
fail('The cert_file parameter is required when use_ssl is set to true')
|
||||
}
|
||||
if is_service_default($key_file_real) {
|
||||
if is_service_default($key_file) {
|
||||
fail('The key_file parameter is required when use_ssl is set to true')
|
||||
}
|
||||
}
|
||||
|
@ -343,11 +320,11 @@ running as a standalone service, or httpd for being run by a httpd server")
|
|||
}
|
||||
|
||||
# SSL Options
|
||||
if $use_ssl_real {
|
||||
if $use_ssl {
|
||||
cinder_config {
|
||||
'ssl/cert_file' : value => $cert_file_real;
|
||||
'ssl/key_file' : value => $key_file_real;
|
||||
'ssl/ca_file' : value => $ca_file_real;
|
||||
'ssl/cert_file' : value => $cert_file;
|
||||
'ssl/key_file' : value => $key_file;
|
||||
'ssl/ca_file' : value => $ca_file;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -363,15 +340,14 @@ running as a standalone service, or httpd for being run by a httpd server")
|
|||
$keystone_username = $::cinder::keystone::authtoken::username
|
||||
$keystone_password = $::cinder::keystone::authtoken::password
|
||||
|
||||
$defaults = {
|
||||
$validation_cmd = {
|
||||
'cinder-api' => {
|
||||
# lint:ignore:140chars
|
||||
'command' => "cinder --os-auth-url ${::cinder::keystone::authtoken::www_authenticate_uri} --os-project-name ${keystone_project_name} --os-username ${keystone_username} --os-password ${keystone_password} list",
|
||||
# lint:endignore
|
||||
}
|
||||
}
|
||||
$validation_options_hash = merge ($defaults, $validation_options)
|
||||
create_resources('openstacklib::service_validation', $validation_options_hash, {'subscribe' => 'Service[cinder-api]'})
|
||||
create_resources('openstacklib::service_validation', $validation_cmd, {'subscribe' => 'Service[cinder-api]'})
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -176,29 +176,6 @@
|
|||
# Example :
|
||||
# { 'netapp_backend/param1' => { 'value' => value1 } }
|
||||
#
|
||||
# DEPRECATED PARAMETERS
|
||||
#
|
||||
# [*netapp_eseries_host_type*]
|
||||
# (optional) Deprecated. This option is used to define how the controllers in
|
||||
# the E-Series storage array will work with the particular operating system on
|
||||
# the hosts that are connected to it.
|
||||
# Defaults to undef
|
||||
#
|
||||
# [*netapp_storage_pools*]
|
||||
# (optional) This option is used to restrict provisioning to the specified
|
||||
# storage pools. Only dynamic disk pools are currently supported. Specify the
|
||||
# value of this option to be a comma separated list of disk pool names to be
|
||||
# used for provisioning.
|
||||
# Defaults to undef
|
||||
#
|
||||
# [*netapp_volume_list*]
|
||||
# (optional) This parameter is only utilized when the storage protocol is
|
||||
# configured to use iSCSI or FC. This parameter is used to restrict
|
||||
# provisioning to the specified controller volumes. Specify the value of
|
||||
# this parameter to be a comma separated list of NetApp controller volume
|
||||
# names to be used for provisioning.
|
||||
# Defaults to undef
|
||||
#
|
||||
# === Examples
|
||||
#
|
||||
# cinder::backend::netapp { 'myBackend':
|
||||
|
@ -247,34 +224,10 @@ define cinder::backend::netapp (
|
|||
$netapp_pool_name_search_pattern = '(.+)',
|
||||
$nas_secure_file_operations = $::os_service_default,
|
||||
$nas_secure_file_permissions = $::os_service_default,
|
||||
# DEPRECATED PARAMETERS
|
||||
$netapp_eseries_host_type = undef,
|
||||
$netapp_storage_pools = undef,
|
||||
$netapp_volume_list = undef,
|
||||
) {
|
||||
|
||||
include ::cinder::deps
|
||||
|
||||
if $netapp_eseries_host_type {
|
||||
warning('The "netapp_eseries_host_type" parameter is deprecated. Use "netapp_host_type" instead.')
|
||||
$netapp_host_type_real = $netapp_eseries_host_type
|
||||
} else {
|
||||
$netapp_host_type_real = $netapp_host_type
|
||||
}
|
||||
|
||||
if $netapp_storage_pools or $netapp_volume_list{
|
||||
if $netapp_storage_pools {
|
||||
warning('The "netapp_storage_pools" parameter is deprecated. Use "netapp_pool_name_search_pattern" instead.')
|
||||
}
|
||||
if $netapp_volume_list {
|
||||
warning('The "netapp_volume_list" parameter is deprecated. Use "netapp_pool_name_search_pattern" instead.')
|
||||
}
|
||||
$list = join(any2array(delete(delete_undef_values([$netapp_storage_pools, $netapp_volume_list]), '')), '|')
|
||||
$netapp_pool_name_search_pattern_real = "(${list})"
|
||||
} else {
|
||||
$netapp_pool_name_search_pattern_real = $netapp_pool_name_search_pattern
|
||||
}
|
||||
|
||||
if $nfs_shares {
|
||||
validate_array($nfs_shares)
|
||||
file {$nfs_shares_config:
|
||||
|
@ -306,8 +259,8 @@ define cinder::backend::netapp (
|
|||
"${name}/netapp_copyoffload_tool_path": value => $netapp_copyoffload_tool_path;
|
||||
"${name}/netapp_controller_ips": value => $netapp_controller_ips;
|
||||
"${name}/netapp_sa_password": value => $netapp_sa_password, secret => true;
|
||||
"${name}/netapp_pool_name_search_pattern": value => $netapp_pool_name_search_pattern_real;
|
||||
"${name}/netapp_host_type": value => $netapp_host_type_real;
|
||||
"${name}/netapp_pool_name_search_pattern": value => $netapp_pool_name_search_pattern;
|
||||
"${name}/netapp_host_type": value => $netapp_host_type;
|
||||
"${name}/netapp_webservice_path": value => $netapp_webservice_path;
|
||||
"${name}/nas_secure_file_operations": value => $nas_secure_file_operations;
|
||||
"${name}/nas_secure_file_permissions": value => $nas_secure_file_permissions;
|
||||
|
|
|
@ -69,13 +69,6 @@
|
|||
# Example :
|
||||
# { 'rbd_backend/param1' => { 'value' => value1 } }
|
||||
#
|
||||
# === Deprecated Parameters
|
||||
#
|
||||
# [*volume_tmp_dir*]
|
||||
# (deprecated by image_conversion_dir) Location to store temporary image files
|
||||
# if the volume driver does not write them directly to the volumea.
|
||||
# Defaults to false
|
||||
#
|
||||
define cinder::backend::rbd (
|
||||
$rbd_pool,
|
||||
$rbd_user,
|
||||
|
@ -91,8 +84,6 @@ define cinder::backend::rbd (
|
|||
$rbd_store_chunk_size = $::os_service_default,
|
||||
$manage_volume_type = false,
|
||||
$extra_options = {},
|
||||
# DEPRECATED PARAMETERS
|
||||
$volume_tmp_dir = false,
|
||||
) {
|
||||
|
||||
include ::cinder::deps
|
||||
|
@ -133,11 +124,6 @@ define cinder::backend::rbd (
|
|||
}
|
||||
}
|
||||
|
||||
if $volume_tmp_dir {
|
||||
cinder_config {"${name}/volume_tmp_dir": value => $volume_tmp_dir;}
|
||||
warning('The rbd volume_tmp_dir parameter is deprecated. Please use image_conversion_dir in the cinder base class instead.')
|
||||
}
|
||||
|
||||
ensure_packages( 'ceph-common', {
|
||||
ensure => present,
|
||||
name => $::cinder::params::ceph_common_package_name,
|
||||
|
|
|
@ -257,56 +257,6 @@
|
|||
# (optional) Backend override of host value.
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# === DEPRECATED PARAMETERS
|
||||
#
|
||||
# [*use_ssl*]
|
||||
# (optional) DEPRECATED. Enable SSL on the API server
|
||||
# Defaults to undef
|
||||
#
|
||||
# [*cert_file*]
|
||||
# (optional) DEPRECATED. Certificate file to use when starting API server
|
||||
# securely
|
||||
# Defaults to undef
|
||||
#
|
||||
# [*key_file*]
|
||||
# (optional) DEPRECATED. Private key file to use when starting API server
|
||||
# securely
|
||||
# Defaults to undef
|
||||
#
|
||||
# [*ca_file*]
|
||||
# (optional) DEPRECATED. CA certificate file to use to verify connecting
|
||||
# clients
|
||||
# Defaults to undef
|
||||
#
|
||||
# [*rabbit_host*]
|
||||
# (Optional) DEPRECATED. IP or hostname of the rabbit server.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*rabbit_port*]
|
||||
# (Optional) DEPRECATED. Port of the rabbit server.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*rabbit_hosts*]
|
||||
# (Optional) DEPRECATED. Array of host:port (used with HA queues).
|
||||
# If defined, will remove rabbit_host & rabbit_port parameters from config
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*rabbit_userid*]
|
||||
# (Optional) DEPRECATED. User to connect to the rabbit server.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*rabbit_password*]
|
||||
# (Required) DEPRECATED. Password to connect to the rabbit_server.
|
||||
# Defaults to empty. Required if using the Rabbit (kombu) backend.
|
||||
#
|
||||
# [*rabbit_virtual_host*]
|
||||
# (Optional) DEPRECATED. Virtual_host to use.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*rpc_backend*]
|
||||
# (Optional) DEPRECATED. Use these options to configure the RabbitMQ message system.
|
||||
# Defaults to undef
|
||||
#
|
||||
class cinder (
|
||||
$database_connection = undef,
|
||||
$database_idle_timeout = undef,
|
||||
|
@ -364,37 +314,12 @@ class cinder (
|
|||
$host = $::os_service_default,
|
||||
$purge_config = false,
|
||||
$backend_host = $::os_service_default,
|
||||
# DEPRECATED PARAMETERS
|
||||
$use_ssl = undef,
|
||||
$ca_file = undef,
|
||||
$cert_file = undef,
|
||||
$key_file = undef,
|
||||
$rabbit_host = $::os_service_default,
|
||||
$rabbit_hosts = $::os_service_default,
|
||||
$rabbit_password = $::os_service_default,
|
||||
$rabbit_port = $::os_service_default,
|
||||
$rabbit_userid = $::os_service_default,
|
||||
$rabbit_virtual_host = $::os_service_default,
|
||||
$rpc_backend = undef,
|
||||
) inherits cinder::params {
|
||||
|
||||
include ::cinder::deps
|
||||
include ::cinder::db
|
||||
include ::cinder::logging
|
||||
|
||||
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
|
||||
$rpc_backend or
|
||||
!is_service_default($rabbit_virtual_host) {
|
||||
warning("cinder::rabbit_host, cinder::rabbit_hosts, cinder::rabbit_password, \
|
||||
cinder::rabbit_port, cinder::rabbit_userid, cinder::rabbit_virtual_host and \
|
||||
cinder::rpc_backend are deprecated. Please use cinder::default_transport_url \
|
||||
instead.")
|
||||
}
|
||||
|
||||
package { 'cinder':
|
||||
ensure => $package_ensure,
|
||||
name => $::cinder::params::package_name,
|
||||
|
@ -406,12 +331,6 @@ instead.")
|
|||
}
|
||||
|
||||
oslo::messaging::rabbit { 'cinder_config':
|
||||
rabbit_userid => $rabbit_userid,
|
||||
rabbit_password => $rabbit_password,
|
||||
rabbit_virtual_host => $rabbit_virtual_host,
|
||||
rabbit_host => $rabbit_host,
|
||||
rabbit_port => $rabbit_port,
|
||||
rabbit_hosts => $rabbit_hosts,
|
||||
rabbit_ha_queues => $rabbit_ha_queues,
|
||||
heartbeat_timeout_threshold => $rabbit_heartbeat_timeout_threshold,
|
||||
heartbeat_rate => $rabbit_heartbeat_rate,
|
||||
|
@ -474,7 +393,7 @@ instead.")
|
|||
|
||||
# V3 APIs
|
||||
cinder_config {
|
||||
'DEFAULT/enable_v3_api': value => $enable_v3_api;
|
||||
'DEFAULT/enable_v3_api': value => $enable_v3_api;
|
||||
}
|
||||
|
||||
oslo::concurrency { 'cinder_config':
|
||||
|
|
|
@ -5,9 +5,6 @@
|
|||
#
|
||||
# === Parameters
|
||||
#
|
||||
# [*os_password*]
|
||||
# (Required) The keystone tenant:username password.
|
||||
#
|
||||
# [*set_key*]
|
||||
# (Optional) Must be used with set_value. Accepts a single string be used
|
||||
# as the key in type_set
|
||||
|
@ -18,44 +15,15 @@
|
|||
# passed to type_set
|
||||
# Defaults to 'undef'.
|
||||
#
|
||||
# === DEPRECATED PARAMETERS
|
||||
#
|
||||
# [*os_tenant_name*]
|
||||
# (Optional) The keystone tenant name.
|
||||
# Defaults to undef.
|
||||
#
|
||||
# [*os_username*]
|
||||
# (Optional) The keystone user name.
|
||||
# Defaults to undef.
|
||||
#
|
||||
# [*os_auth_url*]
|
||||
# (Optional) The keystone auth url.
|
||||
# Defaults to undef.
|
||||
#
|
||||
# [*os_region_name*]
|
||||
# (Optional) The keystone region name.
|
||||
# Default is undef.
|
||||
#
|
||||
# Author: Andrew Woodward <awoodward@mirantis.com>
|
||||
#
|
||||
define cinder::type (
|
||||
$set_key = undef,
|
||||
$set_value = undef,
|
||||
# DEPRECATED PARAMETERS
|
||||
$os_password = undef,
|
||||
$os_tenant_name = undef,
|
||||
$os_username = undef,
|
||||
$os_auth_url = undef,
|
||||
$os_region_name = undef,
|
||||
) {
|
||||
$set_key = undef,
|
||||
$set_value = undef,
|
||||
) {
|
||||
|
||||
include ::cinder::deps
|
||||
|
||||
if $os_password or $os_region_name or $os_tenant_name or $os_username or $os_auth_url {
|
||||
warning('Parameters $os_password/$os_region_name/$os_tenant_name/$os_username/$os_auth_url are not longer required')
|
||||
warning('Auth creds will be used from env or /root/openrc file or cinder.conf')
|
||||
}
|
||||
|
||||
if ($set_value and $set_key) {
|
||||
if is_array($set_value) {
|
||||
$value = join($set_value, ',')
|
||||
|
@ -68,7 +36,7 @@ define cinder::type (
|
|||
}
|
||||
} else {
|
||||
cinder_type { $name:
|
||||
ensure => present,
|
||||
ensure => present,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,45 +14,16 @@
|
|||
# [*value*]
|
||||
# the value that we are setting. Defaults to content of namevar.
|
||||
#
|
||||
# === Deprecated parameters
|
||||
#
|
||||
# [*os_password*]
|
||||
# (optional) DEPRECATED: The keystone tenant:username password.
|
||||
# Defaults to undef.
|
||||
#
|
||||
# [*os_tenant_name*]
|
||||
# (optional) DEPRECATED: The keystone tenant name. Defaults to undef.
|
||||
#
|
||||
# [*os_username*]
|
||||
# (optional) DEPRECATED: The keystone user name. Defaults to undef.
|
||||
#
|
||||
# [*os_auth_url*]
|
||||
# (optional) DEPRECATED: The keystone auth url. Defaults to undef.
|
||||
#
|
||||
# [*os_region_name*]
|
||||
# (optional) DEPRECATED: The keystone region name. Default is undef.
|
||||
#
|
||||
# Author: Andrew Woodward <awoodward@mirantis.com>
|
||||
#
|
||||
define cinder::type_set (
|
||||
$type,
|
||||
$key,
|
||||
$value = $name,
|
||||
# DEPRECATED PARAMETERS
|
||||
$os_password = undef,
|
||||
$os_tenant_name = undef,
|
||||
$os_username = undef,
|
||||
$os_auth_url = undef,
|
||||
$os_region_name = undef,
|
||||
) {
|
||||
$value = $name,
|
||||
) {
|
||||
|
||||
include ::cinder::deps
|
||||
|
||||
if $os_password or $os_region_name or $os_tenant_name or $os_username or $os_auth_url {
|
||||
warning('Parameters $os_password/$os_region_name/$os_tenant_name/$os_username/$os_auth_url are not longer required.')
|
||||
warning('Auth creds will be used from env or /root/openrc file or cinder.conf')
|
||||
}
|
||||
|
||||
cinder_type { $type:
|
||||
ensure => present,
|
||||
properties => ["${key}=${value}"],
|
||||
|
|
|
@ -2,38 +2,10 @@
|
|||
#
|
||||
# Creates vmdk specific disk file type & clone type.
|
||||
#
|
||||
# === Parameters
|
||||
#
|
||||
# [*os_password*]
|
||||
# DEPRECATED. The keystone tenant:username password.
|
||||
# Defaults to undef.
|
||||
#
|
||||
# [*os_tenant_name*]
|
||||
# DEPRECATED. The keystone tenant name.
|
||||
# Defaults to undef.
|
||||
#
|
||||
# [*os_username*]
|
||||
# DEPRECATED. The keystone user name.
|
||||
# Defaults to undef.
|
||||
#
|
||||
# [*os_auth_url*]
|
||||
# DEPRECATED. The keystone auth url.
|
||||
# Defaults to undef.
|
||||
#
|
||||
class cinder::vmware (
|
||||
$os_password = undef,
|
||||
$os_tenant_name = undef,
|
||||
$os_username = undef,
|
||||
$os_auth_url = undef
|
||||
) {
|
||||
class cinder::vmware {
|
||||
|
||||
include ::cinder::deps
|
||||
|
||||
if $os_password or $os_tenant_name or $os_username or $os_auth_url {
|
||||
warning('Parameters $os_password/$os_tenant_name/$os_username/$os_auth_url are not longer required.')
|
||||
warning('Auth creds will be used from env or /root/openrc file or cinder.conf')
|
||||
}
|
||||
|
||||
cinder_type { 'vmware-thin':
|
||||
ensure => present,
|
||||
properties => ['vmware:vmdk_type=thin']
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
---
|
||||
upgrade:
|
||||
- |
|
||||
The deprecated parameters cinder::rabbit_host, cinder::rabbit_hosts, cinder::rabbit_password,
|
||||
cinder::rabbit_port, cinder::rabbit_userid, cinder::rabbit_virtual_host and cinder::rpc_backend
|
||||
is removed. Please use cinder::default_transport_url instead.
|
||||
- |
|
||||
The deprecated parameters cinder::use_ssl, cinder::cert_file, cinder::key_file and cinder::ca_file
|
||||
is removed. You should now set them in the cinder::api class.
|
||||
- |
|
||||
The deprecated parameter cinder::api::validation_options is removed.
|
||||
- |
|
||||
The deprecated parameter netapp_eseries_host_type in cinder::backend::netapp is removed.
|
||||
Please use netapp_host_type instead.
|
||||
- |
|
||||
The deprecated parameters netapp_storage_pool and netapp_volume_list in cinder::backend::netapp is
|
||||
removed. Please use netapp_pool_name_search_pattern instead.
|
||||
- |
|
||||
The deprecated parameter cinder::backend::rbd::volume_tmp_dir is removed.
|
||||
Please use cinder::image_conversion_dir instead.
|
||||
- |
|
||||
The deprecated parameters os_password, os_tenant_name, os_username, os_auth_url and os_region_name
|
||||
in cinder::type_set is removed.
|
||||
- |
|
||||
The deprecated parameters os_password, os_tenant_name, os_username and os_auth_url in
|
||||
cinder::vmware is removed.
|
||||
- |
|
||||
The deprecated parameters os_password, os_tenant_name, os_userne, os_auth_url and os_region_name
|
||||
in cinder::type is removed.
|
|
@ -255,19 +255,6 @@ describe 'cinder::api' do
|
|||
)}
|
||||
end
|
||||
|
||||
describe 'while validating the service with custom command' do
|
||||
let :params do
|
||||
req_params.merge({
|
||||
:validate => true,
|
||||
:validation_options => { 'cinder-api' => { 'command' => 'my-script' } }
|
||||
})
|
||||
end
|
||||
it { is_expected.to contain_openstacklib__service_validation('cinder-api').with(
|
||||
:command => 'my-script',
|
||||
:subscribe => 'Service[cinder-api]',
|
||||
)}
|
||||
end
|
||||
|
||||
describe 'with a custom auth_strategy' do
|
||||
let :params do
|
||||
req_params.merge({'auth_strategy' => 'noauth'})
|
||||
|
@ -296,7 +283,7 @@ describe 'cinder::api' do
|
|||
|
||||
let :pre_condition do
|
||||
"include ::apache
|
||||
class { 'cinder': rabbit_password => 'secret' }
|
||||
class { 'cinder': }
|
||||
class { '::cinder::keystone::authtoken':
|
||||
password => 'foo',
|
||||
}"
|
||||
|
@ -318,7 +305,7 @@ describe 'cinder::api' do
|
|||
|
||||
let :pre_condition do
|
||||
"include ::apache
|
||||
class { 'cinder': rabbit_password => 'secret' }
|
||||
class { 'cinder': }
|
||||
class { '::cinder::keystone::authtoken':
|
||||
password => 'foo',
|
||||
}"
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe 'cinder' do
|
||||
let :req_params do
|
||||
{
|
||||
:rabbit_password => 'guest',
|
||||
:database_connection => 'mysql+pymysql://user:password@host/database',
|
||||
:lock_path => '/var/lock/cinder',
|
||||
}
|
||||
|
@ -37,15 +37,9 @@ describe 'cinder' do
|
|||
is_expected.to contain_cinder_config('DEFAULT/control_exchange').with(:value => 'openstack')
|
||||
is_expected.to contain_cinder_config('DEFAULT/report_interval').with(:value => '<SERVICE DEFAULT>')
|
||||
is_expected.to contain_cinder_config('DEFAULT/service_down_time').with(:value => '<SERVICE DEFAULT>')
|
||||
is_expected.to contain_cinder_config('oslo_messaging_rabbit/rabbit_password').with(:value => 'guest', :secret => true)
|
||||
is_expected.to contain_cinder_config('oslo_messaging_rabbit/rabbit_host').with(:value => '<SERVICE DEFAULT>')
|
||||
is_expected.to contain_cinder_config('oslo_messaging_rabbit/rabbit_port').with(:value => '<SERVICE DEFAULT>')
|
||||
is_expected.to contain_cinder_config('oslo_messaging_rabbit/rabbit_hosts').with(:value => '<SERVICE DEFAULT>')
|
||||
is_expected.to contain_cinder_config('oslo_messaging_rabbit/rabbit_ha_queues').with(:value => '<SERVICE DEFAULT>')
|
||||
is_expected.to contain_cinder_config('oslo_messaging_rabbit/rabbit_virtual_host').with(:value => '<SERVICE DEFAULT>')
|
||||
is_expected.to contain_cinder_config('oslo_messaging_rabbit/heartbeat_timeout_threshold').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_cinder_config('oslo_messaging_rabbit/heartbeat_rate').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_cinder_config('oslo_messaging_rabbit/rabbit_userid').with(:value => '<SERVICE DEFAULT>')
|
||||
is_expected.to contain_cinder_config('oslo_messaging_rabbit/kombu_reconnect_delay').with(:value => '<SERVICE DEFAULT>')
|
||||
is_expected.to contain_cinder_config('oslo_messaging_rabbit/kombu_failover_strategy').with(:value => '<SERVICE DEFAULT>')
|
||||
is_expected.to contain_cinder_config('oslo_messaging_rabbit/kombu_compression').with(:value => '<SERVICE DEFAULT>')
|
||||
|
@ -60,33 +54,8 @@ describe 'cinder' do
|
|||
end
|
||||
|
||||
end
|
||||
describe 'with modified rabbit_hosts' do
|
||||
let :params do
|
||||
req_params.merge({'rabbit_hosts' => ['rabbit1:5672', 'rabbit2:5672']})
|
||||
end
|
||||
|
||||
it 'should contain many' do
|
||||
is_expected.to contain_cinder_config('oslo_messaging_rabbit/rabbit_host').with(:value => '<SERVICE DEFAULT>')
|
||||
is_expected.to contain_cinder_config('oslo_messaging_rabbit/rabbit_port').with(:value => '<SERVICE DEFAULT>')
|
||||
is_expected.to contain_cinder_config('oslo_messaging_rabbit/rabbit_hosts').with(:value => 'rabbit1:5672,rabbit2:5672')
|
||||
is_expected.to contain_cinder_config('oslo_messaging_rabbit/rabbit_ha_queues').with(:value => true)
|
||||
end
|
||||
end
|
||||
|
||||
describe 'with a single rabbit_hosts entry' do
|
||||
let :params do
|
||||
req_params.merge({'rabbit_hosts' => ['rabbit1:5672']})
|
||||
end
|
||||
|
||||
it 'should contain many' do
|
||||
is_expected.to contain_cinder_config('oslo_messaging_rabbit/rabbit_host').with(:value => '<SERVICE DEFAULT>')
|
||||
is_expected.to contain_cinder_config('oslo_messaging_rabbit/rabbit_port').with(:value => '<SERVICE DEFAULT>')
|
||||
is_expected.to contain_cinder_config('oslo_messaging_rabbit/rabbit_hosts').with(:value => 'rabbit1:5672')
|
||||
is_expected.to contain_cinder_config('oslo_messaging_rabbit/rabbit_ha_queues').with(:value => '<SERVICE DEFAULT>')
|
||||
end
|
||||
end
|
||||
|
||||
describe 'a single rabbit_host with enable ha queues' do
|
||||
describe 'with enable ha queues' do
|
||||
let :params do
|
||||
req_params.merge({'rabbit_ha_queues' => true})
|
||||
end
|
||||
|
@ -135,7 +104,7 @@ describe 'cinder' do
|
|||
end
|
||||
|
||||
it { is_expected.to contain_oslo__messaging__rabbit('cinder_config').with(
|
||||
:rabbit_use_ssl => true,
|
||||
:rabbit_use_ssl => true,
|
||||
)}
|
||||
end
|
||||
|
||||
|
@ -239,7 +208,6 @@ describe 'cinder' do
|
|||
let :params do
|
||||
{
|
||||
:database_connection => 'postgresql://user:drowssap@host/database',
|
||||
:rabbit_password => 'guest',
|
||||
}
|
||||
end
|
||||
|
||||
|
@ -251,8 +219,7 @@ describe 'cinder' do
|
|||
describe 'with APIs set for Mitaka (proposed)' do
|
||||
let :params do
|
||||
{
|
||||
:enable_v3_api => true,
|
||||
:rabbit_password => 'guest',
|
||||
:enable_v3_api => true,
|
||||
}
|
||||
end
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ require 'spec_helper'
|
|||
describe 'cinder::volume' do
|
||||
|
||||
let :pre_condition do
|
||||
'class { "cinder": rabbit_password => "fpp", database_connection => "mysql://a:b@c/d" }'
|
||||
'class { "cinder": database_connection => "mysql://a:b@c/d" }'
|
||||
end
|
||||
|
||||
let :facts do
|
||||
|
|
|
@ -143,38 +143,6 @@ describe 'cinder::backend::netapp' do
|
|||
it_raises 'a Puppet::Error', /"not an array" is not an Array. It looks to be a String/
|
||||
end
|
||||
|
||||
context 'with storage pools' do
|
||||
before do
|
||||
params.merge!({ :netapp_storage_pools => 'foo' })
|
||||
end
|
||||
|
||||
it 'configures name seach pattern' do
|
||||
is_expected.to contain_cinder_config('netapp/netapp_pool_name_search_pattern').with_value('(foo)')
|
||||
end
|
||||
end
|
||||
|
||||
context 'with volume list' do
|
||||
before do
|
||||
params.merge!({ :netapp_volume_list=> 'bar' })
|
||||
end
|
||||
|
||||
it 'configures name seach pattern' do
|
||||
is_expected.to contain_cinder_config('netapp/netapp_pool_name_search_pattern').with_value('(bar)')
|
||||
end
|
||||
end
|
||||
|
||||
context 'with storage pools and volume list' do
|
||||
before do
|
||||
params.merge!({
|
||||
:netapp_storage_pools => 'foo',
|
||||
:netapp_volume_list=> 'bar' })
|
||||
end
|
||||
|
||||
it 'configures name seach pattern' do
|
||||
is_expected.to contain_cinder_config('netapp/netapp_pool_name_search_pattern').with_value('(foo|bar)')
|
||||
end
|
||||
end
|
||||
|
||||
context 'with name search pattern' do
|
||||
before do
|
||||
params.merge!({ :netapp_pool_name_search_pattern => '(something)' })
|
||||
|
|
|
@ -16,7 +16,6 @@ describe 'cinder::backend::rbd' do
|
|||
:rbd_secret_uuid => '<SERVICE DEFAULT>',
|
||||
:rbd_ceph_conf => '/foo/boo/zoo/ceph.conf',
|
||||
:rbd_flatten_volume_from_snapshot => true,
|
||||
:volume_tmp_dir => '<SERVICE DEFAULT>',
|
||||
:rbd_max_clone_depth => '0',
|
||||
:rados_connect_timeout => '<SERVICE DEFAULT>',
|
||||
:rados_connection_interval => '<SERVICE DEFAULT>',
|
||||
|
@ -42,7 +41,6 @@ describe 'cinder::backend::rbd' do
|
|||
is_expected.to contain_cinder_config("#{req_params[:volume_backend_name]}/volume_driver").with_value('cinder.volume.drivers.rbd.RBDDriver')
|
||||
is_expected.to contain_cinder_config("#{req_params[:volume_backend_name]}/rbd_ceph_conf").with_value(req_params[:rbd_ceph_conf])
|
||||
is_expected.to contain_cinder_config("#{req_params[:volume_backend_name]}/rbd_flatten_volume_from_snapshot").with_value(req_params[:rbd_flatten_volume_from_snapshot])
|
||||
is_expected.to contain_cinder_config("#{req_params[:volume_backend_name]}/volume_tmp_dir").with_value(req_params[:volume_tmp_dir])
|
||||
is_expected.to contain_cinder_config("#{req_params[:volume_backend_name]}/rbd_max_clone_depth").with_value(req_params[:rbd_max_clone_depth])
|
||||
is_expected.to contain_cinder_config("#{req_params[:volume_backend_name]}/rbd_pool").with_value(req_params[:rbd_pool])
|
||||
is_expected.to contain_cinder_config("#{req_params[:volume_backend_name]}/rbd_user").with_value(req_params[:rbd_user])
|
||||
|
|
|
@ -7,8 +7,8 @@ describe 'cinder::type_set' do
|
|||
let(:title) {'hippo'}
|
||||
|
||||
let :default_params do {
|
||||
:type => 'sith',
|
||||
:key => 'monchichi',
|
||||
:type => 'sith',
|
||||
:key => 'monchichi',
|
||||
}
|
||||
end
|
||||
|
||||
|
|
|
@ -14,8 +14,8 @@ describe 'cinder::type' do
|
|||
|
||||
context 'creation with properties' do
|
||||
let :params do {
|
||||
:set_value => ['name1','name2'],
|
||||
:set_key => 'volume_backend_name',
|
||||
:set_value => ['name1','name2'],
|
||||
:set_key => 'volume_backend_name',
|
||||
}
|
||||
end
|
||||
it 'should create type with properties' do
|
||||
|
|
Loading…
Reference in New Issue