From 5cc49f6b9166efe8cc53a6e9ade1ffd0e2e5c9e2 Mon Sep 17 00:00:00 2001 From: wenchma Date: Thu, 16 Apr 2015 17:23:07 +0800 Subject: [PATCH] Correct the wrong configuration about glance_protocol Change-Id: If736210aaac0436119ac6c4ea880d056f086090c Closes-bug: #1444892 --- spec/ironic-common_spec.rb | 16 ++++++++++++---- templates/default/ironic.conf.erb | 2 +- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/spec/ironic-common_spec.rb b/spec/ironic-common_spec.rb index 10efe2b..678b930 100644 --- a/spec/ironic-common_spec.rb +++ b/spec/ironic-common_spec.rb @@ -60,17 +60,25 @@ describe 'openstack-bare-metal::ironic-common' do ) end + it 'has the default glance attributes' do + [ + /^glance_host=127.0.0.1$/, + /^glance_port=9292$/, + /^glance_protocol=http$/ + ].each do |line| + expect(chef_run).to render_config_file(file.name).with_section_content('glance', line) + end + end + context 'template contents' do it 'has the default rpc_backend attribute' do - expect(chef_run).to render_config_file(file.name)\ - .with_section_content('DEFAULT', /^rpc_backend=rabbit$/) + expect(chef_run).to render_config_file(file.name).with_section_content('DEFAULT', /^rpc_backend=rabbit$/) end it 'overrides the default rpc_backend attribute' do node.set['openstack']['bare-metal']['rpc_backend'] = 'qpid' - expect(chef_run).to render_config_file(file.name)\ - .with_section_content('DEFAULT', /^rpc_backend=qpid$/) + expect(chef_run).to render_config_file(file.name).with_section_content('DEFAULT', /^rpc_backend=qpid$/) end it 'sets the default auth attributes' do diff --git a/templates/default/ironic.conf.erb b/templates/default/ironic.conf.erb index 98164df..3e4dfa4 100644 --- a/templates/default/ironic.conf.erb +++ b/templates/default/ironic.conf.erb @@ -857,7 +857,7 @@ glance_port=<%= @glance_port %> # Default protocol to use when connecting to glance. Set to # https for SSL. (string value) -glance_protocol=<%= @glance_scheme %> +glance_protocol=<%= @glance_protocol %> # A list of the glance api servers available to ironic. Prefix # with https:// for SSL-based glance API servers. Format is