Modify the hardcoded scheme

This commit modifies the schemes of heat_metadata_server_url,
heat_waitcondition_server_url and heat_watch_server_url
so that they do not always use the hardcoded http.

Change-Id: I8dcc8ec53b25dd4f2c53f662c0af821ee653a014
Closes-Bug: #1385046
This commit is contained in:
jun xie 2014-10-24 13:08:50 +08:00
parent d1d2c9c7ad
commit c7f0bb2e0e
3 changed files with 12 additions and 3 deletions

View File

@ -12,6 +12,7 @@ This file is used to list changes made in each version of cookbook-openstack-orc
* Bump Chef gem to 11.16
* Create role and domain setup for heat template defined users
* Add cert_file, key_file, ca_file and insecure for clients so that they are configurable.
* Make 3 schemes configurable instead of being the hardcoded http
## 9.2.0
* python_packages database client attributes have been migrated to

View File

@ -259,6 +259,14 @@ shared_examples 'expects to create heat conf' do
expect(chef_run).to render_file(file.name).with_content(line)
end
end
it 'overrides the schemes' do
node.set['openstack']['endpoints']['orchestration-api-cfn']['scheme'] = 'https'
node.set['openstack']['endpoints']['orchestration-api-cloudwatch']['scheme'] = 'https'
expect(chef_run).to render_file(file.name).with_content(%r{^heat_metadata_server_url=https://127.0.0.1:8000$})
expect(chef_run).to render_file(file.name).with_content(%r{^heat_waitcondition_server_url=https://127.0.0.1:8000/v1/waitcondition$})
expect(chef_run).to render_file(file.name).with_content(%r{^heat_watch_server_url=https://127.0.0.1:8003$})
end
end
describe 'domain values' do

View File

@ -85,13 +85,13 @@
#periodic_interval=60
# URL of the Heat metadata server. (string value)
heat_metadata_server_url=http://<%= @heat_api_cfn_endpoint.host %>:<%= @heat_api_cfn_endpoint.port %>
heat_metadata_server_url=<%= @heat_api_cfn_endpoint.scheme %>://<%= @heat_api_cfn_endpoint.host %>:<%= @heat_api_cfn_endpoint.port %>
# URL of the Heat waitcondition server. (string value)
heat_waitcondition_server_url=http://<%= @heat_api_cfn_endpoint.host %>:<%= @heat_api_cfn_endpoint.port %><%= @heat_api_cfn_endpoint.path %>/waitcondition
heat_waitcondition_server_url=<%= @heat_api_cfn_endpoint.scheme %>://<%= @heat_api_cfn_endpoint.host %>:<%= @heat_api_cfn_endpoint.port %><%= @heat_api_cfn_endpoint.path %>/waitcondition
# URL of the Heat CloudWatch server. (string value)
heat_watch_server_url=http://<%= @heat_api_cloudwatch_endpoint.host %>:<%= @heat_api_cloudwatch_endpoint.port %>
heat_watch_server_url=<%= @heat_api_cloudwatch_endpoint.scheme %>://<%= @heat_api_cloudwatch_endpoint.host %>:<%= @heat_api_cloudwatch_endpoint.port %>
# Instance connection to CFN/CW API via https. (string value)
#instance_connection_is_secure=0