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

Wrong parameters for get_network_resources_facts() #71

Closed
john-colgrave opened this issue Oct 19, 2022 · 3 comments
Closed

Wrong parameters for get_network_resources_facts() #71

john-colgrave opened this issue Oct 19, 2022 · 3 comments

Comments

@john-colgrave
Copy link

I am new to Ansible and this resource module builder. I tried to build a resource module using a copy of the sample model with a few tweaks but when I try and use the generated collection I get the error:
TypeError: get_network_resources_facts() takes from 2 to 4 positional arguments but 5 were given

The generated code in question is in .../module_utils/network/mqaos/facts/facts.py where mqaos is my collection name, and seems to be:

netres_choices = FactsArgs.argument_spec['gather_network_resources'].get('choices', [])
if self.VALID_RESOURCE_SUBSETS:
    self.get_network_resources_facts(netres_choices, FACT_RESOURCE_SUBSETS, resource_facts_type, data)

If I remove the entries_choices argument then I do not get the error.

@john-colgrave
Copy link
Author

I see that this is the subject of PR #58 but that PR has not yet been merged. Is this repository/tool not being maintained/enhanced?

@lcphill
Copy link

lcphill commented Dec 13, 2022

Hi,

I am experiencing the same issue. I was able to push ahead by commenting out the first method argument (i.e., 'netres_choices').

Thank you for taking the lead on filing the issue.

@john-colgrave
Copy link
Author

It seems unlikely that this issue will be fixed. I have started using the latest content builder: https://github.com/ansible-community/ansible.content_builder

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

No branches or pull requests

2 participants