Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .secrets.baseline
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"exclude": {
"files": "zos_mvs_raw.rst|^.secrets.baseline$",
"files": "zos_mvs_raw.rst|test_zos_apf_func.py|^.secrets.baseline$",
"lines": null
},
"generated_at": "2025-09-01T16:59:39Z",
"generated_at": "2025-10-23T20:47:32Z",
"plugins_used": [
{
"name": "AWSKeyDetector"
Expand Down Expand Up @@ -77,7 +77,7 @@
}
],
"results": {},
"version": "0.13.1+ibm.62.dss",
"version": "0.13.1+ibm.64.dss",
"word_list": {
"file": null,
"hash": null
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
trivial:
- module_utils/data_set - Adopt new GenerationDataGroupView generations property for ZOAU 1.4.0.
(https://github.com/ansible-collections/ibm_zos_core/pull/2365)
- module_utils/copy - Adopt new GenerationDataGroupView generations property for ZOAU 1.4.0.
(https://github.com/ansible-collections/ibm_zos_core/pull/2365)
- modules/zos_copy - Adopt new GenerationDataGroupView generations property for ZOAU 1.4.0.
(https://github.com/ansible-collections/ibm_zos_core/pull/2365)
- modules/zos_fetch - Adopt new GenerationDataGroupView generations property for ZOAU 1.4.0.
(https://github.com/ansible-collections/ibm_zos_core/pull/2365)
- modules/zos_mvs_raw - Adopt new GenerationDataGroupView generations property for ZOAU 1.4.0.
(https://github.com/ansible-collections/ibm_zos_core/pull/2365)
- modules/zos_stat - Adopt new GenerationDataGroupView generations property for ZOAU 1.4.0.
(https://github.com/ansible-collections/ibm_zos_core/pull/2365)
2 changes: 1 addition & 1 deletion plugins/module_utils/copy.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def copy_gdg2uss(src, dest, binary=False, asa_text=False):
True if all copies were successful, False otherwise.
"""
src_view = gdgs.GenerationDataGroupView(src)
generations = src_view.generations()
generations = src_view.generations

copy_args = {
"options": ""
Expand Down
5 changes: 3 additions & 2 deletions plugins/module_utils/data_set.py
Original file line number Diff line number Diff line change
Expand Up @@ -1859,8 +1859,9 @@ def resolve_gds_absolute_name(relative_name):
# Fail if we are trying to resolve a future generation.
raise Exception
gdg = gdgs.GenerationDataGroupView(name=gdg_base)
generations = gdg.generations()
gds = generations[rel_generation - 1]
generations = gdg.generations
# From ZOAU 1.4 version relative notation 0 or -1 is on automatic give
gds = generations[rel_generation]
except Exception:
raise GDSNameResolveError(relative_name)

Expand Down
6 changes: 3 additions & 3 deletions plugins/modules/zos_copy.py
Original file line number Diff line number Diff line change
Expand Up @@ -1187,7 +1187,7 @@ def copy_to_gdg(self, src, dest):
True if every copy operation was successful, False otherwise.
"""
src_view = gdgs.GenerationDataGroupView(src)
generations = src_view.generations()
generations = src_view.generations
copy_args = {
"options": ""
}
Expand Down Expand Up @@ -2756,8 +2756,8 @@ def does_destination_allow_copy(
src_view = gdgs.GenerationDataGroupView(src)
dest_view = gdgs.GenerationDataGroupView(dest)

src_allocated_gens = len(src_view.generations())
dest_allocated_gens = len(dest_view.generations())
src_allocated_gens = len(src_view.generations)
dest_allocated_gens = len(dest_view.generations)

if src_allocated_gens > (dest_view.limit - dest_allocated_gens):
return False
Expand Down
2 changes: 1 addition & 1 deletion plugins/modules/zos_fetch.py
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@ def _fetch_gdg(self, src, binary, encoding=None):
dir_path = tempfile.mkdtemp()

data_group = gdgs.GenerationDataGroupView(src)
for current_gds in data_group.generations():
for current_gds in data_group.generations:
if current_gds.organization in data_set.DataSet.MVS_SEQ:
self._fetch_mvs_data(
current_gds.name,
Expand Down
8 changes: 4 additions & 4 deletions plugins/modules/zos_mvs_raw.py
Original file line number Diff line number Diff line change
Expand Up @@ -2802,8 +2802,6 @@ def resolve_data_set_names(dataset, disposition, type):
Data set name to determine if is a GDS relative name or regular name.
disposition : str
Disposition of data set for it creation.
type : str
Type of dataset
Returns
-------
str
Expand All @@ -2820,9 +2818,11 @@ def resolve_data_set_names(dataset, disposition, type):
if data_set.DataSet.is_gds_positive_relative_name(dataset):
if disp == "new":
if type:
return str(datasets.create(dataset, type).name), "shr"
new_generation = datasets.create(name=dataset, dataset_type=type)
return new_generation.name, "shr"
else:
return str(datasets.create(dataset, "seq").name), "shr"
new_generation = datasets.create(name=dataset, dataset_type="seq")
return new_generation.name, "shr"
else:
raise ("To generate a new GDS as {0} disposition 'new' is required.".format(dataset))
else:
Expand Down
2 changes: 1 addition & 1 deletion plugins/modules/zos_stat.py
Original file line number Diff line number Diff line change
Expand Up @@ -2232,7 +2232,7 @@ def query(self):
'order': self.gdg_view.order,
'purge': self.gdg_view.purge,
'extended': self.gdg_view.extended,
'active_gens': [generation.name for generation in self.gdg_view.generations()]
'active_gens': [generation.name for generation in self.gdg_view.generations]
}

# Now we call LISTCAT to get the creation time.
Expand Down
2 changes: 1 addition & 1 deletion tests/functional/modules/test_zos_archive_func.py
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,7 @@ def test_mvs_archive_single_data_set_remove_target(ansible_zos_module, ds_format
# Assert src_data_set is removed
cmd_result = hosts.all.shell(cmd = f"dls '{src_data_set}'")
for c_result in cmd_result.contacted.values():
assert f"BGYSC1103E No datasets match pattern: {src_data_set}." in c_result.get("stderr")
assert f"BGYSC1103E No datasets match pattern: {src_data_set}" in c_result.get("stderr")
finally:
hosts.all.zos_data_set(name=src_data_set, state="absent")
hosts.all.zos_data_set(name=archive_data_set, state="absent")
Expand Down
Loading