diff --git a/recipes/api-cfn.rb b/recipes/api-cfn.rb index bfa27e9..32f2fef 100644 --- a/recipes/api-cfn.rb +++ b/recipes/api-cfn.rb @@ -37,11 +37,3 @@ service 'heat-api-cfn' do action :enable subscribes :restart, 'template[/etc/heat/heat.conf]' end - -template '/etc/heat/api-paste.ini' do - source 'api-paste.ini.erb' - group node['openstack']['orchestration']['group'] - owner node['openstack']['orchestration']['user'] - mode 00644 - notifies :restart, 'service[heat-api-cfn]', :immediately -end diff --git a/recipes/api-cloudwatch.rb b/recipes/api-cloudwatch.rb index 1b74bab..b7532b1 100644 --- a/recipes/api-cloudwatch.rb +++ b/recipes/api-cloudwatch.rb @@ -41,11 +41,3 @@ service 'heat-api-cloudwatch' do action :enable subscribes :restart, 'template[/etc/heat/heat.conf]' end - -template '/etc/heat/api-paste.ini' do - source 'api-paste.ini.erb' - group node['openstack']['orchestration']['group'] - owner node['openstack']['orchestration']['user'] - mode 00644 - notifies :restart, 'service[heat-api-cloudwatch]', :immediately -end diff --git a/recipes/api.rb b/recipes/api.rb index 28fbadc..da232df 100644 --- a/recipes/api.rb +++ b/recipes/api.rb @@ -37,11 +37,3 @@ service 'heat-api' do action :enable subscribes :restart, 'template[/etc/heat/heat.conf]' end - -template '/etc/heat/api-paste.ini' do - source 'api-paste.ini.erb' - group node['openstack']['orchestration']['group'] - owner node['openstack']['orchestration']['user'] - mode 00644 - notifies :restart, 'service[heat-api]', :immediately -end diff --git a/spec/api-cfn-redhat_spec.rb b/spec/api-cfn-redhat_spec.rb index 4afffdc..173b4b6 100644 --- a/spec/api-cfn-redhat_spec.rb +++ b/spec/api-cfn-redhat_spec.rb @@ -14,8 +14,6 @@ describe 'openstack-orchestration::api-cfn' do expect(chef_run).to upgrade_package 'python-heatclient' end - expect_creates_api_paste 'service[heat-api-cfn]' - it 'starts heat api-cfn on boot' do expect(chef_run).to enable_service('openstack-heat-api-cfn') end diff --git a/spec/api-cloudwatch-redhat_spec.rb b/spec/api-cloudwatch-redhat_spec.rb index bd8457f..323295e 100644 --- a/spec/api-cloudwatch-redhat_spec.rb +++ b/spec/api-cloudwatch-redhat_spec.rb @@ -14,8 +14,6 @@ describe 'openstack-orchestration::api-cloudwatch' do expect(chef_run).to upgrade_package 'python-heatclient' end - expect_creates_api_paste 'service[heat-api-cloudwatch]' - it 'starts heat api-cloudwatch on boot' do expect(chef_run).to enable_service('openstack-heat-api-cloudwatch') end diff --git a/spec/api-redhat_spec.rb b/spec/api-redhat_spec.rb index 26f3961..5fd15a7 100644 --- a/spec/api-redhat_spec.rb +++ b/spec/api-redhat_spec.rb @@ -14,8 +14,6 @@ describe 'openstack-orchestration::api' do expect(chef_run).to upgrade_package 'python-heatclient' end - expect_creates_api_paste 'service[heat-api]' - it 'starts heat api on boot' do expect(chef_run).to enable_service('openstack-heat-api') end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 468abcc..f3afea5 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -77,24 +77,6 @@ shared_examples 'expect runs openstack common logging recipe' do end end -def expect_creates_api_paste(service, action = :restart) # rubocop:disable MethodLength - describe 'api-paste.ini' do - let(:template) { chef_run.template('/etc/heat/api-paste.ini') } - - it 'creates the heat.conf file' do - expect(chef_run).to create_template(template.name).with( - owner: 'heat', - group: 'heat', - mode: 0644 - ) - end - - it 'notifies heat-api restart' do - expect(template).to notify(service).to(action) - end - end -end - shared_examples 'expect installs common heat package' do it 'installs the openstack-heat package' do expect(chef_run).to upgrade_package 'openstack-heat' diff --git a/templates/default/api-paste.ini.erb b/templates/default/api-paste.ini.erb deleted file mode 100644 index 1a00023..0000000 --- a/templates/default/api-paste.ini.erb +++ /dev/null @@ -1,100 +0,0 @@ -<%= node["openstack"]["orchestration"]["custom_template_banner"] %> - -# heat-api pipeline -[pipeline:heat-api] -pipeline = request_id faultwrap ssl versionnegotiation authurl authtoken context apiv1app - -# heat-api pipeline for standalone heat -# ie. uses alternative auth backend that authenticates users against keystone -# using username and password instead of validating token (which requires -# an admin/service token). -# To enable, in heat.conf: -# [paste_deploy] -# flavor = standalone -# -[pipeline:heat-api-standalone] -pipeline = request_id faultwrap ssl versionnegotiation authurl authpassword context apiv1app - -# heat-api pipeline for custom cloud backends -# i.e. in heat.conf: -# [paste_deploy] -# flavor = custombackend -# -[pipeline:heat-api-custombackend] -pipeline = request_id faultwrap versionnegotiation context custombackendauth apiv1app - -# heat-api-cfn pipeline -[pipeline:heat-api-cfn] -pipeline = cfnversionnegotiation ec2authtoken authtoken context apicfnv1app - -# heat-api-cfn pipeline for standalone heat -# relies exclusively on authenticating with ec2 signed requests -[pipeline:heat-api-cfn-standalone] -pipeline = cfnversionnegotiation ec2authtoken context apicfnv1app - -# heat-api-cloudwatch pipeline -[pipeline:heat-api-cloudwatch] -pipeline = versionnegotiation ec2authtoken authtoken context apicwapp - -# heat-api-cloudwatch pipeline for standalone heat -# relies exclusively on authenticating with ec2 signed requests -[pipeline:heat-api-cloudwatch-standalone] -pipeline = versionnegotiation ec2authtoken context apicwapp - -[app:apiv1app] -paste.app_factory = heat.common.wsgi:app_factory -heat.app_factory = heat.api.openstack.v1:API - -[app:apicfnv1app] -paste.app_factory = heat.common.wsgi:app_factory -heat.app_factory = heat.api.cfn.v1:API - -[app:apicwapp] -paste.app_factory = heat.common.wsgi:app_factory -heat.app_factory = heat.api.cloudwatch:API - -[filter:versionnegotiation] -paste.filter_factory = heat.common.wsgi:filter_factory -heat.filter_factory = heat.api.openstack:version_negotiation_filter - -[filter:faultwrap] -paste.filter_factory = heat.common.wsgi:filter_factory -heat.filter_factory = heat.api.openstack:faultwrap_filter - -[filter:cfnversionnegotiation] -paste.filter_factory = heat.common.wsgi:filter_factory -heat.filter_factory = heat.api.cfn:version_negotiation_filter - -[filter:cwversionnegotiation] -paste.filter_factory = heat.common.wsgi:filter_factory -heat.filter_factory = heat.api.cloudwatch:version_negotiation_filter - -[filter:context] -paste.filter_factory = heat.common.context:ContextMiddleware_filter_factory - -[filter:ec2authtoken] -paste.filter_factory = heat.api.aws.ec2token:EC2Token_filter_factory - -[filter:ssl] -paste.filter_factory = heat.common.wsgi:filter_factory -heat.filter_factory = heat.api.openstack:sslmiddleware_filter - -# Middleware to set auth_url header appropriately -[filter:authurl] -paste.filter_factory = heat.common.auth_url:filter_factory - -# Auth middleware that validates token against keystone -[filter:authtoken] -paste.filter_factory = keystoneclient.middleware.auth_token:filter_factory - -# Auth middleware that validates username/password against keystone -[filter:authpassword] -paste.filter_factory = heat.common.auth_password:filter_factory - -# Auth middleware that validates against custom backend -[filter:custombackendauth] -paste.filter_factory = heat.common.custom_backend_auth:filter_factory - -# Middleware to set x-openstack-request-id in http response header -[filter:request_id] -paste.filter_factory = heat.openstack.common.middleware.request_id:RequestIdMiddleware.factory