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

D42 16383 - Ansible inventory plugin timeout #17

Merged
merged 14 commits into from
Jul 24, 2020
Merged

Conversation

osanchez42
Copy link
Contributor

No description provided.

plugins/inventory/d42.py Outdated Show resolved Hide resolved
plugins/inventory/d42.py Outdated Show resolved Hide resolved
plugins/inventory/d42.py Outdated Show resolved Hide resolved
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(',')
Copy link
Contributor

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'].

Copy link
Contributor Author

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

# custom field
device_record['custom_fields'] = []

device_record['aliases'] = str(device.get('aliases')).split(',')
Copy link
Contributor

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?

Copy link
Contributor Author

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

plugins/inventory/d42.py Show resolved Hide resolved
plugins/inventory/d42.py Show resolved Hide resolved
plugins/inventory/d42.py Show resolved Hide resolved
plugins/inventory/d42.py Show resolved Hide resolved
plugins/inventory/d42.py Show resolved Hide resolved
@cscaglioned42 cscaglioned42 merged commit 7a23ee1 into master Jul 24, 2020
@cscaglioned42 cscaglioned42 deleted the D42-16383 branch July 24, 2020 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants