-
Notifications
You must be signed in to change notification settings - Fork 20
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
D42 16383 - Ansible inventory plugin timeout #17
Conversation
…e inventory which is much faster than the object based query used before
plugins/inventory/d42.py
Outdated
device_record['ip_addresses'] = [] | ||
device_record['serial_no'] = device.get('serial_no') | ||
device_record['hw_depth'] = device.get('hw_depth') | ||
device_record['nonauthoritativealiases'] = str(device.get('nonauthoritativealiases')).split(',') |
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.
What happens if the device has no nonauthoritativealiases? It looks like if None came back, then we would end up with the array ['None'].
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.
correct, returns ['None'], result should just be []. fixing this now
plugins/inventory/d42.py
Outdated
# custom field | ||
device_record['custom_fields'] = [] | ||
|
||
device_record['aliases'] = str(device.get('aliases')).split(',') |
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.
What is the result if the device has no aliases?
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.
returns ['None'], result should just be []. fixing this now
No description provided.