replace validate_legacy with proper data types
the validate_legacy function is marked for deprecation in v9.0.0 from puppetlabs-stdlib. This change also adds a few more validations about some data types inexplicitly required. Change-Id: I18bc265876f48a7569e971681428fac9e2504486
This commit is contained in:
parent
19bc1d5ba6
commit
4d1bb7c07c
@ -109,20 +109,20 @@ class cinder::api (
|
||||
$service_workers = $facts['os_workers'],
|
||||
$package_ensure = 'present',
|
||||
$bind_host = $facts['os_service_default'],
|
||||
$enabled = true,
|
||||
$manage_service = true,
|
||||
Boolean $enabled = true,
|
||||
Boolean $manage_service = true,
|
||||
$ratelimits = $facts['os_service_default'],
|
||||
$default_volume_type = $facts['os_service_default'],
|
||||
$ratelimits_factory =
|
||||
'cinder.api.v2.limits:RateLimitingMiddleware.factory',
|
||||
$sync_db = true,
|
||||
Boolean $sync_db = true,
|
||||
$public_endpoint = $facts['os_service_default'],
|
||||
$osapi_volume_base_url = $facts['os_service_default'],
|
||||
$osapi_max_limit = $facts['os_service_default'],
|
||||
$service_name = $::cinder::params::api_service,
|
||||
$enable_proxy_headers_parsing = $facts['os_service_default'],
|
||||
$max_request_body_size = $facts['os_service_default'],
|
||||
$use_ssl = false,
|
||||
Boolean $use_ssl = false,
|
||||
$cert_file = $facts['os_service_default'],
|
||||
$key_file = $facts['os_service_default'],
|
||||
$ca_file = $facts['os_service_default'],
|
||||
@ -135,11 +135,6 @@ class cinder::api (
|
||||
include cinder::params
|
||||
include cinder::policy
|
||||
|
||||
validate_legacy(Boolean, 'validate_bool', $manage_service)
|
||||
validate_legacy(Boolean, 'validate_bool', $enabled)
|
||||
validate_legacy(Boolean, 'validate_bool', $sync_db)
|
||||
validate_legacy(Boolean, 'validate_bool', $use_ssl)
|
||||
|
||||
if $use_ssl {
|
||||
if is_service_default($cert_file) {
|
||||
fail('The cert_file parameter is required when use_ssl is set to true')
|
||||
|
@ -114,14 +114,12 @@ define cinder::backend::dellemc_powerflex(
|
||||
$san_thin_provision = $facts['os_service_default'],
|
||||
$driver_ssl_cert_verify = $facts['os_service_default'],
|
||||
$driver_ssl_cert_path = $facts['os_service_default'],
|
||||
$manage_volume_type = false,
|
||||
$extra_options = {},
|
||||
Boolean $manage_volume_type = false,
|
||||
Hash $extra_options = {},
|
||||
) {
|
||||
|
||||
include cinder::deps
|
||||
|
||||
validate_legacy(Boolean, 'validate_bool', $manage_volume_type)
|
||||
|
||||
cinder_config {
|
||||
"${name}/volume_driver": value => 'cinder.volume.drivers.dell_emc.powerflex.driver.PowerFlexDriver';
|
||||
"${name}/san_login": value => $san_login;
|
||||
|
@ -62,14 +62,12 @@ define cinder::backend::dellemc_powermax (
|
||||
$powermax_storage_protocol = 'iSCSI',
|
||||
$volume_backend_name = $name,
|
||||
$backend_availability_zone = $facts['os_service_default'],
|
||||
$extra_options = {},
|
||||
$manage_volume_type = false,
|
||||
Hash $extra_options = {},
|
||||
Boolean $manage_volume_type = false,
|
||||
) {
|
||||
|
||||
include cinder::deps
|
||||
|
||||
validate_legacy(Boolean, 'validate_bool', $manage_volume_type)
|
||||
|
||||
if $powermax_storage_protocol == 'iSCSI' {
|
||||
$volume_driver = 'cinder.volume.drivers.dell_emc.powermax.iscsi.PowerMaxISCSIDriver'
|
||||
}
|
||||
|
@ -50,14 +50,12 @@ define cinder::backend::dellemc_powerstore (
|
||||
$storage_protocol = 'iSCSI',
|
||||
$volume_backend_name = $name,
|
||||
$backend_availability_zone = $facts['os_service_default'],
|
||||
$manage_volume_type = false,
|
||||
$extra_options = {},
|
||||
Boolean $manage_volume_type = false,
|
||||
Hash $extra_options = {},
|
||||
) {
|
||||
|
||||
include cinder::deps
|
||||
|
||||
validate_legacy(Boolean, 'validate_bool', $manage_volume_type)
|
||||
|
||||
if $storage_protocol == 'iSCSI' {
|
||||
$driver = 'dell_emc.powerstore.driver.PowerStoreDriver'
|
||||
}
|
||||
|
@ -111,16 +111,14 @@ define cinder::backend::dellemc_sc (
|
||||
$secondary_san_login = $facts['os_service_default'],
|
||||
$secondary_san_password = $facts['os_service_default'],
|
||||
$secondary_sc_api_port = $facts['os_service_default'],
|
||||
$manage_volume_type = false,
|
||||
Boolean $manage_volume_type = false,
|
||||
$use_multipath_for_image_xfer = true,
|
||||
$sc_storage_protocol = 'iSCSI',
|
||||
$extra_options = {},
|
||||
Hash $extra_options = {},
|
||||
) {
|
||||
|
||||
include cinder::deps
|
||||
|
||||
validate_legacy(Boolean, 'validate_bool', $manage_volume_type)
|
||||
|
||||
if $sc_storage_protocol == 'iSCSI' {
|
||||
$volume_driver = 'cinder.volume.drivers.dell_emc.sc.storagecenter_iscsi.SCISCSIDriver'
|
||||
}
|
||||
|
@ -52,18 +52,16 @@ define cinder::backend::dellemc_unity (
|
||||
$san_login,
|
||||
$san_password,
|
||||
$storage_protocol,
|
||||
$volume_backend_name = $name,
|
||||
$backend_availability_zone = $facts['os_service_default'],
|
||||
$unity_io_ports = $facts['os_service_default'],
|
||||
$unity_storage_pool_names = $facts['os_service_default'],
|
||||
$manage_volume_type = false,
|
||||
$extra_options = {},
|
||||
$volume_backend_name = $name,
|
||||
$backend_availability_zone = $facts['os_service_default'],
|
||||
$unity_io_ports = $facts['os_service_default'],
|
||||
$unity_storage_pool_names = $facts['os_service_default'],
|
||||
Boolean $manage_volume_type = false,
|
||||
Hash $extra_options = {},
|
||||
) {
|
||||
|
||||
include cinder::deps
|
||||
|
||||
validate_legacy(Boolean, 'validate_bool', $manage_volume_type)
|
||||
|
||||
$driver = 'dell_emc.unity.Driver'
|
||||
cinder_config {
|
||||
"${name}/volume_backend_name": value => $volume_backend_name;
|
||||
|
@ -72,16 +72,14 @@ define cinder::backend::dellemc_xtremio (
|
||||
$xtremio_array_busy_retry_count = $facts['os_service_default'],
|
||||
$xtremio_array_busy_retry_interval = $facts['os_service_default'],
|
||||
$xtremio_volumes_per_glance_cache = $facts['os_service_default'],
|
||||
$manage_volume_type = false,
|
||||
Boolean $manage_volume_type = false,
|
||||
$xtremio_storage_protocol = 'iSCSI',
|
||||
$xtremio_ports = $facts['os_service_default'],
|
||||
$extra_options = {},
|
||||
Hash $extra_options = {},
|
||||
) {
|
||||
|
||||
include cinder::deps
|
||||
|
||||
validate_legacy(Boolean, 'validate_bool', $manage_volume_type)
|
||||
|
||||
if $xtremio_storage_protocol == 'iSCSI' {
|
||||
$driver = 'dell_emc.xtremio.XtremIOISCSIDriver'
|
||||
}
|
||||
|
@ -121,7 +121,7 @@ define cinder::backend::emc_vnx (
|
||||
$san_login = 'admin',
|
||||
$volume_backend_name = $name,
|
||||
$backend_availability_zone = $facts['os_service_default'],
|
||||
$extra_options = {},
|
||||
Hash $extra_options = {},
|
||||
$volume_driver = 'cinder.volume.drivers.dell_emc.vnx.driver.VNXDriver',
|
||||
$storage_protocol = 'iscsi',
|
||||
$destroy_empty_storage_group = $facts['os_service_default'],
|
||||
@ -135,14 +135,12 @@ define cinder::backend::emc_vnx (
|
||||
$storage_vnx_auth_type = $facts['os_service_default'],
|
||||
$storage_vnx_security_file_dir = $facts['os_service_default'],
|
||||
$naviseccli_path = $facts['os_service_default'],
|
||||
$manage_volume_type = false,
|
||||
Boolean $manage_volume_type = false,
|
||||
) {
|
||||
|
||||
include cinder::deps
|
||||
include cinder::params
|
||||
|
||||
validate_legacy(Boolean, 'validate_bool', $manage_volume_type)
|
||||
|
||||
cinder_config {
|
||||
"${name}/default_timeout": value => $default_timeout;
|
||||
"${name}/max_luns_per_storage_group": value => $max_luns_per_storage_group;
|
||||
|
@ -92,25 +92,23 @@
|
||||
#
|
||||
define cinder::backend::gpfs (
|
||||
$gpfs_mount_point_base,
|
||||
$gpfs_images_dir = $facts['os_service_default'],
|
||||
$gpfs_images_share_mode = $facts['os_service_default'],
|
||||
$gpfs_max_clone_depth = $facts['os_service_default'],
|
||||
$gpfs_sparse_volumes = $facts['os_service_default'],
|
||||
$gpfs_storage_pool = $facts['os_service_default'],
|
||||
$nas_host = $facts['os_service_default'],
|
||||
$nas_login = $facts['os_service_default'],
|
||||
$nas_password = $facts['os_service_default'],
|
||||
$nas_private_key = $facts['os_service_default'],
|
||||
$nas_ssh_port = $facts['os_service_default'],
|
||||
$backend_availability_zone = $facts['os_service_default'],
|
||||
$manage_volume_type = false,
|
||||
$extra_options = {},
|
||||
$gpfs_images_dir = $facts['os_service_default'],
|
||||
$gpfs_images_share_mode = $facts['os_service_default'],
|
||||
$gpfs_max_clone_depth = $facts['os_service_default'],
|
||||
$gpfs_sparse_volumes = $facts['os_service_default'],
|
||||
$gpfs_storage_pool = $facts['os_service_default'],
|
||||
$nas_host = $facts['os_service_default'],
|
||||
$nas_login = $facts['os_service_default'],
|
||||
$nas_password = $facts['os_service_default'],
|
||||
$nas_private_key = $facts['os_service_default'],
|
||||
$nas_ssh_port = $facts['os_service_default'],
|
||||
$backend_availability_zone = $facts['os_service_default'],
|
||||
Boolean $manage_volume_type = false,
|
||||
Hash $extra_options = {},
|
||||
) {
|
||||
|
||||
include cinder::deps
|
||||
|
||||
validate_legacy(Boolean, 'validate_bool', $manage_volume_type)
|
||||
|
||||
if ! ($gpfs_images_share_mode in ['copy', 'copy_on_write', $facts['os_service_default']]) {
|
||||
fail('gpfs_images_share_mode only support `copy` or `copy_on_write`')
|
||||
}
|
||||
|
@ -86,14 +86,12 @@ define cinder::backend::hpe3par_iscsi(
|
||||
$hpe3par_cpg_snap = 'userCPG',
|
||||
$hpe3par_snapshot_retention = 48,
|
||||
$hpe3par_snapshot_expiration = 72,
|
||||
$manage_volume_type = false,
|
||||
$extra_options = {},
|
||||
Boolean $manage_volume_type = false,
|
||||
Hash $extra_options = {},
|
||||
) {
|
||||
|
||||
include cinder::deps
|
||||
|
||||
validate_legacy(Boolean, 'validate_bool', $manage_volume_type)
|
||||
|
||||
if ($hpe3par_snapshot_expiration <= $hpe3par_snapshot_retention) {
|
||||
fail ('hpe3par_snapshot_expiration must be greater than hpe3par_snapshot_retention')
|
||||
}
|
||||
|
@ -77,14 +77,12 @@ define cinder::backend::ibm_svf (
|
||||
$storwize_portset = $facts['os_service_default'],
|
||||
$volume_backend_name = $name,
|
||||
$backend_availability_zone = $facts['os_service_default'],
|
||||
$extra_options = {},
|
||||
$manage_volume_type = false,
|
||||
Hash $extra_options = {},
|
||||
Boolean $manage_volume_type = false,
|
||||
) {
|
||||
|
||||
include cinder::deps
|
||||
|
||||
validate_legacy(Boolean, 'validate_bool', $manage_volume_type)
|
||||
|
||||
# NOTE: Svf was earlier called as storwize/svc driver, so the cinder
|
||||
# configuration parameters were named accordingly.
|
||||
if $storwize_svc_connection_protocol == 'iSCSI' {
|
||||
|
@ -50,23 +50,21 @@
|
||||
# { 'iscsi_backend/param1' => { 'value' => value1 } }
|
||||
#
|
||||
define cinder::backend::iscsi (
|
||||
$target_ip_address = undef,
|
||||
$volume_backend_name = $name,
|
||||
$backend_availability_zone = $facts['os_service_default'],
|
||||
$volume_driver = 'cinder.volume.drivers.lvm.LVMVolumeDriver',
|
||||
$volume_group = $facts['os_service_default'],
|
||||
$volumes_dir = '/var/lib/cinder/volumes',
|
||||
$target_helper = $::cinder::params::target_helper,
|
||||
$target_protocol = $facts['os_service_default'],
|
||||
$manage_volume_type = false,
|
||||
$extra_options = {},
|
||||
$target_ip_address = undef,
|
||||
$volume_backend_name = $name,
|
||||
$backend_availability_zone = $facts['os_service_default'],
|
||||
$volume_driver = 'cinder.volume.drivers.lvm.LVMVolumeDriver',
|
||||
$volume_group = $facts['os_service_default'],
|
||||
$volumes_dir = '/var/lib/cinder/volumes',
|
||||
$target_helper = $::cinder::params::target_helper,
|
||||
$target_protocol = $facts['os_service_default'],
|
||||
Boolean $manage_volume_type = false,
|
||||
Hash $extra_options = {},
|
||||
) {
|
||||
|
||||
include cinder::deps
|
||||
include cinder::params
|
||||
|
||||
validate_legacy(Boolean, 'validate_bool', $manage_volume_type)
|
||||
|
||||
# NOTE(mnaser): Cinder requires /usr/sbin/thin_check to create volumes which
|
||||
# does not get installed with Cinder (see LP#1615134).
|
||||
if $facts['os']['family'] == 'Debian' {
|
||||
|
@ -170,42 +170,38 @@ define cinder::backend::netapp (
|
||||
$netapp_login,
|
||||
$netapp_password,
|
||||
$netapp_server_hostname,
|
||||
$volume_backend_name = $name,
|
||||
$backend_availability_zone = $facts['os_service_default'],
|
||||
$netapp_server_port = $facts['os_service_default'],
|
||||
$netapp_size_multiplier = $facts['os_service_default'],
|
||||
$netapp_storage_family = $facts['os_service_default'],
|
||||
$netapp_storage_protocol = 'nfs',
|
||||
$netapp_transport_type = $facts['os_service_default'],
|
||||
$netapp_vserver = $facts['os_service_default'],
|
||||
$expiry_thres_minutes = $facts['os_service_default'],
|
||||
$thres_avl_size_perc_start = $facts['os_service_default'],
|
||||
$thres_avl_size_perc_stop = $facts['os_service_default'],
|
||||
$nfs_shares = undef,
|
||||
$nfs_shares_config = '/etc/cinder/shares.conf',
|
||||
$nfs_mount_options = $facts['os_service_default'],
|
||||
$netapp_host_type = $facts['os_service_default'],
|
||||
$manage_volume_type = false,
|
||||
$extra_options = {},
|
||||
$netapp_pool_name_search_pattern = $facts['os_service_default'],
|
||||
$nas_secure_file_operations = $facts['os_service_default'],
|
||||
$nas_secure_file_permissions = $facts['os_service_default'],
|
||||
$volume_backend_name = $name,
|
||||
$backend_availability_zone = $facts['os_service_default'],
|
||||
$netapp_server_port = $facts['os_service_default'],
|
||||
$netapp_size_multiplier = $facts['os_service_default'],
|
||||
$netapp_storage_family = $facts['os_service_default'],
|
||||
$netapp_storage_protocol = 'nfs',
|
||||
$netapp_transport_type = $facts['os_service_default'],
|
||||
$netapp_vserver = $facts['os_service_default'],
|
||||
$expiry_thres_minutes = $facts['os_service_default'],
|
||||
$thres_avl_size_perc_start = $facts['os_service_default'],
|
||||
$thres_avl_size_perc_stop = $facts['os_service_default'],
|
||||
Optional[Array[String]] $nfs_shares = undef,
|
||||
$nfs_shares_config = '/etc/cinder/shares.conf',
|
||||
$nfs_mount_options = $facts['os_service_default'],
|
||||
$netapp_host_type = $facts['os_service_default'],
|
||||
Boolean $manage_volume_type = false,
|
||||
Hash $extra_options = {},
|
||||
$netapp_pool_name_search_pattern = $facts['os_service_default'],
|
||||
$nas_secure_file_operations = $facts['os_service_default'],
|
||||
$nas_secure_file_permissions = $facts['os_service_default'],
|
||||
# DEPRECATED PARAMETERS
|
||||
$netapp_copyoffload_tool_path = undef,
|
||||
$netapp_copyoffload_tool_path = undef,
|
||||
) {
|
||||
|
||||
include cinder::deps
|
||||
|
||||
validate_legacy(Boolean, 'validate_bool', $manage_volume_type)
|
||||
|
||||
if $netapp_copyoffload_tool_path != undef {
|
||||
warning("The netapp_copyoffload_tool_path parameter has been deprecated \
|
||||
and will be removed in a future release.")
|
||||
}
|
||||
|
||||
if $nfs_shares {
|
||||
validate_legacy(Array, 'validate_array', $nfs_shares)
|
||||
|
||||
file {$nfs_shares_config:
|
||||
content => join($nfs_shares, "\n"),
|
||||
require => Anchor['cinder::install::end'],
|
||||
|
@ -76,14 +76,12 @@ define cinder::backend::nexenta (
|
||||
$nexenta_sparse = true,
|
||||
$nexenta_rest_port = '8457',
|
||||
$volume_driver = 'cinder.volume.drivers.nexenta.iscsi.NexentaISCSIDriver',
|
||||
$manage_volume_type = false,
|
||||
$extra_options = {},
|
||||
Boolean $manage_volume_type = false,
|
||||
Hash $extra_options = {},
|
||||
) {
|
||||
|
||||
include cinder::deps
|
||||
|
||||
validate_legacy(Boolean, 'validate_bool', $manage_volume_type)
|
||||
|
||||
cinder_config {
|
||||
"${name}/volume_backend_name": value => $volume_backend_name;
|
||||
"${name}/backend_availability_zone": value => $backend_availability_zone;
|
||||
|
@ -92,7 +92,7 @@
|
||||
define cinder::backend::nfs (
|
||||
$volume_backend_name = $name,
|
||||
$backend_availability_zone = $facts['os_service_default'],
|
||||
$nfs_servers = [],
|
||||
Array[String] $nfs_servers = [],
|
||||
$nfs_mount_attempts = $facts['os_service_default'],
|
||||
$nfs_mount_options = $facts['os_service_default'],
|
||||
$nfs_sparsed_volumes = $facts['os_service_default'],
|
||||
@ -104,15 +104,13 @@ define cinder::backend::nfs (
|
||||
$nas_secure_file_permissions = $facts['os_service_default'],
|
||||
$nfs_snapshot_support = $facts['os_service_default'],
|
||||
$nfs_qcow2_volumes = $facts['os_service_default'],
|
||||
$manage_volume_type = false,
|
||||
$extra_options = {},
|
||||
Boolean $manage_volume_type = false,
|
||||
Hash $extra_options = {},
|
||||
) {
|
||||
|
||||
include cinder::deps
|
||||
|
||||
validate_legacy(Boolean, 'validate_bool', $manage_volume_type)
|
||||
|
||||
file {$nfs_shares_config:
|
||||
file { $nfs_shares_config:
|
||||
content => join($nfs_servers, "\n"),
|
||||
require => Anchor['cinder::install::end'],
|
||||
notify => Anchor['cinder::service::begin'],
|
||||
|
@ -100,7 +100,7 @@ define cinder::backend::pure(
|
||||
$pure_storage_protocol = 'iSCSI',
|
||||
$use_chap_auth = false,
|
||||
$use_multipath_for_image_xfer = true,
|
||||
$manage_volume_type = false,
|
||||
Boolean $manage_volume_type = false,
|
||||
$image_volume_cache_enabled = true,
|
||||
$pure_host_personality = $facts['os_service_default'],
|
||||
$pure_eradicate_on_delete = $facts['os_service_default'],
|
||||
@ -109,13 +109,11 @@ define cinder::backend::pure(
|
||||
$pure_nvme_cidr_list = $facts['os_service_default'],
|
||||
$pure_iscsi_cidr = $facts['os_service_default'],
|
||||
$pure_iscsi_cidr_list = $facts['os_service_default'],
|
||||
$extra_options = {},
|
||||
Hash $extra_options = {},
|
||||
) {
|
||||
|
||||
include cinder::deps
|
||||
|
||||
validate_legacy(Boolean, 'validate_bool', $manage_volume_type)
|
||||
|
||||
$volume_driver = $pure_storage_protocol ? {
|
||||
'FC' => 'cinder.volume.drivers.pure.PureFCDriver',
|
||||
'iSCSI' => 'cinder.volume.drivers.pure.PureISCSIDriver',
|
||||
|
@ -54,19 +54,17 @@
|
||||
#
|
||||
define cinder::backend::quobyte (
|
||||
$quobyte_volume_url,
|
||||
$quobyte_client_cfg = undef,
|
||||
$quobyte_qcow2_volumes = undef,
|
||||
$quobyte_sparsed_volumes = undef,
|
||||
$quobyte_mount_point_base = undef,
|
||||
$volume_backend_name = $name,
|
||||
$backend_availability_zone = $facts['os_service_default'],
|
||||
$manage_volume_type = false,
|
||||
$quobyte_client_cfg = undef,
|
||||
$quobyte_qcow2_volumes = undef,
|
||||
$quobyte_sparsed_volumes = undef,
|
||||
$quobyte_mount_point_base = undef,
|
||||
$volume_backend_name = $name,
|
||||
$backend_availability_zone = $facts['os_service_default'],
|
||||
Boolean $manage_volume_type = false,
|
||||
) {
|
||||
|
||||
include cinder::deps
|
||||
|
||||
validate_legacy(Boolean, 'validate_bool', $manage_volume_type)
|
||||
|
||||
cinder_config {
|
||||
"${name}/volume_backend_name": value => $volume_backend_name;
|
||||
"${name}/backend_availability_zone": value => $backend_availability_zone;
|
||||
|
@ -100,15 +100,13 @@ define cinder::backend::rbd (
|
||||
$rbd_store_chunk_size = $facts['os_service_default'],
|
||||
$report_dynamic_total_capacity = $facts['os_service_default'],
|
||||
$rbd_exclusive_cinder_pool = $facts['os_service_default'],
|
||||
$manage_volume_type = false,
|
||||
$extra_options = {},
|
||||
Boolean $manage_volume_type = false,
|
||||
Hash $extra_options = {},
|
||||
) {
|
||||
|
||||
include cinder::deps
|
||||
include cinder::params
|
||||
|
||||
validate_legacy(Boolean, 'validate_bool', $manage_volume_type)
|
||||
|
||||
$rbd_cluster_name = basename($rbd_ceph_conf, '.conf')
|
||||
if $rbd_cluster_name == 'ceph' {
|
||||
# Do not pass a parameter value in order to avoid service restarts
|
||||
|
@ -81,28 +81,26 @@
|
||||
#
|
||||
define cinder::backend::san (
|
||||
$volume_driver,
|
||||
$volume_backend_name = $name,
|
||||
$backend_availability_zone = $facts['os_service_default'],
|
||||
$san_thin_provision = $facts['os_service_default'],
|
||||
$san_ip = $facts['os_service_default'],
|
||||
$san_login = $facts['os_service_default'],
|
||||
$san_password = $facts['os_service_default'],
|
||||
$san_private_key = $facts['os_service_default'],
|
||||
$san_clustername = $facts['os_service_default'],
|
||||
$san_ssh_port = $facts['os_service_default'],
|
||||
$san_api_port = $facts['os_service_default'],
|
||||
$san_is_local = $facts['os_service_default'],
|
||||
$ssh_conn_timeout = $facts['os_service_default'],
|
||||
$ssh_min_pool_conn = $facts['os_service_default'],
|
||||
$ssh_max_pool_conn = $facts['os_service_default'],
|
||||
$manage_volume_type = false,
|
||||
$extra_options = {},
|
||||
$volume_backend_name = $name,
|
||||
$backend_availability_zone = $facts['os_service_default'],
|
||||
$san_thin_provision = $facts['os_service_default'],
|
||||
$san_ip = $facts['os_service_default'],
|
||||
$san_login = $facts['os_service_default'],
|
||||
$san_password = $facts['os_service_default'],
|
||||
$san_private_key = $facts['os_service_default'],
|
||||
$san_clustername = $facts['os_service_default'],
|
||||
$san_ssh_port = $facts['os_service_default'],
|
||||
$san_api_port = $facts['os_service_default'],
|
||||
$san_is_local = $facts['os_service_default'],
|
||||
$ssh_conn_timeout = $facts['os_service_default'],
|
||||
$ssh_min_pool_conn = $facts['os_service_default'],
|
||||
$ssh_max_pool_conn = $facts['os_service_default'],
|
||||
Boolean $manage_volume_type = false,
|
||||
Hash $extra_options = {},
|
||||
) {
|
||||
|
||||
include cinder::deps
|
||||
|
||||
validate_legacy(Boolean, 'validate_bool', $manage_volume_type)
|
||||
|
||||
cinder_config {
|
||||
"${name}/volume_backend_name": value => $volume_backend_name;
|
||||
"${name}/backend_availability_zone": value => $backend_availability_zone;
|
||||
|
@ -119,14 +119,12 @@ define cinder::backend::solidfire(
|
||||
$sf_api_request_timeout = $facts['os_service_default'],
|
||||
$sf_volume_clone_timeout = $facts['os_service_default'],
|
||||
$sf_volume_create_timeout = $facts['os_service_default'],
|
||||
$manage_volume_type = false,
|
||||
$extra_options = {},
|
||||
Boolean $manage_volume_type = false,
|
||||
Hash $extra_options = {},
|
||||
) {
|
||||
|
||||
include cinder::deps
|
||||
|
||||
validate_legacy(Boolean, 'validate_bool', $manage_volume_type)
|
||||
|
||||
cinder_config {
|
||||
"${name}/volume_backend_name": value => $volume_backend_name;
|
||||
"${name}/backend_availability_zone": value => $backend_availability_zone;
|
||||
|
@ -81,14 +81,12 @@ define cinder::backend::vmdk (
|
||||
$task_poll_interval = $facts['os_service_default'],
|
||||
$image_transfer_timeout_secs = $facts['os_service_default'],
|
||||
$wsdl_location = $facts['os_service_default'],
|
||||
$manage_volume_type = false,
|
||||
$extra_options = {},
|
||||
Boolean $manage_volume_type = false,
|
||||
Hash $extra_options = {},
|
||||
) {
|
||||
|
||||
include cinder::deps
|
||||
|
||||
validate_legacy(Boolean, 'validate_bool', $manage_volume_type)
|
||||
|
||||
cinder_config {
|
||||
"${name}/volume_backend_name": value => $volume_backend_name;
|
||||
"${name}/backend_availability_zone": value => $backend_availability_zone;
|
||||
|
@ -65,25 +65,23 @@
|
||||
define cinder::backend::vstorage (
|
||||
$cluster_name,
|
||||
$cluster_password,
|
||||
$volume_backend_name = $name,
|
||||
$backend_availability_zone = $facts['os_service_default'],
|
||||
$shares_config_path = '/etc/cinder/vzstorage_shares',
|
||||
$use_sparsed_volumes = $facts['os_service_default'],
|
||||
$used_ratio = $facts['os_service_default'],
|
||||
$mount_point_base = $facts['os_service_default'],
|
||||
$default_volume_format = $facts['os_service_default'],
|
||||
$manage_volume_type = false,
|
||||
$mount_user = undef,
|
||||
$mount_group = 'root',
|
||||
$mount_permissions = '0770',
|
||||
$manage_package = true,
|
||||
$volume_backend_name = $name,
|
||||
$backend_availability_zone = $facts['os_service_default'],
|
||||
$shares_config_path = '/etc/cinder/vzstorage_shares',
|
||||
$use_sparsed_volumes = $facts['os_service_default'],
|
||||
$used_ratio = $facts['os_service_default'],
|
||||
$mount_point_base = $facts['os_service_default'],
|
||||
$default_volume_format = $facts['os_service_default'],
|
||||
Boolean $manage_volume_type = false,
|
||||
$mount_user = undef,
|
||||
$mount_group = 'root',
|
||||
$mount_permissions = '0770',
|
||||
Boolean $manage_package = true,
|
||||
) {
|
||||
|
||||
include cinder::deps
|
||||
include cinder::params
|
||||
|
||||
validate_legacy(Boolean, 'validate_bool', $manage_volume_type)
|
||||
|
||||
$mount_user_real = pick($mount_user, $::cinder::params::user)
|
||||
|
||||
cinder_config {
|
||||
|
@ -58,22 +58,19 @@
|
||||
# under the License.
|
||||
#
|
||||
class cinder::backup (
|
||||
$enabled = true,
|
||||
$manage_service = true,
|
||||
$package_ensure = 'present',
|
||||
$backup_manager = $facts['os_service_default'],
|
||||
$backup_api_class = $facts['os_service_default'],
|
||||
$backup_name_template = $facts['os_service_default'],
|
||||
$backup_workers = $facts['os_service_default'],
|
||||
$backup_max_operations = $facts['os_service_default'],
|
||||
Boolean $enabled = true,
|
||||
Boolean $manage_service = true,
|
||||
$package_ensure = 'present',
|
||||
$backup_manager = $facts['os_service_default'],
|
||||
$backup_api_class = $facts['os_service_default'],
|
||||
$backup_name_template = $facts['os_service_default'],
|
||||
$backup_workers = $facts['os_service_default'],
|
||||
$backup_max_operations = $facts['os_service_default'],
|
||||
) {
|
||||
|
||||
include cinder::deps
|
||||
include cinder::params
|
||||
|
||||
validate_legacy(Boolean, 'validate_bool', $manage_service)
|
||||
validate_legacy(Boolean, 'validate_bool', $enabled)
|
||||
|
||||
if $::cinder::params::backup_package {
|
||||
package { 'cinder-backup':
|
||||
ensure => $package_ensure,
|
||||
|
@ -69,7 +69,7 @@
|
||||
#
|
||||
#
|
||||
class cinder::backup::nfs (
|
||||
$backup_share,
|
||||
String[1] $backup_share,
|
||||
$backup_driver = 'cinder.backup.drivers.nfs.NFSBackupDriver',
|
||||
$backup_file_size = $facts['os_service_default'],
|
||||
$backup_sha_block_size_bytes = $facts['os_service_default'],
|
||||
@ -82,8 +82,6 @@ class cinder::backup::nfs (
|
||||
|
||||
include cinder::deps
|
||||
|
||||
validate_legacy(String, 'validate_string', $backup_share)
|
||||
|
||||
cinder_config {
|
||||
'DEFAULT/backup_mount_options': value => $backup_mount_options;
|
||||
'DEFAULT/backup_share': value => $backup_share;
|
||||
|
@ -32,17 +32,13 @@
|
||||
# or Puppet catalog compilation will fail with duplicate resources.
|
||||
#
|
||||
class cinder::config (
|
||||
$cinder_config = {},
|
||||
$api_paste_ini_config = {},
|
||||
$cinder_rootwrap_config = {},
|
||||
Hash $cinder_config = {},
|
||||
Hash $api_paste_ini_config = {},
|
||||
Hash $cinder_rootwrap_config = {},
|
||||
) {
|
||||
|
||||
include cinder::deps
|
||||
|
||||
validate_legacy(Hash, 'validate_hash', $cinder_config)
|
||||
validate_legacy(Hash, 'validate_hash', $api_paste_ini_config)
|
||||
validate_legacy(Hash, 'validate_hash', $cinder_rootwrap_config)
|
||||
|
||||
create_resources('cinder_config', $cinder_config)
|
||||
create_resources('cinder_api_paste_ini', $api_paste_ini_config)
|
||||
create_resources('cinder_rootwrap_config', $cinder_rootwrap_config)
|
||||
|
@ -33,7 +33,7 @@
|
||||
# Defaults to 'utf8_general_ci'
|
||||
#
|
||||
class cinder::db::mysql (
|
||||
$password,
|
||||
String[1] $password,
|
||||
$dbname = 'cinder',
|
||||
$user = 'cinder',
|
||||
$host = '127.0.0.1',
|
||||
@ -44,8 +44,6 @@ class cinder::db::mysql (
|
||||
|
||||
include cinder::deps
|
||||
|
||||
validate_legacy(String, 'validate_string', $password)
|
||||
|
||||
::openstacklib::db::mysql { 'cinder':
|
||||
user => $user,
|
||||
password => $password,
|
||||
|
@ -48,7 +48,7 @@
|
||||
class cinder::policy (
|
||||
$enforce_scope = $facts['os_service_default'],
|
||||
$enforce_new_defaults = $facts['os_service_default'],
|
||||
$policies = {},
|
||||
Hash $policies = {},
|
||||
$policy_path = '/etc/cinder/policy.yaml',
|
||||
$policy_default_rule = $facts['os_service_default'],
|
||||
$policy_dirs = $facts['os_service_default'],
|
||||
@ -58,8 +58,6 @@ class cinder::policy (
|
||||
include cinder::deps
|
||||
include cinder::params
|
||||
|
||||
validate_legacy(Hash, 'validate_hash', $policies)
|
||||
|
||||
$policy_parameters = {
|
||||
policies => $policies,
|
||||
policy_path => $policy_path,
|
||||
|
@ -22,18 +22,15 @@
|
||||
#
|
||||
#
|
||||
class cinder::scheduler (
|
||||
$scheduler_driver = $facts['os_service_default'],
|
||||
$package_ensure = 'present',
|
||||
$enabled = true,
|
||||
$manage_service = true
|
||||
$scheduler_driver = $facts['os_service_default'],
|
||||
$package_ensure = 'present',
|
||||
Boolean $enabled = true,
|
||||
Boolean $manage_service = true
|
||||
) {
|
||||
|
||||
include cinder::deps
|
||||
include cinder::params
|
||||
|
||||
validate_legacy(Boolean, 'validate_bool', $manage_service)
|
||||
validate_legacy(Boolean, 'validate_bool', $enabled)
|
||||
|
||||
cinder_config { 'DEFAULT/scheduler_driver': value => $scheduler_driver; }
|
||||
|
||||
if $::cinder::params::scheduler_package {
|
||||
|
@ -59,8 +59,8 @@
|
||||
#
|
||||
class cinder::volume (
|
||||
$package_ensure = 'present',
|
||||
$enabled = true,
|
||||
$manage_service = true,
|
||||
Boolean $enabled = true,
|
||||
Boolean $manage_service = true,
|
||||
$cluster = $facts['os_service_default'],
|
||||
$volume_clear = $facts['os_service_default'],
|
||||
$volume_clear_size = $facts['os_service_default'],
|
||||
@ -75,9 +75,6 @@ class cinder::volume (
|
||||
include cinder::deps
|
||||
include cinder::params
|
||||
|
||||
validate_legacy(Boolean, 'validate_bool', $manage_service)
|
||||
validate_legacy(Boolean, 'validate_bool', $enabled)
|
||||
|
||||
if $::cinder::params::volume_package {
|
||||
package { 'cinder-volume':
|
||||
ensure => $package_ensure,
|
||||
|
Loading…
Reference in New Issue
Block a user