Unneeded identity reg done for api-cfn
When the heat cloud formation (api-cfn recipe) is not needed and not used, the identity recipe still creates service and endpoint identity registrations for it. I added a check to see if the api-cfn recipe is in the run_list, suggestions welcome for better ways to approach this. Change-Id: I5f326a66f005f0553aecd8cea798a224d76f57c4 Closes-bug: 1279577
This commit is contained in:
parent
80c8412f32
commit
e4dfe58f07
|
@ -52,17 +52,6 @@ openstack_identity_register 'Register Heat Orchestration Service' do
|
|||
action :create_service
|
||||
end
|
||||
|
||||
# Register Heat API Cloudformation Service
|
||||
openstack_identity_register 'Register Heat Cloudformation Service' do
|
||||
auth_uri auth_url
|
||||
bootstrap_token token
|
||||
service_name 'heat-cfn'
|
||||
service_type 'cloudformation'
|
||||
service_description 'Heat Cloudformation Service'
|
||||
|
||||
action :create_service
|
||||
end
|
||||
|
||||
# Register Heat API Endpoint
|
||||
openstack_identity_register 'Register Heat Orchestration Endpoint' do
|
||||
auth_uri auth_url
|
||||
|
@ -76,17 +65,31 @@ openstack_identity_register 'Register Heat Orchestration Endpoint' do
|
|||
action :create_endpoint
|
||||
end
|
||||
|
||||
# Register Heat API CloudFormation Endpoint
|
||||
openstack_identity_register 'Register Heat Cloudformation Endpoint' do
|
||||
auth_uri auth_url
|
||||
bootstrap_token token
|
||||
service_type 'cloudformation'
|
||||
endpoint_region region
|
||||
endpoint_adminurl heat_cfn_endpoint.to_s
|
||||
endpoint_internalurl heat_cfn_endpoint.to_s
|
||||
endpoint_publicurl heat_cfn_endpoint.to_s
|
||||
if node.run_list.include?('openstack-orchestration::api-cfn')
|
||||
|
||||
action :create_endpoint
|
||||
# Register Heat API Cloudformation Service
|
||||
openstack_identity_register 'Register Heat Cloudformation Service' do
|
||||
auth_uri auth_url
|
||||
bootstrap_token token
|
||||
service_name 'heat-cfn'
|
||||
service_type 'cloudformation'
|
||||
service_description 'Heat Cloudformation Service'
|
||||
|
||||
action :create_service
|
||||
end
|
||||
|
||||
# Register Heat API CloudFormation Endpoint
|
||||
openstack_identity_register 'Register Heat Cloudformation Endpoint' do
|
||||
auth_uri auth_url
|
||||
bootstrap_token token
|
||||
service_type 'cloudformation'
|
||||
endpoint_region region
|
||||
endpoint_adminurl heat_cfn_endpoint.to_s
|
||||
endpoint_internalurl heat_cfn_endpoint.to_s
|
||||
endpoint_publicurl heat_cfn_endpoint.to_s
|
||||
|
||||
action :create_endpoint
|
||||
end
|
||||
end
|
||||
|
||||
# Register Service Tenant
|
||||
|
|
|
@ -29,25 +29,34 @@ describe 'openstack-orchestration::identity_registration' do
|
|||
pending 'TODO: implement'
|
||||
end
|
||||
|
||||
it 'Register Heat Cloudformation Service' do
|
||||
resource = @chef_run.find_resource(
|
||||
'openstack-identity_register',
|
||||
'Register Heat Cloudformation Service'
|
||||
).to_hash
|
||||
describe 'openstack-orchestration::identity_registration-cfn' do
|
||||
before do
|
||||
orchestration_stubs
|
||||
@chef_run = ::ChefSpec::Runner.new ::REDHAT_OPTS
|
||||
@chef_run.converge 'openstack-orchestration::identity_registration',
|
||||
'openstack-orchestration::api-cfn'
|
||||
end
|
||||
|
||||
expect(resource).to include(
|
||||
auth_uri: 'http://127.0.0.1:35357/v2.0',
|
||||
bootstrap_token: 'bootstrap-token',
|
||||
service_name: 'heat-cfn',
|
||||
service_type: 'cloudformation',
|
||||
service_description: 'Heat Cloudformation Service',
|
||||
action: [:create_service]
|
||||
)
|
||||
end
|
||||
it 'Register Heat Cloudformation Service' do
|
||||
resource = @chef_run.find_resource(
|
||||
'openstack-identity_register',
|
||||
'Register Heat Cloudformation Service'
|
||||
).to_hash
|
||||
|
||||
# Pending on https://review.openstack.org/#/c/59088/
|
||||
it 'Register Heat Cloudformation Endpoint' do
|
||||
pending 'TODO: implement'
|
||||
expect(resource).to include(
|
||||
auth_uri: 'http://127.0.0.1:35357/v2.0',
|
||||
bootstrap_token: 'bootstrap-token',
|
||||
service_name: 'heat-cfn',
|
||||
service_type: 'cloudformation',
|
||||
service_description: 'Heat Cloudformation Service',
|
||||
action: [:create_service]
|
||||
)
|
||||
end
|
||||
|
||||
# Pending on https://review.openstack.org/#/c/59088/
|
||||
it 'Register Heat Cloudformation Endpoint' do
|
||||
pending 'TODO: implement'
|
||||
end
|
||||
end
|
||||
|
||||
it 'registers service user' do
|
||||
|
|
Loading…
Reference in New Issue