Merge "guestagent: Support volume operation options"

This commit is contained in:
Zuul 2024-03-26 12:08:20 +00:00 committed by Gerrit Code Review
commit b4024431ee
3 changed files with 48 additions and 0 deletions

View File

@ -80,6 +80,26 @@
# (optional) The plaintext registry password.
# Defaults to $facts['os_service_default'].
#
# [*num_tries*]
# (optional) Number of times to check if a volume exists.
# Defaults to $facts['os_service_default'].
#
# [*volume_fstype*]
# (optional) File system type used to format a volume.
# Defaults to $facts['os_service_default'].
#
# [*format_options*]
# (optional) Options to use when formatting a volume.
# Defaults to $facts['os_service_default'].
#
# [*volume_format_timeout*]
# (optional) Maximum time (in seconds) to wait for a volume format.
# Defaults to $facts['os_service_default'].
#
# [*mount_options*]
# (optional) Options to use when mounting a volume.
# Defaults to $facts['os_service_default'].
#
# DEPRECATED PARAMETERS
#
# [*default_password_length*]
@ -108,6 +128,11 @@ class trove::guestagent(
$container_registry = $facts['os_service_default'],
$container_registry_username = $facts['os_service_default'],
$container_registry_password = $facts['os_service_default'],
$num_tries = $facts['os_service_default'],
$volume_fstype = $facts['os_service_default'],
$format_options = $facts['os_service_default'],
$volume_format_timeout = $facts['os_service_default'],
$mount_options = $facts['os_service_default'],
# DEPRECATED PARAMETERS
$default_password_length = undef,
$backup_aes_cbc_key = undef,
@ -196,4 +221,11 @@ class trove::guestagent(
'guest_agent/container_registry_password': value => $container_registry_password, secret => true;
}
trove_guestagent_config {
'DEFAULT/num_tries': value => $num_tries;
'DEFAULT/volume_fstype': value => $volume_fstype;
'DEFAULT/format_options': value => $format_options;
'DEFAULT/volume_format_timeout': value => $volume_format_timeout;
'DEFAULT/mount_options': value => $mount_options;
}
}

View File

@ -0,0 +1,11 @@
---
features:
- |
The following parameters have been added to the ``trove::guestagent``
class.
- ``num_tries``
- ``volume_fstype``
- ``format_options``
- ``volume_format_timeout``
- ``mount_options``

View File

@ -85,6 +85,11 @@ describe 'trove::guestagent' do
is_expected.to contain_trove_guestagent_config('guest_agent/container_registry').with_value('<SERVICE DEFAULT>')
is_expected.to contain_trove_guestagent_config('guest_agent/container_registry_username').with_value('<SERVICE DEFAULT>')
is_expected.to contain_trove_guestagent_config('guest_agent/container_registry_password').with_value('<SERVICE DEFAULT>').with_secret(true)
is_expected.to contain_trove_guestagent_config('DEFAULT/num_tries').with_value('<SERVICE DEFAULT>')
is_expected.to contain_trove_guestagent_config('DEFAULT/volume_fstype').with_value('<SERVICE DEFAULT>')
is_expected.to contain_trove_guestagent_config('DEFAULT/format_options').with_value('<SERVICE DEFAULT>')
is_expected.to contain_trove_guestagent_config('DEFAULT/volume_format_timeout').with_value('<SERVICE DEFAULT>')
is_expected.to contain_trove_guestagent_config('DEFAULT/mount_options').with_value('<SERVICE DEFAULT>')
end
it 'configures trove-guestagent with default logging parameters' do