-
Notifications
You must be signed in to change notification settings - Fork 334
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
Fix for inventory host processing #1545
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small change request!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, not enough indent!
@@ -602,7 +602,8 @@ def hostvars(self): | |||
# set nic-related values from the primary NIC first | |||
for nic in sorted(self.nics, key=lambda n: n.is_primary, reverse=True): | |||
# and from the primary IP config per NIC first | |||
for ipc in sorted(nic._nic_model['properties']['ipConfigurations'], key=lambda i: i['properties'].get('primary', False), reverse=True): | |||
for ipc in sorted(nic._nic_model.get('properties', {}).get('ipConfigurations', []), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@p3ck continuation line under-indented
for ipc in sorted(nic._nic_model.get('properties', {}).get('ipConfigurations', []),
key=lambda i: i.get('properties', {}).get('primary', False), reverse=True)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed - Thank for the review
This change provides sane defaults when NIC's are still in process of coming up.
ready_for_review! |
This change provides sane defaults when NIC's are still in process of coming up.
SUMMARY
This change provides sane defaults when NIC's are still in process of coming up.
Fixes #1544
ISSUE TYPE
COMPONENT NAME
plugins/inventory/azure_rm.py
ADDITIONAL INFORMATION
See the issue for the traceback that this fixes
I've had the customer that experienced this traceback use this patch and it fixes the issue.