Skip to content

Commit b723da3

Browse files
[Bug]Return system and subsystem in zos_job_query (#1759)
* Added fix for system and subsystem * Added changelog fragment
1 parent 9aa2411 commit b723da3

File tree

4 files changed

+15
-2
lines changed

4 files changed

+15
-2
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
bugfixes:
2+
- zos_job_query - Module was not returning values for system and subsystem. Fix now returns these values.
3+
(https://github.com/ansible-collections/ibm_zos_core/pull/1759).

plugins/module_utils/job.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,6 @@ def job_status(job_id=None, owner=None, job_name=None, dd_name=None):
240240
job_id=job_id,
241241
owner=owner,
242242
job_name=job_name,
243-
dd_scan=False
244243
)
245244

246245
if len(job_status_result) == 0:
@@ -252,7 +251,6 @@ def job_status(job_id=None, owner=None, job_name=None, dd_name=None):
252251
job_id=job_id,
253252
owner=owner,
254253
job_name=job_name,
255-
dd_scan=False
256254
)
257255

258256
return job_status_result

plugins/modules/zos_job_query.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,16 @@
124124
Type of address space used by the job.
125125
type: str
126126
sample: STC
127+
system:
128+
description:
129+
The job entry system that MVS uses to do work.
130+
type: str
131+
sample: STL1
132+
subsystem:
133+
description:
134+
The job entry subsystem that MVS uses to do work.
135+
type: str
136+
sample: STL1
127137
ret_code:
128138
description:
129139
Return code output collected from job log.

tests/functional/modules/test_zos_job_query_func.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ def test_zos_job_id_query_multi_wildcards_func(ansible_zos_module):
9393
qresults = hosts.all.zos_job_query(job_id=jobmask)
9494
for qresult in qresults.contacted.values():
9595
assert qresult.get("jobs") is not None
96+
assert qresult.get("jobs")[0].get("system") is not None
97+
assert qresult.get("jobs")[0].get("subsystem") is not None
9698

9799
finally:
98100
hosts.all.file(path=temp_path, state="absent")

0 commit comments

Comments
 (0)