Replace hard-coded regionOne with parameter references
authorSteven Hardy <shardy@redhat.com>
Wed, 3 Aug 2016 14:01:57 +0000 (15:01 +0100)
committerSteven Hardy <shardy@redhat.com>
Wed, 3 Aug 2016 14:01:57 +0000 (15:01 +0100)
In a few places we hard-code the config values to regionOne, but
there is a parameter available to set this.

Change-Id: I9f5138103deb45f7432ee44e03a08dcf54c2990d

puppet/services/ceilometer-base.yaml
puppet/services/gnocchi-base.yaml

index db5a82b..a812371 100644 (file)
@@ -83,7 +83,7 @@ outputs:
         ceilometer::agent::auth::auth_password: {get_param: CeilometerPassword}
         ceilometer::agent::auth::auth_url: {get_param: [EndpointMap, KeystoneInternal, uri_no_suffix] }
         ceilometer::agent::notification::store_events: {get_param: CeilometerStoreEvents}
-        ceilometer::agent::auth::auth_region: 'regionOne'
+        ceilometer::agent::auth::auth_region: {get_param: KeystoneRegion}
         ceilometer::agent::auth::auth_tenant_name: 'service'
         ceilometer::agent::auth::auth_endpoint_type: 'internalURL'
         ceilometer::db::mysql::password: {get_param: CeilometerPassword}
index 5c1e015..a408d5d 100644 (file)
@@ -30,6 +30,10 @@ parameters:
   CephClientUserName:
     default: openstack
     type: string
+  KeystoneRegion:
+    type: string
+    default: 'regionOne'
+    description: Keystone region for endpoint
 
 outputs:
   aux_parameters:
@@ -52,7 +56,7 @@ outputs:
               - '@'
               - {get_param: [EndpointMap, MysqlInternal, host]}
               - '/gnocchi'
-        gnocchi::keystone::auth::region: 'regionOne'
+        gnocchi::keystone::auth::region: {get_param: KeystoneRegion}
         gnocchi::keystone::auth::tenant: 'service'
         gnocchi::keystone::auth::password: {get_param: GnocchiPassword}
         gnocchi::db::mysql::password: {get_param: GnocchiPassword}
@@ -90,5 +94,5 @@ outputs:
         gnocchi::db::mysql::allowed_hosts:
           - '%'
           - "%{hiera('mysql_bind_host')}"
-        gnocchi::auth::auth_region: 'regionOne'
+        gnocchi::auth::auth_region: {get_param: KeystoneRegion}
         gnocchi::auth::auth_tenant_name: 'service'