Solidfire: Improve parameter coverage

This change introduces some new parameters to the defined type for
solidfire backend, so that users can manage tunable parameters by
puppet.

Change-Id: I34a8103b30091f78719a7675e10046e7578af5d1
This commit is contained in:
Takashi Kajinami 2022-04-02 01:58:57 +09:00
parent d5f3493f6a
commit 3897092b5a
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.
# 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*]
# (Optional) Whether or not manage Cinder Volume type.
# If set to true, a Cinder Volume type will be created
@ -88,21 +116,27 @@ define cinder::backend::solidfire(
$san_ip,
$san_login,
$san_password,
$volume_backend_name = $name,
$backend_availability_zone = $::os_service_default,
$volume_driver = 'cinder.volume.drivers.solidfire.SolidFireDriver',
$sf_emulate_512 = $::os_service_default,
$sf_allow_tenant_qos = $::os_service_default,
$sf_account_prefix = $::os_service_default,
$sf_api_port = $::os_service_default,
$sf_volume_prefix = $::os_service_default,
$sf_svip = $::os_service_default,
$sf_enable_vag = $::os_service_default,
$manage_volume_type = false,
$extra_options = {},
$volume_backend_name = $name,
$backend_availability_zone = $::os_service_default,
$volume_driver = 'cinder.volume.drivers.solidfire.SolidFireDriver',
$sf_emulate_512 = $::os_service_default,
$sf_allow_tenant_qos = $::os_service_default,
$sf_account_prefix = $::os_service_default,
$sf_api_port = $::os_service_default,
$sf_volume_prefix = $::os_service_default,
$sf_svip = $::os_service_default,
$sf_enable_vag = $::os_service_default,
$sf_provisioning_calc = $::os_service_default,
$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
$sf_template_account_name = undef,
$sf_allow_template_caching = undef,
$sf_template_account_name = undef,
$sf_allow_template_caching = undef,
) {
include cinder::deps
@ -119,19 +153,25 @@ define cinder::backend::solidfire(
}
cinder_config {
"${name}/volume_backend_name": value => $volume_backend_name;
"${name}/backend_availability_zone": value => $backend_availability_zone;
"${name}/volume_driver": value => $volume_driver;
"${name}/san_ip": value => $san_ip;
"${name}/san_login": value => $san_login;
"${name}/san_password": value => $san_password, secret => true;
"${name}/sf_emulate_512": value => $sf_emulate_512;
"${name}/sf_allow_tenant_qos": value => $sf_allow_tenant_qos;
"${name}/sf_account_prefix": value => $sf_account_prefix;
"${name}/sf_api_port": value => $sf_api_port;
"${name}/sf_volume_prefix": value => $sf_volume_prefix;
"${name}/sf_svip": value => $sf_svip;
"${name}/sf_enable_vag": value => $sf_enable_vag;
"${name}/volume_backend_name": value => $volume_backend_name;
"${name}/backend_availability_zone": value => $backend_availability_zone;
"${name}/volume_driver": value => $volume_driver;
"${name}/san_ip": value => $san_ip;
"${name}/san_login": value => $san_login;
"${name}/san_password": value => $san_password, secret => true;
"${name}/sf_emulate_512": value => $sf_emulate_512;
"${name}/sf_allow_tenant_qos": value => $sf_allow_tenant_qos;
"${name}/sf_account_prefix": value => $sf_account_prefix;
"${name}/sf_api_port": value => $sf_api_port;
"${name}/sf_volume_prefix": value => $sf_volume_prefix;
"${name}/sf_svip": value => $sf_svip;
"${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 {

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
{
:backend_availability_zone => '<SERVICE DEFAULT>',
:sf_emulate_512 => '<SERVICE DEFAULT>',
:sf_allow_tenant_qos => '<SERVICE DEFAULT>',
:sf_account_prefix => '<SERVICE DEFAULT>',
:sf_api_port => '<SERVICE DEFAULT>',
:sf_volume_prefix => '<SERVICE DEFAULT>',
:sf_svip => '<SERVICE DEFAULT>',
:sf_enable_vag => '<SERVICE DEFAULT>',
:backend_availability_zone => '<SERVICE DEFAULT>',
:sf_emulate_512 => '<SERVICE DEFAULT>',
:sf_allow_tenant_qos => '<SERVICE DEFAULT>',
:sf_account_prefix => '<SERVICE DEFAULT>',
:sf_api_port => '<SERVICE DEFAULT>',
:sf_volume_prefix => '<SERVICE DEFAULT>',
:sf_svip => '<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
let :other_params do
{
:backend_availability_zone => 'az1',
:sf_emulate_512 => true,
:sf_allow_tenant_qos => false,
:sf_account_prefix => 'acc_prefix',
:sf_api_port => 443,
:sf_volume_prefix => 'UUID-',
:sf_svip => 'svip',
:sf_enable_vag => false,
:backend_availability_zone => 'az1',
:sf_emulate_512 => true,
:sf_allow_tenant_qos => false,
:sf_account_prefix => 'acc_prefix',
:sf_api_port => 443,
:sf_volume_prefix => 'UUID-',
:sf_svip => 'svip',
: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