Merge "Update comment to fix lint"

This commit is contained in:
Zuul 2020-10-12 15:36:08 +00:00 committed by Gerrit Code Review
commit 6604f5aa73
6 changed files with 30 additions and 23 deletions

View File

@ -40,9 +40,6 @@
# is used as the default for all backends.
# Defaults to $::os_service_default.
#
# [*volume_driver*]
# (optional) The Dell EMC PowerMax Driver
#
# [*manage_volume_type*]
# (Optional) Whether or not manage Cinder Volume type.
# If set to true, a Cinder Volume type will be created

View File

@ -49,9 +49,6 @@
# [*ssh_min_pool_conn*]
# (optional) Minimum ssh connections in the pool.
#
# [*ssh_min_pool_conn*]
# (optional) Maximum ssh connections in the pool.
#
# [*ssh_max_pool_conn*]
# (Optional) Maximum ssh connections in the pool.
# Defaults to '5'.

View File

@ -56,21 +56,23 @@
#
#
class cinder::backup::posix (
$backup_driver = 'cinder.backup.drivers.posix.PosixBackupDriver',
$backup_file_size = $::os_service_default,
$backup_sha_block_size_bytes = $::os_service_default,
$backup_posix_path = $::os_service_default,
$backup_container = $::os_service_default,
$backup_driver = 'cinder.backup.drivers.posix.PosixBackupDriver',
$backup_file_size = $::os_service_default,
$backup_sha_block_size_bytes = $::os_service_default,
$backup_enable_progress_timer = $::os_service_default,
$backup_posix_path = $::os_service_default,
$backup_container = $::os_service_default,
) {
include cinder::deps
cinder_config {
'DEFAULT/backup_driver': value => $backup_driver;
'DEFAULT/backup_file_size': value => $backup_file_size;
'DEFAULT/backup_sha_block_size_bytes': value => $backup_sha_block_size_bytes;
'DEFAULT/backup_posix_path': value => $backup_posix_path;
'DEFAULT/backup_container': value => $backup_container;
'DEFAULT/backup_driver': value => $backup_driver;
'DEFAULT/backup_file_size': value => $backup_file_size;
'DEFAULT/backup_sha_block_size_bytes': value => $backup_sha_block_size_bytes;
'DEFAULT/backup_enable_progress_timer': value => $backup_enable_progress_timer;
'DEFAULT/backup_posix_path': value => $backup_posix_path;
'DEFAULT/backup_container': value => $backup_container;
}
}

View File

@ -2,9 +2,7 @@
#
# This class is used to manage arbitrary cinder configurations.
#
# === Parameters
#
# [*xxx_config*]
# example xxx_config
# (optional) Allow configuration of arbitrary cinder configurations.
# The value is a hash of xxx_config resources. Example:
# { 'DEFAULT/foo' => { value => 'fooValue'},
@ -18,6 +16,8 @@
# DEFAULT/bar:
# value: barValue
#
# === Parameters
#
# [*cinder_config*]
# (optional) Allow configuration of cinder.conf configurations.
# Defaults to empty hash'{}'

View File

@ -0,0 +1,6 @@
---
fixes:
- |
The ``cinder::backup::posix::backup_enable_progress_timer`` parameter has
been described in parameter but been invalid. Now the parameter is
implemented as a valid paramater.

View File

@ -44,20 +44,25 @@ describe 'cinder::backup::posix' do
is_expected.to contain_cinder_config('DEFAULT/backup_driver').with_value('cinder.backup.drivers.posix.PosixBackupDriver')
is_expected.to contain_cinder_config('DEFAULT/backup_file_size').with_value(p[:backup_file_size])
is_expected.to contain_cinder_config('DEFAULT/backup_sha_block_size_bytes').with_value(p[:backup_sha_block_size_bytes])
is_expected.to contain_cinder_config('DEFAULT/backup_enable_progress_timer').with_value(p[:backup_sha_block_size_bytes])
is_expected.to contain_cinder_config('DEFAULT/backup_posix_path').with_value(p[:backup_posix_path])
is_expected.to contain_cinder_config('DEFAULT/backup_container').with_value(p[:backup_container])
end
context 'when overriding default parameters' do
before :each do
params.merge!(:backup_file_size => '4')
params.merge!(:backup_sha_block_size_bytes => '2')
params.merge!(:backup_posix_path => '/etc/backup')
params.merge!(:backup_container => 'mycontainer')
params.merge!(
{ :backup_file_size => '4',
:backup_sha_block_size_bytes => '2',
:backup_enable_progress_timer => true,
:backup_posix_path => '/etc/backup',
:backup_container => 'mycontainer' })
end
it 'should replace default parameters with new values' do
is_expected.to contain_cinder_config('DEFAULT/backup_file_size').with_value(p[:backup_file_size])
is_expected.to contain_cinder_config('DEFAULT/backup_sha_block_size_bytes').with_value(p[:backup_sha_block_size_bytes])
is_expected.to contain_cinder_config('DEFAULT/backup_enable_progress_timer').with_value(p[:backup_enable_progress_timer])
is_expected.to contain_cinder_config('DEFAULT/backup_posix_path').with_value(p[:backup_posix_path])
is_expected.to contain_cinder_config('DEFAULT/backup_container').with_value(p[:backup_container])
end