Remove api-paste.ini as it provided by package
Since we have no attribute overrides for api-paste.ini, no need to have a template resource for it. Until we need to have some attribute, removing this will take away burden of keeping in sync with base openstack code. Change-Id: Ic72c638ba61929bc06061b04d13ce986514b0460 Related-Bug: #1433152
This commit is contained in:
parent
da3e1d4d57
commit
33fd5eee2c
|
@ -65,8 +65,7 @@ default['openstack']['block-storage']['rabbit_server_chef_role'] = 'os-ops-messa
|
||||||
# This is the name of the Chef role that will install the Keystone Service API
|
# This is the name of the Chef role that will install the Keystone Service API
|
||||||
default['openstack']['block-storage']['keystone_service_chef_role'] = 'keystone'
|
default['openstack']['block-storage']['keystone_service_chef_role'] = 'keystone'
|
||||||
|
|
||||||
# Keystone PKI signing directory. Only written to the filter:authtoken section
|
# Keystone PKI signing directory
|
||||||
# of the api-paste.ini when node['openstack']['auth']['strategy'] == 'pki'
|
|
||||||
default['openstack']['block-storage']['api']['auth']['cache_dir'] = '/var/cache/cinder/api'
|
default['openstack']['block-storage']['api']['auth']['cache_dir'] = '/var/cache/cinder/api'
|
||||||
|
|
||||||
default['openstack']['block-storage']['api']['auth']['version'] = node['openstack']['api']['auth']['version']
|
default['openstack']['block-storage']['api']['auth']['version'] = node['openstack']['api']['auth']['version']
|
||||||
|
|
|
@ -61,15 +61,6 @@ execute 'cinder-manage db sync' do
|
||||||
group node['openstack']['block-storage']['group']
|
group node['openstack']['block-storage']['group']
|
||||||
end
|
end
|
||||||
|
|
||||||
template '/etc/cinder/api-paste.ini' do
|
|
||||||
source 'api-paste.ini.erb'
|
|
||||||
group node['openstack']['block-storage']['group']
|
|
||||||
owner node['openstack']['block-storage']['user']
|
|
||||||
mode 00644
|
|
||||||
|
|
||||||
notifies :restart, 'service[cinder-api]', :immediately
|
|
||||||
end
|
|
||||||
|
|
||||||
if node['openstack']['block-storage']['policyfile_url']
|
if node['openstack']['block-storage']['policyfile_url']
|
||||||
remote_file '/etc/cinder/policy.json' do
|
remote_file '/etc/cinder/policy.json' do
|
||||||
source node['openstack']['block-storage']['policyfile_url']
|
source node['openstack']['block-storage']['policyfile_url']
|
||||||
|
|
|
@ -56,27 +56,6 @@ describe 'openstack-block-storage::api' do
|
||||||
expect(chef_run).to run_execute('cinder-manage db sync').with(user: 'cinder', group: 'cinder')
|
expect(chef_run).to run_execute('cinder-manage db sync').with(user: 'cinder', group: 'cinder')
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'api-paste.ini' do
|
|
||||||
let(:file) { chef_run.template('/etc/cinder/api-paste.ini') }
|
|
||||||
|
|
||||||
it 'should create api-paste.ini' do
|
|
||||||
expect(chef_run).to create_template(file.name)
|
|
||||||
end
|
|
||||||
|
|
||||||
it 'has proper owner' do
|
|
||||||
expect(file.owner).to eq('cinder')
|
|
||||||
expect(file.group).to eq('cinder')
|
|
||||||
end
|
|
||||||
|
|
||||||
it 'has proper modes' do
|
|
||||||
expect(sprintf('%o', file.mode)).to eq('644')
|
|
||||||
end
|
|
||||||
|
|
||||||
it 'notifies cinder-api restart' do
|
|
||||||
expect(file).to notify('service[cinder-api]').to(:restart)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
describe 'policy file' do
|
describe 'policy file' do
|
||||||
it 'does not manage policy file unless specified' do
|
it 'does not manage policy file unless specified' do
|
||||||
expect(chef_run).not_to create_remote_file('/etc/cinder/policy.json')
|
expect(chef_run).not_to create_remote_file('/etc/cinder/policy.json')
|
||||||
|
|
|
@ -1,57 +0,0 @@
|
||||||
<%= node["openstack"]["block-storage"]["custom_template_banner"] %>
|
|
||||||
|
|
||||||
#############
|
|
||||||
# OpenStack #
|
|
||||||
#############
|
|
||||||
|
|
||||||
[composite:osapi_volume]
|
|
||||||
use = call:cinder.api:root_app_factory
|
|
||||||
/: apiversions
|
|
||||||
/v1: openstack_volume_api_v1
|
|
||||||
/v2: openstack_volume_api_v2
|
|
||||||
|
|
||||||
[composite:openstack_volume_api_v1]
|
|
||||||
use = call:cinder.api.middleware.auth:pipeline_factory
|
|
||||||
noauth = request_id faultwrap sizelimit noauth apiv1
|
|
||||||
keystone = request_id faultwrap sizelimit authtoken keystonecontext apiv1
|
|
||||||
keystone_nolimit = request_id faultwrap sizelimit authtoken keystonecontext apiv1
|
|
||||||
|
|
||||||
[composite:openstack_volume_api_v2]
|
|
||||||
use = call:cinder.api.middleware.auth:pipeline_factory
|
|
||||||
noauth = request_id faultwrap sizelimit noauth apiv2
|
|
||||||
keystone = request_id faultwrap sizelimit authtoken keystonecontext apiv2
|
|
||||||
keystone_nolimit = request_id faultwrap sizelimit authtoken keystonecontext apiv2
|
|
||||||
|
|
||||||
[filter:request_id]
|
|
||||||
paste.filter_factory = cinder.openstack.common.middleware.request_id:RequestIdMiddleware.factory
|
|
||||||
|
|
||||||
[filter:faultwrap]
|
|
||||||
paste.filter_factory = cinder.api.middleware.fault:FaultWrapper.factory
|
|
||||||
|
|
||||||
[filter:noauth]
|
|
||||||
paste.filter_factory = cinder.api.middleware.auth:NoAuthMiddleware.factory
|
|
||||||
|
|
||||||
[filter:sizelimit]
|
|
||||||
paste.filter_factory = cinder.api.middleware.sizelimit:RequestBodySizeLimiter.factory
|
|
||||||
|
|
||||||
[app:apiv1]
|
|
||||||
paste.app_factory = cinder.api.v1.router:APIRouter.factory
|
|
||||||
|
|
||||||
[app:apiv2]
|
|
||||||
paste.app_factory = cinder.api.v2.router:APIRouter.factory
|
|
||||||
|
|
||||||
[pipeline:apiversions]
|
|
||||||
pipeline = faultwrap osvolumeversionapp
|
|
||||||
|
|
||||||
[app:osvolumeversionapp]
|
|
||||||
paste.app_factory = cinder.api.versions:Versions.factory
|
|
||||||
|
|
||||||
##########
|
|
||||||
# Shared #
|
|
||||||
##########
|
|
||||||
|
|
||||||
[filter:keystonecontext]
|
|
||||||
paste.filter_factory = cinder.api.middleware.auth:CinderKeystoneContext.factory
|
|
||||||
|
|
||||||
[filter:authtoken]
|
|
||||||
paste.filter_factory = keystonemiddleware.auth_token:filter_factory
|
|
Loading…
Reference in New Issue