kmip: Leverage the service default

The kmip plugin uses the reasonable default tcp port (5969) in case
the port option is not set.

Change-Id: Ic32a397e93479f7d54e22e3f94e35c7c95dbbca4
This commit is contained in:
Takashi Kajinami 2023-12-15 16:42:32 +09:00
parent 19f9032983
commit 5bd12fd7f4
2 changed files with 4 additions and 4 deletions

View File

@ -8,7 +8,8 @@
# (required) username for KMIP device
#
# [*kmip_plugin_port*]
# (required) port for KMIP device
# (optional) port for KMIP device
# Defaults to $facts['os_service_default']
#
# [*kmip_plugin_username*]
# (optional) username for KMIP device
@ -40,7 +41,7 @@
#
class barbican::plugins::kmip (
$kmip_plugin_host,
$kmip_plugin_port,
$kmip_plugin_port = $facts['os_service_default'],
$kmip_plugin_username = $facts['os_service_default'],
$kmip_plugin_password = $facts['os_service_default'],
$kmip_plugin_keyfile = $facts['os_service_default'],

View File

@ -29,7 +29,6 @@ describe 'barbican::plugins::kmip' do
:kmip_plugin_username => 'kmip_user',
:kmip_plugin_password => 'kmip_password',
:kmip_plugin_host => 'kmip_host',
:kmip_plugin_port => 9000,
:global_default => true
}
end
@ -48,7 +47,7 @@ describe 'barbican::plugins::kmip' do
is_expected.to contain_barbican_config('kmip_plugin/host')\
.with_value(params[:kmip_plugin_host])
is_expected.to contain_barbican_config('kmip_plugin/port')\
.with_value(params[:kmip_plugin_port])
.with_value('<SERVICE DEFAULT>')
is_expected.to contain_barbican_config(
'secretstore:kmip/secret_store_plugin') \
.with_value('kmip_plugin')