nutanix / nutanix.ansible

Official Nutanix Ansible collections
GNU General Public License v3.0
66 stars 36 forks source link

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

Closed bhati-pradeep closed 1 year ago

bhati-pradeep commented 1 year ago

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 commented 1 year ago

code causing issue : https://github.com/nutanix/nutanix.ansible/blob/487403a84494d7937d8023ec7fa84975de1827e5/plugins/module_utils/entity.py#L474