ansible-collections / ibm_zos_core

Red Hat Ansible Certified Content for IBM Z
76 stars 44 forks source link

[Enabler] [zos_job_submit] Correct code path in plugin #1250

Open ddimatos opened 6 months ago

ddimatos commented 6 months ago

Is there an existing issue for this?

Ansible module

zos_job_submit

Enabler description

The plugin module appears to have competing transfer logic where its using community and zos_copy when it could rely on zos_copy alone.

See remote_path = self._transfer_file(source_full, tmp_src) which then goes on to do a self._fixup_perms2((tmp, remote_path)) , although _fixup_perms2 is recommended, I question if its needed based on our modules needs; there is considerable logic in _fixup_perms2 that could be helpful such as sudo but still unsure its necessary.

Then if you see a zos_copy call a bit further down , where zos_copy can handle encodings.

The point is , effort was made to remove the modules dependency on copy in lieu of zos_copy but still has calls back to the community transfer functions.

This issus should review the code , decide what should be changed, ideally a solution built on the ibm_zos_core where we control the behavior is optimal but not required.

image

richp405 commented 2 months ago

Plan to move the remaining community call to zos_copy. Just reviewing code to make sure there wasn't a reason for it (I don't see one)