Fix user_agent string not getting set (#66914)
This commit is contained in:
parent
9db0fb785d
commit
26175178ee
2 changed files with 6 additions and 2 deletions
2
changelogs/fragments/66914-purefa_user_string.yaml
Normal file
2
changelogs/fragments/66914-purefa_user_string.yaml
Normal file
|
@ -0,0 +1,2 @@
|
|||
bugfixes:
|
||||
- pure - fix incorrect user_string setting in module_utils file (https://github.com/ansible/ansible/pull/66914)
|
|
@ -90,7 +90,8 @@ def get_blade(module):
|
|||
blade.disable_verify_ssl()
|
||||
try:
|
||||
blade.login(api)
|
||||
if API_AGENT_VERSION in blade.api_version.list_versions().versions:
|
||||
versions = blade.api_version.list_versions().versions
|
||||
if API_AGENT_VERSION in versions:
|
||||
blade._api_client.user_agent = user_agent
|
||||
except rest.ApiException as e:
|
||||
module.fail_json(msg="Pure Storage FlashBlade authentication failed. Check your credentials")
|
||||
|
@ -99,7 +100,8 @@ def get_blade(module):
|
|||
blade.disable_verify_ssl()
|
||||
try:
|
||||
blade.login(environ.get('PUREFB_API'))
|
||||
if API_AGENT_VERSION in blade.api_version.list_versions().versions:
|
||||
versions = blade.api_version.list_versions().versions
|
||||
if API_AGENT_VERSION in versions:
|
||||
blade._api_client.user_agent = user_agent
|
||||
except rest.ApiException as e:
|
||||
module.fail_json(msg="Pure Storage FlashBlade authentication failed. Check your credentials")
|
||||
|
|
Loading…
Reference in a new issue