From 4bc7053f514001d05d89dfb5348fb89f5c1cbdbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Marcel=20Guti=C3=A9rrez=20Ben=C3=ADtez?= Date: Thu, 2 Oct 2025 18:33:59 -0600 Subject: [PATCH 01/15] Add warning to values will change on new implementations --- plugins/modules/zos_apf.py | 9 +++++- plugins/modules/zos_archive.py | 30 ++++++++++++++++++-- plugins/modules/zos_copy.py | 19 +++++++++++-- plugins/modules/zos_fetch.py | 10 +++++-- plugins/modules/zos_find.py | 5 ++++ plugins/modules/zos_job_output.py | 9 ++++-- plugins/modules/zos_job_submit.py | 17 +++++++++-- plugins/modules/zos_mount.py | 18 ++++++++++-- plugins/modules/zos_operator.py | 10 +++++-- plugins/modules/zos_operator_action_query.py | 12 +++++++- plugins/modules/zos_unarchive.py | 27 +++++++++++++++--- 11 files changed, 144 insertions(+), 22 deletions(-) diff --git a/plugins/modules/zos_apf.py b/plugins/modules/zos_apf.py index 211a1f4789..9e427c6bb2 100644 --- a/plugins/modules/zos_apf.py +++ b/plugins/modules/zos_apf.py @@ -113,6 +113,7 @@ the APF list. required: True type: str + aliases: [target] marker: description: - The marker line template. @@ -439,6 +440,7 @@ def main(): data_set_name=dict( type='str', required=True, + aliases=["target"], ), marker=dict( type='str', @@ -503,7 +505,7 @@ def main(): arg_type='dict', required=False, options=dict( - data_set_name=dict(arg_type='str', required=True), + data_set_name=dict(arg_type='str', required=True, aliases=["target"]), marker=dict(arg_type='str', required=False, default='/* {mark} ANSIBLE MANAGED BLOCK */'), backup=dict(arg_type='bool', default=False), backup_name=dict(arg_type='str', required=False, default=None), @@ -534,6 +536,11 @@ def main(): try: parser = better_arg_parser.BetterArgParser(arg_defs) parsed_args = parser.parse_args(module.params) + + if module.params.get('data_set_name') is not None: + module.warn("The 'data_set_name' parameter is deprecated and will be removed in a 2.0.0 release.\n" + "Please use 'target' instead.") + except ValueError as err: module.fail_json(msg="Parameter verification failed", stderr=str(err)) diff --git a/plugins/modules/zos_archive.py b/plugins/modules/zos_archive.py index a02ec00a59..bf64af49b0 100644 --- a/plugins/modules/zos_archive.py +++ b/plugins/modules/zos_archive.py @@ -57,6 +57,7 @@ type: str required: false default: gz + aliases: [type] choices: - bz2 - gz @@ -70,6 +71,7 @@ - Options specific to a compression format. type: dict required: false + aliases: [options] suboptions: terse_pack: description: @@ -86,6 +88,7 @@ choices: - pack - spack + aliases: [spack] xmit_log_data_set: description: - Provide the name of a data set to store xmit log output. @@ -105,6 +108,7 @@ portable format before using C(xmit) or C(terse). type: bool default: false + aliases: [adrdssus] dest: description: - The remote absolute path or data set where the archive should be @@ -1874,15 +1878,18 @@ def run_module(): name=dict( type='str', default='gz', - choices=['bz2', 'gz', 'tar', 'zip', 'terse', 'xmit', 'pax'] + choices=['bz2', 'gz', 'tar', 'zip', 'terse', 'xmit', 'pax'], + aliases=['type'] ), format_options=dict( type='dict', required=False, + aliases=['options'], options=dict( terse_pack=dict( type='str', choices=['pack', 'spack'], + aliases=['spack'], ), xmit_log_data_set=dict( type='str', @@ -1890,6 +1897,7 @@ def run_module(): use_adrdssu=dict( type='bool', default=False, + aliases=['adrdssu'], ) ), ), @@ -1969,16 +1977,19 @@ def run_module(): name=dict( type='str', default='gz', - choices=['bz2', 'gz', 'tar', 'zip', 'terse', 'xmit', 'pax'] + choices=['bz2', 'gz', 'tar', 'zip', 'terse', 'xmit', 'pax'], + aliases=["type"], ), format_options=dict( type='dict', required=False, + aliases=["options"], options=dict( terse_pack=dict( type='str', required=False, choices=['pack', 'spack'], + aliases=["spack"], ), xmit_log_data_set=dict( type='str', @@ -1987,6 +1998,7 @@ def run_module(): use_adrdssu=dict( type='bool', default=False, + aliases=["adrdssu"], ) ), default=dict( @@ -2051,6 +2063,20 @@ def run_module(): try: parser = better_arg_parser.BetterArgParser(arg_defs) parsed_args = parser.parse_args(module.params) + + if module.params.get('format') is not None and module.params.get('format').get('name') is not None: + module.warn("The 'name' parameter is deprecated and will be removed in a 2.0.0 release.\n" + "Please use 'type' instead.") + if module.params.get('format') is not None and module.params.get('format').get('format_options') is not None: + module.warn("The 'format_options' parameter is deprecated and will be removed in a 2.0.0 release.\n" + "Please use 'options' instead.") + if module.params.get('format') is not None and module.params.get('format').get('format_options') is not None and module.params.get('format').get('format_options').get("terse_pack") is not None: + module.warn("The 'terse_pack' parameter is deprecated and will be removed in a 2.0.0 release.\n" + "Please use 'spack' instead.") + if module.params.get('format') is not None and module.params.get('format').get('format_options') is not None and module.params.get('format').get('format_options').get("use_adrdssu")is not None: + module.warn("The 'use_adrdssu' parameter is deprecated and will be removed in a 2.0.0 release.\n" + "Please use 'adrdssu' instead.") + module.params = parsed_args except ValueError as err: module.fail_json(msg="Parameter verification failed", stderr=str(err)) diff --git a/plugins/modules/zos_copy.py b/plugins/modules/zos_copy.py index 0d2ac02134..27d93b66d6 100644 --- a/plugins/modules/zos_copy.py +++ b/plugins/modules/zos_copy.py @@ -193,6 +193,7 @@ type: bool default: false required: false + aliases: [replace] force_lock: description: - By default, when C(dest) is a MVS data set and is being used by another @@ -236,6 +237,7 @@ type: bool default: false required: false + aliases: [binary] executable: description: - If set to C(true), indicates that the file or library to be copied is an executable. @@ -4015,7 +4017,7 @@ def main(): argument_spec=dict( src=dict(type='str'), dest=dict(required=True, type='str'), - is_binary=dict(type='bool', default=False), + is_binary=dict(type='bool', default=False, aliases=["binary"]), executable=dict(type='bool', default=False), asa_text=dict(type='bool', default=False), aliases=dict(type='bool', default=False, required=False), @@ -4108,7 +4110,7 @@ def main(): autoescape=dict(type='bool', default=True), ) ), - force=dict(type='bool', default=False), + force=dict(type='bool', default=False, aliases=["replace"]), force_lock=dict(type='bool', default=False), mode=dict(type='str', required=False), owner=dict(type='str', required=False), @@ -4120,7 +4122,7 @@ def main(): arg_def = dict( src=dict(arg_type='data_set_or_path', required=False), dest=dict(arg_type='data_set_or_path', required=True), - is_binary=dict(arg_type='bool', required=False, default=False), + is_binary=dict(arg_type='bool', required=False, default=False, aliases=["binary"]), executable=dict(arg_type='bool', required=False, default=False), asa_text=dict(arg_type='bool', required=False, default=False), aliases=dict(arg_type='bool', required=False, default=False), @@ -4132,6 +4134,7 @@ def main(): checksum=dict(arg_type='str', required=False), validate=dict(arg_type='bool', required=False), volume=dict(arg_type='str', required=False), + force=dict(type='bool', default=False, aliases=["replace"]), force_lock=dict(type='bool', default=False), dest_data_set=dict( @@ -4210,6 +4213,16 @@ def main(): ) ) + if module.params.get("force") is not None: + module.warn("The 'force' parameter is deprecated and will be removed in a 2.0.0 release.\n" + "Please use 'replace' instead.") + if module.params.get("force_lock") is not None: + module.warn("The 'force_lock' parameter is deprecated and will be removed in a 2.0.0 release.\n" + "For the 2.0.0 version please use 'force' instead.") + if module.params.get("is_binary") is not None: + module.warn("The 'is_binary' parameter is deprecated and will be removed in a 2.0.0 release.\n" + "Please use 'binary' instead.") + res_args = conv_path = None try: res_args, conv_path = run_module(module, arg_def) diff --git a/plugins/modules/zos_fetch.py b/plugins/modules/zos_fetch.py index 62004698aa..e33931939c 100644 --- a/plugins/modules/zos_fetch.py +++ b/plugins/modules/zos_fetch.py @@ -83,6 +83,7 @@ required: false default: "false" type: bool + aliases: [binary] use_qualifier: description: - Indicates whether the data set high level qualifier should be used when @@ -849,7 +850,7 @@ def run_module(): dest=dict(required=True, type="path"), fail_on_missing=dict(required=False, default=True, type="bool"), flat=dict(required=False, default=False, type="bool"), - is_binary=dict(required=False, default=False, type="bool"), + is_binary=dict(required=False, default=False, type="bool", aliases=["binary"]), use_qualifier=dict(required=False, default=False, type="bool"), validate_checksum=dict(required=False, default=True, type="bool"), encoding=dict(required=False, type="dict"), @@ -872,7 +873,7 @@ def run_module(): src=dict(arg_type="data_set_or_path", required=True), dest=dict(arg_type="path", required=True), fail_on_missing=dict(arg_type="bool", required=False, default=True), - is_binary=dict(arg_type="bool", required=False, default=False), + is_binary=dict(arg_type="bool", required=False, default=False, aliases=["binary"]), use_qualifier=dict(arg_type="bool", required=False, default=False), tmp_hlq=dict(type='qualifier_or_empty', required=False, default=None), ) @@ -907,6 +908,11 @@ def run_module(): fetch_handler = FetchHandler(module) try: + + if module.params.get("is_binary") is not None: + module.warn("The 'is_binary' parameter is deprecated and will be removed in a 2.0.0 release.\n" + "Please use 'binary' instead.") + parser = better_arg_parser.BetterArgParser(arg_def) parsed_args = parser.parse_args(module.params) except ValueError as err: diff --git a/plugins/modules/zos_find.py b/plugins/modules/zos_find.py index 68319b9171..59394690f0 100644 --- a/plugins/modules/zos_find.py +++ b/plugins/modules/zos_find.py @@ -1231,6 +1231,7 @@ def run_module(module): Failed to process size. """ # Parameter initialization + pds_paths = None age = module.params.get('age') age_stamp = module.params.get('age_stamp') contains = module.params.get('contains') @@ -1260,6 +1261,10 @@ def run_module(module): filtered_migrated_types = set() vsam_migrated_types = set() + if pds_paths is not None: + module.warn("The 'pds_pattern' parameter and aliases is deprecated and will be removed in a 2.0.0 release.\n" + "On 2.0.0 version to serach for an specific member required regex isnide ().") + for type in resource_type: if type in vsam_types: filtered_resource_types.add("VSAM") diff --git a/plugins/modules/zos_job_output.py b/plugins/modules/zos_job_output.py index b2a7cdcaa4..996eaca9d2 100644 --- a/plugins/modules/zos_job_output.py +++ b/plugins/modules/zos_job_output.py @@ -62,6 +62,7 @@ (e.g "JESJCL", "?") type: str required: false + aliases: [dd_name] sysin_dd: description: - Whether to include SYSIN DDs as part of the output. @@ -507,7 +508,7 @@ def run_module(): job_id=dict(type="str", required=False), job_name=dict(type="str", required=False), owner=dict(type="str", required=False), - ddname=dict(type="str", required=False), + ddname=dict(type="str", required=False, aliases=["dd_name"]), sysin_dd=dict(type="bool", required=False, default=False), ) @@ -517,7 +518,7 @@ def run_module(): job_id=dict(type="job_identifier", required=False), job_name=dict(type="job_identifier", required=False), owner=dict(type="str", required=False), - ddname=dict(type="str", required=False), + ddname=dict(type="str", required=False, aliases=["dd_name"]), sysin_dd=dict(type="bool", required=False, default=False), ) @@ -531,6 +532,10 @@ def run_module(): stderr=str(err) ) + if module.params.get(ddname) is not None: + module.warn("The 'ddname' parameter is deprecated and will be use as alias in a 2.0.0 release.\n" + "Please use 'dd_name' instead.") + job_id = module.params.get("job_id") job_name = module.params.get("job_name") owner = module.params.get("owner") diff --git a/plugins/modules/zos_job_submit.py b/plugins/modules/zos_job_submit.py index 0917fc0079..2cb440c028 100644 --- a/plugins/modules/zos_job_submit.py +++ b/plugins/modules/zos_job_submit.py @@ -50,6 +50,7 @@ required: false default: data_set type: str + aliases: [remote_src] choices: - data_set - uss @@ -63,6 +64,7 @@ required: false default: 10 type: int + aliases: [wait_time] description: - Option I(wait_time_s) is the total time that module L(zos_job_submit,./zos_job_submit.html) will wait for a submitted job @@ -948,6 +950,7 @@ def run_module(): type="str", default="data_set", choices=["data_set", "uss", "local"], + aliases=["remote_src"] ), encoding=dict( type="dict", @@ -967,7 +970,7 @@ def run_module(): ), volume=dict(type="str", required=False), return_output=dict(type="bool", required=False, default=True), - wait_time_s=dict(type="int", default=10), + wait_time_s=dict(type="int", default=10, wait_time=["wait_time"]), max_rc=dict(type="int", required=False), use_template=dict(type='bool', default=False), template_parameters=dict( @@ -1019,6 +1022,7 @@ def run_module(): arg_type="str", default="data_set", choices=["data_set", "uss", "local"], + aliases=["remote_src"] ), from_encoding=dict( arg_type="encoding", default=Defaults.DEFAULT_ASCII_CHARSET, required=False), @@ -1027,7 +1031,7 @@ def run_module(): ), volume=dict(arg_type="volume", required=False), return_output=dict(arg_type="bool", default=True), - wait_time_s=dict(arg_type="int", required=False, default=10), + wait_time_s=dict(arg_type="int", required=False, default=10, aliases=["wait_time"]), max_rc=dict(arg_type="int", required=False), ) @@ -1042,6 +1046,15 @@ def run_module(): module.fail_json( msg="Parameter verification failed", stderr=str(err)) + if module.params.get("location") is not None: + module.warn("The 'location' parameter is deprecated and will be removed in a 2.0.0 release.\n" + "Please use 'remote_src' instead. Logic will change to set if the document with the job is" \ + "on the controller or the node") + + if module.params.get("wait_time_s") is not None: + module.warn("The 'wait_time_s' parameter is deprecated and will be removed in a 2.0.0 release.\n" + "Please use 'wait_time' instead.") + # Extract values from set module options location = parsed_args.get("location") volume = parsed_args.get("volume") diff --git a/plugins/modules/zos_mount.py b/plugins/modules/zos_mount.py index a35dda095a..afd575983c 100644 --- a/plugins/modules/zos_mount.py +++ b/plugins/modules/zos_mount.py @@ -117,6 +117,7 @@ This is usually BPXPRMxx or a copy. required: True type: str + aliases: [name] backup: description: - Creates a backup file or backup data set for @@ -160,6 +161,7 @@ type: list elements: str required: False + aliases: [marker] unmount_opts: description: - Describes how the unmount will be performed. @@ -754,6 +756,15 @@ def run_module(module, arg_def): if persistent: data_store = persistent.get("data_store").upper() + + if data_store: + module.warn("The 'data_store' parameter is deprecated and will be removed in a 2.0.0 release.\n" + "Please use 'name' instead.") + + if persistent.get("comment") is not None: + module.warn("The 'comment' parameter is deprecated and will be removed in a 2.0.0 release.\n" + "Please use 'marker' instead.") + comment = persistent.get("comment") backup = persistent.get("backup") if backup: @@ -1133,10 +1144,11 @@ def main(): data_store=dict( type="str", required=True, + aliases=["name"] ), backup=dict(type="bool", default=False), backup_name=dict(type="str", required=False, default=None), - comment=dict(type="list", elements="str", required=False), + comment=dict(type="list", elements="str", required=False, aliases=["marker"]), ), ), unmount_opts=dict( @@ -1193,10 +1205,10 @@ def main(): arg_type="dict", required=False, options=dict( - data_store=dict(arg_type="str", required=True), + data_store=dict(arg_type="str", required=True, aliases=["name"]), backup=dict(arg_type="bool", default=False), backup_name=dict(arg_type="str", required=False, default=None), - comment=dict(arg_type="list", elements="str", required=False), + comment=dict(arg_type="list", elements="str", required=False, aliases=["marker"]), ), ), unmount_opts=dict( diff --git a/plugins/modules/zos_operator.py b/plugins/modules/zos_operator.py index ab529cf335..939e300f63 100644 --- a/plugins/modules/zos_operator.py +++ b/plugins/modules/zos_operator.py @@ -61,6 +61,7 @@ type: int required: false default: 1 + aliases: [wait_time] case_sensitive: description: - If C(true), the command will not be converted to uppercase before @@ -252,7 +253,7 @@ def run_module(): module_args = dict( cmd=dict(type="str", required=True), verbose=dict(type="bool", required=False, default=False), - wait_time_s=dict(type="int", required=False, default=1), + wait_time_s=dict(type="int", required=False, default=1, aliases=["wait_time"]), case_sensitive=dict(type="bool", required=False, default=False), ) @@ -264,6 +265,11 @@ def run_module(): module.fail_json(msg="An error ocurred while importing ZOAU: {0}".format(opercmd.traceback)) try: + + if module.params.get('wait_time_s') is not None: + module.warn("The 'wait_time_s' parameter is deprecated and will be removed in a 2.0.0 release.\n" + "Please use 'wait time' instead. And option 'time_unit' will be added to set cs o seconds.") + new_params = parse_params(module.params) rc_message = run_operator_command(new_params) result["rc"] = rc_message.get("rc") @@ -339,7 +345,7 @@ def parse_params(params): arg_defs = dict( cmd=dict(arg_type="str", required=True), verbose=dict(arg_type="bool", required=False), - wait_time_s=dict(arg_type="int", required=False), + wait_time_s=dict(arg_type="int", required=False, aliases=["wait_time"]), case_sensitive=dict(arg_type="bool", required=False), ) parser = BetterArgParser(arg_defs) diff --git a/plugins/modules/zos_operator_action_query.py b/plugins/modules/zos_operator_action_query.py index 525518a2f2..cb9b3acc08 100644 --- a/plugins/modules/zos_operator_action_query.py +++ b/plugins/modules/zos_operator_action_query.py @@ -90,6 +90,7 @@ required: False type: bool default: False + aliases: [literal] seealso: - module: zos_operator @@ -267,7 +268,12 @@ def run_module(): required=False, options=dict( filter=dict(type="str", required=True), - use_regex=dict(default=False, type="bool", required=False) + use_regex=dict( + default=False, + type="bool", + required=False, + aliases=["literal"] + ) ) ) ) @@ -276,6 +282,10 @@ def run_module(): module = AnsibleModule(argument_spec=module_args, supports_check_mode=False) requests = [] try: + if module.params.get('use_regex') is not None: + module.warn("The 'use_regex' parameter is deprecated and will be removed in a 2.0.0 release.\n" + "Please use 'literal' instead. On 2.0.0 version will work on reverse logic being" \ + "False to use as regex.") new_params = parse_params(module.params) kwargs = {} diff --git a/plugins/modules/zos_unarchive.py b/plugins/modules/zos_unarchive.py index 970d789a6b..afe2ad4614 100644 --- a/plugins/modules/zos_unarchive.py +++ b/plugins/modules/zos_unarchive.py @@ -51,6 +51,7 @@ - The compression format used while archiving. type: str required: true + aliases: [type] choices: - bz2 - gz @@ -64,6 +65,7 @@ - Options specific to a compression format. type: dict required: false + aliases: [options] suboptions: xmit_log_data_set: description: @@ -84,6 +86,7 @@ a portable format after using C(xmit) or C(terse). type: bool default: False + aliases: [adrdssu] dest_volumes: description: - When I(use_adrdssu=True), specify the volume the data sets @@ -1597,11 +1600,13 @@ def run_module(): name=dict( type='str', required=True, - choices=['bz2', 'gz', 'tar', 'zip', 'terse', 'xmit', 'pax'] + choices=['bz2', 'gz', 'tar', 'zip', 'terse', 'xmit', 'pax'], + aliases=['type'] ), format_options=dict( type='dict', required=False, + aliases=['options'], options=dict( xmit_log_data_set=dict( type='str', @@ -1614,6 +1619,7 @@ def run_module(): use_adrdssu=dict( type='bool', default=False, + aliases=['adrdssu'] ) ) ), @@ -1701,12 +1707,13 @@ def run_module(): name=dict( type='str', required=True, - default='gz', - choices=['bz2', 'gz', 'tar', 'zip', 'terse', 'xmit', 'pax'] + choices=['bz2', 'gz', 'tar', 'zip', 'terse', 'xmit', 'pax'], + aliases=['type'] ), format_options=dict( type='dict', required=False, + aliases=['options'], options=dict( xmit_log_data_set=dict( type='str', @@ -1714,11 +1721,12 @@ def run_module(): ), dest_volumes=dict( type='list', - elements='str' + elements='str', ), use_adrdssu=dict( type='bool', default=False, + aliases=['adrdssu'] ), ), default=dict(xmit_log_data_set=""), @@ -1770,6 +1778,17 @@ def run_module(): try: parser = better_arg_parser.BetterArgParser(arg_defs) parsed_args = parser.parse_args(module.params) + + if module.params.get('format') is not None and module.params.get('format').get('name') is not None: + module.warn("The 'name' parameter is deprecated and will be removed in a 2.0.0 release.\n" + "Please use 'type' instead.") + if module.params.get('format') is not None and module.params.get('format').get('format_options') is not None: + module.warn("The 'format_options' parameter is deprecated and will be removed in a 2.0.0 release.\n" + "Please use 'options' instead.") + if module.params.get('format') is not None and module.params.get('format').get('format_options') is not None and module.params.get('format').get('format_options').get("use_adrdssu") is not None: + module.warn("The 'use_adrdssu' parameter is deprecated and will be removed in a 2.0.0 release.\n" + "Please use 'adrdssu' instead.") + module.params = parsed_args except ValueError as err: module.fail_json(msg="Parameter verification failed", stderr=str(err)) From 7b36ef3244e2a987cfea5bb8a7de305602d8a2bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Marcel=20Guti=C3=A9rrez=20Ben=C3=ADtez?= Date: Mon, 6 Oct 2025 15:42:35 -0600 Subject: [PATCH 02/15] Add fails to avoid fails pipeliine --- .secrets.baseline | 85 ++++++++++++++++++++++++++++++++++++ branch_protection_rules.json | 12 +++++ 2 files changed, 97 insertions(+) create mode 100644 .secrets.baseline create mode 100644 branch_protection_rules.json diff --git a/.secrets.baseline b/.secrets.baseline new file mode 100644 index 0000000000..e1a888d658 --- /dev/null +++ b/.secrets.baseline @@ -0,0 +1,85 @@ +{ + "exclude": { + "files": "zos_mvs_raw.rst|^.secrets.baseline$", + "lines": null + }, + "generated_at": "2025-10-06T17:53:30Z", + "plugins_used": [ + { + "name": "AWSKeyDetector" + }, + { + "name": "ArtifactoryDetector" + }, + { + "name": "AzureStorageKeyDetector" + }, + { + "base64_limit": 4.5, + "name": "Base64HighEntropyString" + }, + { + "name": "BasicAuthDetector" + }, + { + "name": "BoxDetector" + }, + { + "name": "CloudantDetector" + }, + { + "ghe_instance": "github.ibm.com", + "name": "GheDetector" + }, + { + "name": "GitHubTokenDetector" + }, + { + "hex_limit": 3, + "name": "HexHighEntropyString" + }, + { + "name": "IbmCloudIamDetector" + }, + { + "name": "IbmCosHmacDetector" + }, + { + "name": "JwtTokenDetector" + }, + { + "keyword_exclude": null, + "name": "KeywordDetector" + }, + { + "name": "MailchimpDetector" + }, + { + "name": "NpmDetector" + }, + { + "name": "PrivateKeyDetector" + }, + { + "name": "SlackDetector" + }, + { + "name": "SoftlayerDetector" + }, + { + "name": "SquareOAuthDetector" + }, + { + "name": "StripeDetector" + }, + { + "name": "TwilioKeyDetector" + } + ], + "results": {}, + "version": "0.13.1+ibm.64.dss", + "word_list": { + "file": null, + "hash": null + } +} diff --git a/branch_protection_rules.json b/branch_protection_rules.json new file mode 100644 index 0000000000..ec67bed7dd --- /dev/null +++ b/branch_protection_rules.json @@ -0,0 +1,12 @@ +[{ + "type": "branch-protection", + "name": "code-review", + "params": { + "checks": [ + "tekton/code-branch-protection", + "tekton/code-unit-tests", + "tekton/code-vulnerability-scan", + "tekton/code-detect-secrets" + ] + } +}] \ No newline at end of file From 72eb66952ca0e77dc2dd44ddaa83e5e15933df73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Marcel=20Guti=C3=A9rrez=20Ben=C3=ADtez?= Date: Mon, 6 Oct 2025 16:03:29 -0600 Subject: [PATCH 03/15] Add fragments --- ...-raw-option-for-generic-dcb-selection.yml} | 0 ...d_deprecation_messages_for_new_version.yml | 32 +++++++++++++++++++ 2 files changed, 32 insertions(+) rename changelogs/fragments/{2341-zos_mvs_raw-Add-raw-option-for-generic-dcb-selection => 2341-zos_mvs_raw-Add-raw-option-for-generic-dcb-selection.yml} (100%) create mode 100644 changelogs/fragments/2553-Add_aliases_and_deprecation_messages_for_new_version.yml diff --git a/changelogs/fragments/2341-zos_mvs_raw-Add-raw-option-for-generic-dcb-selection b/changelogs/fragments/2341-zos_mvs_raw-Add-raw-option-for-generic-dcb-selection.yml similarity index 100% rename from changelogs/fragments/2341-zos_mvs_raw-Add-raw-option-for-generic-dcb-selection rename to changelogs/fragments/2341-zos_mvs_raw-Add-raw-option-for-generic-dcb-selection.yml diff --git a/changelogs/fragments/2553-Add_aliases_and_deprecation_messages_for_new_version.yml b/changelogs/fragments/2553-Add_aliases_and_deprecation_messages_for_new_version.yml new file mode 100644 index 0000000000..be2a8e1b2b --- /dev/null +++ b/changelogs/fragments/2553-Add_aliases_and_deprecation_messages_for_new_version.yml @@ -0,0 +1,32 @@ +minor_changes: + - zos_apf - Adds new aliases ``target`` for ``data_set_nam`` and warning message that will be deprecated on 2.0.0. + (https://github.com/ansible-collections/ibm_zos_core/pull/2353). + - zos_archive - Adds new aliases ``type`` for ``name`` and warning message that will be deprecated on 2.0.0. + - zos_archive - Adds new aliases ``options`` for ``format_options`` and warning message that will be deprecated on 2.0.0. + - zos_archive - Adds new aliases ``spack`` for ``terse_pack`` and warning message that will be deprecated on 2.0.0. + - zos_archive - Adds new aliases ``adrdssus`` for ``use_adrdssu`` and warning message that will be deprecated on 2.0.0. + (https://github.com/ansible-collections/ibm_zos_core/pull/2353). + - zos_copy - Adds new aliases ``replace`` for ``force`` and warning message that will be deprecated on 2.0.0. + - zos_copy - Adds new aliases ``binary`` for ``is_binary`` and warning message that will be deprecated on 2.0.0. + - zos_copy - Adds warning message for ``force_lock`` that will be deprecated on 2.0.0. + (https://github.com/ansible-collections/ibm_zos_core/pull/2353). + - zos_fetch - Adds new aliases ``binary`` for ``is_binary`` and warning message that will be deprecated on 2.0.0. + (https://github.com/ansible-collections/ibm_zos_core/pull/2353). + - zos_find - Adds warning message for ``pds_paths`` that will be deprecated on 2.0.0. + (https://github.com/ansible-collections/ibm_zos_core/pull/2353). + - zos_job_output - Adds new aliases ``dd_name`` for ``ddname`` and warning message that will be aliases on 2.0.0. + (https://github.com/ansible-collections/ibm_zos_core/pull/2353). + - zos_job_submit - Adds new aliases ``remote_src`` for ``location`` and warning message that will be deprecated on 2.0.0. + - zos_job_submit - Adds new aliases ``wait_time`` for ``wait_time_s`` and warning message that will be deprecated on 2.0.0. + (https://github.com/ansible-collections/ibm_zos_core/pull/2353). + - zos_mount - Adds new aliases ``name`` for ``data_store`` and warning message that will be deprecated on 2.0.0. + - zos_mount - Adds new aliases ``marker`` for ``comment`` and warning message that will be deprecated on 2.0.0. + (https://github.com/ansible-collections/ibm_zos_core/pull/2353). + - zos_operator - Adds new aliases ``wait_time_s`` for ``wait_time`` and warning message that will be deprecated on 2.0.0. + (https://github.com/ansible-collections/ibm_zos_core/pull/2353). + - zos_operator_action_query - Adds new aliases ``literal`` for ``use_regex`` and warning message that will be deprecated on 2.0.0. + (https://github.com/ansible-collections/ibm_zos_core/pull/2353). + - zos_unarchive - Adds new aliases ``type`` for ``name`` and warning message that will be deprecated on 2.0.0. + - zos_unarchive - Adds new aliases ``options`` for ``format_options`` and warning message that will be deprecated on 2.0.0. + - zos_unarchive - Adds new aliases ``adrdssus`` for ``use_adrdssu`` and warning message that will be deprecated on 2.0.0. + (https://github.com/ansible-collections/ibm_zos_core/pull/2353). \ No newline at end of file From c90a8bd6e0d8ffca99b02dbaf1599920ac4d0040 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Marcel=20Guti=C3=A9rrez=20Ben=C3=ADtez?= Date: Tue, 7 Oct 2025 13:38:10 -0600 Subject: [PATCH 04/15] Make deprecation warning and ensure message properly --- ...d_deprecation_messages_for_new_version.yml | 4 +- plugins/action/zos_fetch.py | 6 +++ plugins/modules/zos_apf.py | 10 ++-- plugins/modules/zos_archive.py | 47 ++++++++++++------- plugins/modules/zos_copy.py | 20 +++++--- plugins/modules/zos_fetch.py | 13 ++--- plugins/modules/zos_find.py | 6 ++- plugins/modules/zos_job_output.py | 10 ++-- plugins/modules/zos_job_submit.py | 14 ++++-- plugins/modules/zos_mount.py | 17 ++++--- plugins/modules/zos_operator.py | 6 ++- plugins/modules/zos_operator_action_query.py | 10 ++-- plugins/modules/zos_unarchive.py | 33 ++++++++----- 13 files changed, 126 insertions(+), 70 deletions(-) diff --git a/changelogs/fragments/2553-Add_aliases_and_deprecation_messages_for_new_version.yml b/changelogs/fragments/2553-Add_aliases_and_deprecation_messages_for_new_version.yml index be2a8e1b2b..010db80ead 100644 --- a/changelogs/fragments/2553-Add_aliases_and_deprecation_messages_for_new_version.yml +++ b/changelogs/fragments/2553-Add_aliases_and_deprecation_messages_for_new_version.yml @@ -1,5 +1,5 @@ minor_changes: - - zos_apf - Adds new aliases ``target`` for ``data_set_nam`` and warning message that will be deprecated on 2.0.0. + - zos_apf - Adds new aliases ``target`` for ``data_set_name`` and warning message that will be deprecated on 2.0.0. (https://github.com/ansible-collections/ibm_zos_core/pull/2353). - zos_archive - Adds new aliases ``type`` for ``name`` and warning message that will be deprecated on 2.0.0. - zos_archive - Adds new aliases ``options`` for ``format_options`` and warning message that will be deprecated on 2.0.0. @@ -22,7 +22,7 @@ minor_changes: - zos_mount - Adds new aliases ``name`` for ``data_store`` and warning message that will be deprecated on 2.0.0. - zos_mount - Adds new aliases ``marker`` for ``comment`` and warning message that will be deprecated on 2.0.0. (https://github.com/ansible-collections/ibm_zos_core/pull/2353). - - zos_operator - Adds new aliases ``wait_time_s`` for ``wait_time`` and warning message that will be deprecated on 2.0.0. + - zos_operator - Adds new aliases ``wait_time`` for ``wait_time_s`` and warning message that will be deprecated on 2.0.0. (https://github.com/ansible-collections/ibm_zos_core/pull/2353). - zos_operator_action_query - Adds new aliases ``literal`` for ``use_regex`` and warning message that will be deprecated on 2.0.0. (https://github.com/ansible-collections/ibm_zos_core/pull/2353). diff --git a/plugins/action/zos_fetch.py b/plugins/action/zos_fetch.py index bdbb82e826..28fc293523 100644 --- a/plugins/action/zos_fetch.py +++ b/plugins/action/zos_fetch.py @@ -129,6 +129,12 @@ def run(self, tmp=None, task_vars=None): self._task.args.get("validate_checksum"), default=True ) + if is_binary is not None: + display.deprecated( + msg="The 'is_binary' parameter will be deprecated. Use 'binary' instead.", + version="2.0.0" + ) + # ********************************************************** # # Parameter checks # # ********************************************************** # diff --git a/plugins/modules/zos_apf.py b/plugins/modules/zos_apf.py index 9e427c6bb2..c916f3abd3 100644 --- a/plugins/modules/zos_apf.py +++ b/plugins/modules/zos_apf.py @@ -537,9 +537,13 @@ def main(): parser = better_arg_parser.BetterArgParser(arg_defs) parsed_args = parser.parse_args(module.params) - if module.params.get('data_set_name') is not None: - module.warn("The 'data_set_name' parameter is deprecated and will be removed in a 2.0.0 release.\n" - "Please use 'target' instead.") + persistent_param = module.params.get('persistent', {}) + + if persistent_param.get('data_set_name') is not None: + module.deprecate( + msg="The 'persistent.data_set_name' parameter will be deprecated. Please use 'persistent.target' instead.", + version="2.0.0", + ) except ValueError as err: module.fail_json(msg="Parameter verification failed", stderr=str(err)) diff --git a/plugins/modules/zos_archive.py b/plugins/modules/zos_archive.py index bf64af49b0..d4e34cecf1 100644 --- a/plugins/modules/zos_archive.py +++ b/plugins/modules/zos_archive.py @@ -57,7 +57,6 @@ type: str required: false default: gz - aliases: [type] choices: - bz2 - gz @@ -1879,7 +1878,6 @@ def run_module(): type='str', default='gz', choices=['bz2', 'gz', 'tar', 'zip', 'terse', 'xmit', 'pax'], - aliases=['type'] ), format_options=dict( type='dict', @@ -1978,7 +1976,6 @@ def run_module(): type='str', default='gz', choices=['bz2', 'gz', 'tar', 'zip', 'terse', 'xmit', 'pax'], - aliases=["type"], ), format_options=dict( type='dict', @@ -2057,27 +2054,41 @@ def run_module(): original_message='', message='' ) + + format_param = module.params.get('format', {}) + + if format_param.get('name') is not None: + module.deprecate( + msg="The 'format.name' parameter will be deperecated. On 2.0.0 version use 'format.type' instead.", + version="2.0.0", + ) + + if format_param.get('format_options') is not None: + module.deprecate( + msg="The 'format.format_options' parameter will be deperecated. Use 'format.options' instead.", + version="2.0.0", + ) + + format_options = format_param['format_options'] + + if format_options.get('terse_pack') is not None: + module.deprecate( + msg="The 'format.format_options.terse_pack' parameter will be deperecated. Use 'format.format_options.spack' instead.", + version="2.0.0", + ) + + if format_options.get('use_adrdssu') is not None: + module.deprecate( + msg="The 'format.format_options.use_adrdssu' parameter will be deperecated. Use 'format.format_options.adrdssu' instead.", + version="2.0.0", + ) + if module.check_mode: module.exit_json(**result) try: parser = better_arg_parser.BetterArgParser(arg_defs) parsed_args = parser.parse_args(module.params) - - if module.params.get('format') is not None and module.params.get('format').get('name') is not None: - module.warn("The 'name' parameter is deprecated and will be removed in a 2.0.0 release.\n" - "Please use 'type' instead.") - if module.params.get('format') is not None and module.params.get('format').get('format_options') is not None: - module.warn("The 'format_options' parameter is deprecated and will be removed in a 2.0.0 release.\n" - "Please use 'options' instead.") - if module.params.get('format') is not None and module.params.get('format').get('format_options') is not None and module.params.get('format').get('format_options').get("terse_pack") is not None: - module.warn("The 'terse_pack' parameter is deprecated and will be removed in a 2.0.0 release.\n" - "Please use 'spack' instead.") - if module.params.get('format') is not None and module.params.get('format').get('format_options') is not None and module.params.get('format').get('format_options').get("use_adrdssu")is not None: - module.warn("The 'use_adrdssu' parameter is deprecated and will be removed in a 2.0.0 release.\n" - "Please use 'adrdssu' instead.") - - module.params = parsed_args except ValueError as err: module.fail_json(msg="Parameter verification failed", stderr=str(err)) diff --git a/plugins/modules/zos_copy.py b/plugins/modules/zos_copy.py index 27d93b66d6..029a6018a8 100644 --- a/plugins/modules/zos_copy.py +++ b/plugins/modules/zos_copy.py @@ -4214,14 +4214,22 @@ def main(): ) if module.params.get("force") is not None: - module.warn("The 'force' parameter is deprecated and will be removed in a 2.0.0 release.\n" - "Please use 'replace' instead.") + module.deprecate( + msg="The 'force' parameter will be deperecated. Please use 'replace' instead.", + version="2.0.0", + ) + if module.params.get("force_lock") is not None: - module.warn("The 'force_lock' parameter is deprecated and will be removed in a 2.0.0 release.\n" - "For the 2.0.0 version please use 'force' instead.") + module.deprecate( + msg="The 'force_lock' parameter will be deperecated. For the 2.0.0 version please use 'force' instead.", + version="2.0.0", + ) + if module.params.get("is_binary") is not None: - module.warn("The 'is_binary' parameter is deprecated and will be removed in a 2.0.0 release.\n" - "Please use 'binary' instead.") + module.deprecate( + msg="The 'is_binary' parameter wil be deprecated. Please use 'binary' instead.", + version="2.0.0", + ) res_args = conv_path = None try: diff --git a/plugins/modules/zos_fetch.py b/plugins/modules/zos_fetch.py index e33931939c..b4e89fea63 100644 --- a/plugins/modules/zos_fetch.py +++ b/plugins/modules/zos_fetch.py @@ -861,6 +861,13 @@ def run_module(): src = module.params.get("src") hlq = None + + if module.params.get('is_binary') is not None: + module.deprecate( + msg="The 'is_binary' parameter will be deprecated. Please use 'binary' instead.", + version="2.0.0", + ) + if module.params.get("use_qualifier"): hlq = datasets.get_hlq() module.params["src"] = hlq + "." + src @@ -905,14 +912,8 @@ def run_module(): to_encoding=dict(arg_type="encoding"), ) ) - fetch_handler = FetchHandler(module) try: - - if module.params.get("is_binary") is not None: - module.warn("The 'is_binary' parameter is deprecated and will be removed in a 2.0.0 release.\n" - "Please use 'binary' instead.") - parser = better_arg_parser.BetterArgParser(arg_def) parsed_args = parser.parse_args(module.params) except ValueError as err: diff --git a/plugins/modules/zos_find.py b/plugins/modules/zos_find.py index 59394690f0..b3410299e5 100644 --- a/plugins/modules/zos_find.py +++ b/plugins/modules/zos_find.py @@ -1262,8 +1262,10 @@ def run_module(module): vsam_migrated_types = set() if pds_paths is not None: - module.warn("The 'pds_pattern' parameter and aliases is deprecated and will be removed in a 2.0.0 release.\n" - "On 2.0.0 version to serach for an specific member required regex isnide ().") + module.deprecate( + msg="The 'pds_pattern' parameter and aliases is deprecated and will be removed. Onnew version to serach for an specific member required regex isnide ()", + version="2.0.0", + ) for type in resource_type: if type in vsam_types: diff --git a/plugins/modules/zos_job_output.py b/plugins/modules/zos_job_output.py index 996eaca9d2..edd919b364 100644 --- a/plugins/modules/zos_job_output.py +++ b/plugins/modules/zos_job_output.py @@ -532,16 +532,18 @@ def run_module(): stderr=str(err) ) - if module.params.get(ddname) is not None: - module.warn("The 'ddname' parameter is deprecated and will be use as alias in a 2.0.0 release.\n" - "Please use 'dd_name' instead.") - job_id = module.params.get("job_id") job_name = module.params.get("job_name") owner = module.params.get("owner") ddname = module.params.get("ddname") sysin = module.params.get("sysin_dd") + if ddname is not None: + module.deprecate( + msg="The 'ddname' parameter is deprecated and will be use as alias. Please use 'dd_name' instead.", + version="2.0.0", + ) + if not job_id and not job_name and not owner: module.fail_json(msg="Please provide a job_id or job_name or owner") diff --git a/plugins/modules/zos_job_submit.py b/plugins/modules/zos_job_submit.py index 2cb440c028..e3109049f7 100644 --- a/plugins/modules/zos_job_submit.py +++ b/plugins/modules/zos_job_submit.py @@ -1047,13 +1047,17 @@ def run_module(): msg="Parameter verification failed", stderr=str(err)) if module.params.get("location") is not None: - module.warn("The 'location' parameter is deprecated and will be removed in a 2.0.0 release.\n" - "Please use 'remote_src' instead. Logic will change to set if the document with the job is" \ - "on the controller or the node") + module.deprecate( + msg="The 'location' parameter will be drpecated Please use 'remote_src' instead. Logic will change to set if the document with the job is" \ + "on the controller or the node", + version="2.0.0", + ) if module.params.get("wait_time_s") is not None: - module.warn("The 'wait_time_s' parameter is deprecated and will be removed in a 2.0.0 release.\n" - "Please use 'wait_time' instead.") + module.deprecate( + msg="The 'wait_time_s' parameter will be deprecated. Please use 'wait_time' instead.", + version="2.0.0", + ) # Extract values from set module options location = parsed_args.get("location") diff --git a/plugins/modules/zos_mount.py b/plugins/modules/zos_mount.py index afd575983c..09d13a3bc5 100644 --- a/plugins/modules/zos_mount.py +++ b/plugins/modules/zos_mount.py @@ -758,15 +758,20 @@ def run_module(module, arg_def): data_store = persistent.get("data_store").upper() if data_store: - module.warn("The 'data_store' parameter is deprecated and will be removed in a 2.0.0 release.\n" - "Please use 'name' instead.") - - if persistent.get("comment") is not None: - module.warn("The 'comment' parameter is deprecated and will be removed in a 2.0.0 release.\n" - "Please use 'marker' instead.") + module.deprecate( + msg="The 'data_store' parameter will be deprecated. Please use 'name' instead.", + version="2.0.0", + ) comment = persistent.get("comment") backup = persistent.get("backup") + + if comment is not None: + module.deprecate( + msg="The 'comment' parameter will be deprecated. Please use 'marker' instead.", + version="2.0.0", + ) + if backup: if persistent.get("backup_name"): backup_name = persistent.get("backup_name").upper() diff --git a/plugins/modules/zos_operator.py b/plugins/modules/zos_operator.py index 939e300f63..a91b9e2792 100644 --- a/plugins/modules/zos_operator.py +++ b/plugins/modules/zos_operator.py @@ -267,8 +267,10 @@ def run_module(): try: if module.params.get('wait_time_s') is not None: - module.warn("The 'wait_time_s' parameter is deprecated and will be removed in a 2.0.0 release.\n" - "Please use 'wait time' instead. And option 'time_unit' will be added to set cs o seconds.") + module.deprecate( + msg="The 'wait_time_s' parameter will be deprecated. Please use 'wait_time' instead. And option 'time_unit' will be added to set cs o seconds.", + version="2.0.0", + ) new_params = parse_params(module.params) rc_message = run_operator_command(new_params) diff --git a/plugins/modules/zos_operator_action_query.py b/plugins/modules/zos_operator_action_query.py index cb9b3acc08..5e770fc718 100644 --- a/plugins/modules/zos_operator_action_query.py +++ b/plugins/modules/zos_operator_action_query.py @@ -282,10 +282,12 @@ def run_module(): module = AnsibleModule(argument_spec=module_args, supports_check_mode=False) requests = [] try: - if module.params.get('use_regex') is not None: - module.warn("The 'use_regex' parameter is deprecated and will be removed in a 2.0.0 release.\n" - "Please use 'literal' instead. On 2.0.0 version will work on reverse logic being" \ - "False to use as regex.") + if module.params.get('message_filter') is not None: + if module.params.get('message_filter').get('use_regex') is not None: + module.deprecate( + msg="The 'use_regex' parameter will be deprecated. Please use 'literal' instead. On new version will work on reverse logic being False to use as regex.", + version="2.0.0", + ) new_params = parse_params(module.params) kwargs = {} diff --git a/plugins/modules/zos_unarchive.py b/plugins/modules/zos_unarchive.py index afe2ad4614..91eeb6bf0f 100644 --- a/plugins/modules/zos_unarchive.py +++ b/plugins/modules/zos_unarchive.py @@ -51,7 +51,6 @@ - The compression format used while archiving. type: str required: true - aliases: [type] choices: - bz2 - gz @@ -1601,7 +1600,6 @@ def run_module(): type='str', required=True, choices=['bz2', 'gz', 'tar', 'zip', 'terse', 'xmit', 'pax'], - aliases=['type'] ), format_options=dict( type='dict', @@ -1708,7 +1706,6 @@ def run_module(): type='str', required=True, choices=['bz2', 'gz', 'tar', 'zip', 'terse', 'xmit', 'pax'], - aliases=['type'] ), format_options=dict( type='dict', @@ -1779,15 +1776,27 @@ def run_module(): parser = better_arg_parser.BetterArgParser(arg_defs) parsed_args = parser.parse_args(module.params) - if module.params.get('format') is not None and module.params.get('format').get('name') is not None: - module.warn("The 'name' parameter is deprecated and will be removed in a 2.0.0 release.\n" - "Please use 'type' instead.") - if module.params.get('format') is not None and module.params.get('format').get('format_options') is not None: - module.warn("The 'format_options' parameter is deprecated and will be removed in a 2.0.0 release.\n" - "Please use 'options' instead.") - if module.params.get('format') is not None and module.params.get('format').get('format_options') is not None and module.params.get('format').get('format_options').get("use_adrdssu") is not None: - module.warn("The 'use_adrdssu' parameter is deprecated and will be removed in a 2.0.0 release.\n" - "Please use 'adrdssu' instead.") + format_param = module.params.get('format', {}) + + if format_param.get('name') is not None: + module.deprecate( + msg="The 'format.name' parameter will be deperecated. On 2.0.0 version use 'format.type' instead.", + version="2.0.0", + ) + + if format_param.get('format_options') is not None: + module.deprecate( + msg="The 'format.format_options' parameter will be deperecated. Use 'format.options' instead.", + version="2.0.0", + ) + + format_options = format_param['format_options'] + + if format_options.get('use_adrdssu') is not None: + module.deprecate( + msg="The 'format.format_options.use_adrdssu' parameter will be deperecated. Use 'format.format_options.adrdssu' instead.", + version="2.0.0", + ) module.params = parsed_args except ValueError as err: From ea4e6f501fbf85f1521e435acfc3e9248fb5965f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Marcel=20Guti=C3=A9rrez=20Ben=C3=ADtez?= Date: Tue, 7 Oct 2025 14:55:07 -0600 Subject: [PATCH 05/15] Fix lint --- plugins/action/zos_fetch.py | 2 +- plugins/modules/zos_find.py | 3 ++- plugins/modules/zos_job_submit.py | 8 ++++---- plugins/modules/zos_mount.py | 8 ++++---- plugins/modules/zos_operator_action_query.py | 5 +++-- plugins/modules/zos_unarchive.py | 2 +- 6 files changed, 15 insertions(+), 13 deletions(-) diff --git a/plugins/action/zos_fetch.py b/plugins/action/zos_fetch.py index 28fc293523..90cb7922c3 100644 --- a/plugins/action/zos_fetch.py +++ b/plugins/action/zos_fetch.py @@ -133,7 +133,7 @@ def run(self, tmp=None, task_vars=None): display.deprecated( msg="The 'is_binary' parameter will be deprecated. Use 'binary' instead.", version="2.0.0" - ) + ) # ********************************************************** # # Parameter checks # diff --git a/plugins/modules/zos_find.py b/plugins/modules/zos_find.py index b3410299e5..5cc11b9955 100644 --- a/plugins/modules/zos_find.py +++ b/plugins/modules/zos_find.py @@ -1263,7 +1263,8 @@ def run_module(module): if pds_paths is not None: module.deprecate( - msg="The 'pds_pattern' parameter and aliases is deprecated and will be removed. Onnew version to serach for an specific member required regex isnide ()", + msg="The 'pds_pattern' parameter and aliases is deprecated and will be removed \ + On new version to serach for an specific member required regex isnide ()", version="2.0.0", ) diff --git a/plugins/modules/zos_job_submit.py b/plugins/modules/zos_job_submit.py index e3109049f7..935a7636d6 100644 --- a/plugins/modules/zos_job_submit.py +++ b/plugins/modules/zos_job_submit.py @@ -1048,15 +1048,15 @@ def run_module(): if module.params.get("location") is not None: module.deprecate( - msg="The 'location' parameter will be drpecated Please use 'remote_src' instead. Logic will change to set if the document with the job is" \ - "on the controller or the node", + msg="The 'location' parameter will be drpecated Please use 'remote_src' instead. Logic will change to set if the document with the job is \ + on the controller or the node", version="2.0.0", ) if module.params.get("wait_time_s") is not None: module.deprecate( - msg="The 'wait_time_s' parameter will be deprecated. Please use 'wait_time' instead.", - version="2.0.0", + msg="The 'wait_time_s' parameter will be deprecated. Please use 'wait_time' instead.", + version="2.0.0", ) # Extract values from set module options diff --git a/plugins/modules/zos_mount.py b/plugins/modules/zos_mount.py index 09d13a3bc5..fb76cd837e 100644 --- a/plugins/modules/zos_mount.py +++ b/plugins/modules/zos_mount.py @@ -759,8 +759,8 @@ def run_module(module, arg_def): if data_store: module.deprecate( - msg="The 'data_store' parameter will be deprecated. Please use 'name' instead.", - version="2.0.0", + msg="The 'data_store' parameter will be deprecated. Please use 'name' instead.", + version="2.0.0", ) comment = persistent.get("comment") @@ -768,8 +768,8 @@ def run_module(module, arg_def): if comment is not None: module.deprecate( - msg="The 'comment' parameter will be deprecated. Please use 'marker' instead.", - version="2.0.0", + msg="The 'comment' parameter will be deprecated. Please use 'marker' instead.", + version="2.0.0", ) if backup: diff --git a/plugins/modules/zos_operator_action_query.py b/plugins/modules/zos_operator_action_query.py index 5e770fc718..d7c6e3fd65 100644 --- a/plugins/modules/zos_operator_action_query.py +++ b/plugins/modules/zos_operator_action_query.py @@ -273,7 +273,7 @@ def run_module(): type="bool", required=False, aliases=["literal"] - ) + ) ) ) ) @@ -285,7 +285,8 @@ def run_module(): if module.params.get('message_filter') is not None: if module.params.get('message_filter').get('use_regex') is not None: module.deprecate( - msg="The 'use_regex' parameter will be deprecated. Please use 'literal' instead. On new version will work on reverse logic being False to use as regex.", + msg="The 'use_regex' parameter will be deprecated. Please use 'literal' instead.\ + On new version will work on reverse logic being False to use as regex.", version="2.0.0", ) new_params = parse_params(module.params) diff --git a/plugins/modules/zos_unarchive.py b/plugins/modules/zos_unarchive.py index 91eeb6bf0f..e7a68d0730 100644 --- a/plugins/modules/zos_unarchive.py +++ b/plugins/modules/zos_unarchive.py @@ -1791,7 +1791,7 @@ def run_module(): ) format_options = format_param['format_options'] - + if format_options.get('use_adrdssu') is not None: module.deprecate( msg="The 'format.format_options.use_adrdssu' parameter will be deperecated. Use 'format.format_options.adrdssu' instead.", From 7a910d3638e30fe527317c25cac1e13a7cc7819f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Marcel=20Guti=C3=A9rrez=20Ben=C3=ADtez?= Date: Tue, 7 Oct 2025 15:04:36 -0600 Subject: [PATCH 06/15] Fix name collection --- plugins/action/zos_fetch.py | 3 ++- plugins/modules/zos_apf.py | 1 + plugins/modules/zos_archive.py | 4 ++++ plugins/modules/zos_copy.py | 3 +++ plugins/modules/zos_fetch.py | 1 + plugins/modules/zos_find.py | 1 + plugins/modules/zos_job_output.py | 1 + plugins/modules/zos_job_submit.py | 2 ++ plugins/modules/zos_mount.py | 2 ++ plugins/modules/zos_operator.py | 1 + plugins/modules/zos_operator_action_query.py | 1 + plugins/modules/zos_unarchive.py | 3 +++ 12 files changed, 22 insertions(+), 1 deletion(-) diff --git a/plugins/action/zos_fetch.py b/plugins/action/zos_fetch.py index 90cb7922c3..0ef978ad23 100644 --- a/plugins/action/zos_fetch.py +++ b/plugins/action/zos_fetch.py @@ -132,7 +132,8 @@ def run(self, tmp=None, task_vars=None): if is_binary is not None: display.deprecated( msg="The 'is_binary' parameter will be deprecated. Use 'binary' instead.", - version="2.0.0" + version="2.0.0", + collection_name='ibm.ibm_zos_core', ) # ********************************************************** # diff --git a/plugins/modules/zos_apf.py b/plugins/modules/zos_apf.py index c916f3abd3..4fa46671a8 100644 --- a/plugins/modules/zos_apf.py +++ b/plugins/modules/zos_apf.py @@ -543,6 +543,7 @@ def main(): module.deprecate( msg="The 'persistent.data_set_name' parameter will be deprecated. Please use 'persistent.target' instead.", version="2.0.0", + collection_name='ibm.ibm_zos_core', ) except ValueError as err: diff --git a/plugins/modules/zos_archive.py b/plugins/modules/zos_archive.py index d4e34cecf1..9253e311a1 100644 --- a/plugins/modules/zos_archive.py +++ b/plugins/modules/zos_archive.py @@ -2061,12 +2061,14 @@ def run_module(): module.deprecate( msg="The 'format.name' parameter will be deperecated. On 2.0.0 version use 'format.type' instead.", version="2.0.0", + collection_name='ibm.ibm_zos_core', ) if format_param.get('format_options') is not None: module.deprecate( msg="The 'format.format_options' parameter will be deperecated. Use 'format.options' instead.", version="2.0.0", + collection_name='ibm.ibm_zos_core', ) format_options = format_param['format_options'] @@ -2075,12 +2077,14 @@ def run_module(): module.deprecate( msg="The 'format.format_options.terse_pack' parameter will be deperecated. Use 'format.format_options.spack' instead.", version="2.0.0", + collection_name='ibm.ibm_zos_core', ) if format_options.get('use_adrdssu') is not None: module.deprecate( msg="The 'format.format_options.use_adrdssu' parameter will be deperecated. Use 'format.format_options.adrdssu' instead.", version="2.0.0", + collection_name='ibm.ibm_zos_core', ) if module.check_mode: diff --git a/plugins/modules/zos_copy.py b/plugins/modules/zos_copy.py index 029a6018a8..f6f47ef489 100644 --- a/plugins/modules/zos_copy.py +++ b/plugins/modules/zos_copy.py @@ -4217,18 +4217,21 @@ def main(): module.deprecate( msg="The 'force' parameter will be deperecated. Please use 'replace' instead.", version="2.0.0", + collection_name='ibm.ibm_zos_core', ) if module.params.get("force_lock") is not None: module.deprecate( msg="The 'force_lock' parameter will be deperecated. For the 2.0.0 version please use 'force' instead.", version="2.0.0", + collection_name='ibm.ibm_zos_core', ) if module.params.get("is_binary") is not None: module.deprecate( msg="The 'is_binary' parameter wil be deprecated. Please use 'binary' instead.", version="2.0.0", + collection_name='ibm.ibm_zos_core', ) res_args = conv_path = None diff --git a/plugins/modules/zos_fetch.py b/plugins/modules/zos_fetch.py index b4e89fea63..6eca44e2c5 100644 --- a/plugins/modules/zos_fetch.py +++ b/plugins/modules/zos_fetch.py @@ -866,6 +866,7 @@ def run_module(): module.deprecate( msg="The 'is_binary' parameter will be deprecated. Please use 'binary' instead.", version="2.0.0", + collection_name='ibm.ibm_zos_core', ) if module.params.get("use_qualifier"): diff --git a/plugins/modules/zos_find.py b/plugins/modules/zos_find.py index 5cc11b9955..908cb06782 100644 --- a/plugins/modules/zos_find.py +++ b/plugins/modules/zos_find.py @@ -1266,6 +1266,7 @@ def run_module(module): msg="The 'pds_pattern' parameter and aliases is deprecated and will be removed \ On new version to serach for an specific member required regex isnide ()", version="2.0.0", + collection_name='ibm.ibm_zos_core', ) for type in resource_type: diff --git a/plugins/modules/zos_job_output.py b/plugins/modules/zos_job_output.py index edd919b364..23fea15115 100644 --- a/plugins/modules/zos_job_output.py +++ b/plugins/modules/zos_job_output.py @@ -542,6 +542,7 @@ def run_module(): module.deprecate( msg="The 'ddname' parameter is deprecated and will be use as alias. Please use 'dd_name' instead.", version="2.0.0", + collection_name='ibm.ibm_zos_core', ) if not job_id and not job_name and not owner: diff --git a/plugins/modules/zos_job_submit.py b/plugins/modules/zos_job_submit.py index 935a7636d6..00944ba221 100644 --- a/plugins/modules/zos_job_submit.py +++ b/plugins/modules/zos_job_submit.py @@ -1051,12 +1051,14 @@ def run_module(): msg="The 'location' parameter will be drpecated Please use 'remote_src' instead. Logic will change to set if the document with the job is \ on the controller or the node", version="2.0.0", + collection_name='ibm.ibm_zos_core', ) if module.params.get("wait_time_s") is not None: module.deprecate( msg="The 'wait_time_s' parameter will be deprecated. Please use 'wait_time' instead.", version="2.0.0", + collection_name='ibm.ibm_zos_core', ) # Extract values from set module options diff --git a/plugins/modules/zos_mount.py b/plugins/modules/zos_mount.py index fb76cd837e..1f71c9fc88 100644 --- a/plugins/modules/zos_mount.py +++ b/plugins/modules/zos_mount.py @@ -761,6 +761,7 @@ def run_module(module, arg_def): module.deprecate( msg="The 'data_store' parameter will be deprecated. Please use 'name' instead.", version="2.0.0", + collection_name='ibm.ibm_zos_core', ) comment = persistent.get("comment") @@ -770,6 +771,7 @@ def run_module(module, arg_def): module.deprecate( msg="The 'comment' parameter will be deprecated. Please use 'marker' instead.", version="2.0.0", + collection_name='ibm.ibm_zos_core', ) if backup: diff --git a/plugins/modules/zos_operator.py b/plugins/modules/zos_operator.py index a91b9e2792..9fe93e255d 100644 --- a/plugins/modules/zos_operator.py +++ b/plugins/modules/zos_operator.py @@ -270,6 +270,7 @@ def run_module(): module.deprecate( msg="The 'wait_time_s' parameter will be deprecated. Please use 'wait_time' instead. And option 'time_unit' will be added to set cs o seconds.", version="2.0.0", + collection_name='ibm.ibm_zos_core', ) new_params = parse_params(module.params) diff --git a/plugins/modules/zos_operator_action_query.py b/plugins/modules/zos_operator_action_query.py index d7c6e3fd65..d98f19dc2a 100644 --- a/plugins/modules/zos_operator_action_query.py +++ b/plugins/modules/zos_operator_action_query.py @@ -288,6 +288,7 @@ def run_module(): msg="The 'use_regex' parameter will be deprecated. Please use 'literal' instead.\ On new version will work on reverse logic being False to use as regex.", version="2.0.0", + collection_name='ibm.ibm_zos_core', ) new_params = parse_params(module.params) diff --git a/plugins/modules/zos_unarchive.py b/plugins/modules/zos_unarchive.py index e7a68d0730..58b92bab27 100644 --- a/plugins/modules/zos_unarchive.py +++ b/plugins/modules/zos_unarchive.py @@ -1782,12 +1782,14 @@ def run_module(): module.deprecate( msg="The 'format.name' parameter will be deperecated. On 2.0.0 version use 'format.type' instead.", version="2.0.0", + collection_name='ibm.ibm_zos_core', ) if format_param.get('format_options') is not None: module.deprecate( msg="The 'format.format_options' parameter will be deperecated. Use 'format.options' instead.", version="2.0.0", + collection_name='ibm.ibm_zos_core', ) format_options = format_param['format_options'] @@ -1796,6 +1798,7 @@ def run_module(): module.deprecate( msg="The 'format.format_options.use_adrdssu' parameter will be deperecated. Use 'format.format_options.adrdssu' instead.", version="2.0.0", + collection_name='ibm.ibm_zos_core', ) module.params = parsed_args From dcfccded0310d783617f5304dc5528de4f1988b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Marcel=20Guti=C3=A9rrez=20Ben=C3=ADtez?= Date: Tue, 7 Oct 2025 16:47:14 -0600 Subject: [PATCH 07/15] Fix documentation --- plugins/modules/zos_archive.py | 2 +- plugins/modules/zos_job_submit.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/modules/zos_archive.py b/plugins/modules/zos_archive.py index 9253e311a1..76e1a40eb2 100644 --- a/plugins/modules/zos_archive.py +++ b/plugins/modules/zos_archive.py @@ -107,7 +107,7 @@ portable format before using C(xmit) or C(terse). type: bool default: false - aliases: [adrdssus] + aliases: [adrdssu] dest: description: - The remote absolute path or data set where the archive should be diff --git a/plugins/modules/zos_job_submit.py b/plugins/modules/zos_job_submit.py index 00944ba221..1a579f00f9 100644 --- a/plugins/modules/zos_job_submit.py +++ b/plugins/modules/zos_job_submit.py @@ -970,7 +970,7 @@ def run_module(): ), volume=dict(type="str", required=False), return_output=dict(type="bool", required=False, default=True), - wait_time_s=dict(type="int", default=10, wait_time=["wait_time"]), + wait_time_s=dict(type="int", default=10, aliases=["wait_time"]), max_rc=dict(type="int", required=False), use_template=dict(type='bool', default=False), template_parameters=dict( From c66812e5a2621fcddbd13390a7a5235326043bbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Marcel=20Guti=C3=A9rrez=20Ben=C3=ADtez?= Date: Tue, 7 Oct 2025 16:52:30 -0600 Subject: [PATCH 08/15] Fix comments --- plugins/modules/zos_copy.py | 2 +- plugins/modules/zos_job_output.py | 2 +- plugins/modules/zos_job_submit.py | 2 +- plugins/modules/zos_operator.py | 2 +- plugins/modules/zos_operator_action_query.py | 2 +- plugins/modules/zos_unarchive.py | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/plugins/modules/zos_copy.py b/plugins/modules/zos_copy.py index f6f47ef489..29f54eefa6 100644 --- a/plugins/modules/zos_copy.py +++ b/plugins/modules/zos_copy.py @@ -4222,7 +4222,7 @@ def main(): if module.params.get("force_lock") is not None: module.deprecate( - msg="The 'force_lock' parameter will be deperecated. For the 2.0.0 version please use 'force' instead.", + msg="The 'force_lock' parameter will be deperecated. For the next version please use 'force' instead.", version="2.0.0", collection_name='ibm.ibm_zos_core', ) diff --git a/plugins/modules/zos_job_output.py b/plugins/modules/zos_job_output.py index 23fea15115..d44400202a 100644 --- a/plugins/modules/zos_job_output.py +++ b/plugins/modules/zos_job_output.py @@ -540,7 +540,7 @@ def run_module(): if ddname is not None: module.deprecate( - msg="The 'ddname' parameter is deprecated and will be use as alias. Please use 'dd_name' instead.", + msg="The 'ddname' parameter is deprecated and will be used as alias. Please use 'dd_name' instead.", version="2.0.0", collection_name='ibm.ibm_zos_core', ) diff --git a/plugins/modules/zos_job_submit.py b/plugins/modules/zos_job_submit.py index 1a579f00f9..8a28ffe929 100644 --- a/plugins/modules/zos_job_submit.py +++ b/plugins/modules/zos_job_submit.py @@ -1048,7 +1048,7 @@ def run_module(): if module.params.get("location") is not None: module.deprecate( - msg="The 'location' parameter will be drpecated Please use 'remote_src' instead. Logic will change to set if the document with the job is \ + msg="The 'location' parameter will be deprecated Please use 'remote_src' instead. Logic will change to set if the document with the job is \ on the controller or the node", version="2.0.0", collection_name='ibm.ibm_zos_core', diff --git a/plugins/modules/zos_operator.py b/plugins/modules/zos_operator.py index 9fe93e255d..136742931a 100644 --- a/plugins/modules/zos_operator.py +++ b/plugins/modules/zos_operator.py @@ -268,7 +268,7 @@ def run_module(): if module.params.get('wait_time_s') is not None: module.deprecate( - msg="The 'wait_time_s' parameter will be deprecated. Please use 'wait_time' instead. And option 'time_unit' will be added to set cs o seconds.", + msg="The 'wait_time_s' parameter will be deprecated. Please use 'wait_time' instead.", version="2.0.0", collection_name='ibm.ibm_zos_core', ) diff --git a/plugins/modules/zos_operator_action_query.py b/plugins/modules/zos_operator_action_query.py index d98f19dc2a..89e9eae525 100644 --- a/plugins/modules/zos_operator_action_query.py +++ b/plugins/modules/zos_operator_action_query.py @@ -286,7 +286,7 @@ def run_module(): if module.params.get('message_filter').get('use_regex') is not None: module.deprecate( msg="The 'use_regex' parameter will be deprecated. Please use 'literal' instead.\ - On new version will work on reverse logic being False to use as regex.", + New version will use false to mean regex will be used.", version="2.0.0", collection_name='ibm.ibm_zos_core', ) diff --git a/plugins/modules/zos_unarchive.py b/plugins/modules/zos_unarchive.py index 58b92bab27..581eb57c36 100644 --- a/plugins/modules/zos_unarchive.py +++ b/plugins/modules/zos_unarchive.py @@ -1780,7 +1780,7 @@ def run_module(): if format_param.get('name') is not None: module.deprecate( - msg="The 'format.name' parameter will be deperecated. On 2.0.0 version use 'format.type' instead.", + msg="The 'format.name' parameter will be deperecated. For the next version use 'format.type' instead.", version="2.0.0", collection_name='ibm.ibm_zos_core', ) From 8e771a482041686b8bb356ea9c4048904a831450 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Marcel=20Guti=C3=A9rrez=20Ben=C3=ADtez?= Date: Wed, 8 Oct 2025 10:09:32 -0600 Subject: [PATCH 09/15] Fix typo on find --- plugins/modules/zos_find.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/modules/zos_find.py b/plugins/modules/zos_find.py index 908cb06782..f2d5d6477a 100644 --- a/plugins/modules/zos_find.py +++ b/plugins/modules/zos_find.py @@ -1264,7 +1264,7 @@ def run_module(module): if pds_paths is not None: module.deprecate( msg="The 'pds_pattern' parameter and aliases is deprecated and will be removed \ - On new version to serach for an specific member required regex isnide ()", + On new version to search for an specific member required regex isnide ()", version="2.0.0", collection_name='ibm.ibm_zos_core', ) From c3ca9b73022406b9a36508d69c627ed7fc82467d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Marcel=20Guti=C3=A9rrez=20Ben=C3=ADtez?= Date: Wed, 8 Oct 2025 12:24:00 -0600 Subject: [PATCH 10/15] Fix typo and fail on zos archive error --- plugins/modules/zos_archive.py | 25 +++++++++++++------------ plugins/modules/zos_copy.py | 4 ++-- plugins/modules/zos_unarchive.py | 29 ----------------------------- 3 files changed, 15 insertions(+), 43 deletions(-) diff --git a/plugins/modules/zos_archive.py b/plugins/modules/zos_archive.py index 76e1a40eb2..4b0e52f9f7 100644 --- a/plugins/modules/zos_archive.py +++ b/plugins/modules/zos_archive.py @@ -87,7 +87,7 @@ choices: - pack - spack - aliases: [spack] + aliases=['spack'] xmit_log_data_set: description: - Provide the name of a data set to store xmit log output. @@ -1887,7 +1887,7 @@ def run_module(): terse_pack=dict( type='str', choices=['pack', 'spack'], - aliases=['spack'], + aliases=['spack'] ), xmit_log_data_set=dict( type='str', @@ -1895,7 +1895,7 @@ def run_module(): use_adrdssu=dict( type='bool', default=False, - aliases=['adrdssu'], + aliases=['adrdssu'] ) ), ), @@ -1986,7 +1986,7 @@ def run_module(): type='str', required=False, choices=['pack', 'spack'], - aliases=["spack"], + aliases=['spack'] ), xmit_log_data_set=dict( type='str', @@ -1995,7 +1995,7 @@ def run_module(): use_adrdssu=dict( type='bool', default=False, - aliases=["adrdssu"], + aliases=['adrdssu'] ) ), default=dict( @@ -2059,30 +2059,30 @@ def run_module(): if format_param.get('name') is not None: module.deprecate( - msg="The 'format.name' parameter will be deperecated. On 2.0.0 version use 'format.type' instead.", + msg="The 'format.name' parameter will be deprecated. On new version use 'format.type' instead.", version="2.0.0", collection_name='ibm.ibm_zos_core', ) if format_param.get('format_options') is not None: module.deprecate( - msg="The 'format.format_options' parameter will be deperecated. Use 'format.options' instead.", + msg="The 'format.format_options' parameter will be deprecated. Use 'format.options' instead.", version="2.0.0", collection_name='ibm.ibm_zos_core', ) - format_options = format_param['format_options'] + optopms_deprecate = format_param['format_options'] - if format_options.get('terse_pack') is not None: + if optopms_deprecate.get('terse_pack') is not None: module.deprecate( - msg="The 'format.format_options.terse_pack' parameter will be deperecated. Use 'format.format_options.spack' instead.", + msg="The 'format.format_options.terse_pack' parameter will be deprecated. On new version use 'format.format_options.spack' instead.", version="2.0.0", collection_name='ibm.ibm_zos_core', ) - if format_options.get('use_adrdssu') is not None: + if optopms_deprecate.get('use_adrdssu') is not None: module.deprecate( - msg="The 'format.format_options.use_adrdssu' parameter will be deperecated. Use 'format.format_options.adrdssu' instead.", + msg="The 'format.format_options.use_adrdssu' parameter will be deprecated. On new version use 'format.format_options.adrdssu' instead.", version="2.0.0", collection_name='ibm.ibm_zos_core', ) @@ -2093,6 +2093,7 @@ def run_module(): try: parser = better_arg_parser.BetterArgParser(arg_defs) parsed_args = parser.parse_args(module.params) + module.params = parsed_args except ValueError as err: module.fail_json(msg="Parameter verification failed", stderr=str(err)) diff --git a/plugins/modules/zos_copy.py b/plugins/modules/zos_copy.py index 29f54eefa6..f1e4185b2d 100644 --- a/plugins/modules/zos_copy.py +++ b/plugins/modules/zos_copy.py @@ -4215,14 +4215,14 @@ def main(): if module.params.get("force") is not None: module.deprecate( - msg="The 'force' parameter will be deperecated. Please use 'replace' instead.", + msg="The 'force' parameter will be deprecated. Please use 'replace' instead.", version="2.0.0", collection_name='ibm.ibm_zos_core', ) if module.params.get("force_lock") is not None: module.deprecate( - msg="The 'force_lock' parameter will be deperecated. For the next version please use 'force' instead.", + msg="The 'force_lock' parameter will be deprecated. For the next version please use 'force' instead.", version="2.0.0", collection_name='ibm.ibm_zos_core', ) diff --git a/plugins/modules/zos_unarchive.py b/plugins/modules/zos_unarchive.py index 581eb57c36..a16acad254 100644 --- a/plugins/modules/zos_unarchive.py +++ b/plugins/modules/zos_unarchive.py @@ -64,7 +64,6 @@ - Options specific to a compression format. type: dict required: false - aliases: [options] suboptions: xmit_log_data_set: description: @@ -85,7 +84,6 @@ a portable format after using C(xmit) or C(terse). type: bool default: False - aliases: [adrdssu] dest_volumes: description: - When I(use_adrdssu=True), specify the volume the data sets @@ -1604,7 +1602,6 @@ def run_module(): format_options=dict( type='dict', required=False, - aliases=['options'], options=dict( xmit_log_data_set=dict( type='str', @@ -1617,7 +1614,6 @@ def run_module(): use_adrdssu=dict( type='bool', default=False, - aliases=['adrdssu'] ) ) ), @@ -1710,7 +1706,6 @@ def run_module(): format_options=dict( type='dict', required=False, - aliases=['options'], options=dict( xmit_log_data_set=dict( type='str', @@ -1723,7 +1718,6 @@ def run_module(): use_adrdssu=dict( type='bool', default=False, - aliases=['adrdssu'] ), ), default=dict(xmit_log_data_set=""), @@ -1776,30 +1770,7 @@ def run_module(): parser = better_arg_parser.BetterArgParser(arg_defs) parsed_args = parser.parse_args(module.params) - format_param = module.params.get('format', {}) - if format_param.get('name') is not None: - module.deprecate( - msg="The 'format.name' parameter will be deperecated. For the next version use 'format.type' instead.", - version="2.0.0", - collection_name='ibm.ibm_zos_core', - ) - - if format_param.get('format_options') is not None: - module.deprecate( - msg="The 'format.format_options' parameter will be deperecated. Use 'format.options' instead.", - version="2.0.0", - collection_name='ibm.ibm_zos_core', - ) - - format_options = format_param['format_options'] - - if format_options.get('use_adrdssu') is not None: - module.deprecate( - msg="The 'format.format_options.use_adrdssu' parameter will be deperecated. Use 'format.format_options.adrdssu' instead.", - version="2.0.0", - collection_name='ibm.ibm_zos_core', - ) module.params = parsed_args except ValueError as err: From 3bf1ce8497ef01c94047542c9341d28e78899183 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Marcel=20Guti=C3=A9rrez=20Ben=C3=ADtez?= Date: Wed, 8 Oct 2025 12:26:18 -0600 Subject: [PATCH 11/15] Fix bad documentation --- plugins/modules/zos_archive.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/modules/zos_archive.py b/plugins/modules/zos_archive.py index 4b0e52f9f7..c3d8f5887f 100644 --- a/plugins/modules/zos_archive.py +++ b/plugins/modules/zos_archive.py @@ -87,7 +87,7 @@ choices: - pack - spack - aliases=['spack'] + aliases: [spack] xmit_log_data_set: description: - Provide the name of a data set to store xmit log output. From 9008e132fac55475d54b76caf1ab99fa415dee4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Marcel=20Guti=C3=A9rrez=20Ben=C3=ADtez?= Date: Wed, 8 Oct 2025 12:32:27 -0600 Subject: [PATCH 12/15] Restore unarchive --- plugins/modules/zos_unarchive.py | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/plugins/modules/zos_unarchive.py b/plugins/modules/zos_unarchive.py index a16acad254..13cf18366e 100644 --- a/plugins/modules/zos_unarchive.py +++ b/plugins/modules/zos_unarchive.py @@ -64,6 +64,7 @@ - Options specific to a compression format. type: dict required: false + aliases: [options] suboptions: xmit_log_data_set: description: @@ -84,6 +85,7 @@ a portable format after using C(xmit) or C(terse). type: bool default: False + aliases: [adrdssu] dest_volumes: description: - When I(use_adrdssu=True), specify the volume the data sets @@ -1602,6 +1604,7 @@ def run_module(): format_options=dict( type='dict', required=False, + aliases=['options'] options=dict( xmit_log_data_set=dict( type='str', @@ -1614,6 +1617,7 @@ def run_module(): use_adrdssu=dict( type='bool', default=False, + aliases=['adrdssu'] ) ) ), @@ -1706,6 +1710,7 @@ def run_module(): format_options=dict( type='dict', required=False, + aliases=['options'] options=dict( xmit_log_data_set=dict( type='str', @@ -1718,6 +1723,7 @@ def run_module(): use_adrdssu=dict( type='bool', default=False, + aliases=['adrdssu'] ), ), default=dict(xmit_log_data_set=""), @@ -1770,7 +1776,30 @@ def run_module(): parser = better_arg_parser.BetterArgParser(arg_defs) parsed_args = parser.parse_args(module.params) + format_param = module.params.get('format', {}) + if format_param.get('name') is not None: + module.deprecate( + msg="The 'format.name' parameter will be deperecated. For the next version use 'format.type' instead.", + version="2.0.0", + collection_name='ibm.ibm_zos_core', + ) + + if format_param.get('format_options') is not None: + module.deprecate( + msg="The 'format.format_options' parameter will be deperecated. Use 'format.options' instead.", + version="2.0.0", + collection_name='ibm.ibm_zos_core', + ) + + format_options = format_param['format_options'] + + if format_options.get('use_adrdssu') is not None: + module.deprecate( + msg="The 'format.format_options.use_adrdssu' parameter will be deperecated. Use 'format.format_options.adrdssu' instead.", + version="2.0.0", + collection_name='ibm.ibm_zos_core', + ) module.params = parsed_args except ValueError as err: From e9d29cd6045dec467375506534ee9bb442339f5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Marcel=20Guti=C3=A9rrez=20Ben=C3=ADtez?= Date: Wed, 8 Oct 2025 12:38:05 -0600 Subject: [PATCH 13/15] Fix unarchive documentation comma --- plugins/modules/zos_unarchive.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/modules/zos_unarchive.py b/plugins/modules/zos_unarchive.py index 13cf18366e..581eb57c36 100644 --- a/plugins/modules/zos_unarchive.py +++ b/plugins/modules/zos_unarchive.py @@ -1604,7 +1604,7 @@ def run_module(): format_options=dict( type='dict', required=False, - aliases=['options'] + aliases=['options'], options=dict( xmit_log_data_set=dict( type='str', @@ -1710,7 +1710,7 @@ def run_module(): format_options=dict( type='dict', required=False, - aliases=['options'] + aliases=['options'], options=dict( xmit_log_data_set=dict( type='str', From e1588db598a00bded48aa91036f71c08c260f153 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Marcel=20Guti=C3=A9rrez=20Ben=C3=ADtez?= Date: Wed, 8 Oct 2025 12:43:09 -0600 Subject: [PATCH 14/15] fix comment --- plugins/modules/zos_operator.py | 1 - 1 file changed, 1 deletion(-) diff --git a/plugins/modules/zos_operator.py b/plugins/modules/zos_operator.py index 136742931a..70022124b8 100644 --- a/plugins/modules/zos_operator.py +++ b/plugins/modules/zos_operator.py @@ -265,7 +265,6 @@ def run_module(): module.fail_json(msg="An error ocurred while importing ZOAU: {0}".format(opercmd.traceback)) try: - if module.params.get('wait_time_s') is not None: module.deprecate( msg="The 'wait_time_s' parameter will be deprecated. Please use 'wait_time' instead.", From eb2a3093b875ebfa9ad5de77d3ccb4defe259ee6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Marcel=20Guti=C3=A9rrez=20Ben=C3=ADtez?= Date: Wed, 8 Oct 2025 13:21:50 -0600 Subject: [PATCH 15/15] Add type aliases --- plugins/module_utils/better_arg_parser.py | 6 ------ plugins/modules/zos_archive.py | 5 ++++- plugins/modules/zos_unarchive.py | 5 ++++- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/plugins/module_utils/better_arg_parser.py b/plugins/module_utils/better_arg_parser.py index e5dd8e975c..2cca37a316 100644 --- a/plugins/module_utils/better_arg_parser.py +++ b/plugins/module_utils/better_arg_parser.py @@ -1108,12 +1108,6 @@ def _add_alias(self, arg_name, arg_aliases=None, aliases=None): aliases = {} arg_aliases.append(arg_name) for alternate_name in arg_aliases: - if aliases.get(alternate_name, arg_name) != arg_name: - raise ValueError( - 'Conflicting aliases "{0}" and "{1}" found for name "{2}"'.format( - aliases.get(alternate_name), alternate_name, arg_name - ) - ) aliases[alternate_name] = arg_name return aliases diff --git a/plugins/modules/zos_archive.py b/plugins/modules/zos_archive.py index c3d8f5887f..e502aa8549 100644 --- a/plugins/modules/zos_archive.py +++ b/plugins/modules/zos_archive.py @@ -65,6 +65,7 @@ - terse - xmit - pax + aliases: [type] format_options: description: - Options specific to a compression format. @@ -1878,6 +1879,7 @@ def run_module(): type='str', default='gz', choices=['bz2', 'gz', 'tar', 'zip', 'terse', 'xmit', 'pax'], + aliases=['type'], ), format_options=dict( type='dict', @@ -1976,6 +1978,7 @@ def run_module(): type='str', default='gz', choices=['bz2', 'gz', 'tar', 'zip', 'terse', 'xmit', 'pax'], + aliases=['type'], ), format_options=dict( type='dict', @@ -2059,7 +2062,7 @@ def run_module(): if format_param.get('name') is not None: module.deprecate( - msg="The 'format.name' parameter will be deprecated. On new version use 'format.type' instead.", + msg="The 'format.name' parameter will be deprecated. Please use 'format.type' instead.", version="2.0.0", collection_name='ibm.ibm_zos_core', ) diff --git a/plugins/modules/zos_unarchive.py b/plugins/modules/zos_unarchive.py index 581eb57c36..01630c8d24 100644 --- a/plugins/modules/zos_unarchive.py +++ b/plugins/modules/zos_unarchive.py @@ -59,6 +59,7 @@ - terse - xmit - pax + aliases: [type] format_options: description: - Options specific to a compression format. @@ -1600,6 +1601,7 @@ def run_module(): type='str', required=True, choices=['bz2', 'gz', 'tar', 'zip', 'terse', 'xmit', 'pax'], + aliases=['type'], ), format_options=dict( type='dict', @@ -1706,6 +1708,7 @@ def run_module(): type='str', required=True, choices=['bz2', 'gz', 'tar', 'zip', 'terse', 'xmit', 'pax'], + aliases=['type'], ), format_options=dict( type='dict', @@ -1780,7 +1783,7 @@ def run_module(): if format_param.get('name') is not None: module.deprecate( - msg="The 'format.name' parameter will be deperecated. For the next version use 'format.type' instead.", + msg="The 'format.name' parameter will be deperecated. Please use 'format.type' instead.", version="2.0.0", collection_name='ibm.ibm_zos_core', )