]> review.fuel-infra Code Review - puppet-modules/puppet-ceilometer.git/commitdiff
agent/auth: bring consistent how we manage empty parameters
authorEmilien Macchi <emilien@redhat.com>
Thu, 24 Sep 2015 13:31:28 +0000 (09:31 -0400)
committerEmilien Macchi <emilien@redhat.com>
Thu, 24 Sep 2015 19:07:26 +0000 (19:07 +0000)
Replace '' by undef for auth_tenant_id paramater.
Using undef follow Puppet best practice.

Change-Id: I2b10cbec7d469aed4da95f7a51a67ec63bf96d71

manifests/agent/auth.pp

index 2b6f536e21cb8d29c9d1abd8a14dab30a1b7ac58..360989b55da761f2789a85c13d5957997e213daa 100644 (file)
@@ -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;
     }