Skip to content

Commit

Permalink
Nazare 8838 force option (#316)
Browse files Browse the repository at this point in the history
* Modifed zos_blockinfile for using the dmod -f option

* Created functional tests for force option

* Cleaned blank spaces for sanity test

* Update branch NAZARE-8838-force-option branch with the latest from dev (#346)

* Sanity tests: copy ignore-2.13.txt to ignore-2.14.txt

* Update dependency to use the latest with security patches (#332)

* Update dependency to use the latest with security patches

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update requirements to community 4.10.0 which is ansible-core 2.11.7

Signed-off-by: ddimatos <dimatos@gmail.com>

* Revert "Update requirements to community 4.10.0 which is ansible-core 2.11.7"
because our jenkins and docker images are not yet ready for what 4.10.0
brings in for dependencies. The last error for this migration shows that we
need to add pycodestyle to our container.

This reverts commit 9dfd29acc23d283c0aefb24e1a2c1774ff1b9b7c.

* Gh issue 329 ddname (#333)

* Fixed typo for dd_name that prevented job output filtering based on dd_name

* Added functional tests to verify ddname filtering

* Update Readme to reflect supported ansible version

Signed-off-by: ddimatos <dimatos@gmail.com>

* Upate release note to reflect patched version 1.3.x

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update galaxy.yml with added build_ignore and authors

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update artifacts to correctly reflect execution environments

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update module with boolean bug fix and version released

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update modules docs and version released

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update error message for clarity

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update sanity tests to remove a doc reference

Signed-off-by: ddimatos <dimatos@gmail.com>

* First commit for changelog support and backported release fragemetns

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update changelog fragments because of yamlint blank lines

Signed-off-by: ddimatos <dimatos@gmail.com>

* update zos_fetch test case to remove testing the sftp port which is deprecated

Signed-off-by: ddimatos <dimatos@gmail.com>

* update test case with verbosity to troubleshoot file count

Signed-off-by: ddimatos <dimatos@gmail.com>

* update test case with verbosity to troubleshoot file count

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update the test case to add 1 to the count for the added profile

Signed-off-by: ddimatos <dimatos@gmail.com>

* Correct missing whitespace around arithmetic operator

Signed-off-by: ddimatos <dimatos@gmail.com>

* Chaning src file because I think there is a race condition where its used elsewhere

Signed-off-by: ddimatos <dimatos@gmail.com>

* Chaning src file because I think there is a race condition where its used elsewhere

Signed-off-by: ddimatos <dimatos@gmail.com>

* add more debug stmt's to the test case

Signed-off-by: ddimatos <dimatos@gmail.com>

* Added more debug to the test

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update test case with more debug

Signed-off-by: ddimatos <dimatos@gmail.com>

* udpate test case to correctly validate copied file

Signed-off-by: ddimatos <dimatos@gmail.com>

Co-authored-by: Oscar Fernando Flores Garcia <fernando.flores@ibm.com>
Co-authored-by: ddimatos <dimatos@gmail.com>

* Update zos_blockinfile to correctly manage double quotes in the block (#303)

* Changed the quotedString routine to remove double-quotations instead of escaping them.
Because this routine is potentially called multiple times, the escaping can become problematic.
Also, the quotation marks themselves cause problems with the zoau/blockinfile routine that gets called.

* Added note to documentation that quotation marks will be removed.

* Added 4.2 ignore file

* added 2.13 ignore

* added more ignore files, in case the versioning is butchered (added 4.0 and 4.1)

* removed some ignore files, and mucked 2.11 up to see if it throws an error

* added ignore 12, 13 and put different garbage in each...trying to find which ignore is used

* messed up the 4.2 ignore file

* added 2.11.5 ignore, still looking for the trigger

* added ignore.txt, in case 2.13 is being skipped

* removed incorrect ignore files.

* restored ignore files

* Added changelog fragement for pr 303

Signed-off-by: ddimatos <dimatos@gmail.com>

* Udpate the changelog fragment with more details

Signed-off-by: ddimatos <dimatos@gmail.com>

* Doc/pr303/add changelog to branch (#337)

* Copy ignore-2.12.txt to ignore-2.13.txt

* Update/copy fetch scp bypass (#305)

* Update galaxy author list

Signed-off-by: ddimatos <dimatos@gmail.com>

* Add logic to ensure the module only uses SFTP for sftp_transfer_method so that encodings are maintained as desired

Signed-off-by: ddimatos <dimatos@gmail.com>

* Add logic to ensure the module only uses SFTP for sftp_transfer_method so that encodings are maintained as desired

Signed-off-by: ddimatos <dimatos@gmail.com>

* Sanity tests: copy ignore-2.13.txt to ignore-2.14.txt

* Update dependency to use the latest with security patches (#332)

* Update dependency to use the latest with security patches

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update requirements to community 4.10.0 which is ansible-core 2.11.7

Signed-off-by: ddimatos <dimatos@gmail.com>

* Revert "Update requirements to community 4.10.0 which is ansible-core 2.11.7"
because our jenkins and docker images are not yet ready for what 4.10.0
brings in for dependencies. The last error for this migration shows that we
need to add pycodestyle to our container.

This reverts commit 9dfd29acc23d283c0aefb24e1a2c1774ff1b9b7c.

* Fixed typo for dd_name that prevented job output filtering based on dd_name

* Added functional tests to verify ddname filtering

* Update Readme to reflect supported ansible version

Signed-off-by: ddimatos <dimatos@gmail.com>

* Upate release note to reflect patched version 1.3.x

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update galaxy.yml with added build_ignore and authors

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update artifacts to correctly reflect execution environments

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update module with boolean bug fix and version released

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update modules docs and version released

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update error message for clarity

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update sanity tests to remove a doc reference

Signed-off-by: ddimatos <dimatos@gmail.com>

* First commit for changelog support and backported release fragemetns

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update changelog fragments because of yamlint blank lines

Signed-off-by: ddimatos <dimatos@gmail.com>

* update zos_fetch test case to remove testing the sftp port which is deprecated

Signed-off-by: ddimatos <dimatos@gmail.com>

* update test case with verbosity to troubleshoot file count

Signed-off-by: ddimatos <dimatos@gmail.com>

* update test case with verbosity to troubleshoot file count

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update the test case to add 1 to the count for the added profile

Signed-off-by: ddimatos <dimatos@gmail.com>

* Correct missing whitespace around arithmetic operator

Signed-off-by: ddimatos <dimatos@gmail.com>

* Chaning src file because I think there is a race condition where its used elsewhere

Signed-off-by: ddimatos <dimatos@gmail.com>

* Chaning src file because I think there is a race condition where its used elsewhere

Signed-off-by: ddimatos <dimatos@gmail.com>

* add more debug stmt's to the test case

Signed-off-by: ddimatos <dimatos@gmail.com>

* Added more debug to the test

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update test case with more debug

Signed-off-by: ddimatos <dimatos@gmail.com>

* udpate test case to correctly validate copied file

Signed-off-by: ddimatos <dimatos@gmail.com>

Co-authored-by: Andrew Klychkov <aklychko@redhat.com>
Co-authored-by: Oscar Fernando Flores Garcia <fernando.flores@ibm.com>

* Update fragment from bug fix to minor changes

Signed-off-by: ddimatos <dimatos@gmail.com>

Co-authored-by: ddimatos <dimatos@gmail.com>
Co-authored-by: Andrew Klychkov <aklychko@redhat.com>
Co-authored-by: Oscar Fernando Flores Garcia <fernando.flores@ibm.com>

* This function updates the existing code to leverage the latest API changes available in ZOAU 1.2.0 (#312)

* zos_operator: removed rexx/sdsf script and used opercmd.execute() instead
... this passes integration/playbook tests,
... so I'm duplicating the change in job.py before build testing

* Initial branch for Jira NAZARE-6933... this aligns zos_submit/zos_output to zoau.
We use the zoau library instead of a local rexx and sdsf call.
Note: passes integration tests using 1.2 of zoau.
Note: documentation is mistaken, which I'll change before PR submission

* NAZARE-6933 (alignment with zoau) - code complete
Unit tests pass, with 3 variances:
1 - Cannot find/get Job class
2 - Cannot find/get content_type
3 - msg_txt is what is returned from job list, so it's not as meaningful as the sdsf version was.

* update to pull class, system and subsystem from the dd's when loading job.
still haven't found job type outside of sdsf.

* Corrected processing of the 'node' value for subsystem.
Upcoming: found an odd response on JCL error.

* error handling: added "JCLERR" to list of terminators
error handling: no return error code as rc where appropriate (from dd)
non-error handling: added a check to not consider a job status provided if the dd's aren't there

* comment in zos_job_output hadn't been saved

* removed other comment, since the issue was addressed.

* fixes for pep-8 issues (spacing)
tweak to switch IFSDELAY (SDSF) to use timeout (zoau native)

* Tweaking import statements to add some protection to zoau imports.

* correction to call of _zget_job_status (had self-referenced a parameter)

* experimental change to zget_job_status::jobs/listing, to only pass first param
This is to check a theory that the additional owner param for 1.2 is killing 1.1 testing

* Added sdsf action back into zos_operator so that 1.1 zoau could pass the timer test

* added TJSP to output to track error in job_submit_func

* added traccking to test_zos_operator_func (test precedence keeps changing)

* tweak to handle 1.1 situation where ddls doesn't return a recnum

* bugfix: run_operator_command needed to use wait_time_s, not wait_time

* tracking with output added to time delay test of operator func

* pep8 fixes on a test function (?>?!)

* expanded error handling in job.poy to handle partial returns from listing and list_dds

* changed if not ... in ... to if ... not in ... ... argh

* tweaked test for more output, and temporarily commented assertion.

* fixing argument indext

* yet another pylint issue on a test message

* change to add parameter back into operator call
change to add time assertion back into operator test

* changed operator command delay param, but re-commented assertion
This will pass, but delay doesn't seem to be working.

* job: put in logic to limit result based on ddname, if provided
output: removed excess
operator: corrected parameter passing

* change to import to get past linter

* forgot missingImport import

* Change to job to handle ddname value... same for job_query.

* Adding changelog fragement to the pull request

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update the branch enh6933 used for pull request 312 by merging in the latest from branch dev. (#338)

* Copy ignore-2.12.txt to ignore-2.13.txt

* Update/copy fetch scp bypass (#305)

* Update galaxy author list

Signed-off-by: ddimatos <dimatos@gmail.com>

* Add logic to ensure the module only uses SFTP for sftp_transfer_method so that encodings are maintained as desired

Signed-off-by: ddimatos <dimatos@gmail.com>

* Add logic to ensure the module only uses SFTP for sftp_transfer_method so that encodings are maintained as desired

Signed-off-by: ddimatos <dimatos@gmail.com>

* Sanity tests: copy ignore-2.13.txt to ignore-2.14.txt

* Update dependency to use the latest with security patches (#332)

* Update dependency to use the latest with security patches

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update requirements to community 4.10.0 which is ansible-core 2.11.7

Signed-off-by: ddimatos <dimatos@gmail.com>

* Revert "Update requirements to community 4.10.0 which is ansible-core 2.11.7"
because our jenkins and docker images are not yet ready for what 4.10.0
brings in for dependencies. The last error for this migration shows that we
need to add pycodestyle to our container.

This reverts commit 9dfd29acc23d283c0aefb24e1a2c1774ff1b9b7c.

* Gh issue 329 ddname (#333)

* Fixed typo for dd_name that prevented job output filtering based on dd_name

* Added functional tests to verify ddname filtering

* Update Readme to reflect supported ansible version

Signed-off-by: ddimatos <dimatos@gmail.com>

* Upate release note to reflect patched version 1.3.x

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update galaxy.yml with added build_ignore and authors

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update artifacts to correctly reflect execution environments

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update module with boolean bug fix and version released

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update modules docs and version released

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update error message for clarity

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update sanity tests to remove a doc reference

Signed-off-by: ddimatos <dimatos@gmail.com>

* First commit for changelog support and backported release fragemetns

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update changelog fragments because of yamlint blank lines

Signed-off-by: ddimatos <dimatos@gmail.com>

* update zos_fetch test case to remove testing the sftp port which is deprecated

Signed-off-by: ddimatos <dimatos@gmail.com>

* update test case with verbosity to troubleshoot file count

Signed-off-by: ddimatos <dimatos@gmail.com>

* update test case with verbosity to troubleshoot file count

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update the test case to add 1 to the count for the added profile

Signed-off-by: ddimatos <dimatos@gmail.com>

* Correct missing whitespace around arithmetic operator

Signed-off-by: ddimatos <dimatos@gmail.com>

* Chaning src file because I think there is a race condition where its used elsewhere

Signed-off-by: ddimatos <dimatos@gmail.com>

* Chaning src file because I think there is a race condition where its used elsewhere

Signed-off-by: ddimatos <dimatos@gmail.com>

* add more debug stmt's to the test case

Signed-off-by: ddimatos <dimatos@gmail.com>

* Added more debug to the test

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update test case with more debug

Signed-off-by: ddimatos <dimatos@gmail.com>

* udpate test case to correctly validate copied file

Signed-off-by: ddimatos <dimatos@gmail.com>

Co-authored-by: Oscar Fernando Flores Garcia <fernando.flores@ibm.com>
Co-authored-by: ddimatos <dimatos@gmail.com>

* Update zos_blockinfile to correctly manage double quotes in the block (#303)

* Changed the quotedString routine to remove double-quotations instead of escaping them.
Because this routine is potentially called multiple times, the escaping can become problematic.
Also, the quotation marks themselves cause problems with the zoau/blockinfile routine that gets called.

* Added note to documentation that quotation marks will be removed.

* Added 4.2 ignore file

* added 2.13 ignore

* added more ignore files, in case the versioning is butchered (added 4.0 and 4.1)

* removed some ignore files, and mucked 2.11 up to see if it throws an error

* added ignore 12, 13 and put different garbage in each...trying to find which ignore is used

* messed up the 4.2 ignore file

* added 2.11.5 ignore, still looking for the trigger

* added ignore.txt, in case 2.13 is being skipped

* removed incorrect ignore files.

* restored ignore files

* Added changelog fragement for pr 303

Signed-off-by: ddimatos <dimatos@gmail.com>

* Udpate the changelog fragment with more details

Signed-off-by: ddimatos <dimatos@gmail.com>

* Doc/pr303/add changelog to branch (#337)

* Copy ignore-2.12.txt to ignore-2.13.txt

* Update/copy fetch scp bypass (#305)

* Update galaxy author list

Signed-off-by: ddimatos <dimatos@gmail.com>

* Add logic to ensure the module only uses SFTP for sftp_transfer_method so that encodings are maintained as desired

Signed-off-by: ddimatos <dimatos@gmail.com>

* Add logic to ensure the module only uses SFTP for sftp_transfer_method so that encodings are maintained as desired

Signed-off-by: ddimatos <dimatos@gmail.com>

* Sanity tests: copy ignore-2.13.txt to ignore-2.14.txt

* Update dependency to use the latest with security patches (#332)

* Update dependency to use the latest with security patches

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update requirements to community 4.10.0 which is ansible-core 2.11.7

Signed-off-by: ddimatos <dimatos@gmail.com>

* Revert "Update requirements to community 4.10.0 which is ansible-core 2.11.7"
because our jenkins and docker images are not yet ready for what 4.10.0
brings in for dependencies. The last error for this migration shows that we
need to add pycodestyle to our container.

This reverts commit 9dfd29acc23d283c0aefb24e1a2c1774ff1b9b7c.

* Fixed typo for dd_name that prevented job output filtering based on dd_name

* Added functional tests to verify ddname filtering

* Update Readme to reflect supported ansible version

Signed-off-by: ddimatos <dimatos@gmail.com>

* Upate release note to reflect patched version 1.3.x

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update galaxy.yml with added build_ignore and authors

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update artifacts to correctly reflect execution environments

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update module with boolean bug fix and version released

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update modules docs and version released

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update error message for clarity

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update sanity tests to remove a doc reference

Signed-off-by: ddimatos <dimatos@gmail.com>

* First commit for changelog support and backported release fragemetns

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update changelog fragments because of yamlint blank lines

Signed-off-by: ddimatos <dimatos@gmail.com>

* update zos_fetch test case to remove testing the sftp port which is deprecated

Signed-off-by: ddimatos <dimatos@gmail.com>

* update test case with verbosity to troubleshoot file count

Signed-off-by: ddimatos <dimatos@gmail.com>

* update test case with verbosity to troubleshoot file count

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update the test case to add 1 to the count for the added profile

Signed-off-by: ddimatos <dimatos@gmail.com>

* Correct missing whitespace around arithmetic operator

Signed-off-by: ddimatos <dimatos@gmail.com>

* Chaning src file because I think there is a race condition where its used elsewhere

Signed-off-by: ddimatos <dimatos@gmail.com>

* Chaning src file because I think there is a race condition where its used elsewhere

Signed-off-by: ddimatos <dimatos@gmail.com>

* add more debug stmt's to the test case

Signed-off-by: ddimatos <dimatos@gmail.com>

* Added more debug to the test

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update test case with more debug

Signed-off-by: ddimatos <dimatos@gmail.com>

* udpate test case to correctly validate copied file

Signed-off-by: ddimatos <dimatos@gmail.com>

Co-authored-by: Andrew Klychkov <aklychko@redhat.com>
Co-authored-by: Oscar Fernando Flores Garcia <fernando.flores@ibm.com>

* Update fragment from bug fix to minor changes

Signed-off-by: ddimatos <dimatos@gmail.com>

Co-authored-by: ddimatos <dimatos@gmail.com>
Co-authored-by: Andrew Klychkov <aklychko@redhat.com>
Co-authored-by: Oscar Fernando Flores Garcia <fernando.flores@ibm.com>

Co-authored-by: Andrew Klychkov <aklychko@redhat.com>
Co-authored-by: Fernando Flores <fflores10@uabc.edu.mx>
Co-authored-by: Oscar Fernando Flores Garcia <fernando.flores@ibm.com>
Co-authored-by: Rich Parker <richp405@gmail.com>

* added changes from PR comments:
job.py: cleaned up variable name, stray comment, switched some n/a and UNAV to None
zos_job_submit: improved wording on an exception message

Co-authored-by: ddimatos <dimatos@gmail.com>
Co-authored-by: Andrew Klychkov <aklychko@redhat.com>
Co-authored-by: Fernando Flores <fflores10@uabc.edu.mx>
Co-authored-by: Oscar Fernando Flores Garcia <fernando.flores@ibm.com>

* Feature/2621/regex operator action query (#313)

* added message_text parameter for specifying a regex

* Added new parameter documentation and example

* Simplified regex pattern

* Revert "Simplified regex pattern"

This reverts commit a877b9d59465016fad78f9c0e1c594b576a00fff.
Going back to using all valid regex to parse the raw output from z/OS

* Added regex to raw message

* Changed 'msg_' to 'message_' to keep consistency

* Added tests for regex

* Changed description for message_text in RETURN doc

* Added use_regex suboption to message_filter

* Fixed documentation style issues

* Updated tests for new suboption in zos_operator_action_query

* Added test cases for use_regex and tweaked examples

* Doc/regex operator action query (#340)

* Sanity tests: copy ignore-2.13.txt to ignore-2.14.txt

* Update dependency to use the latest with security patches (#332)

* Update dependency to use the latest with security patches

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update requirements to community 4.10.0 which is ansible-core 2.11.7

Signed-off-by: ddimatos <dimatos@gmail.com>

* Revert "Update requirements to community 4.10.0 which is ansible-core 2.11.7"
because our jenkins and docker images are not yet ready for what 4.10.0
brings in for dependencies. The last error for this migration shows that we
need to add pycodestyle to our container.

This reverts commit 9dfd29acc23d283c0aefb24e1a2c1774ff1b9b7c.

* Gh issue 329 ddname (#333)

* Fixed typo for dd_name that prevented job output filtering based on dd_name

* Added functional tests to verify ddname filtering

* Update Readme to reflect supported ansible version

Signed-off-by: ddimatos <dimatos@gmail.com>

* Upate release note to reflect patched version 1.3.x

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update galaxy.yml with added build_ignore and authors

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update artifacts to correctly reflect execution environments

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update module with boolean bug fix and version released

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update modules docs and version released

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update error message for clarity

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update sanity tests to remove a doc reference

Signed-off-by: ddimatos <dimatos@gmail.com>

* First commit for changelog support and backported release fragemetns

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update changelog fragments because of yamlint blank lines

Signed-off-by: ddimatos <dimatos@gmail.com>

* update zos_fetch test case to remove testing the sftp port which is deprecated

Signed-off-by: ddimatos <dimatos@gmail.com>

* update test case with verbosity to troubleshoot file count

Signed-off-by: ddimatos <dimatos@gmail.com>

* update test case with verbosity to troubleshoot file count

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update the test case to add 1 to the count for the added profile

Signed-off-by: ddimatos <dimatos@gmail.com>

* Correct missing whitespace around arithmetic operator

Signed-off-by: ddimatos <dimatos@gmail.com>

* Chaning src file because I think there is a race condition where its used elsewhere

Signed-off-by: ddimatos <dimatos@gmail.com>

* Chaning src file because I think there is a race condition where its used elsewhere

Signed-off-by: ddimatos <dimatos@gmail.com>

* add more debug stmt's to the test case

Signed-off-by: ddimatos <dimatos@gmail.com>

* Added more debug to the test

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update test case with more debug

Signed-off-by: ddimatos <dimatos@gmail.com>

* udpate test case to correctly validate copied file

Signed-off-by: ddimatos <dimatos@gmail.com>

Co-authored-by: Oscar Fernando Flores Garcia <fernando.flores@ibm.com>
Co-authored-by: ddimatos <dimatos@gmail.com>

* Update zos_blockinfile to correctly manage double quotes in the block (#303)

* Changed the quotedString routine to remove double-quotations instead of escaping them.
Because this routine is potentially called multiple times, the escaping can become problematic.
Also, the quotation marks themselves cause problems with the zoau/blockinfile routine that gets called.

* Added note to documentation that quotation marks will be removed.

* Added 4.2 ignore file

* added 2.13 ignore

* added more ignore files, in case the versioning is butchered (added 4.0 and 4.1)

* removed some ignore files, and mucked 2.11 up to see if it throws an error

* added ignore 12, 13 and put different garbage in each...trying to find which ignore is used

* messed up the 4.2 ignore file

* added 2.11.5 ignore, still looking for the trigger

* added ignore.txt, in case 2.13 is being skipped

* removed incorrect ignore files.

* restored ignore files

* Added changelog fragement for pr 303

Signed-off-by: ddimatos <dimatos@gmail.com>

* Udpate the changelog fragment with more details

Signed-off-by: ddimatos <dimatos@gmail.com>

* Doc/pr303/add changelog to branch (#337)

* Copy ignore-2.12.txt to ignore-2.13.txt

* Update/copy fetch scp bypass (#305)

* Update galaxy author list

Signed-off-by: ddimatos <dimatos@gmail.com>

* Add logic to ensure the module only uses SFTP for sftp_transfer_method so that encodings are maintained as desired

Signed-off-by: ddimatos <dimatos@gmail.com>

* Add logic to ensure the module only uses SFTP for sftp_transfer_method so that encodings are maintained as desired

Signed-off-by: ddimatos <dimatos@gmail.com>

* Sanity tests: copy ignore-2.13.txt to ignore-2.14.txt

* Update dependency to use the latest with security patches (#332)

* Update dependency to use the latest with security patches

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update requirements to community 4.10.0 which is ansible-core 2.11.7

Signed-off-by: ddimatos <dimatos@gmail.com>

* Revert "Update requirements to community 4.10.0 which is ansible-core 2.11.7"
because our jenkins and docker images are not yet ready for what 4.10.0
brings in for dependencies. The last error for this migration shows that we
need to add pycodestyle to our container.

This reverts commit 9dfd29acc23d283c0aefb24e1a2c1774ff1b9b7c.

* Fixed typo for dd_name that prevented job output filtering based on dd_name

* Added functional tests to verify ddname filtering

* Update Readme to reflect supported ansible version

Signed-off-by: ddimatos <dimatos@gmail.com>

* Upate release note to reflect patched version 1.3.x

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update galaxy.yml with added build_ignore and authors

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update artifacts to correctly reflect execution environments

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update module with boolean bug fix and version released

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update modules docs and version released

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update error message for clarity

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update sanity tests to remove a doc reference

Signed-off-by: ddimatos <dimatos@gmail.com>

* First commit for changelog support and backported release fragemetns

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update changelog fragments because of yamlint blank lines

Signed-off-by: ddimatos <dimatos@gmail.com>

* update zos_fetch test case to remove testing the sftp port which is deprecated

Signed-off-by: ddimatos <dimatos@gmail.com>

* update test case with verbosity to troubleshoot file count

Signed-off-by: ddimatos <dimatos@gmail.com>

* update test case with verbosity to troubleshoot file count

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update the test case to add 1 to the count for the added profile

Signed-off-by: ddimatos <dimatos@gmail.com>

* Correct missing whitespace around arithmetic operator

Signed-off-by: ddimatos <dimatos@gmail.com>

* Chaning src file because I think there is a race condition where its used elsewhere

Signed-off-by: ddimatos <dimatos@gmail.com>

* Chaning src file because I think there is a race condition where its used elsewhere

Signed-off-by: ddimatos <dimatos@gmail.com>

* add more debug stmt's to the test case

Signed-off-by: ddimatos <dimatos@gmail.com>

* Added more debug to the test

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update test case with more debug

Signed-off-by: ddimatos <dimatos@gmail.com>

* udpate test case to correctly validate copied file

Signed-off-by: ddimatos <dimatos@gmail.com>

Co-authored-by: Andrew Klychkov <aklychko@redhat.com>
Co-authored-by: Oscar Fernando Flores Garcia <fernando.flores@ibm.com>

* Update fragment from bug fix to minor changes

Signed-off-by: ddimatos <dimatos@gmail.com>

Co-authored-by: ddimatos <dimatos@gmail.com>
Co-authored-by: Andrew Klychkov <aklychko@redhat.com>
Co-authored-by: Oscar Fernando Flores Garcia <fernando.flores@ibm.com>

* This function updates the existing code to leverage the latest API changes available in ZOAU 1.2.0 (#312)

* zos_operator: removed rexx/sdsf script and used opercmd.execute() instead
... this passes integration/playbook tests,
... so I'm duplicating the change in job.py before build testing

* Initial branch for Jira NAZARE-6933... this aligns zos_submit/zos_output to zoau.
We use the zoau library instead of a local rexx and sdsf call.
Note: passes integration tests using 1.2 of zoau.
Note: documentation is mistaken, which I'll change before PR submission

* NAZARE-6933 (alignment with zoau) - code complete
Unit tests pass, with 3 variances:
1 - Cannot find/get Job class
2 - Cannot find/get content_type
3 - msg_txt is what is returned from job list, so it's not as meaningful as the sdsf version was.

* update to pull class, system and subsystem from the dd's when loading job.
still haven't found job type outside of sdsf.

* Corrected processing of the 'node' value for subsystem.
Upcoming: found an odd response on JCL error.

* error handling: added "JCLERR" to list of terminators
error handling: no return error code as rc where appropriate (from dd)
non-error handling: added a check to not consider a job status provided if the dd's aren't there

* comment in zos_job_output hadn't been saved

* removed other comment, since the issue was addressed.

* fixes for pep-8 issues (spacing)
tweak to switch IFSDELAY (SDSF) to use timeout (zoau native)

* Tweaking import statements to add some protection to zoau imports.

* correction to call of _zget_job_status (had self-referenced a parameter)

* experimental change to zget_job_status::jobs/listing, to only pass first param
This is to check a theory that the additional owner param for 1.2 is killing 1.1 testing

* Added sdsf action back into zos_operator so that 1.1 zoau could pass the timer test

* added TJSP to output to track error in job_submit_func

* added traccking to test_zos_operator_func (test precedence keeps changing)

* tweak to handle 1.1 situation where ddls doesn't return a recnum

* bugfix: run_operator_command needed to use wait_time_s, not wait_time

* tracking with output added to time delay test of operator func

* pep8 fixes on a test function (?>?!)

* expanded error handling in job.poy to handle partial returns from listing and list_dds

* changed if not ... in ... to if ... not in ... ... argh

* tweaked test for more output, and temporarily commented assertion.

* fixing argument indext

* yet another pylint issue on a test message

* change to add parameter back into operator call
change to add time assertion back into operator test

* changed operator command delay param, but re-commented assertion
This will pass, but delay doesn't seem to be working.

* job: put in logic to limit result based on ddname, if provided
output: removed excess
operator: corrected parameter passing

* change to import to get past linter

* forgot missingImport import

* Change to job to handle ddname value... same for job_query.

* Adding changelog fragement to the pull request

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update the branch enh6933 used for pull request 312 by merging in the latest from branch dev. (#338)

* Copy ignore-2.12.txt to ignore-2.13.txt

* Update/copy fetch scp bypass (#305)

* Update galaxy author list

Signed-off-by: ddimatos <dimatos@gmail.com>

* Add logic to ensure the module only uses SFTP for sftp_transfer_method so that encodings are maintained as desired

Signed-off-by: ddimatos <dimatos@gmail.com>

* Add logic to ensure the module only uses SFTP for sftp_transfer_method so that encodings are maintained as desired

Signed-off-by: ddimatos <dimatos@gmail.com>

* Sanity tests: copy ignore-2.13.txt to ignore-2.14.txt

* Update dependency to use the latest with security patches (#332)

* Update dependency to use the latest with security patches

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update requirements to community 4.10.0 which is ansible-core 2.11.7

Signed-off-by: ddimatos <dimatos@gmail.com>

* Revert "Update requirements to community 4.10.0 which is ansible-core 2.11.7"
because our jenkins and docker images are not yet ready for what 4.10.0
brings in for dependencies. The last error for this migration shows that we
need to add pycodestyle to our container.

This reverts commit 9dfd29acc23d283c0aefb24e1a2c1774ff1b9b7c.

* Gh issue 329 ddname (#333)

* Fixed typo for dd_name that prevented job output filtering based on dd_name

* Added functional tests to verify ddname filtering

* Update Readme to reflect supported ansible version

Signed-off-by: ddimatos <dimatos@gmail.com>

* Upate release note to reflect patched version 1.3.x

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update galaxy.yml with added build_ignore and authors

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update artifacts to correctly reflect execution environments

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update module with boolean bug fix and version released

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update modules docs and version released

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update error message for clarity

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update sanity tests to remove a doc reference

Signed-off-by: ddimatos <dimatos@gmail.com>

* First commit for changelog support and backported release fragemetns

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update changelog fragments because of yamlint blank lines

Signed-off-by: ddimatos <dimatos@gmail.com>

* update zos_fetch test case to remove testing the sftp port which is deprecated

Signed-off-by: ddimatos <dimatos@gmail.com>

* update test case with verbosity to troubleshoot file count

Signed-off-by: ddimatos <dimatos@gmail.com>

* update test case with verbosity to troubleshoot file count

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update the test case to add 1 to the count for the added profile

Signed-off-by: ddimatos <dimatos@gmail.com>

* Correct missing whitespace around arithmetic operator

Signed-off-by: ddimatos <dimatos@gmail.com>

* Chaning src file because I think there is a race condition where its used elsewhere

Signed-off-by: ddimatos <dimatos@gmail.com>

* Chaning src file because I think there is a race condition where its used elsewhere

Signed-off-by: ddimatos <dimatos@gmail.com>

* add more debug stmt's to the test case

Signed-off-by: ddimatos <dimatos@gmail.com>

* Added more debug to the test

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update test case with more debug

Signed-off-by: ddimatos <dimatos@gmail.com>

* udpate test case to correctly validate copied file

Signed-off-by: ddimatos <dimatos@gmail.com>

Co-authored-by: Oscar Fernando Flores Garcia <fernando.flores@ibm.com>
Co-authored-by: ddimatos <dimatos@gmail.com>

* Update zos_blockinfile to correctly manage double quotes in the block (#303)

* Changed the quotedString routine to remove double-quotations instead of escaping them.
Because this routine is potentially called multiple times, the escaping can become problematic.
Also, the quotation marks themselves cause problems with the zoau/blockinfile routine that gets called.

* Added note to documentation that quotation marks will be removed.

* Added 4.2 ignore file

* added 2.13 ignore

* added more ignore files, in case the versioning is butchered (added 4.0 and 4.1)

* removed some ignore files, and mucked 2.11 up to see if it throws an error

* added ignore 12, 13 and put different garbage in each...trying to find which ignore is used

* messed up the 4.2 ignore file

* added 2.11.5 ignore, still looking for the trigger

* added ignore.txt, in case 2.13 is being skipped

* removed incorrect ignore files.

* restored ignore files

* Added changelog fragement for pr 303

Signed-off-by: ddimatos <dimatos@gmail.com>

* Udpate the changelog fragment with more details

Signed-off-by: ddimatos <dimatos@gmail.com>

* Doc/pr303/add changelog to branch (#337)

* Copy ignore-2.12.txt to ignore-2.13.txt

* Update/copy fetch scp bypass (#305)

* Update galaxy author list

Signed-off-by: ddimatos <dimatos@gmail.com>

* Add logic to ensure the module only uses SFTP for sftp_transfer_method so that encodings are maintained as desired

Signed-off-by: ddimatos <dimatos@gmail.com>

* Add logic to ensure the module only uses SFTP for sftp_transfer_method so that encodings are maintained as desired

Signed-off-by: ddimatos <dimatos@gmail.com>

* Sanity tests: copy ignore-2.13.txt to ignore-2.14.txt

* Update dependency to use the latest with security patches (#332)

* Update dependency to use the latest with security patches

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update requirements to community 4.10.0 which is ansible-core 2.11.7

Signed-off-by: ddimatos <dimatos@gmail.com>

* Revert "Update requirements to community 4.10.0 which is ansible-core 2.11.7"
because our jenkins and docker images are not yet ready for what 4.10.0
brings in for dependencies. The last error for this migration shows that we
need to add pycodestyle to our container.

This reverts commit 9dfd29acc23d283c0aefb24e1a2c1774ff1b9b7c.

* Fixed typo for dd_name that prevented job output filtering based on dd_name

* Added functional tests to verify ddname filtering

* Update Readme to reflect supported ansible version

Signed-off-by: ddimatos <dimatos@gmail.com>

* Upate release note to reflect patched version 1.3.x

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update galaxy.yml with added build_ignore and authors

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update artifacts to correctly reflect execution environments

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update module with boolean bug fix and version released

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update modules docs and version released

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update error message for clarity

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update sanity tests to remove a doc reference

Signed-off-by: ddimatos <dimatos@gmail.com>

* First commit for changelog support and backported release fragemetns

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update changelog fragments because of yamlint blank lines

Signed-off-by: ddimatos <dimatos@gmail.com>

* update zos_fetch test case to remove testing the sftp port which is deprecated

Signed-off-by: ddimatos <dimatos@gmail.com>

* update test case with verbosity to troubleshoot file count

Signed-off-by: ddimatos <dimatos@gmail.com>

* update test case with verbosity to troubleshoot file count

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update the test case to add 1 to the count for the added profile

Signed-off-by: ddimatos <dimatos@gmail.com>

* Correct missing whitespace around arithmetic operator

Signed-off-by: ddimatos <dimatos@gmail.com>

* Chaning src file because I think there is a race condition where its used elsewhere

Signed-off-by: ddimatos <dimatos@gmail.com>

* Chaning src file because I think there is a race condition where its used elsewhere

Signed-off-by: ddimatos <dimatos@gmail.com>

* add more debug stmt's to the test case

Signed-off-by: ddimatos <dimatos@gmail.com>

* Added more debug to the test

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update test case with more debug

Signed-off-by: ddimatos <dimatos@gmail.com>

* udpate test case to correctly validate copied file

Signed-off-by: ddimatos <dimatos@gmail.com>

Co-authored-by: Andrew Klychkov <aklychko@redhat.com>
Co-authored-by: Oscar Fernando Flores Garcia <fernando.flores@ibm.com>

* Update fragment from bug fix to minor changes

Signed-off-by: ddimatos <dimatos@gmail.com>

Co-authored-by: ddimatos <dimatos@gmail.com>
Co-authored-by: Andrew Klychkov <aklychko@redhat.com>
Co-authored-by: Oscar Fernando Flores Garcia <fernando.flores@ibm.com>

Co-authored-by: Andrew Klychkov <aklychko@redhat.com>
Co-authored-by: Fernando Flores <fflores10@uabc.edu.mx>
Co-authored-by: Oscar Fernando Flores Garcia <fernando.flores@ibm.com>
Co-authored-by: Rich Parker <richp405@gmail.com>

* added changes from PR comments:
job.py: cleaned up variable name, stray comment, switched some n/a and UNAV to None
zos_job_submit: improved wording on an exception message

Co-authored-by: ddimatos <dimatos@gmail.com>
Co-authored-by: Andrew Klychkov <aklychko@redhat.com>
Co-authored-by: Fernando Flores <fflores10@uabc.edu.mx>
Co-authored-by: Oscar Fernando Flores Garcia <fernando.flores@ibm.com>

Co-authored-by: Andrew Klychkov <aklychko@redhat.com>
Co-authored-by: Fernando Flores <fflores10@uabc.edu.mx>
Co-authored-by: Oscar Fernando Flores Garcia <fernando.flores@ibm.com>
Co-authored-by: Rich Parker <richp405@gmail.com>

* Minor doc updates per the pull request comments

Signed-off-by: ddimatos <dimatos@gmail.com>

Co-authored-by: Demetri <dimatos@gmail.com>
Co-authored-by: Andrew Klychkov <aklychko@redhat.com>
Co-authored-by: Fernando Flores <fflores10@uabc.edu.mx>
Co-authored-by: Oscar Fernando Flores Garcia <fernando.flores@ibm.com>
Co-authored-by: Rich Parker <richp405@gmail.com>

* Nazare 8880 prepend spaces (#317)

* Added indentation option to the module

* Added blockinfile tests and modified helper to assert taking into account spaces and line breaks

* Add changelog frament to release.

Signed-off-by: ddimatos <dimatos@gmail.com>

* Merge dev into NAZARE-8880-prepend-spaces to handle the divergence (#342)

* Sanity tests: copy ignore-2.13.txt to ignore-2.14.txt

* Update dependency to use the latest with security patches (#332)

* Update dependency to use the latest with security patches

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update requirements to community 4.10.0 which is ansible-core 2.11.7

Signed-off-by: ddimatos <dimatos@gmail.com>

* Revert "Update requirements to community 4.10.0 which is ansible-core 2.11.7"
because our jenkins and docker images are not yet ready for what 4.10.0
brings in for dependencies. The last error for this migration shows that we
need to add pycodestyle to our container.

This reverts commit 9dfd29acc23d283c0aefb24e1a2c1774ff1b9b7c.

* Gh issue 329 ddname (#333)

* Fixed typo for dd_name that prevented job output filtering based on dd_name

* Added functional tests to verify ddname filtering

* Update Readme to reflect supported ansible version

Signed-off-by: ddimatos <dimatos@gmail.com>

* Upate release note to reflect patched version 1.3.x

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update galaxy.yml with added build_ignore and authors

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update artifacts to correctly reflect execution environments

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update module with boolean bug fix and version released

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update modules docs and version released

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update error message for clarity

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update sanity tests to remove a doc reference

Signed-off-by: ddimatos <dimatos@gmail.com>

* First commit for changelog support and backported release fragemetns

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update changelog fragments because of yamlint blank lines

Signed-off-by: ddimatos <dimatos@gmail.com>

* update zos_fetch test case to remove testing the sftp port which is deprecated

Signed-off-by: ddimatos <dimatos@gmail.com>

* update test case with verbosity to troubleshoot file count

Signed-off-by: ddimatos <dimatos@gmail.com>

* update test case with verbosity to troubleshoot file count

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update the test case to add 1 to the count for the added profile

Signed-off-by: ddimatos <dimatos@gmail.com>

* Correct missing whitespace around arithmetic operator

Signed-off-by: ddimatos <dimatos@gmail.com>

* Chaning src file because I think there is a race condition where its used elsewhere

Signed-off-by: ddimatos <dimatos@gmail.com>

* Chaning src file because I think there is a race condition where its used elsewhere

Signed-off-by: ddimatos <dimatos@gmail.com>

* add more debug stmt's to the test case

Signed-off-by: ddimatos <dimatos@gmail.com>

* Added more debug to the test

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update test case with more debug

Signed-off-by: ddimatos <dimatos@gmail.com>

* udpate test case to correctly validate copied file

Signed-off-by: ddimatos <dimatos@gmail.com>

Co-authored-by: Oscar Fernando Flores Garcia <fernando.flores@ibm.com>
Co-authored-by: ddimatos <dimatos@gmail.com>

* Update zos_blockinfile to correctly manage double quotes in the block (#303)

* Changed the quotedString routine to remove double-quotations instead of escaping them.
Because this routine is potentially called multiple times, the escaping can become problematic.
Also, the quotation marks themselves cause problems with the zoau/blockinfile routine that gets called.

* Added note to documentation that quotation marks will be removed.

* Added 4.2 ignore file

* added 2.13 ignore

* added more ignore files, in case the versioning is butchered (added 4.0 and 4.1)

* removed some ignore files, and mucked 2.11 up to see if it throws an error

* added ignore 12, 13 and put different garbage in each...trying to find which ignore is used

* messed up the 4.2 ignore file

* added 2.11.5 ignore, still looking for the trigger

* added ignore.txt, in case 2.13 is being skipped

* removed incorrect ignore files.

* restored ignore files

* Added changelog fragement for pr 303

Signed-off-by: ddimatos <dimatos@gmail.com>

* Udpate the changelog fragment with more details

Signed-off-by: ddimatos <dimatos@gmail.com>

* Doc/pr303/add changelog to branch (#337)

* Copy ignore-2.12.txt to ignore-2.13.txt

* Update/copy fetch scp bypass (#305)

* Update galaxy author list

Signed-off-by: ddimatos <dimatos@gmail.com>

* Add logic to ensure the module only uses SFTP for sftp_transfer_method so that encodings are maintained as desired

Signed-off-by: ddimatos <dimatos@gmail.com>

* Add logic to ensure the module only uses SFTP for sftp_transfer_method so that encodings are maintained as desired

Signed-off-by: ddimatos <dimatos@gmail.com>

* Sanity tests: copy ignore-2.13.txt to ignore-2.14.txt

* Update dependency to use the latest with security patches (#332)

* Update dependency to use the latest with security patches

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update requirements to community 4.10.0 which is ansible-core 2.11.7

Signed-off-by: ddimatos <dimatos@gmail.com>

* Revert "Update requirements to community 4.10.0 which is ansible-core 2.11.7"
because our jenkins and docker images are not yet ready for what 4.10.0
brings in for dependencies. The last error for this migration shows that we
need to add pycodestyle to our container.

This reverts commit 9dfd29acc23d283c0aefb24e1a2c1774ff1b9b7c.

* Fixed typo for dd_name that prevented job output filtering based on dd_name

* Added functional tests to verify ddname filtering

* Update Readme to reflect supported ansible version

Signed-off-by: ddimatos <dimatos@gmail.com>

* Upate release note to reflect patched version 1.3.x

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update galaxy.yml with added build_ignore and authors

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update artifacts to correctly reflect execution environments

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update module with boolean bug fix and version released

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update modules docs and version released

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update error message for clarity

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update sanity tests to remove a doc reference

Signed-off-by: ddimatos <dimatos@gmail.com>

* First commit for changelog support and backported release fragemetns

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update changelog fragments because of yamlint blank lines

Signed-off-by: ddimatos <dimatos@gmail.com>

* update zos_fetch test case to remove testing the sftp port which is deprecated

Signed-off-by: ddimatos <dimatos@gmail.com>

* update test case with verbosity to troubleshoot file count

Signed-off-by: ddimatos <dimatos@gmail.com>

* update test case with verbosity to troubleshoot file count

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update the test case to add 1 to the count for the added profile

Signed-off-by: ddimatos <dimatos@gmail.com>

* Correct missing whitespace around arithmetic operator

Signed-off-by: ddimatos <dimatos@gmail.com>

* Chaning src file because I think there is a race condition where its used elsewhere

Signed-off-by: ddimatos <dimatos@gmail.com>

* Chaning src file because I think there is a race condition where its used elsewhere

Signed-off-by: ddimatos <dimatos@gmail.com>

* add more debug stmt's to the test case

Signed-off-by: ddimatos <dimatos@gmail.com>

* Added more debug to the test

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update test case with more debug

Signed-off-by: ddimatos <dimatos@gmail.com>

* udpate test case to correctly validate copied file

Signed-off-by: ddimatos <dimatos@gmail.com>

Co-authored-by: Andrew Klychkov <aklychko@redhat.com>
Co-authored-by: Oscar Fernando Flores Garcia <fernando.flores@ibm.com>

* Update fragment from bug fix to minor changes

Signed-off-by: ddimatos <dimatos@gmail.com>

Co-authored-by: ddimatos <dimatos@gmail.com>
Co-authored-by: Andrew Klychkov <aklychko@redhat.com>
Co-authored-by: Oscar Fernando Flores Garcia <fernando.flores@ibm.com>

* This function updates the existing code to leverage the latest API changes available in ZOAU 1.2.0 (#312)

* zos_operator: removed rexx/sdsf script and used opercmd.execute() instead
... this passes integration/playbook tests,
... so I'm duplicating the change in job.py before build testing

* Initial branch for Jira NAZARE-6933... this aligns zos_submit/zos_output to zoau.
We use the zoau library instead of a local rexx and sdsf call.
Note: passes integration tests using 1.2 of zoau.
Note: documentation is mistaken, which I'll change before PR submission

* NAZARE-6933 (alignment with zoau) - code complete
Unit tests pass, with 3 variances:
1 - Cannot find/get Job class
2 - Cannot find/get content_type
3 - msg_txt is what is returned from job list, so it's not as meaningful as the sdsf version was.

* update to pull class, system and subsystem from the dd's when loading job.
still haven't found job type outside of sdsf.

* Corrected processing of the 'node' value for subsystem.
Upcoming: found an odd response on JCL error.

* error handling: added "JCLERR" to list of terminators
error handling: no return error code as rc where appropriate (from dd)
non-error handling: added a check to not consider a job status provided if the dd's aren't there

* comment in zos_job_output hadn't been saved

* removed other comment, since the issue was addressed.

* fixes for pep-8 issues (spacing)
tweak to switch IFSDELAY (SDSF) to use timeout (zoau native)

* Tweaking import statements to add some protection to zoau imports.

* correction to call of _zget_job_status (had self-referenced a parameter)

* experimental change to zget_job_status::jobs/listing, to only pass first param
This is to check a theory that the additional owner param for 1.2 is killing 1.1 testing

* Added sdsf action back into zos_operator so that 1.1 zoau could pass the timer test

* added TJSP to output to track error in job_submit_func

* added traccking to test_zos_operator_func (test precedence keeps changing)

* tweak to handle 1.1 situation where ddls doesn't return a recnum

* bugfix: run_operator_command needed to use wait_time_s, not wait_time

* tracking with output added to time delay test of operator func

* pep8 fixes on a test function (?>?!)

* expanded error handling in job.poy to handle partial returns from listing and list_dds

* changed if not ... in ... to if ... not in ... ... argh

* tweaked test for more output, and temporarily commented assertion.

* fixing argument indext

* yet another pylint issue on a test message

* change to add parameter back into operator call
change to add time assertion back into operator test

* changed operator command delay param, but re-commented assertion
This will pass, but delay doesn't seem to be working.

* job: put in logic to limit result based on ddname, if provided
output: removed excess
operator: corrected parameter passing

* change to import to get past linter

* forgot missingImport import

* Change to job to handle ddname value... same for job_query.

* Adding changelog fragement to the pull request

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update the branch enh6933 used for pull request 312 by merging in the latest from branch dev. (#338)

* Copy ignore-2.12.txt to ignore-2.13.txt

* Update/copy fetch scp bypass (#305)

* Update galaxy author list

Signed-off-by: ddimatos <dimatos@gmail.com>

* Add logic to ensure the module only uses SFTP for sftp_transfer_method so that encodings are maintained as desired

Signed-off-by: ddimatos <dimatos@gmail.com>

* Add logic to ensure the module only uses SFTP for sftp_transfer_method so that encodings are maintained as desired

Signed-off-by: ddimatos <dimatos@gmail.com>

* Sanity tests: copy ignore-2.13.txt to ignore-2.14.txt

* Update dependency to use the latest with security patches (#332)

* Update dependency to use the latest with security patches

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update requirements to community 4.10.0 which is ansible-core 2.11.7

Signed-off-by: ddimatos <dimatos@gmail.com>

* Revert "Update requirements to community 4.10.0 which is ansible-core 2.11.7"
because our jenkins and docker images are not yet ready for what 4.10.0
brings in for dependencies. The last error for this migration shows that we
need to add pycodestyle to our container.

This reverts commit 9dfd29acc23d283c0aefb24e1a2c1774ff1b9b7c.

* Gh issue 329 ddname (#333)

* Fixed typo for dd_name that prevented job output filtering based on dd_name

* Added functional tests to verify ddname filtering

* Update Readme to reflect supported ansible version

Signed-off-by: ddimatos <dimatos@gmail.com>

* Upate release note to reflect patched version 1.3.x

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update galaxy.yml with added build_ignore and authors

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update artifacts to correctly reflect execution environments

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update module with boolean bug fix and version released

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update modules docs and version released

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update error message for clarity

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update sanity tests to remove a doc reference

Signed-off-by: ddimatos <dimatos@gmail.com>

* First commit for changelog support and backported release fragemetns

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update changelog fragments because of yamlint blank lines

Signed-off-by: ddimatos <dimatos@gmail.com>

* update zos_fetch test case to remove testing the sftp port which is deprecated

Signed-off-by: ddimatos <dimatos@gmail.com>

* update test case with verbosity to troubleshoot file count

Signed-off-by: ddimatos <dimatos@gmail.com>

* update test case with verbosity to troubleshoot file count

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update the test case to add 1 to the count for the added profile

Signed-off-by: ddimatos <dimatos@gmail.com>

* Correct missing whitespace around arithmetic operator

Signed-off-by: ddimatos <dimatos@gmail.com>

* Chaning src file because I think there is a race condition where its used elsewhere

Signed-off-by: ddimatos <dimatos@gmail.com>

* Chaning src file because I think there is a race condition where its used elsewhere

Signed-off-by: ddimatos <dimatos@gmail.com>

* add more debug stmt's to the test case

Signed-off-by: ddimatos <dimatos@gmail.com>

* Added more debug to the test

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update test case with more debug

Signed-off-by: ddimatos <dimatos@gmail.com>

* udpate test case to correctly validate copied file

Signed-off-by: ddimatos <dimatos@gmail.com>

Co-authored-by: Oscar Fernando Flores Garcia <fernando.flores@ibm.com>
Co-authored-by: ddimatos <dimatos@gmail.com>

* Update zos_blockinfile to correctly manage double quotes in the block (#303)

* Changed the quotedString routine to remove double-quotations instead of escaping them.
Because this routine is potentially called multiple times, the escaping can become problematic.
Also, the quotation marks themselves cause problems with the zoau/blockinfile routine that gets called.

* Added note to documentation that quotation marks will be removed.

* Added 4.2 ignore file

* added 2.13 ignore

* added more ignore files, in case the versioning is butchered (added 4.0 and 4.1)

* removed some ignore files, and mucked 2.11 up to see if it throws an error

* added ignore 12, 13 and put different garbage in each...trying to find which ignore is used

* messed up the 4.2 ignore file

* added 2.11.5 ignore, still looking for the trigger

* added ignore.txt, in case 2.13 is being skipped

* removed incorrect ignore files.

* restored ignore files

* Added changelog fragement for pr 303

Signed-off-by: ddimatos <dimatos@gmail.com>

* Udpate the changelog fragment with more details

Signed-off-by: ddimatos <dimatos@gmail.com>

* Doc/pr303/add changelog to branch (#337)

* Copy ignore-2.12.txt to ignore-2.13.txt

* Update/copy fetch scp bypass (#305)

* Update galaxy author list

Signed-off-by: ddimatos <dimatos@gmail.com>

* Add logic to ensure the module only uses SFTP for sftp_transfer_method so that encodings are maintained as desired

Signed-off-by: ddimatos <dimatos@gmail.com>

* Add logic to ensure the module only uses SFTP for sftp_transfer_method so that encodings are maintained as desired

Signed-off-by: ddimatos <dimatos@gmail.com>

* Sanity tests: copy ignore-2.13.txt to ignore-2.14.txt

* Update dependency to use the latest with security patches (#332)

* Update dependency to use the latest with security patches

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update requirements to community 4.10.0 which is ansible-core 2.11.7

Signed-off-by: ddimatos <dimatos@gmail.com>

* Revert "Update requirements to community 4.10.0 which is ansible-core 2.11.7"
because our jenkins and docker images are not yet ready for what 4.10.0
brings in for dependencies. The last error for this migration shows that we
need to add pycodestyle to our container.

This reverts commit 9dfd29acc23d283c0aefb24e1a2c1774ff1b9b7c.

* Fixed typo for dd_name that prevented job output filtering based on dd_name

* Added functional tests to verify ddname filtering

* Update Readme to reflect supported ansible version

Signed-off-by: ddimatos <dimatos@gmail.com>

* Upate release note to reflect patched version 1.3.x

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update galaxy.yml with added build_ignore and authors

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update artifacts to correctly reflect execution environments

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update module with boolean bug fix and version released

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update modules docs and version released

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update error message for clarity

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update sanity tests to remove a doc reference

Signed-off-by: ddimatos <dimatos@gmail.com>

* First commit for changelog support and backported release fragemetns

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update changelog fragments because of yamlint blank lines

Signed-off-by: ddimatos <dimatos@gmail.com>

* update zos_fetch test case to remove testing the sftp port which is deprecated

Signed-off-by: ddimatos <dimatos@gmail.com>

* update test case with verbosity to troubleshoot file count

Signed-off-by: ddimatos <dimatos@gmail.com>

* update test case with verbosity to troubleshoot file count

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update the test case to add 1 to the count for the added profile

Signed-off-by: ddimatos <dimatos@gmail.com>

* Correct missing whitespace around arithmetic operator

Signed-off-by: ddimatos <dimatos@gmail.com>

* Chaning src file because I think there is a race condition where its used elsewhere

Signed-off-by: ddimatos <dimatos@gmail.com>

* Chaning src file because I think there is a race condition where its used elsewhere

Signed-off-by: ddimatos <dimatos@gmail.com>

* add more debug stmt's to the test case

Signed-off-by: ddimatos <dimatos@gmail.com>

* Added more debug to the test

Signed-off-by: ddimatos <dimatos@gmail.com>

* Update test case with more debug

Signed-off-by: ddimatos <dimatos@gmail.com>

* udpate test case to correctly validate copied file

Signed-off-by: ddimatos <dimatos@gmail.com>

Co-authored-by: Andrew Klychkov <aklychko@redhat.com>
Co-authored-by: Oscar Fernando Flores Garcia <fernando.flores@ibm.com>

* Update fragment from bug fix to minor changes

Signed-off-by: ddimatos <dimatos@gmail.com>

Co-authored-by: ddimatos <dimatos@gmail.com>
Co-authored-by: Andrew Klychkov <aklychko@redhat.com>
Co-authored-by: Oscar Fernando Flores Garcia <fernando.flores@ibm.com>

Co-authored-by: Andrew Klychkov <aklychko@redhat.com>
Co-authored-by: Fernando Flores <fflores10@uabc.edu.mx>
Co-authored-by: Oscar Fernando Flores Garcia <fernando.flores@ibm.com>
Co-authored-by: Rich Pa…
  • Loading branch information
6 people authored Jul 1, 2022
1 parent 7f51a30 commit 91309c7
Show file tree
Hide file tree
Showing 3 changed files with 139 additions and 8 deletions.
7 changes: 7 additions & 0 deletions changelogs/fragments/316-update-zos-blockinfile-force.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
minor_changes:
- >
zos_blockinfile - updates the module with a new option named force.
This allows for a user to specifiy that the data set can be shared with
others during an update which results in the data set you are updating to
be simultaneously updated by others.
(https://github.com/ansible-collections/ibm_zos_core/pull/316).
37 changes: 29 additions & 8 deletions plugins/modules/zos_blockinfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,18 @@
required: false
type: str
default: IBM-1047
force:
description:
- Specifies that the data set can be shared with others during an update
which results in the data set you are updating to be simultaneously
updated by others.
- This is helpful when a data set is being used in a long running process
such as a started task and you are wanting to update or read.
- The C(-f) option enables sharing of data sets through the disposition
I(DISP=SHR).
required: false
type: bool
default: false
indentation:
description:
- Defines the number of spaces needed to prepend in every line of the block.
Expand Down Expand Up @@ -242,7 +254,7 @@
description: Constructed ZOAU dmod shell command based on the parameters
returned: success
type: str
sample: dmodhelper -d -b -c IBM-1047 -m "BEGIN\nEND\n# {mark} ANSIBLE MANAGED BLOCK" -e "$ a\\PATH=/dir/bin:$PATH" /etc/profile
sample: dmod -d -b -c IBM-1047 -m "BEGIN\nEND\n# {mark} ANSIBLE MANAGED BLOCK" -e "$ a\\PATH=/dir/bin:$PATH" /etc/profile
msg:
description: The module messages
returned: failure
Expand Down Expand Up @@ -319,7 +331,7 @@ def transformBlock(block, indentation_char, indentation_spaces):
return block


def present(src, block, marker, ins_aft, ins_bef, encoding):
def present(src, block, marker, ins_aft, ins_bef, encoding, force):
"""Replace a block with the matching regex pattern
Insert a block before/after the matching pattern
Insert a block at BOF/EOF
Expand All @@ -337,31 +349,33 @@ def present(src, block, marker, ins_aft, ins_bef, encoding):
- BOF
- '*regex*'
encoding: {str} -- Encoding of the src.
force: {str} -- If not empty passes the -f option to dmod cmd.
Returns:
str -- Information in JSON format. keys:
cmd: {str} -- dmod shell command
found: {int} -- Number of matching regex pattern
changed: {bool} -- Indicates if the destination was modified.
"""
return datasets.blockinfile(src, block=block, marker=marker, ins_aft=ins_aft, ins_bef=ins_bef, encoding=encoding, state=True, debug=True)
return datasets.blockinfile(src, block=block, marker=marker, ins_aft=ins_aft, ins_bef=ins_bef, encoding=encoding, state=True, debug=True, options=force)


def absent(src, marker, encoding):
def absent(src, marker, encoding, force):
"""Delete blocks with matching regex pattern
Arguments:
src: {str} -- The z/OS USS file or data set to modify.
marker: {str} -- Identifies the block to be removed.
encoding: {str} -- Encoding of the src.
force: {str} -- If not empty passes the -f option to dmod cmd.
Returns:
str -- Information in JSON format. keys:
cmd: {str} -- dmod shell command
found: {int} -- Number of matching regex pattern
changed: {bool} -- Indicates if the destination was modified.
"""
return datasets.blockinfile(src, marker=marker, encoding=encoding, state=False, debug=True)
return datasets.blockinfile(src, marker=marker, encoding=encoding, state=False, debug=True, options=force)


def quotedString(string):
Expand Down Expand Up @@ -420,6 +434,10 @@ def main():
type='str',
default='IBM-1047'
),
force=dict(
type='bool',
default=False
),
indentation=dict(
type='int',
required=False,
Expand All @@ -439,6 +457,7 @@ def main():
marker_begin=dict(arg_type='str', default='BEGIN', required=False),
marker_end=dict(arg_type='str', default='END', required=False),
encoding=dict(arg_type='str', default='IBM-1047', required=False),
force=dict(arg_type='bool', default=False, required=False),
backup=dict(arg_type='bool', default=False, required=False),
backup_name=dict(arg_type='data_set_or_pat', required=False, default=None),
mutually_exclusive=[['insertbefore', 'insertafter']],
Expand All @@ -462,6 +481,7 @@ def main():
marker = parsed_args.get('marker')
marker_begin = parsed_args.get('marker_begin')
marker_end = parsed_args.get('marker_end')
force = parsed_args.get('force')
state = parsed_args.get('state')
indentation = parsed_args.get('indentation')

Expand All @@ -480,6 +500,7 @@ def main():
marker_begin = 'BEGIN'
if not marker_end:
marker_end = 'END'
force = '-f' if force else ''

marker = "{0}\\n{1}\\n{2}".format(marker_begin, marker_end, marker)
block = transformBlock(block, ' ', indentation)
Expand Down Expand Up @@ -512,10 +533,10 @@ def main():
module.fail_json(msg="creating backup has failed")
# state=present, insert/replace a block with matching regex pattern
# state=absent, delete blocks with matching regex pattern
if state == 'present':
return_content = present(src, quotedString(block), quotedString(marker), quotedString(ins_aft), quotedString(ins_bef), encoding)
if parsed_args.get('state') == 'present':
return_content = present(src, quotedString(block), quotedString(marker), quotedString(ins_aft), quotedString(ins_bef), encoding, force)
else:
return_content = absent(src, quotedString(marker), encoding)
return_content = absent(src, quotedString(marker), encoding, force)
stdout = return_content.stdout_response
stderr = return_content.stderr_response
rc = return_content.rc
Expand Down
103 changes: 103 additions & 0 deletions tests/functional/modules/test_zos_blockinfile_func.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,16 @@
insertbefore="ZOAU_ROOT=", block="unset ZOAU_ROOT\nunset ZOAU_HOME\nunset ZOAU_DIR", state="present"),
test_uss_block_insertafter_eof=dict(
insertafter="EOF", block="export ZOAU_ROOT\nexport ZOAU_HOME\nexport ZOAU_DIR", state="present"),
test_uss_block_insert_with_force_option_as_true=dict(
insertafter="EOF", block="export ZOAU_ROOT\nexport ZOAU_HOME\nexport ZOAU_DIR", state="present", force=True),
test_uss_block_insert_with_force_option_as_false=dict(
insertafter="EOF", block="export ZOAU_ROOT\nexport ZOAU_HOME\nexport ZOAU_DIR", state="present", force=False),
test_uss_block_insertbefore_bof=dict(
insertbefore="BOF", block="# this is file is for setting env vars",
state="present"),
test_uss_block_absent=dict(block="", state="absent"),
test_uss_block_absent_with_force_option_as_true=dict(block="", state="absent", force=True),
test_uss_block_absent_with_force_option_as_false=dict(block="", state="absent", force=True),
test_uss_block_replace_insertafter_regex=dict(
insertafter="PYTHON_HOME=", block="ZOAU_ROOT=/mvsutil-develop_dsed\nZOAU_HOME=\\$ZOAU_ROOT\nZOAU_DIR=\\$ZOAU_ROOT",
state="present"),
Expand All @@ -182,6 +188,10 @@
test_ds_block_insertafter_eof=dict(test_name="T3"),
test_ds_block_insertbefore_bof=dict(test_name="T4"),
test_ds_block_absent=dict(test_name="T5"),
test_ds_block_insert_with_force_option_as_true=dict(block="export ZOAU_ROOT\nexport ZOAU_HOME\nexport ZOAU_DIR", state="present", force=True),
test_ds_block_absent_with_force_option_as_true=dict(block="", state="absent", force=True),
test_ds_block_insert_with_force_option_as_false=dict(block="export ZOAU_ROOT\nexport ZOAU_HOME\nexport ZOAU_DIR", state="present", force=False),
test_ds_block_absent_with_force_option_as_false=dict(block="", state="absent", force=False),
test_ds_block_insert_with_indentation_level_specified=dict(test_name="T7"),
expected=dict(test_uss_block_insertafter_regex_defaultmarker="""if [ -z STEPLIB ] && tty -s;
then
Expand Down Expand Up @@ -1088,6 +1098,42 @@ def test_uss_block_replace_insertbefore_bof_custommarker(ansible_zos_module):
TEST_ENV["TEST_CONT"] = TEST_CONTENT


@pytest.mark.uss
def test_uss_block_insert_with_force_option_as_true(ansible_zos_module):
UssGeneral(
"test_uss_block_insertafter_eof_defaultmarker", ansible_zos_module,
TEST_ENV, TEST_INFO["test_uss_block_insert_with_force_option_as_true"],
TEST_INFO["expected"]["test_uss_block_insertafter_eof_defaultmarker"])


@pytest.mark.uss
def test_uss_block_insert_with_force_option_as_false(ansible_zos_module):
UssGeneral(
"test_uss_block_insertafter_eof_defaultmarker", ansible_zos_module,
TEST_ENV, TEST_INFO["test_uss_block_insert_with_force_option_as_false"],
TEST_INFO["expected"]["test_uss_block_insertafter_eof_defaultmarker"])


@pytest.mark.uss
def test_uss_block_absent_with_force_option_as_true(ansible_zos_module):
TEST_ENV["TEST_CONT"] = TEST_CONTENT_DEFAULTMARKER
UssGeneral(
"test_uss_block_absent_defaultmarker", ansible_zos_module, TEST_ENV,
TEST_INFO["test_uss_block_absent_with_force_option_as_true"],
TEST_INFO["expected"]["test_uss_block_absent"])
TEST_ENV["TEST_CONT"] = TEST_CONTENT


@pytest.mark.uss
def test_uss_block_absent_with_force_option_as_false(ansible_zos_module):
TEST_ENV["TEST_CONT"] = TEST_CONTENT_DEFAULTMARKER
UssGeneral(
"test_uss_block_absent_defaultmarker", ansible_zos_module, TEST_ENV,
TEST_INFO["test_uss_block_absent_with_force_option_as_false"],
TEST_INFO["expected"]["test_uss_block_absent"])
TEST_ENV["TEST_CONT"] = TEST_CONTENT


@pytest.mark.uss
def test_uss_block_insert_with_indentation_level_specified(ansible_zos_module):
UssGeneral(
Expand Down Expand Up @@ -1236,6 +1282,63 @@ def test_ds_block_absent(ansible_zos_module, dstype, encoding):
TEST_ENV["TEST_CONT"] = TEST_CONTENT


@pytest.mark.ds
@pytest.mark.parametrize("dstype", DS_TYPE)
@pytest.mark.parametrize("encoding", ENCODING)
def test_ds_block_insert_with_force_option_as_true(ansible_zos_module, dstype, encoding):
TEST_ENV["DS_TYPE"] = dstype
TEST_ENV["ENCODING"] = encoding
DsGeneral(
"T6",
ansible_zos_module, TEST_ENV,
TEST_INFO["test_ds_block_insert_with_force_option_as_true"],
TEST_INFO["expected"]["test_uss_block_insertafter_eof_defaultmarker"]
)


@pytest.mark.ds
@pytest.mark.parametrize("dstype", DS_TYPE)
@pytest.mark.parametrize("encoding", ENCODING)
def test_ds_block_absent_with_force_option_as_true(ansible_zos_module, dstype, encoding):
TEST_ENV["DS_TYPE"] = dstype
TEST_ENV["ENCODING"] = encoding
TEST_ENV["TEST_CONT"] = TEST_CONTENT_DEFAULTMARKER
DsGeneral(
"T7", ansible_zos_module,
TEST_ENV, TEST_INFO["test_ds_block_absent_with_force_option_as_true"],
TEST_INFO["expected"]["test_uss_block_absent"]
)
TEST_ENV["TEST_CONT"] = TEST_CONTENT


@pytest.mark.ds
@pytest.mark.parametrize("dstype", DS_TYPE)
@pytest.mark.parametrize("encoding", ENCODING)
def test_ds_block_insert_with_force_option_as_false(ansible_zos_module, dstype, encoding):
TEST_ENV["DS_TYPE"] = dstype
TEST_ENV["ENCODING"] = encoding
DsGeneral(
"T8", ansible_zos_module,
TEST_ENV, TEST_INFO["test_ds_block_insert_with_force_option_as_false"],
TEST_INFO["expected"]["test_uss_block_insertafter_eof_defaultmarker"]
)


@pytest.mark.ds
@pytest.mark.parametrize("dstype", DS_TYPE)
@pytest.mark.parametrize("encoding", ENCODING)
def test_ds_block_absent_with_force_option_as_false(ansible_zos_module, dstype, encoding):
TEST_ENV["DS_TYPE"] = dstype
TEST_ENV["ENCODING"] = encoding
TEST_ENV["TEST_CONT"] = TEST_CONTENT_DEFAULTMARKER
DsGeneral(
"T9", ansible_zos_module,
TEST_ENV, TEST_INFO["test_ds_block_absent_with_force_option_as_false"],
TEST_INFO["expected"]["test_uss_block_absent"]
)
TEST_ENV["TEST_CONT"] = TEST_CONTENT


@pytest.mark.ds
@pytest.mark.parametrize("dstype", DS_TYPE)
@pytest.mark.parametrize("encoding", ENCODING)
Expand Down

0 comments on commit 91309c7

Please sign in to comment.