Browse Source

use_cookbook-openstackclient/identity_v3

- Now use cookbook-openstackclient to create endpoints role service and
  user
- added domain creation and access granting
- added values to work with identity_v3
- rewrote specs to work again
- added needed keystone_authtoken attributes
- updated README

Change-Id: I2f339055883354c6a8a77daa7967ff279c4d18d9
Depends-On: I0f8955f05de9b33711c54b9a198f45018cceb8e1
Depends-On: If7b4d6e563081a0be9957353d73ef61a9688df56
changes/96/363696/9
Christoph Albers 3 years ago
parent
commit
49d23da167

+ 3
- 0
Berksfile View File

@@ -8,3 +8,6 @@ cookbook "openstack-identity",
8 8
   github: "openstack/cookbook-openstack-identity"
9 9
 cookbook "openstack-common",
10 10
   github: "openstack/cookbook-openstack-common"
11
+cookbook "openstackclient",
12
+  github: "cloudbau/cookbook-openstackclient"
13
+

+ 5
- 3
README.md View File

@@ -29,9 +29,10 @@ Cookbooks
29 29
 The following cookbooks are dependencies:
30 30
 
31 31
 - 'apt', '~> 4.0'
32
-- 'openstack-common', '>= 13.0.0'
33
-- 'openstack-identity', '>= 13.0.0'
34
-- 'openstack-image', '>= 13.0.0'
32
+- 'openstack-common', '>= 14.0.0'
33
+- 'openstack-identity', '>= 14.0.0'
34
+- 'openstack-image', '>= 14.0.0'
35
+- 'openstackclient', '>= 0.1.0'
35 36
 
36 37
 Attributes
37 38
 ==========
@@ -96,6 +97,7 @@ License and Author
96 97
 | **Author**           |  Eric Zhou (<zyouzhou@cn.ibm.com>)                 |
97 98
 | **Author**           |  Edwin Wang (<edwin.wang@cn.ibm.com>)              |
98 99
 | **Author**           |  Jan Klare (<j.klare@cloudbau.de>)                 |
100
+| **Author**           |  Christoph Albers (<c.albers@x-ion.de>)            |
99 101
 |                      |                                                    |
100 102
 | **Copyright**        |  Copyright (c) 2012, Rackspace US, Inc.            |
101 103
 | **Copyright**        |  Copyright (c) 2012-2013, AT&T Services, Inc.      |

+ 6
- 2
attributes/cinder_conf.rb View File

@@ -9,10 +9,14 @@ default['openstack']['block-storage']['conf'].tap do |conf|
9 9
   conf['DEFAULT']['control_exchange'] = 'cinder'
10 10
   conf['DEFAULT']['volume_group'] = 'cinder-volumes'
11 11
   conf['DEFAULT']['state_path'] = '/var/lib/cinder'
12
-  conf['keystone_authtoken']['auth_type'] = 'v2password'
12
+  conf['keystone_authtoken']['auth_type'] = 'v3password'
13 13
   conf['keystone_authtoken']['region_name'] = node['openstack']['region']
14 14
   conf['keystone_authtoken']['username'] = 'cinder'
15
-  conf['keystone_authtoken']['tenant_name'] = 'service'
15
+  conf['keystone_authtoken']['auth_version'] = node['openstack']['identity']['auth']['version']
16
+  conf['keystone_authtoken']['project_name'] = 'service'
17
+  conf['keystone_authtoken']['user_domain_name'] = 'Default'
16 18
   conf['keystone_authtoken']['signing_dir'] = '/var/cache/cinder/api'
19
+  conf['keystone_authtoken']['project_domain_name'] = 'Default'
20
+
17 21
   conf['oslo_concurrency']['lock_path'] = '/var/lib/cinder/tmp'
18 22
 end

+ 1
- 1
attributes/default.rb View File

@@ -49,7 +49,7 @@ default['openstack']['block-storage']['rabbit_server_chef_role'] = 'os-ops-messa
49 49
 default['openstack']['block-storage']['keystone_service_chef_role'] = 'keystone'
50 50
 
51 51
 default['openstack']['block-storage']['service_user'] = 'cinder'
52
-default['openstack']['block-storage']['service_tenant_name'] = 'service'
52
+default['openstack']['block-storage']['project'] = 'service'
53 53
 default['openstack']['block-storage']['service_role'] = 'service'
54 54
 default['openstack']['block-storage']['service_name'] = 'cinderv2'
55 55
 default['openstack']['block-storage']['service_type'] = 'volumev2'

+ 1
- 0
metadata.rb View File

@@ -17,3 +17,4 @@ depends 'apt', '~> 4.0'
17 17
 depends 'openstack-common', '>= 14.0.0'
18 18
 depends 'openstack-identity', '>= 14.0.0'
19 19
 depends 'openstack-image', '>= 14.0.0'
20
+depends 'openstackclient'

+ 85
- 75
recipes/identity_registration.rb View File

@@ -27,102 +27,112 @@ class ::Chef::Recipe
27 27
 end
28 28
 
29 29
 identity_admin_endpoint = admin_endpoint 'identity'
30
-bootstrap_token = get_password 'token', 'openstack_identity_bootstrap_token'
31
-auth_uri = ::URI.decode identity_admin_endpoint.to_s
32
-admin_cinder_api_endpoint = admin_endpoint 'block-storage'
33
-internal_cinder_api_endpoint = internal_endpoint 'block-storage'
34
-public_cinder_api_endpoint = public_endpoint 'block-storage'
30
+auth_url = ::URI.decode identity_admin_endpoint.to_s
31
+
32
+interfaces = {
33
+  public: { url: public_endpoint('block-storage') },
34
+  internal: { url: internal_endpoint('block-storage') },
35
+  admin: { url: admin_endpoint('block-storage') }
36
+}
35 37
 service_pass = get_password 'service', 'openstack-block-storage'
36 38
 region = node['openstack']['block-storage']['region']
37
-service_tenant_name = node['openstack']['block-storage']['service_tenant_name']
39
+service_project_name = node['openstack']['block-storage']['conf']['keystone_authtoken']['project_name']
38 40
 service_user = node['openstack']['block-storage']['service_user']
41
+admin_user = node['openstack']['identity']['admin_user']
42
+admin_pass = get_password 'user', node['openstack']['identity']['admin_user']
43
+admin_project = node['openstack']['identity']['admin_project']
44
+admin_domain = node['openstack']['identity']['admin_domain_name']
45
+service_domain_name = node['openstack']['block-storage']['conf']['keystone_authtoken']['user_domain_name']
39 46
 service_role = node['openstack']['block-storage']['service_role']
40 47
 service_name = node['openstack']['block-storage']['service_name']
41 48
 service_type = node['openstack']['block-storage']['service_type']
42 49
 
43
-openstack_identity_register 'Register Service Tenant' do
44
-  auth_uri auth_uri
45
-  bootstrap_token bootstrap_token
46
-  tenant_name service_tenant_name
47
-  tenant_description 'Service Tenant'
48
-  action :create_tenant
50
+connection_params = {
51
+  openstack_auth_url:     "#{auth_url}/auth/tokens",
52
+  openstack_username:     admin_user,
53
+  openstack_api_key:      admin_pass,
54
+  openstack_project_name: admin_project,
55
+  openstack_domain_name:    admin_domain
56
+}
57
+
58
+# Register VolumeV2 Service
59
+openstack_service service_name do
60
+  type service_type
61
+  connection_params connection_params
49 62
 end
50 63
 
51
-openstack_identity_register 'Register Cinder V2 Volume Service' do
52
-  auth_uri auth_uri
53
-  bootstrap_token bootstrap_token
54
-  service_name service_name
55
-  service_type service_type
56
-  service_description 'Cinder Volume Service V2'
57
-  endpoint_region region
58
-  endpoint_adminurl ::URI.decode admin_cinder_api_endpoint.to_s
59
-  endpoint_internalurl ::URI.decode internal_cinder_api_endpoint.to_s
60
-  endpoint_publicurl ::URI.decode public_cinder_api_endpoint.to_s
61
-  action :create_service
64
+interfaces.each do |interface, res|
65
+  # Register VolumeV2 Endpoints
66
+  openstack_endpoint service_type do
67
+    service_name service_name
68
+    interface interface.to_s
69
+    url res[:url].to_s
70
+    region region
71
+    connection_params connection_params
72
+  end
62 73
 end
63 74
 
64
-openstack_identity_register 'Register Cinder V2 Volume Endpoint' do
65
-  auth_uri auth_uri
66
-  bootstrap_token bootstrap_token
67
-  service_name service_name
68
-  service_type service_type
69
-  service_description 'Cinder Volume Service V2'
70
-  endpoint_region region
71
-  endpoint_adminurl ::URI.decode admin_cinder_api_endpoint.to_s
72
-  endpoint_internalurl ::URI.decode internal_cinder_api_endpoint.to_s
73
-  endpoint_publicurl ::URI.decode public_cinder_api_endpoint.to_s
74
-  action :create_endpoint
75
+# Register Service Project
76
+openstack_project service_project_name do
77
+  connection_params connection_params
78
+end
79
+
80
+# Register Service User
81
+openstack_user service_user do
82
+  project_name service_project_name
83
+  role_name service_role
84
+  password service_pass
85
+  connection_params connection_params
86
+end
87
+
88
+## Grant Service role to Service User for Service Tenant ##
89
+openstack_user service_user do
90
+  role_name service_role
91
+  project_name service_project_name
92
+  connection_params connection_params
93
+  action :grant_role
75 94
 end
76 95
 
96
+openstack_user service_user do
97
+  domain_name service_domain_name
98
+  role_name service_role
99
+  connection_params connection_params
100
+  action :grant_domain
101
+end
77 102
 # --------------------- WORKAROUND --------------------------------------#
78 103
 # Currently this bug is still open
79 104
 # (https://bugs.launchpad.net/horizon/+bug/1415712) and we need to register and
80 105
 # enable the cinder v1 api to make it available via the dashboard. This should
81 106
 # be removed with the final mitaka release.
82 107
 
83
-openstack_identity_register 'Register Cinder V1 Volume Service' do
84
-  auth_uri auth_uri
85
-  bootstrap_token bootstrap_token
86
-  service_name (service_name.gsub(/v2/, ''))
87
-  service_type (service_type.gsub(/v2/, ''))
88
-  service_description 'Cinder Volume Service V1'
89
-  endpoint_region region
90
-  endpoint_adminurl (::URI.decode admin_cinder_api_endpoint.to_s.gsub(/v2/, 'v1'))
91
-  endpoint_internalurl (::URI.decode internal_cinder_api_endpoint.to_s.gsub(/v2/, 'v1'))
92
-  endpoint_publicurl (::URI.decode public_cinder_api_endpoint.to_s.gsub(/v2/, 'v1'))
93
-  action :create_service
94
-end
108
+# openstack_identity_register 'Register Cinder V1 Volume Service' do
109
+#   auth_uri auth_uri
110
+#   bootstrap_token bootstrap_token
111
+#   service_name ((service_name).gsub(/v2/, ''))
112
+#   service_type ((service_type).gsub(/v2/, ''))
113
+#   service_description 'Cinder Volume Service V1'
114
+#   endpoint_region region
115
+#   endpoint_adminurl ((::URI.decode admin_cinder_api_endpoint.to_s).gsub(/v2/, 'v1'))
116
+#   endpoint_internalurl ((::URI.decode internal_cinder_api_endpoint.to_s).gsub(/v2/, 'v1'))
117
+#   endpoint_publicurl ((::URI.decode public_cinder_api_endpoint.to_s).gsub(/v2/, 'v1'))
118
+#   action :create_service
119
+# end
95 120
 
96
-openstack_identity_register 'Register Cinder V1 Volume Endpoint' do
97
-  auth_uri auth_uri
98
-  bootstrap_token bootstrap_token
99
-  service_name (service_name.gsub(/v2/, ''))
100
-  service_type (service_type.gsub(/v2/, ''))
101
-  service_description 'Cinder Volume Service V1'
102
-  endpoint_region region
103
-  endpoint_adminurl (::URI.decode admin_cinder_api_endpoint.to_s.gsub(/v2/, 'v1'))
104
-  endpoint_internalurl (::URI.decode internal_cinder_api_endpoint.to_s.gsub(/v2/, 'v1'))
105
-  endpoint_publicurl (::URI.decode public_cinder_api_endpoint.to_s.gsub(/v2/, 'v1'))
106
-  action :create_endpoint
121
+# Register Volume Service
122
+openstack_service 'cinder' do
123
+  type 'volume'
124
+  connection_params connection_params
107 125
 end
108 126
 
109
-# --------------------- WORKAROUND --------------------------------------#
110
-
111
-openstack_identity_register 'Register Cinder Service User' do
112
-  auth_uri auth_uri
113
-  bootstrap_token bootstrap_token
114
-  tenant_name service_tenant_name
115
-  user_name service_user
116
-  user_pass service_pass
117
-  user_enabled true # Not required as this is the default
118
-  action :create_user
127
+interfaces.each do |interface, res|
128
+  # Register VolumeV1 Endpoints
129
+  openstack_endpoint 'volume' do
130
+    service_name 'cinder'
131
+    interface interface.to_s
132
+    url (::URI.decode res[:url].to_s).gsub(/v2/, 'v1')
133
+    region region
134
+    connection_params connection_params
135
+  end
119 136
 end
120 137
 
121
-openstack_identity_register 'Grant service Role to Cinder Service User for Cinder Service Tenant' do
122
-  auth_uri auth_uri
123
-  bootstrap_token bootstrap_token
124
-  tenant_name service_tenant_name
125
-  user_name service_user
126
-  role_name service_role
127
-  action :grant_role
128
-end
138
+# --------------------- WORKAROUND --------------------------------------#

+ 2
- 4
spec/cinder_common_spec.rb View File

@@ -77,13 +77,11 @@ describe 'openstack-block-storage::cinder-common' do
77 77
 
78 78
         context 'endpoint related' do
79 79
           it 'has auth_uri' do
80
-            expect(chef_run).to render_file(file.name).with_content(%r{^auth_url = http://127.0.0.1:5000/v2.0$})
80
+            expect(chef_run).to render_file(file.name).with_content(%r{^auth_url = http://127.0.0.1:5000/v3$})
81 81
           end
82 82
         end
83 83
 
84
-        it 'has no auth_version when auth_version is v2.0' do
85
-          node.set['openstack']['block-storage']['api']['auth']['version'] = 'v2.0'
86
-
84
+        it do
87 85
           expect(chef_run).not_to render_file(file.name).with_content(/^auth_version = v2.0$/)
88 86
         end
89 87
 

+ 81
- 117
spec/identity_registration_spec.rb View File

@@ -12,153 +12,117 @@ describe 'openstack-block-storage::identity_registration' do
12 12
 
13 13
     include_context 'block-storage-stubs'
14 14
 
15
-    it 'registers service tenant' do
16
-      expect(chef_run).to create_tenant_openstack_identity_register(
17
-        'Register Service Tenant'
15
+    connection_params = {
16
+      openstack_auth_url: 'http://127.0.0.1:35357/v3/auth/tokens',
17
+      openstack_username: 'admin',
18
+      openstack_api_key: 'emc_test_pass',
19
+      openstack_project_name: 'admin',
20
+      openstack_domain_name: 'default'
21
+    }
22
+    service_name = 'cinderv2'
23
+    service_type = 'volumev2'
24
+    service_user = 'cinder'
25
+    url = 'http://127.0.0.1:8776/v2/%(tenant_id)s'
26
+    region = 'RegionOne'
27
+    project_name = 'service'
28
+    role_name = 'service'
29
+    password = 'cinder-pass'
30
+    domain_name = 'Default'
31
+
32
+    it "registers #{project_name} Project" do
33
+      expect(chef_run).to create_openstack_project(
34
+        project_name
18 35
       ).with(
19
-        auth_uri: 'http://127.0.0.1:35357/v2.0',
20
-        bootstrap_token: 'bootstrap-token',
21
-        tenant_name: 'service',
22
-        tenant_description: 'Service Tenant'
36
+        connection_params: connection_params
23 37
       )
24 38
     end
25 39
 
26
-    it 'registers cinder v2 volume service' do
27
-      expect(chef_run).to create_service_openstack_identity_register(
28
-        'Register Cinder V2 Volume Service'
40
+    it "registers #{service_name} service" do
41
+      expect(chef_run).to create_openstack_service(
42
+        service_name
29 43
       ).with(
30
-        auth_uri: 'http://127.0.0.1:35357/v2.0',
31
-        bootstrap_token: 'bootstrap-token',
32
-        service_name: 'cinderv2',
33
-        service_type: 'volumev2',
34
-        service_description: 'Cinder Volume Service V2',
35
-        endpoint_region: 'RegionOne',
36
-        endpoint_adminurl: 'http://127.0.0.1:8776/v2/%(tenant_id)s',
37
-        endpoint_internalurl: 'http://127.0.0.1:8776/v2/%(tenant_id)s',
38
-        endpoint_publicurl: 'http://127.0.0.1:8776/v2/%(tenant_id)s'
44
+        connection_params: connection_params,
45
+        type: service_type
39 46
       )
40 47
     end
41 48
 
42
-    context 'registers v2 volume endpoint' do
43
-      it 'with default values' do
44
-        expect(chef_run).to create_endpoint_openstack_identity_register(
45
-          'Register Cinder V2 Volume Endpoint'
46
-        ).with(
47
-          auth_uri: 'http://127.0.0.1:35357/v2.0',
48
-          bootstrap_token: 'bootstrap-token',
49
-          service_name: 'cinderv2',
50
-          service_type: 'volumev2',
51
-          service_description: 'Cinder Volume Service V2',
52
-          endpoint_region: 'RegionOne',
53
-          endpoint_adminurl: 'http://127.0.0.1:8776/v2/%(tenant_id)s',
54
-          endpoint_internalurl: 'http://127.0.0.1:8776/v2/%(tenant_id)s',
55
-          endpoint_publicurl: 'http://127.0.0.1:8776/v2/%(tenant_id)s'
56
-        )
57
-      end
58
-
59
-      it 'with all different URLs' do
60
-        admin_url = 'https://admin.host:123/admin_path'
61
-        internal_url = 'http://internal.host:456/internal_path'
62
-        public_url = 'https://public.host:789/public_path'
63
-
64
-        node.set['openstack']['endpoints']['internal']['block-storage']['uri'] = internal_url
65
-        node.set['openstack']['endpoints']['admin']['block-storage']['uri'] = admin_url
66
-        node.set['openstack']['endpoints']['public']['block-storage']['uri'] = public_url
67
-
68
-        expect(chef_run).to create_endpoint_openstack_identity_register(
69
-          'Register Cinder V2 Volume Endpoint'
70
-        ).with(
71
-          auth_uri: 'http://127.0.0.1:35357/v2.0',
72
-          bootstrap_token: 'bootstrap-token',
73
-          service_name: 'cinderv2',
74
-          service_type: 'volumev2',
75
-          service_description: 'Cinder Volume Service V2',
76
-          endpoint_region: 'RegionOne',
77
-          endpoint_adminurl: admin_url,
78
-          endpoint_internalurl: internal_url,
79
-          endpoint_publicurl: public_url
80
-        )
49
+    context "registers #{service_name} endpoint" do
50
+      %w(admin internal public).each do |interface|
51
+        it "#{interface} endpoint with default values" do
52
+          expect(chef_run).to create_openstack_endpoint(
53
+            service_type
54
+          ).with(
55
+            service_name: service_name,
56
+            # interface: interface,
57
+            url: url,
58
+            region: region,
59
+            connection_params: connection_params
60
+          )
61
+        end
81 62
       end
63
+      %w(admin internal public).each do |interface|
64
+        it "#{interface} with different service type/name and registers v1 endpoint" do
65
+          node.set['openstack']['block-storage']['service_name'] = 'cinder'
66
+          node.set['openstack']['block-storage']['service_type'] = 'volume'
82 67
 
83
-      it 'with different service type/name' do
84
-        node.set['openstack']['block-storage']['service_name'] = 'cinder'
85
-        node.set['openstack']['block-storage']['service_type'] = 'volume'
86
-
87
-        expect(chef_run).to create_endpoint_openstack_identity_register(
88
-          'Register Cinder V2 Volume Endpoint'
89
-        ).with(
90
-          auth_uri: 'http://127.0.0.1:35357/v2.0',
91
-          bootstrap_token: 'bootstrap-token',
92
-          service_name: 'cinder',
93
-          service_type: 'volume',
94
-          service_description: 'Cinder Volume Service V2',
95
-          endpoint_region: 'RegionOne',
96
-          endpoint_adminurl: 'http://127.0.0.1:8776/v2/%(tenant_id)s',
97
-          endpoint_internalurl: 'http://127.0.0.1:8776/v2/%(tenant_id)s',
98
-          endpoint_publicurl: 'http://127.0.0.1:8776/v2/%(tenant_id)s'
99
-        )
68
+          expect(chef_run).to create_openstack_endpoint(
69
+            'volume'
70
+          ).with(
71
+            service_name: 'cinder',
72
+            # interface: interface,
73
+            url: 'http://127.0.0.1:8776/v1/%(tenant_id)s',
74
+            region: 'RegionOne',
75
+            connection_params: connection_params
76
+          )
77
+        end
100 78
       end
101 79
 
102 80
       it 'with custom region override' do
103 81
         node.set['openstack']['block-storage']['region'] = 'volumeRegion'
104
-        expect(chef_run).to create_endpoint_openstack_identity_register(
105
-          'Register Cinder V2 Volume Endpoint'
106
-        ).with(endpoint_region: 'volumeRegion')
82
+        expect(chef_run).to create_openstack_endpoint(
83
+          service_type
84
+        ).with(region: 'volumeRegion')
107 85
       end
108 86
     end
109 87
 
110 88
     it 'registers service user' do
111
-      expect(chef_run).to create_user_openstack_identity_register(
112
-        'Register Cinder Service User'
89
+      expect(chef_run).to create_openstack_user(
90
+        service_user
113 91
       ).with(
114
-        auth_uri: 'http://127.0.0.1:35357/v2.0',
115
-        bootstrap_token: 'bootstrap-token',
116
-        tenant_name: 'service',
117
-        user_name: 'cinder',
118
-        user_pass: 'cinder-pass',
119
-        user_enabled: true
92
+        project_name: project_name,
93
+        role_name: role_name,
94
+        password: password,
95
+        connection_params: connection_params
120 96
       )
121 97
     end
122 98
 
123
-    it 'grants service role to service user for service tenant' do
124
-      expect(chef_run).to grant_role_openstack_identity_register(
125
-        'Grant service Role to Cinder Service User for Cinder Service Tenant'
99
+    it do
100
+      expect(chef_run).to grant_domain_openstack_user(
101
+        service_user
126 102
       ).with(
127
-        auth_uri: 'http://127.0.0.1:35357/v2.0',
128
-        bootstrap_token: 'bootstrap-token',
129
-        tenant_name: 'service',
130
-        user_name: 'cinder',
131
-        role_name: 'service'
103
+        domain_name: domain_name,
104
+        role_name: role_name,
105
+        connection_params: connection_params
132 106
       )
133 107
     end
108
+
134 109
     it do
135
-      expect(chef_run).to create_service_openstack_identity_register(
136
-        'Register Cinder V1 Volume Service'
110
+      expect(chef_run).to grant_role_openstack_user(
111
+        service_user
137 112
       ).with(
138
-        auth_uri: 'http://127.0.0.1:35357/v2.0',
139
-        bootstrap_token: 'bootstrap-token',
140
-        service_name: 'cinder',
141
-        service_type: 'volume',
142
-        service_description: 'Cinder Volume Service V1',
143
-        endpoint_region: 'RegionOne',
144
-        endpoint_adminurl: 'http://127.0.0.1:8776/v1/%(tenant_id)s',
145
-        endpoint_internalurl: 'http://127.0.0.1:8776/v1/%(tenant_id)s',
146
-        endpoint_publicurl: 'http://127.0.0.1:8776/v1/%(tenant_id)s'
113
+        project_name: project_name,
114
+        role_name: role_name,
115
+        password: password,
116
+        connection_params: connection_params
147 117
       )
148 118
     end
149
-    it do
150
-      expect(chef_run).to create_endpoint_openstack_identity_register(
151
-        'Register Cinder V1 Volume Endpoint'
119
+
120
+    it 'registers cinder v1 volume service' do
121
+      expect(chef_run).to create_openstack_service(
122
+        'cinder'
152 123
       ).with(
153
-        auth_uri: 'http://127.0.0.1:35357/v2.0',
154
-        bootstrap_token: 'bootstrap-token',
155
-        service_name: 'cinder',
156
-        service_type: 'volume',
157
-        service_description: 'Cinder Volume Service V1',
158
-        endpoint_region: 'RegionOne',
159
-        endpoint_adminurl: 'http://127.0.0.1:8776/v1/%(tenant_id)s',
160
-        endpoint_internalurl: 'http://127.0.0.1:8776/v1/%(tenant_id)s',
161
-        endpoint_publicurl: 'http://127.0.0.1:8776/v1/%(tenant_id)s'
124
+        connection_params: connection_params,
125
+        type: 'volume'
162 126
       )
163 127
     end
164 128
   end

+ 5
- 3
spec/spec_helper.rb View File

@@ -108,12 +108,14 @@ shared_examples 'creates_cinder_conf' do |service, user, group, action = :restar
108 108
 
109 109
     it do
110 110
       [
111
-        /^auth_type = v2password$/,
111
+        /^auth_type = v3password$/,
112 112
         /^region_name = RegionOne$/,
113 113
         /^username = cinder/,
114
-        /^tenant_name = service$/,
114
+        /^project_name = service$/,
115
+        /^user_domain_name = Default/,
116
+        /^project_domain_name = Default/,
115 117
         %r{^signing_dir = /var/cache/cinder/api$},
116
-        %r{^auth_url = http://127.0.0.1:5000/v2.0$},
118
+        %r{^auth_url = http://127.0.0.1:5000/v3$},
117 119
         /^password = cinder-pass$/
118 120
       ].each do |line|
119 121
         expect(chef_run).to render_config_file(file.name)

Loading…
Cancel
Save