Browse Source

Merge "Remove api-paste.ini as it provided by package"

Jenkins 4 years ago
parent
commit
da35cf1404
4 changed files with 1 additions and 89 deletions
  1. 1
    2
      attributes/default.rb
  2. 0
    9
      recipes/api.rb
  3. 0
    21
      spec/api_spec.rb
  4. 0
    57
      templates/default/api-paste.ini.erb

+ 1
- 2
attributes/default.rb View File

@@ -65,8 +65,7 @@ default['openstack']['block-storage']['rabbit_server_chef_role'] = 'os-ops-messa
65 65
 # This is the name of the Chef role that will install the Keystone Service API
66 66
 default['openstack']['block-storage']['keystone_service_chef_role'] = 'keystone'
67 67
 
68
-# Keystone PKI signing directory. Only written to the filter:authtoken section
69
-# of the api-paste.ini when node['openstack']['auth']['strategy'] == 'pki'
68
+# Keystone PKI signing directory
70 69
 default['openstack']['block-storage']['api']['auth']['cache_dir'] = '/var/cache/cinder/api'
71 70
 
72 71
 default['openstack']['block-storage']['api']['auth']['version'] = node['openstack']['api']['auth']['version']

+ 0
- 9
recipes/api.rb View File

@@ -61,15 +61,6 @@ execute 'cinder-manage db sync' do
61 61
   group node['openstack']['block-storage']['group']
62 62
 end
63 63
 
64
-template '/etc/cinder/api-paste.ini' do
65
-  source 'api-paste.ini.erb'
66
-  group node['openstack']['block-storage']['group']
67
-  owner node['openstack']['block-storage']['user']
68
-  mode 00644
69
-
70
-  notifies :restart, 'service[cinder-api]', :immediately
71
-end
72
-
73 64
 if node['openstack']['block-storage']['policyfile_url']
74 65
   remote_file '/etc/cinder/policy.json' do
75 66
     source node['openstack']['block-storage']['policyfile_url']

+ 0
- 21
spec/api_spec.rb View File

@@ -56,27 +56,6 @@ describe 'openstack-block-storage::api' do
56 56
       expect(chef_run).to run_execute('cinder-manage db sync').with(user: 'cinder', group: 'cinder')
57 57
     end
58 58
 
59
-    describe 'api-paste.ini' do
60
-      let(:file) { chef_run.template('/etc/cinder/api-paste.ini') }
61
-
62
-      it 'should create api-paste.ini' do
63
-        expect(chef_run).to create_template(file.name)
64
-      end
65
-
66
-      it 'has proper owner' do
67
-        expect(file.owner).to eq('cinder')
68
-        expect(file.group).to eq('cinder')
69
-      end
70
-
71
-      it 'has proper modes' do
72
-        expect(sprintf('%o', file.mode)).to eq('644')
73
-      end
74
-
75
-      it 'notifies cinder-api restart' do
76
-        expect(file).to notify('service[cinder-api]').to(:restart)
77
-      end
78
-    end
79
-
80 59
     describe 'policy file' do
81 60
       it 'does not manage policy file unless specified' do
82 61
         expect(chef_run).not_to create_remote_file('/etc/cinder/policy.json')

+ 0
- 57
templates/default/api-paste.ini.erb View File

@@ -1,57 +0,0 @@
1
-<%= node["openstack"]["block-storage"]["custom_template_banner"] %>
2
-
3
-#############
4
-# OpenStack #
5
-#############
6
-
7
-[composite:osapi_volume]
8
-use = call:cinder.api:root_app_factory
9
-/: apiversions
10
-/v1: openstack_volume_api_v1
11
-/v2: openstack_volume_api_v2
12
-
13
-[composite:openstack_volume_api_v1]
14
-use = call:cinder.api.middleware.auth:pipeline_factory
15
-noauth = request_id faultwrap sizelimit noauth apiv1
16
-keystone = request_id faultwrap sizelimit authtoken keystonecontext apiv1
17
-keystone_nolimit = request_id faultwrap sizelimit authtoken keystonecontext apiv1
18
-
19
-[composite:openstack_volume_api_v2]
20
-use = call:cinder.api.middleware.auth:pipeline_factory
21
-noauth = request_id faultwrap sizelimit noauth apiv2
22
-keystone = request_id faultwrap sizelimit authtoken keystonecontext apiv2
23
-keystone_nolimit = request_id faultwrap sizelimit authtoken keystonecontext apiv2
24
-
25
-[filter:request_id]
26
-paste.filter_factory = cinder.openstack.common.middleware.request_id:RequestIdMiddleware.factory
27
-
28
-[filter:faultwrap]
29
-paste.filter_factory = cinder.api.middleware.fault:FaultWrapper.factory
30
-
31
-[filter:noauth]
32
-paste.filter_factory = cinder.api.middleware.auth:NoAuthMiddleware.factory
33
-
34
-[filter:sizelimit]
35
-paste.filter_factory = cinder.api.middleware.sizelimit:RequestBodySizeLimiter.factory
36
-
37
-[app:apiv1]
38
-paste.app_factory = cinder.api.v1.router:APIRouter.factory
39
-
40
-[app:apiv2]
41
-paste.app_factory = cinder.api.v2.router:APIRouter.factory
42
-
43
-[pipeline:apiversions]
44
-pipeline = faultwrap osvolumeversionapp
45
-
46
-[app:osvolumeversionapp]
47
-paste.app_factory = cinder.api.versions:Versions.factory
48
-
49
-##########
50
-# Shared #
51
-##########
52
-
53
-[filter:keystonecontext]
54
-paste.filter_factory = cinder.api.middleware.auth:CinderKeystoneContext.factory
55
-
56
-[filter:authtoken]
57
-paste.filter_factory = keystonemiddleware.auth_token:filter_factory

Loading…
Cancel
Save