Utilise ['openstack']['region'] from cookbook-openstack-common

- Set ['openstack']['orchestration']['region'] to equal ['openstack']['region']
- Add tests for endpoint creation, to confirm region is set.

Change-Id: Ie882f6da89f8e6a4324f7f19d3c9582671610629
Addresses: blueprint uniform-region
This commit is contained in:
Andy McCrae 2014-02-17 14:39:09 +00:00
parent 56936c3d93
commit 8bcb692655
2 changed files with 31 additions and 4 deletions

View File

@ -30,7 +30,7 @@ default['openstack']['orchestration']['debug'] = 'False'
default['openstack']['orchestration']['identity_service_chef_role'] = 'os-identity'
# Gets set in the Heat Endpoint when registering with Keystone
default['openstack']['orchestration']['region'] = 'RegionOne'
default['openstack']['orchestration']['region'] = node['openstack']['region']
# The name of the Chef role that knows about the message queue server
# that Heat uses

View File

@ -24,9 +24,22 @@ describe 'openstack-orchestration::identity_registration' do
)
end
# Pending on https://review.openstack.org/#/c/59088/
it 'Register Heat Orchestration Endpoint' do
pending 'TODO: implement'
resource = @chef_run.find_resource(
'openstack-identity_register',
'Register Heat Orchestration Endpoint'
).to_hash
expect(resource).to include(
auth_uri: 'http://127.0.0.1:35357/v2.0',
bootstrap_token: 'bootstrap-token',
service_type: 'orchestration',
endpoint_region: 'RegionOne',
endpoint_adminurl: 'http://127.0.0.1:8004/v1/%(tenant_id)s',
endpoint_internalurl: 'http://127.0.0.1:8004/v1/%(tenant_id)s',
endpoint_publicurl: 'http://127.0.0.1:8004/v1/%(tenant_id)s',
action: [:create_endpoint]
)
end
describe 'openstack-orchestration::identity_registration-cfn' do
@ -55,7 +68,21 @@ describe 'openstack-orchestration::identity_registration' do
# Pending on https://review.openstack.org/#/c/59088/
it 'Register Heat Cloudformation Endpoint' do
pending 'TODO: implement'
resource = @chef_run.find_resource(
'openstack-identity_register',
'Register Heat Cloudformation Endpoint'
).to_hash
expect(resource).to include(
auth_uri: 'http://127.0.0.1:35357/v2.0',
bootstrap_token: 'bootstrap-token',
service_type: 'cloudformation',
endpoint_region: 'RegionOne',
endpoint_adminurl: 'http://127.0.0.1:8000/v1',
endpoint_internalurl: 'http://127.0.0.1:8000/v1',
endpoint_publicurl: 'http://127.0.0.1:8000/v1',
action: [:create_endpoint]
)
end
end