Browse Source

Make auth_uri attribute for ec2authtoken section

Make auth_uri attribute for ec2authtoken section

Closes-Bug: #1480818
Change-Id: I6b3018317e6c4890d193aee6f6b5e101d901e687
Ethan Lynn 3 years ago
parent
commit
0170665c67
4 changed files with 10 additions and 1 deletions
  1. 1
    0
      attributes/default.rb
  2. 2
    0
      recipes/common.rb
  3. 6
    0
      spec/spec_helper.rb
  4. 1
    1
      templates/default/heat.conf.erb

+ 1
- 0
attributes/default.rb View File

@@ -50,6 +50,7 @@ default['openstack']['orchestration']['service_tenant_name'] = 'service'
50 50
 default['openstack']['orchestration']['service_user'] = 'heat'
51 51
 default['openstack']['orchestration']['service_role'] = 'service'
52 52
 
53
+default['openstack']['orchestration']['ec2authtoken']['auth']['version'] = 'v2.0'
53 54
 default['openstack']['orchestration']['api']['auth']['version'] = node['openstack']['api']['auth']['version']
54 55
 
55 56
 # A PEM encoded Certificate Authority to use for clients when verifying HTTPs connections.

+ 2
- 0
recipes/common.rb View File

@@ -70,6 +70,7 @@ if node['openstack']['orchestration']['stack_domain_admin']
70 70
   stack_domain_admin_password = get_password 'user', node['openstack']['orchestration']['stack_domain_admin']
71 71
 end
72 72
 
73
+ec2_auth_uri = auth_uri_transform identity_endpoint.to_s, node['openstack']['orchestration']['ec2authtoken']['auth']['version']
73 74
 auth_uri = auth_uri_transform identity_endpoint.to_s, node['openstack']['orchestration']['api']['auth']['version']
74 75
 identity_uri = identity_uri_transform(identity_admin_endpoint)
75 76
 
@@ -114,6 +115,7 @@ template '/etc/heat/heat.conf' do
114 115
     mq_service_type: mq_service_type,
115 116
     mq_password: mq_password,
116 117
     rabbit_hosts: rabbit_hosts,
118
+    ec2_auth_uri: ec2_auth_uri,
117 119
     auth_uri: auth_uri,
118 120
     identity_uri: identity_uri,
119 121
     service_pass: service_pass,

+ 6
- 0
spec/spec_helper.rb View File

@@ -406,6 +406,12 @@ shared_examples 'expects to create heat conf' do
406 406
       end
407 407
     end
408 408
 
409
+    describe 'has ec2authtoken values' do
410
+      it 'has default ec2authtoken values' do
411
+        expect(chef_run).to render_config_file(file.name).with_section_content('ec2authtoken', %r{^auth_uri=http://127.0.0.1:5000/v2.0$})
412
+      end
413
+    end
414
+
409 415
     describe 'has rabbit values' do
410 416
       before do
411 417
         node.set['openstack']['mq']['orchestration']['service_type'] = 'rabbitmq'

+ 1
- 1
templates/default/heat.conf.erb View File

@@ -964,7 +964,7 @@ sql_connection=<%= @sql_connection %>
964 964
 #
965 965
 
966 966
 # Authentication Endpoint URI. (string value)
967
-#auth_uri=<None>
967
+auth_uri=<%= @ec2_auth_uri %>
968 968
 
969 969
 # Allow orchestration of multiple clouds. (boolean value)
970 970
 #multi_cloud=false

Loading…
Cancel
Save