Skip to content

Wrong parameters for get_network_resources_facts() #71

@john-colgrave

Description

@john-colgrave

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions