From 9f55c0708eca6bb73bd98199fd6ca8044d84a118 Mon Sep 17 00:00:00 2001 From: wenchma Date: Tue, 24 Nov 2015 15:02:53 +0800 Subject: [PATCH] Add os_endpoint_type attribute to ceilometer.conf Change-Id: Iaf1590d7a7bec4191429a73895b9eecb65bfd367 Closes-bug: #1519218 (cherry picked from commit c168991c8f5b6b02536c89e56629e4c592048054) --- attributes/default.rb | 4 ++++ metadata.rb | 2 +- spec/common_spec.rb | 4 ++++ templates/default/ceilometer.conf.erb | 4 ++++ 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/attributes/default.rb b/attributes/default.rb index 8d44a21..e99fade 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -66,6 +66,10 @@ default['openstack']['telemetry']['service-credentials']['cafile'] = nil # Verify HTTPS connections (for service polling authentication) default['openstack']['telemetry']['service-credentials']['insecure'] = false +# Type of endpoint in Identity service catalog to use for +# communication with OpenStack services. (string value) +default['openstack']['telemetry']['service-credentials']['os_endpoint_type'] = 'publicURL' + default['openstack']['telemetry']['sample_source'] = 'openstack' default['openstack']['telemetry']['dbsync_timeout'] = 3600 diff --git a/metadata.rb b/metadata.rb index 9daeb0a..157027c 100644 --- a/metadata.rb +++ b/metadata.rb @@ -4,7 +4,7 @@ maintainer_email 'opscode-chef-openstack@googlegroups.com' license 'Apache 2.0' description 'The OpenStack Metering service Ceilometer.' long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) -version '11.0.0' +version '11.1.0' recipe 'openstack-telemetry::agent-central', 'Installs agent central service.' recipe 'openstack-telemetry::agent-compute', 'Installs agent compute service.' diff --git a/spec/common_spec.rb b/spec/common_spec.rb index 451bbab..b250c79 100644 --- a/spec/common_spec.rb +++ b/spec/common_spec.rb @@ -239,6 +239,10 @@ describe 'openstack-telemetry::common' do expect(chef_run).not_to render_file(file.name).with_content(/^os_cacert = $/) end + it 'sets os_endpoint_type' do + expect(chef_run).to render_config_file(file.name).with_section_content('service_credentials', /^os_endpoint_type = publicURL$/) + end + it 'sets insecure' do expect(chef_run).to render_file(file.name).with_content(/^insecure = false$/) end diff --git a/templates/default/ceilometer.conf.erb b/templates/default/ceilometer.conf.erb index 3e409ff..8f7095c 100644 --- a/templates/default/ceilometer.conf.erb +++ b/templates/default/ceilometer.conf.erb @@ -191,6 +191,10 @@ os_region_name = <%= node['openstack']['telemetry']['region'] %> os_cacert = <%= node['openstack']['telemetry']['service-credentials']['cafile'] %> <% end %> +# Type of endpoint in Identity service catalog to use for +# communication with OpenStack services. (string value) +os_endpoint_type = <%= node['openstack']['telemetry']['service-credentials']['os_endpoint_type'] %> + # Verify HTTPS connections. (boolean value, for service polling authentication) insecure = <%= node['openstack']['telemetry']['service-credentials']['insecure'] %>