From: Emilien Macchi Date: Thu, 24 Sep 2015 13:31:28 +0000 (-0400) Subject: agent/auth: bring consistent how we manage empty parameters X-Git-Tag: 7.0.0-mos-rc2^2~5^2 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=31879eeac45e8a24449cd09b085c6f856328ad1e;p=puppet-modules%2Fpuppet-ceilometer.git agent/auth: bring consistent how we manage empty parameters Replace '' by undef for auth_tenant_id paramater. Using undef follow Puppet best practice. Change-Id: I2b10cbec7d469aed4da95f7a51a67ec63bf96d71 --- diff --git a/manifests/agent/auth.pp b/manifests/agent/auth.pp index 2b6f536..360989b 100644 --- a/manifests/agent/auth.pp +++ b/manifests/agent/auth.pp @@ -24,7 +24,7 @@ # # [*auth_tenant_id*] # the keystone tenant id for ceilometer services. -# Optional. Defaults to empty. +# Optional. Defaults to undef. # # [*auth_cacert*] # Certificate chain for SSL validation. Optional; Defaults to 'None' @@ -35,7 +35,7 @@ class ceilometer::agent::auth ( $auth_region = 'RegionOne', $auth_user = 'ceilometer', $auth_tenant_name = 'services', - $auth_tenant_id = '', + $auth_tenant_id = undef, $auth_cacert = undef, ) { @@ -53,7 +53,7 @@ class ceilometer::agent::auth ( 'service_credentials/os_tenant_name' : value => $auth_tenant_name; } - if ($auth_tenant_id != '') { + if $auth_tenant_id { ceilometer_config { 'service_credentials/os_tenant_id' : value => $auth_tenant_id; }