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

[Bug] Multiple filters params are not considered for fetching entities in PC based info modules #352

Closed
bhati-pradeep opened this issue Apr 11, 2023 · 1 comment · Fixed by #353
Assignees
Labels
1.9.0 Bug fixes and improvements bug Something isn't working

Comments

@bhati-pradeep
Copy link
Collaborator

bhati-pradeep commented Apr 11, 2023

Describe the bug
Currently, for example if a subnet is fetched based on name and cluster_name in filters, ntnx_subnets_info doesn't consider both filter. (i.e. "AND" behaviour)

To Reproduce
Steps to reproduce the behavior:
Run playbook task:

ntnx_subnets_info:
        filter:
          name: <vlan_name>
          cluster_name: <cluster name>
register: result

This playbook fetches all subnets from cluster name given.

Expected behavior
Info module should consider all filters for fetching entities.

@bhati-pradeep
Copy link
Collaborator Author

bhati-pradeep commented Apr 11, 2023

code causing issue :

return ",".join(map(lambda i: "{0}=={1}".format(i[0], i[1]), filters.items()))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.9.0 Bug fixes and improvements bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants