]> review.fuel-infra Code Review - puppet-modules/puppet-ceilometer.git/commitdiff
Add keystone_tenant parameter for api
authorMathieu Gagné <mgagne@iweb.com>
Thu, 4 Apr 2013 21:53:52 +0000 (17:53 -0400)
committerMathieu Gagné <mgagne@iweb.com>
Thu, 4 Apr 2013 21:53:52 +0000 (17:53 -0400)
manifests/api.pp
spec/classes/ceilometer_api_spec.rb

index 0e081933dde201fde2b2703dbe178b2f4c168231..54d101b509866850d0fc9ee317a41e7cbf0166e4 100644 (file)
@@ -7,6 +7,7 @@ class ceilometer::api(
   $keystone_port     = '35357',
   $keystone_protocol = 'http',
   $keystone_user     = 'ceilometer',
+  $keystone_tenant   = 'services',
   $keystone_password = false,
 ) inherits ceilometer {
 
@@ -40,7 +41,7 @@ class ceilometer::api(
     'keystone_authtoken/auth_host'         : value => $keystone_host;
     'keystone_authtoken/auth_port'         : value => $keystone_port;
     'keystone_authtoken/auth_protocol'     : value => $keystone_protocol;
-    'keystone_authtoken/admin_tenant_name' : value => 'services';
+    'keystone_authtoken/admin_tenant_name' : value => $keystone_tenant;
     'keystone_authtoken/admin_user'        : value => $keystone_user;
     'keystone_authtoken/admin_password'    : value => $keystone_password;
   }
index 0be0e6c9722a7b59dbc8857baeec76c065742701..37e10b1617cc839a17a28a4942927eb09cd64596 100644 (file)
@@ -12,7 +12,8 @@ describe 'ceilometer::api' do
       :keystone_port     => '35357',
       :keystone_protocol => 'http',
       :keystone_user     => 'ceilometer',
-      :keystone_password => 'ceilometer-passw0rd'
+      :keystone_password => 'ceilometer-passw0rd',
+      :keystone_tenant   => 'services'
     }
   end
 
@@ -42,7 +43,7 @@ describe 'ceilometer::api' do
       should contain_ceilometer_config('keystone_authtoken/auth_host').with_value( params[:keystone_host] )
       should contain_ceilometer_config('keystone_authtoken/auth_port').with_value( params[:keystone_port] )
       should contain_ceilometer_config('keystone_authtoken/auth_protocol').with_value( params[:keystone_protocol] )
-      should contain_ceilometer_config('keystone_authtoken/admin_tenant_name').with_value('services')
+      should contain_ceilometer_config('keystone_authtoken/admin_tenant_name').with_value( params[:keystone_tenant] )
       should contain_ceilometer_config('keystone_authtoken/admin_user').with_value( params[:keystone_user] )
       should contain_ceilometer_config('keystone_authtoken/admin_password').with_value( params[:keystone_password] )
     end