Skip to content

Commit b74b96e

Browse files
[enabler][1722]Avoid_parsing_on_job_utils (#1751)
* Avoid parsing * Add fragment * Update job.py * Update changelogs/fragments/1751-Avoid_parsing_on_job_utils.yml Co-authored-by: Fernando Flores <[email protected]> * Update 1751-Avoid_parsing_on_job_utils.yml --------- Co-authored-by: Fernando Flores <[email protected]>
1 parent 93f9768 commit b74b96e

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
trivial:
2+
- module_utils/job.py - Avoid parsing of job output and use job class from ZOAU python API.
3+
(https://github.com/ansible-collections/ibm_zos_core/pull/1751).

plugins/module_utils/job.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -477,9 +477,7 @@ def _get_job_status(job_id="*", owner="*", job_name="*", dd_name=None, dd_scan=T
477477

478478
job["ddnames"].append(dd)
479479
if len(job["class"]) < 1:
480-
if "- CLASS " in tmpcont:
481-
tmptext = tmpcont.split("- CLASS ")[1]
482-
job["class"] = tmptext.split(" ")[0]
480+
job["class"] = entry.job_class
483481

484482
if len(job["system"]) < 1:
485483
if "-- S Y S T E M " in tmpcont:

0 commit comments

Comments
 (0)