Merge "Solidfire: Improve parameter coverage"

This commit is contained in:
Zuul 2022-04-04 21:56:13 +00:00 committed by Gerrit Code Review
commit 23e6869b6e
3 changed files with 107 additions and 43 deletions

View File

@ -59,6 +59,34 @@
# (optional) Utilize volume access groups on a per-tenant basis. # (optional) Utilize volume access groups on a per-tenant basis.
# Defaults to $::os_service_default # Defaults to $::os_service_default
# #
# [*sf_provisioning_calc*]
# (optional) Change how SolidFire reports used space and provisioning
# calculations.
# Defaults to $::os_service_default
#
# [*sf_cluster_pairing_timeout*]
# (optional) Sets time in seconds to wait for cluster to complete paring.
# Defaults to $::os_service_default
#
# [*sf_volume_pairing_timeout*]
# (optional) Sets time in seconds to wait for a migrating volume to complete
# paring and sync.
# Defaults to $::os_service_default
#
# [*sf_api_request_timeout*]
# (optional) Sets time in seconds to wait for an api request to complete.
# Defaults to $::os_service_default
#
# [*sf_volume_clone_timeout*]
# (optional) Sets time in seconds to wait for a clone of a volume or snapshot
# to complete.
# Defaults to $::os_service_default
#
# [*sf_volume_create_timeout*]
# (optional) Sets time in seconds to wait for a create volume operation to
# complete.
# Defaults to $::os_service_default
#
# [*manage_volume_type*] # [*manage_volume_type*]
# (Optional) Whether or not manage Cinder Volume type. # (Optional) Whether or not manage Cinder Volume type.
# If set to true, a Cinder Volume type will be created # If set to true, a Cinder Volume type will be created
@ -88,21 +116,27 @@ define cinder::backend::solidfire(
$san_ip, $san_ip,
$san_login, $san_login,
$san_password, $san_password,
$volume_backend_name = $name, $volume_backend_name = $name,
$backend_availability_zone = $::os_service_default, $backend_availability_zone = $::os_service_default,
$volume_driver = 'cinder.volume.drivers.solidfire.SolidFireDriver', $volume_driver = 'cinder.volume.drivers.solidfire.SolidFireDriver',
$sf_emulate_512 = $::os_service_default, $sf_emulate_512 = $::os_service_default,
$sf_allow_tenant_qos = $::os_service_default, $sf_allow_tenant_qos = $::os_service_default,
$sf_account_prefix = $::os_service_default, $sf_account_prefix = $::os_service_default,
$sf_api_port = $::os_service_default, $sf_api_port = $::os_service_default,
$sf_volume_prefix = $::os_service_default, $sf_volume_prefix = $::os_service_default,
$sf_svip = $::os_service_default, $sf_svip = $::os_service_default,
$sf_enable_vag = $::os_service_default, $sf_enable_vag = $::os_service_default,
$manage_volume_type = false, $sf_provisioning_calc = $::os_service_default,
$extra_options = {}, $sf_cluster_pairing_timeout = $::os_service_default,
$sf_volume_pairing_timeout = $::os_service_default,
$sf_api_request_timeout = $::os_service_default,
$sf_volume_clone_timeout = $::os_service_default,
$sf_volume_create_timeout = $::os_service_default,
$manage_volume_type = false,
$extra_options = {},
# DEPRECATED PARAMETERS # DEPRECATED PARAMETERS
$sf_template_account_name = undef, $sf_template_account_name = undef,
$sf_allow_template_caching = undef, $sf_allow_template_caching = undef,
) { ) {
include cinder::deps include cinder::deps
@ -119,19 +153,25 @@ define cinder::backend::solidfire(
} }
cinder_config { cinder_config {
"${name}/volume_backend_name": value => $volume_backend_name; "${name}/volume_backend_name": value => $volume_backend_name;
"${name}/backend_availability_zone": value => $backend_availability_zone; "${name}/backend_availability_zone": value => $backend_availability_zone;
"${name}/volume_driver": value => $volume_driver; "${name}/volume_driver": value => $volume_driver;
"${name}/san_ip": value => $san_ip; "${name}/san_ip": value => $san_ip;
"${name}/san_login": value => $san_login; "${name}/san_login": value => $san_login;
"${name}/san_password": value => $san_password, secret => true; "${name}/san_password": value => $san_password, secret => true;
"${name}/sf_emulate_512": value => $sf_emulate_512; "${name}/sf_emulate_512": value => $sf_emulate_512;
"${name}/sf_allow_tenant_qos": value => $sf_allow_tenant_qos; "${name}/sf_allow_tenant_qos": value => $sf_allow_tenant_qos;
"${name}/sf_account_prefix": value => $sf_account_prefix; "${name}/sf_account_prefix": value => $sf_account_prefix;
"${name}/sf_api_port": value => $sf_api_port; "${name}/sf_api_port": value => $sf_api_port;
"${name}/sf_volume_prefix": value => $sf_volume_prefix; "${name}/sf_volume_prefix": value => $sf_volume_prefix;
"${name}/sf_svip": value => $sf_svip; "${name}/sf_svip": value => $sf_svip;
"${name}/sf_enable_vag": value => $sf_enable_vag; "${name}/sf_enable_vag": value => $sf_enable_vag;
"${name}/sf_provisioning_calc": value => $sf_provisioning_calc;
"${name}/sf_cluster_pairing_timeout": value => $sf_cluster_pairing_timeout;
"${name}/sf_volume_pairing_timeout": value => $sf_volume_pairing_timeout;
"${name}/sf_api_request_timeout": value => $sf_api_request_timeout;
"${name}/sf_volume_clone_timeout": value => $sf_volume_clone_timeout;
"${name}/sf_volume_create_timeout": value => $sf_volume_create_timeout;
} }
if $manage_volume_type { if $manage_volume_type {

View File

@ -0,0 +1,12 @@
---
features:
- |
The ``cinder::backend::solidfire`` defined type now supports the following
new parameters.
- ``sf_provisioning_calc``
- ``sf_cluster_pairing_timeout``
- ``sf_volume_pairing_timeout``
- ``sf_api_request_timeout``
- ``sf_volume_clone_timeout``
- ``sf_volume_create_timeout``

View File

@ -15,27 +15,39 @@ describe 'cinder::backend::solidfire' do
let :default_params do let :default_params do
{ {
:backend_availability_zone => '<SERVICE DEFAULT>', :backend_availability_zone => '<SERVICE DEFAULT>',
:sf_emulate_512 => '<SERVICE DEFAULT>', :sf_emulate_512 => '<SERVICE DEFAULT>',
:sf_allow_tenant_qos => '<SERVICE DEFAULT>', :sf_allow_tenant_qos => '<SERVICE DEFAULT>',
:sf_account_prefix => '<SERVICE DEFAULT>', :sf_account_prefix => '<SERVICE DEFAULT>',
:sf_api_port => '<SERVICE DEFAULT>', :sf_api_port => '<SERVICE DEFAULT>',
:sf_volume_prefix => '<SERVICE DEFAULT>', :sf_volume_prefix => '<SERVICE DEFAULT>',
:sf_svip => '<SERVICE DEFAULT>', :sf_svip => '<SERVICE DEFAULT>',
:sf_enable_vag => '<SERVICE DEFAULT>', :sf_enable_vag => '<SERVICE DEFAULT>',
:sf_provisioning_calc => '<SERVICE DEFAULT>',
:sf_cluster_pairing_timeout => '<SERVICE DEFAULT>',
:sf_volume_pairing_timeout => '<SERVICE DEFAULT>',
:sf_api_request_timeout => '<SERVICE DEFAULT>',
:sf_volume_clone_timeout => '<SERVICE DEFAULT>',
:sf_volume_create_timeout => '<SERVICE DEFAULT>',
} }
end end
let :other_params do let :other_params do
{ {
:backend_availability_zone => 'az1', :backend_availability_zone => 'az1',
:sf_emulate_512 => true, :sf_emulate_512 => true,
:sf_allow_tenant_qos => false, :sf_allow_tenant_qos => false,
:sf_account_prefix => 'acc_prefix', :sf_account_prefix => 'acc_prefix',
:sf_api_port => 443, :sf_api_port => 443,
:sf_volume_prefix => 'UUID-', :sf_volume_prefix => 'UUID-',
:sf_svip => 'svip', :sf_svip => 'svip',
:sf_enable_vag => false, :sf_enable_vag => false,
:sf_provisioning_calc => 'maxProvisionedSpace',
:sf_cluster_pairing_timeout => 60,
:sf_volume_pairing_timeout => 3600,
:sf_api_request_timeout => 30,
:sf_volume_clone_timeout => 600,
:sf_volume_create_timeout => 60,
} }
end end