Pure-Storage-Ansible / FlashArray-Collection

Ansible Collection for Pure Storage FlashArray
GNU General Public License v3.0
19 stars 21 forks source link

Help with purestorage.flasharray.purefa_info: with subset pgroup, missing performance positional argument #576

Closed sumantripuraneni closed 1 month ago

sumantripuraneni commented 1 month ago

Describe the bug We are using purestorage.flasharray (version 1.28.0), we are trying collect pgroup info using gather_subset , with subset "pgroups" and module is giving an error "line 3020, in main\nTypeError: generate_pgroups_dict() missing 1 required positional argument: 'performance'\n"

To Reproduce Steps to reproduce the behavior:

  1. Use purestorage.flasharray for version 1.28.0
  2. Create a playbook to use module " purestorage.flasharray.purefa_info" only gather subset "pgroups" Example Task definition:
    - name: collect all information
    purestorage.flasharray.purefa_info:
    gather_subset:
      - pgroups
    fa_url: 10.10.10.2
    api_token: e31060a7-21fc-e277-6240-25983c6c4592

Expected behavior Module return the pgroups information

Additional context

  1. File (plugins/modules/purefa_info.py) , lines 3019, 3020, when gather_subsets is set to "pgroups" we are calling the function with 2 arguments, which are module and array
    if "pgroups" in subset or "all" in subset:
        info["pgroups"] = generate_pgroups_dict(module, array)

However, function definition is expecting 3 arguments, which are module, array, performance, in line 1803,

def generate_pgroups_dict(module, array, performance):

Sample playbook, works with 1.26 but not with 1.28.0 due an error as mentioned above.

sdodsley commented 1 month ago

This is known. We are creating a new release later today

sumantripuraneni commented 1 month ago

Thank you

sdodsley commented 1 month ago

Fixed in Release 1.28.1