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
- updated readme

Change-Id: If5c3758c786b2d11cec6d64dc57530367acd2976
Depends-On: I0f8955f05de9b33711c54b9a198f45018cceb8e1
Christoph Albers 2 years ago
parent
commit
f2c3db560e
7 changed files with 210 additions and 213 deletions
  1. 3
    0
      Berksfile
  2. 2
    0
      README.md
  3. 5
    3
      attributes/heat_conf.rb
  4. 1
    0
      metadata.rb
  5. 115
    63
      recipes/identity_registration.rb
  6. 75
    140
      spec/identity_registration_spec.rb
  7. 9
    7
      spec/spec_helper.rb

+ 3
- 0
Berksfile View File

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

+ 2
- 0
README.md View File

@@ -27,6 +27,7 @@ The following cookbooks are dependencies:
27 27
 
28 28
 - 'openstack-common', '>= 14.0.0'
29 29
 - 'openstack-identity', '>= 14.0.0'
30
+- 'openstackclient', '>= 0.1.0'
30 31
 
31 32
 Attributes
32 33
 ==========
@@ -74,6 +75,7 @@ License and Author
74 75
 | **Author**           |  Mark Vanderwiel (<vanderwl@us.ibm.com>)           |
75 76
 | **Author**           |  Jan Klare (<j.klare@x-ion.de>)                    |
76 77
 | **Author**           |  Dr. Jens Rosenboom (<j.rosenboom@x-ion.de>)       |
78
+| **Author**           |  Christoph Albers (<c.albers@x-ion.de>)            |
77 79
 |                      |                                                    |
78 80
 | **Copyright**        |  Copyright (c) 2013-2014, IBM Corp.                |
79 81
 | **Copyright**        |  Copyright (c) 2014, SUSE Linux, GmbH.             |

+ 5
- 3
attributes/heat_conf.rb View File

@@ -19,8 +19,10 @@
19 19
 
20 20
 default['openstack']['orchestration']['conf']['DEFAULT']['log_dir'] = '/var/log/heat'
21 21
 default['openstack']['orchestration']['conf']['oslo_messaging_notifications']['driver'] = 'heat.openstack.common.notifier.rpc_notifier'
22
-default['openstack']['orchestration']['conf']['keystone_authtoken']['auth_type'] = 'v2password'
22
+default['openstack']['orchestration']['conf']['keystone_authtoken']['auth_type'] = 'v3password'
23 23
 default['openstack']['orchestration']['conf']['keystone_authtoken']['username'] = 'heat'
24
-default['openstack']['orchestration']['conf']['keystone_authtoken']['tenant_name'] = 'service'
25
-default['openstack']['orchestration']['conf']['trustee']['auth_plugin'] = 'v2password'
24
+default['openstack']['orchestration']['conf']['keystone_authtoken']['project_name'] = 'service'
25
+default['openstack']['orchestration']['conf']['keystone_authtoken']['project_domain_name'] = 'Default'
26
+default['openstack']['orchestration']['conf']['keystone_authtoken']['user_domain_name'] = 'Default'
27
+default['openstack']['orchestration']['conf']['trustee']['auth_plugin'] = 'v3password'
26 28
 default['openstack']['orchestration']['conf']['trustee']['username'] = 'heat'

+ 1
- 0
metadata.rb View File

@@ -15,3 +15,4 @@ end
15 15
 
16 16
 depends 'openstack-common', '>= 14.0.0'
17 17
 depends 'openstack-identity', '>= 14.0.0'
18
+depends 'openstackclient'

+ 115
- 63
recipes/identity_registration.rb View File

@@ -26,7 +26,6 @@ end
26 26
 
27 27
 identity_admin_endpoint = admin_endpoint 'identity'
28 28
 
29
-token = get_password 'token', 'openstack_identity_bootstrap_token'
30 29
 auth_url = ::URI.decode identity_admin_endpoint.to_s
31 30
 
32 31
 admin_heat_endpoint = admin_endpoint 'orchestration-api'
@@ -37,36 +36,88 @@ internal_heat_cfn_endpoint = internal_endpoint 'orchestration-api-cfn'
37 36
 public_heat_cfn_endpoint = public_endpoint 'orchestration-api-cfn'
38 37
 
39 38
 service_pass = get_password 'service', 'openstack-orchestration'
40
-service_tenant_name = node['openstack']['orchestration']['conf']['keystone_authtoken']['tenant_name']
39
+service_project_name = node['openstack']['orchestration']['conf']['keystone_authtoken']['project_name']
41 40
 service_user = node['openstack']['orchestration']['conf']['keystone_authtoken']['username']
42 41
 service_role = node['openstack']['orchestration']['service_role']
43
-region = node['openstack']['orchestration']['conf']['DEFAULT']['region_name_for_services']
42
+service_type = 'orchestration'
43
+service_name = 'heat'
44
+service_domain_name = node['openstack']['orchestration']['conf']['keystone_authtoken']['user_domain_name']
45
+admin_user = node['openstack']['identity']['admin_user']
46
+admin_pass = get_password 'user', node['openstack']['identity']['admin_user']
47
+admin_project = node['openstack']['identity']['admin_project']
48
+admin_domain = node['openstack']['identity']['admin_domain_name']
49
+region = node['openstack']['region']
44 50
 
45 51
 # Do not configure a service/endpoint in keystone for heat-api-cloudwatch(Bug #1167927),
46 52
 # See discussions on https://bugs.launchpad.net/heat/+bug/1167927
47 53
 
48
-# Register Heat API Service
49
-openstack_identity_register 'Register Heat Orchestration Service' do
50
-  auth_uri auth_url
51
-  bootstrap_token token
52
-  service_name 'heat'
53
-  service_type 'orchestration'
54
-  service_description 'Heat Orchestration Service'
54
+connection_params = {
55
+  openstack_auth_url:     "#{auth_url}/auth/tokens",
56
+  openstack_username:     admin_user,
57
+  openstack_api_key:      admin_pass,
58
+  openstack_project_name: admin_project,
59
+  openstack_domain_name:    admin_domain
60
+}
61
+
62
+# Register Orchestration Service
63
+openstack_service service_name do
64
+  type service_type
65
+  connection_params connection_params
66
+end
55 67
 
56
-  action :create_service
68
+# Register Orchestration Public-Endpoint
69
+openstack_endpoint service_type do
70
+  service_name service_name
71
+  interface 'public'
72
+  url public_heat_endpoint.to_s
73
+  region region
74
+  connection_params connection_params
57 75
 end
58 76
 
59
-# Register Heat API Endpoint
60
-openstack_identity_register 'Register Heat Orchestration Endpoint' do
61
-  auth_uri auth_url
62
-  bootstrap_token token
63
-  service_type 'orchestration'
64
-  endpoint_region region
65
-  endpoint_adminurl admin_heat_endpoint.to_s
66
-  endpoint_internalurl internal_heat_endpoint.to_s
67
-  endpoint_publicurl public_heat_endpoint.to_s
77
+# Register Orchestration Internal-Endpoint
78
+openstack_endpoint service_type do
79
+  service_name service_name
80
+  url internal_heat_endpoint.to_s
81
+  region region
82
+  connection_params connection_params
83
+end
68 84
 
69
-  action :create_endpoint
85
+# Register Orchestration Admin-Endpoint
86
+openstack_endpoint service_type do
87
+  service_name service_name
88
+  interface 'admin'
89
+  url admin_heat_endpoint.to_s
90
+  region region
91
+  connection_params connection_params
92
+end
93
+
94
+# Register Service Tenant
95
+openstack_project service_project_name do
96
+  connection_params connection_params
97
+end
98
+
99
+# Register Service User
100
+openstack_user service_user do
101
+  project_name service_project_name
102
+  role_name service_role
103
+  password service_pass
104
+  connection_params connection_params
105
+end
106
+
107
+## Grant Service role to Service User for Service Tenant ##
108
+openstack_user service_user do
109
+  role_name service_role
110
+  project_name service_project_name
111
+  connection_params connection_params
112
+  action :grant_role
113
+end
114
+
115
+openstack_user service_user do
116
+  domain_name service_domain_name
117
+  role_name service_role
118
+  user_name service_user
119
+  connection_params connection_params
120
+  action :grant_domain
70 121
 end
71 122
 
72 123
 # TODO: (MRV) Revert this change until a better solution can be found
@@ -74,61 +125,62 @@ end
74 125
 # if node.run_list.include?('openstack-orchestration::api-cfn')
75 126
 
76 127
 # Register Heat API Cloudformation Service
77
-openstack_identity_register 'Register Heat Cloudformation Service' do
78
-  auth_uri auth_url
79
-  bootstrap_token token
80
-  service_name 'heat-cfn'
81
-  service_type 'cloudformation'
82
-  service_description 'Heat Cloudformation Service'
128
+openstack_service 'heat-cfn' do
129
+  type 'cloudformation'
130
+  connection_params connection_params
131
+end
83 132
 
84
-  action :create_service
133
+# Register Heat API CloudFormation Public-Endpoint
134
+openstack_endpoint 'cloudformation' do
135
+  service_name 'heat-cfn'
136
+  interface 'public'
137
+  url public_heat_cfn_endpoint.to_s
138
+  region region
139
+  connection_params connection_params
85 140
 end
86 141
 
87
-# Register Heat API CloudFormation Endpoint
88
-openstack_identity_register 'Register Heat Cloudformation Endpoint' do
89
-  auth_uri auth_url
90
-  bootstrap_token token
91
-  service_type 'cloudformation'
92
-  endpoint_region region
93
-  endpoint_adminurl admin_heat_cfn_endpoint.to_s
94
-  endpoint_internalurl internal_heat_cfn_endpoint.to_s
95
-  endpoint_publicurl public_heat_cfn_endpoint.to_s
142
+# Register Heat API CloudFormation Internal-Endpoint
143
+openstack_endpoint 'cloudformation' do
144
+  service_name 'heat-cfn'
145
+  url internal_heat_cfn_endpoint.to_s
146
+  region region
147
+  connection_params connection_params
148
+end
96 149
 
97
-  action :create_endpoint
150
+# Register Heat API CloudFormation Admin-Endpoint
151
+openstack_endpoint 'cloudformation' do
152
+  service_name 'heat-cfn'
153
+  interface 'admin'
154
+  url admin_heat_cfn_endpoint.to_s
155
+  region region
156
+  connection_params connection_params
98 157
 end
99
-# end
100 158
 
101 159
 # Register Service Tenant
102
-openstack_identity_register 'Register Service Tenant' do
103
-  auth_uri auth_url
104
-  bootstrap_token token
105
-  tenant_name service_tenant_name
106
-  tenant_description 'Service Tenant'
107
-  tenant_enabled true # Not required as this is the default
108
-
109
-  action :create_tenant
160
+openstack_project service_project_name do
161
+  connection_params connection_params
110 162
 end
111 163
 
112 164
 # Register Service User
113
-openstack_identity_register 'Register Heat Service User' do
114
-  auth_uri auth_url
115
-  bootstrap_token token
116
-  tenant_name service_tenant_name
117
-  user_name service_user
118
-  user_pass service_pass
119
-  # String until https://review.openstack.org/#/c/29498/ merged
120
-  user_enabled true
121
-
122
-  action :create_user
165
+openstack_user service_user do
166
+  project_name service_project_name
167
+  role_name service_role
168
+  password service_pass
169
+  connection_params connection_params
123 170
 end
124 171
 
125 172
 ## Grant Service role to Service User for Service Tenant ##
126
-openstack_identity_register "Grant '#{service_role}' Role to #{service_user} User for #{service_tenant_name} Tenant" do
127
-  auth_uri auth_url
128
-  bootstrap_token token
129
-  tenant_name service_tenant_name
130
-  user_name service_user
173
+openstack_user service_user do
131 174
   role_name service_role
132
-
175
+  project_name service_project_name
176
+  connection_params connection_params
133 177
   action :grant_role
134 178
 end
179
+
180
+openstack_user service_user do
181
+  domain_name service_domain_name
182
+  role_name service_role
183
+  user_name service_user
184
+  connection_params connection_params
185
+  action :grant_domain
186
+end

+ 75
- 140
spec/identity_registration_spec.rb View File

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

+ 9
- 7
spec/spec_helper.rb View File

@@ -48,7 +48,7 @@ shared_context 'orchestration_stubs' do
48 48
       .and_return 'heat-pass'
49 49
     allow_any_instance_of(Chef::Recipe).to receive(:get_password)
50 50
       .with('user', 'admin')
51
-      .and_return 'admin_pass'
51
+      .and_return 'admin-pass'
52 52
     allow_any_instance_of(Chef::Recipe).to receive(:get_password)
53 53
       .with('token', 'orchestration_auth_encryption_key')
54 54
       .and_return 'auth_encryption_key_secret'
@@ -182,7 +182,7 @@ shared_examples 'expects to create heat conf' do
182 182
 
183 183
     describe 'has ec2authtoken values' do
184 184
       it 'has default ec2authtoken values' do
185
-        expect(chef_run).to render_config_file(file.name).with_section_content('ec2authtoken', %r{^auth_uri = http://127.0.0.1:5000/v2.0$})
185
+        expect(chef_run).to render_config_file(file.name).with_section_content('ec2authtoken', %r{^auth_uri = http://127.0.0.1:5000/v3$})
186 186
       end
187 187
     end
188 188
 
@@ -206,10 +206,12 @@ shared_examples 'expects to create heat conf' do
206 206
     describe 'has keystone_authtoken values' do
207 207
       it 'has default keystone_authtoken values' do
208 208
         [
209
-          %r{^auth_url = http://127.0.0.1:5000/v2.0$},
210
-          /^auth_type = v2password$/,
209
+          %r{^auth_url = http://127.0.0.1:5000/v3$},
210
+          /^auth_type = v3password$/,
211 211
           /^username = heat$/,
212
-          /^tenant_name = service$/,
212
+          /^project_name = service$/,
213
+          /^user_domain_name = Default/,
214
+          /^project_domain_name = Default/,
213 215
           /^password = heat-pass$/
214 216
         ].each do |line|
215 217
           expect(chef_run).to render_config_file(file.name).with_section_content('keystone_authtoken', line)
@@ -220,8 +222,8 @@ shared_examples 'expects to create heat conf' do
220 222
     describe 'has trustee values' do
221 223
       it 'has default trustee values' do
222 224
         [
223
-          %r{^auth_url = http://127.0.0.1:35357/v2.0$},
224
-          /^auth_plugin = v2password$/,
225
+          %r{^auth_url = http://127.0.0.1:35357/v3$},
226
+          /^auth_plugin = v3password$/,
225 227
           /^username = heat$/,
226 228
           /^password = heat-pass$/
227 229
         ].each do |line|

Loading…
Cancel
Save