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:
parent
19f9032983
commit
5bd12fd7f4
|
@ -8,7 +8,8 @@
|
||||||
# (required) username for KMIP device
|
# (required) username for KMIP device
|
||||||
#
|
#
|
||||||
# [*kmip_plugin_port*]
|
# [*kmip_plugin_port*]
|
||||||
# (required) port for KMIP device
|
# (optional) port for KMIP device
|
||||||
|
# Defaults to $facts['os_service_default']
|
||||||
#
|
#
|
||||||
# [*kmip_plugin_username*]
|
# [*kmip_plugin_username*]
|
||||||
# (optional) username for KMIP device
|
# (optional) username for KMIP device
|
||||||
|
@ -40,7 +41,7 @@
|
||||||
#
|
#
|
||||||
class barbican::plugins::kmip (
|
class barbican::plugins::kmip (
|
||||||
$kmip_plugin_host,
|
$kmip_plugin_host,
|
||||||
$kmip_plugin_port,
|
$kmip_plugin_port = $facts['os_service_default'],
|
||||||
$kmip_plugin_username = $facts['os_service_default'],
|
$kmip_plugin_username = $facts['os_service_default'],
|
||||||
$kmip_plugin_password = $facts['os_service_default'],
|
$kmip_plugin_password = $facts['os_service_default'],
|
||||||
$kmip_plugin_keyfile = $facts['os_service_default'],
|
$kmip_plugin_keyfile = $facts['os_service_default'],
|
||||||
|
|
|
@ -29,7 +29,6 @@ describe 'barbican::plugins::kmip' do
|
||||||
:kmip_plugin_username => 'kmip_user',
|
:kmip_plugin_username => 'kmip_user',
|
||||||
:kmip_plugin_password => 'kmip_password',
|
:kmip_plugin_password => 'kmip_password',
|
||||||
:kmip_plugin_host => 'kmip_host',
|
:kmip_plugin_host => 'kmip_host',
|
||||||
:kmip_plugin_port => 9000,
|
|
||||||
:global_default => true
|
:global_default => true
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
@ -48,7 +47,7 @@ describe 'barbican::plugins::kmip' do
|
||||||
is_expected.to contain_barbican_config('kmip_plugin/host')\
|
is_expected.to contain_barbican_config('kmip_plugin/host')\
|
||||||
.with_value(params[:kmip_plugin_host])
|
.with_value(params[:kmip_plugin_host])
|
||||||
is_expected.to contain_barbican_config('kmip_plugin/port')\
|
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(
|
is_expected.to contain_barbican_config(
|
||||||
'secretstore:kmip/secret_store_plugin') \
|
'secretstore:kmip/secret_store_plugin') \
|
||||||
.with_value('kmip_plugin')
|
.with_value('kmip_plugin')
|
||||||
|
|
Loading…
Reference in New Issue