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

Raise error instead of returning empty. #224

Merged
merged 5 commits into from
Aug 15, 2023

Conversation

jvanderaa
Copy link
Contributor

Fixes #223

I believe this fixes the returning of no devices when access is denied. Working on getting the tests written for this.

@joewesch
Copy link
Contributor

This was implemented by @FragmentedPacket pre-fork due to this issue raised: netbox-community/ansible_modules#312.

I think we should consider the implications of both requests to determine if we want to revert this.

@jvanderaa
Copy link
Contributor Author

We should revert this @joewesch, from https://docs.ansible.com/ansible/latest/dev_guide/developing_inventory.html:

The specifics will vary depending on API and structure returned. Remember that if you get an inventory source error or any other issue, you should raise AnsibleParserError to let Ansible know that the source was invalid or the process failed.

@jvanderaa
Copy link
Contributor Author

What I'm trying to figure out here yet is how to test the changes

@joewesch
Copy link
Contributor

The only inventory tests that we currently have are comparison tests. I don't think you need to create a new testing methodology as part of this PR.

Co-authored-by: Joe Wesch <10467633+joewesch@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inventory Hosts deleted after Inventory Sync Fails
2 participants