Pure-Storage-Ansible / FlashArray-Collection

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

Update create_pgsnapshot in purefa_pgsnap.py renaming throttle parame… #516

Closed AheroX closed 7 months ago

AheroX commented 7 months ago

…ter of protection_group_snapshots_post to allow_throttle

"create_pgsnapshot" in plugins/modules/purefa_pgsnap.py calls "protection_group_snapshots_api.py" from the py-pure-client with the wrongly named parameter "throttle" instead of "allow_throttle" to fail if array health is not optimal.

This causes the error: Traceback (most recent call last): File "[...]/AnsiballZ_purefa_pgsnap.py", line 107, in _ansiballz_main() File "[...]/AnsiballZ_purefa_pgsnap.py", line 99, in _ansiballz_main invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS) File "[...]/AnsiballZ_purefa_pgsnap.py", line 47, in invoke_module runpy.run_module(mod_name='ansible_collections.purestorage.flasharray.plugins.modules.purefa_pgsnap', init_globals=dict(_module_fqn='ansible_collections.purestorage.flasharray.plugins.modules.purefa_pgsnap', _modlib_path=modlib_path), File "/usr/lib64/python3.9/runpy.py",line 225, in run_module return _run_module_code(code, init_globals, run_name, mod_spec) File "/usr/lib64/python3.9/runpy.py", line 97, in _run_module_code _run_code(code, mod_globals, init_globals, File "/usr/lib64/python3.9/runpy.py", line 87, in _run_code exec(code, run_globals) File "[...]/purefa_pgsnap.py", line 615, in File "[...]/purefa_pgsnap.py", line 593, in main File "[...]/purefa_pgsnap.py", line 336, in create_pgsnapshot TypeError: post_protection_group_snapshots() got an unexpected keyword argument 'throttle'

SUMMARY
ISSUE TYPE
COMPONENT NAME

purefa_pgsnap.py

CLAassistant commented 7 months ago

CLA assistant check
All committers have signed the CLA.

sdodsley commented 7 months ago

@AheroX please create a doc fragment for this bug fix.

AheroX commented 7 months ago

create a doc fragment

My apologies - no idea what i am to do.

sdodsley commented 7 months ago

No worries - I'll add it for you.