Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correction in the line 309 of the azure_rm.py script #55937

Open
wants to merge 1 commit into
base: devel
from

Conversation

Projects
None yet
3 participants
@AlexonOliveiraRH
Copy link

commented Apr 30, 2019

Fetching dynamic inventory throws error : 'Cloud' object has no attribute 'decode'.

To solve this, the following change was made in the line 309:

From:
matched_clouds = [x for x in all_clouds if x.name == raw_cloud_env]
To:
matched_clouds = [x for x in all_clouds if x.name == raw_cloud_env.name]

Reference:
Azure/azure-sdk-for-python#3009

PS. This change was tested in a production environment successfully.

SUMMARY
ISSUE TYPE
  • Bugfix Pull Request
  • Docs Pull Request
  • Feature Pull Request
  • New Module Pull Request
COMPONENT NAME
ADDITIONAL INFORMATION

Update azure_rm.py
Fetching dynamic inventory throws error : 'Cloud' object has no attribute 'decode'.

To solve this, the following change was made in the line 309:

From:
matched_clouds = [x for x in all_clouds if x.name == raw_cloud_env]
To:
matched_clouds = [x for x in all_clouds if x.name == raw_cloud_env.name]

Reference:
Azure/azure-sdk-for-python#3009

PS. This change was tested in a production environment successfully.
@ansibot

This comment has been minimized.

@@ -306,7 +306,7 @@ def __init__(self, args):
else:
# try to look up "well-known" values via the name attribute on azure_cloud members
all_clouds = [x[1] for x in inspect.getmembers(azure_cloud) if isinstance(x[1], azure_cloud.Cloud)]
matched_clouds = [x for x in all_clouds if x.name == raw_cloud_env]
matched_clouds = [x for x in all_clouds if x.name == raw_cloud_env.name]

This comment has been minimized.

Copy link
@yuwzho

yuwzho May 5, 2019

Contributor

Please also replace the raw_cloud_env this in the following context

@ansibot

This comment has been minimized.

Copy link
Contributor

commented May 5, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.