Update AnsibleGenerateInventoryAction to match new mistral interfaces
Ife653558bfcda794e7f37086832f70b0ad7c28a4 changed the way this data is represented, now there's a nested context with the security data in, and the old interfaces are deprecated. Change-Id: Id0ba10d1192314187bedb14998d4aadc5fb91ef5 Closes-Bug: 1740891
This commit is contained in:
parent
720a82d606
commit
04317fff33
@ -207,10 +207,10 @@ class AnsibleAction(actions.Action):
|
||||
|
||||
if self.use_openstack_credentials:
|
||||
env_variables.update({
|
||||
'OS_AUTH_URL': context.auth_uri,
|
||||
'OS_USERNAME': context.user_name,
|
||||
'OS_AUTH_TOKEN': context.auth_token,
|
||||
'OS_PROJECT_NAME': context.project_name})
|
||||
'OS_AUTH_URL': context.security.auth_uri,
|
||||
'OS_USERNAME': context.security.user_name,
|
||||
'OS_AUTH_TOKEN': context.security.auth_token,
|
||||
'OS_PROJECT_NAME': context.security.project_name})
|
||||
|
||||
stderr, stdout = processutils.execute(
|
||||
*command, cwd=self.work_dir,
|
||||
@ -536,10 +536,10 @@ class AnsibleGenerateInventoryAction(actions.Action):
|
||||
|
||||
env_variables = {
|
||||
'HOME': self.work_dir,
|
||||
'OS_AUTH_URL': context.auth_uri,
|
||||
'OS_USERNAME': context.user_name,
|
||||
'OS_AUTH_TOKEN': context.auth_token,
|
||||
'OS_PROJECT_NAME': context.project_name}
|
||||
'OS_AUTH_URL': context.security.auth_uri,
|
||||
'OS_USERNAME': context.security.user_name,
|
||||
'OS_AUTH_TOKEN': context.security.auth_token,
|
||||
'OS_PROJECT_NAME': context.security.project_name}
|
||||
|
||||
if self.ansible_ssh_user:
|
||||
command.append('--ansible_ssh_user')
|
||||
|
@ -125,14 +125,14 @@ class TripleOAction(actions.Action):
|
||||
service_type='messaging'
|
||||
)
|
||||
|
||||
auth_uri = context.auth_uri or \
|
||||
auth_uri = context.security.auth_uri or \
|
||||
keystone_utils.CONF.keystone_authtoken.auth_uri
|
||||
|
||||
opts = {
|
||||
'os_auth_token': context.auth_token,
|
||||
'os_auth_token': context.security.auth_token,
|
||||
'os_auth_url': auth_uri,
|
||||
'os_project_id': context.project_id,
|
||||
'insecure': context.insecure,
|
||||
'os_project_id': context.security.project_id,
|
||||
'insecure': context.security.insecure,
|
||||
}
|
||||
auth_opts = {'backend': 'keystone', 'options': opts, }
|
||||
conf = {'auth_opts': auth_opts, 'session': session_and_auth['session']}
|
||||
|
Loading…
Reference in New Issue
Block a user