Update create_pgsnapshot in purefa_pgsnap.py renaming throttle parame… #516
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
…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