From 7ec113cf957efe63d6d6dc356ca728f91944ab52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Marcel=20Guti=C3=A9rrez=20Ben=C3=ADtez?= Date: Mon, 1 Apr 2024 10:12:07 -0600 Subject: [PATCH] Fix upper case and lower case --- plugins/modules/zos_mvs_raw.py | 180 +++++++++--------- .../modules/test_zos_mvs_raw_func.py | 62 +++--- 2 files changed, 121 insertions(+), 121 deletions(-) diff --git a/plugins/modules/zos_mvs_raw.py b/plugins/modules/zos_mvs_raw.py index 36a3b75eb..f59453d1b 100644 --- a/plugins/modules/zos_mvs_raw.py +++ b/plugins/modules/zos_mvs_raw.py @@ -96,16 +96,16 @@ - Maps to DSNTYPE on z/OS. type: str choices: - - library - - pds - - pdse - - large - - basic - - seq - - rrds - - esds - - lds - - ksds + - LIBRARY + - PSDS + - PDSE + - LARGE + - BASIC + - SEQ + - RRDS + - ESDS + - LDS + - KSDS disposition: description: - I(disposition) indicates the status of a data set. @@ -174,12 +174,12 @@ using I(space_primary) and I(space_secondary). type: str choices: - - trk - - cyl - - b - - k - - m - - g + - TRK + - CYL + - B + - K + - M + - G space_primary: description: - The primary amount of space to allocate for a new data set. @@ -325,11 +325,11 @@ - The format and characteristics of the records for new data set. type: str choices: - - u - - vb - - vba - - fb - - fba + - U + - VB + - VBA + - FB + - FBA return_content: description: - Determines how content should be returned to the user. @@ -505,11 +505,11 @@ a UNIX file would normally be treated as a stream of bytes. type: str choices: - - u - - vb - - vba - - fb - - fba + - U + - VB + - VBA + - FB + - FBA return_content: description: - Determines how content should be returned to the user. @@ -717,16 +717,16 @@ - Maps to DSNTYPE on z/OS. type: str choices: - - library - - pds - - pdse - - large - - basic - - seq - - rrds - - esds - - lds - - ksds + - LIBRARY + - PDS + - PDSE + - LARGE + - BASIC + - SEQ + - RRDS + - ESDS + - LDS + - KSDS disposition: description: - I(disposition) indicates the status of a data set. @@ -795,12 +795,12 @@ using I(space_primary) and I(space_secondary). type: str choices: - - trk - - cyl - - b - - k - - m - - g + - TRK + - CYL + - B + - K + - M + - G space_primary: description: - The primary amount of space to allocate for a new data set. @@ -946,11 +946,11 @@ - The format and characteristics of the records for new data set. type: str choices: - - u - - vb - - vba - - fb - - fba + - U + - VB + - VBA + - FB + - FBA return_content: description: - Determines how content should be returned to the user. @@ -1124,11 +1124,11 @@ a UNIX file would normally be treated as a stream of bytes. type: str choices: - - u - - vb - - vba - - fb - - fba + - U + - VB + - VBA + - FB + - FBA return_content: description: - Determines how content should be returned to the user. @@ -1300,13 +1300,13 @@ data_set_name: mypgm.output.ds disposition: new reuse: yes - type: seq + type: SEQ space_primary: 5 space_secondary: 1 - space_type: m + space_type: M volumes: - "000000" - record_format: fb + record_format: FB return_content: type: text - dd_input: @@ -1324,13 +1324,13 @@ data_set_name: mypgm.output.ds disposition: new reuse: yes - type: seq + type: SEQ space_primary: 5 space_secondary: 1 - space_type: m + space_type: M volumes: - "000000" - record_format: fb + record_format: FB return_content: type: text - dd_input: @@ -1369,13 +1369,13 @@ data_set_name: mypgm.output.ds disposition: new reuse: yes - type: seq + type: SEQ space_primary: 5 space_secondary: 1 - space_type: m + space_type: M volumes: - "000000" - record_format: fb + record_format: FB return_content: type: text - dd_input: @@ -1398,15 +1398,15 @@ disposition: new replace: yes backup: yes - type: seq + type: SEQ space_primary: 5 space_secondary: 1 - space_type: m + space_type: M volumes: - "000000" - "111111" - "SCR002" - record_format: fb + record_format: FB return_content: type: text - dd_input: @@ -1647,7 +1647,7 @@ def run_module(): type="str", choices=["delete", "keep", "catalog", "uncatalog", "catlg", "uncatlg"], ), - space_type=dict(type="str", choices=["trk", "cyl", "b", "k", "m", "g"]), + space_type=dict(type="str", choices=["TRK", "CYL", "B", "K", "M", "G"]), space_primary=dict(type="int"), space_secondary=dict(type="int"), volumes=dict(type="raw"), @@ -1660,16 +1660,16 @@ def run_module(): type=dict( type="str", choices=[ - "library", - "pds", - "pdse", - "seq", - "basic", - "large", - "ksds", - "rrds", - "lds", - "esds", + "LIBRARY", + "PDS", + "PDSE", + "SEQ", + "BASIC", + "LARGE", + "KSDS", + "RRDS", + "LDS", + "ESDS", ], ), encryption_key_1=dict( @@ -1691,7 +1691,7 @@ def run_module(): key_length=dict(type="int", no_log=False), key_offset=dict(type="int", no_log=False), record_length=dict(type="int"), - record_format=dict(type="str", choices=["u", "vb", "vba", "fb", "fba"]), + record_format=dict(type="str", choices=["U", "VB", "VBA", "FB", "FBA"]), return_content=dict( type="dict", options=dict( @@ -1766,7 +1766,7 @@ def run_module(): ), block_size=dict(type="int"), record_length=dict(type="int"), - record_format=dict(type="str", choices=["u", "vb", "vba", "fb", "fba"]), + record_format=dict(type="str", choices=["U", "VB", "VBA", "FB", "FBA"]), return_content=dict( type="dict", options=dict( @@ -1890,7 +1890,7 @@ def parse_and_validate_args(params): type="str", choices=["delete", "keep", "catalog", "uncatalog", "catlg", "uncatlg"], ), - space_type=dict(type="str", choices=["trk", "cyl", "b", "k", "m", "g"]), + space_type=dict(type="str", choices=["TRK", "CYL", "B", "K", "M", "G"]), space_primary=dict(type="int"), space_secondary=dict(type="int"), volumes=dict(type=volumes), @@ -1903,16 +1903,16 @@ def parse_and_validate_args(params): type=dict( type="str", choices=[ - "library", - "pds", - "pdse", - "seq", - "basic", - "large", - "ksds", - "rrds", - "lds", - "esds", + "LIBRARY", + "PDS", + "PDSE", + "SEQ", + "BASIC", + "LARGE", + "KSDS", + "RRDS", + "LDS", + "ESDS", ], ), encryption_key_1=dict( @@ -1936,7 +1936,7 @@ def parse_and_validate_args(params): type=key_offset, default=key_offset_default, dependencies=["type"] ), record_length=dict(type="int"), - record_format=dict(type="str", choices=["u", "vb", "vba", "fb", "fba"]), + record_format=dict(type="str", choices=["U", "VB", "VBA", "FB", "FBA"]), return_content=dict( type="dict", options=dict( @@ -1992,7 +1992,7 @@ def parse_and_validate_args(params): ), block_size=dict(type="int"), record_length=dict(type="int"), - record_format=dict(type="str", choices=["u", "vb", "vba", "fb", "fba"]), + record_format=dict(type="str", choices=["U", "VB", "VBA", "FB", "FBA"]), return_content=dict( type="dict", options=dict( diff --git a/tests/functional/modules/test_zos_mvs_raw_func.py b/tests/functional/modules/test_zos_mvs_raw_func.py index 88e598b05..baa50dba1 100644 --- a/tests/functional/modules/test_zos_mvs_raw_func.py +++ b/tests/functional/modules/test_zos_mvs_raw_func.py @@ -136,9 +136,9 @@ def test_list_cat_for_existing_data_set_with_tmp_hlq_option(ansible_zos_module, type="seq", space_primary=5, space_secondary=1, - space_type="m", + space_type="M", volumes=default_volume, - record_format="fb" + record_format="FB" ), ), dict(dd_input=dict(dd_name=SYSIN_DD, content=IDCAMS_STDIN)), @@ -172,7 +172,7 @@ def test_new_disposition_for_data_set_members(ansible_zos_module): dd_name=SYSPRINT_DD, data_set_name=DEFAULT_DATA_SET_WITH_MEMBER, disposition="new", - type="pds", + type="PDS", directory_blocks=15, return_content=dict(type="text"), ), @@ -267,11 +267,11 @@ def test_normal_dispositions_data_set(ansible_zos_module, normal_disposition, ch @pytest.mark.parametrize( "space_type,primary,secondary,expected", [ - ("trk", 3, 1, 169992), - ("cyl", 3, 1, 2549880), - ("b", 3, 1, 56664), - ("k", 3, 1, 56664), - ("m", 3, 1, 3003192), + ("TRK", 3, 1, 169992), + ("CYL", 3, 1, 2549880), + ("B", 3, 1, 56664), + ("K", 3, 1, 56664), + ("M", 3, 1, 3003192), ], ) def test_space_types(ansible_zos_module, space_type, primary, secondary, expected): @@ -288,7 +288,7 @@ def test_space_types(ansible_zos_module, space_type, primary, secondary, expecte dd_name=SYSPRINT_DD, data_set_name=default_data_set, disposition="new", - type="seq", + type="SEQ", space_primary=primary, space_secondary=secondary, space_type=space_type, @@ -315,7 +315,7 @@ def test_space_types(ansible_zos_module, space_type, primary, secondary, expecte @pytest.mark.parametrize( "data_set_type", - ["pds", "pdse", "large", "basic", "seq"], + ["PDS", "PDSE", "LARGE", "BASIC", "SEQ"], ) def test_data_set_types_non_vsam(ansible_zos_module, data_set_type, volumes_on_systems): try: @@ -351,7 +351,7 @@ def test_data_set_types_non_vsam(ansible_zos_module, data_set_type, volumes_on_s @pytest.mark.parametrize( "data_set_type", - ["ksds", "rrds", "lds", "esds"], + ["KSDS", "RRDS", "LDS", "ESDS"], ) def test_data_set_types_vsam(ansible_zos_module, data_set_type, volumes_on_systems): try: @@ -374,7 +374,7 @@ def test_data_set_types_vsam(ansible_zos_module, data_set_type, volumes_on_syste volumes=[volume_1], ), ) - if data_set_type != "ksds" + if data_set_type != "KSDS" else dict( dd_data_set=dict( dd_name=SYSPRINT_DD, @@ -400,7 +400,7 @@ def test_data_set_types_vsam(ansible_zos_module, data_set_type, volumes_on_syste @pytest.mark.parametrize( "record_format", - ["u", "vb", "vba", "fb", "fba"], + ["U", "VB", "VBA", "FB", "FBA"], ) def test_record_formats(ansible_zos_module, record_format, volumes_on_systems): try: @@ -544,7 +544,7 @@ def test_reuse_existing_data_set(ansible_zos_module): hosts = ansible_zos_module default_data_set = get_tmp_ds_name() hosts.all.zos_data_set( - name=default_data_set, type="seq", state="present", replace=True + name=default_data_set, type="SEQ", state="present", replace=True ) results = hosts.all.zos_mvs_raw( program_name="IDCAMS", @@ -555,7 +555,7 @@ def test_reuse_existing_data_set(ansible_zos_module): dd_name=SYSPRINT_DD, data_set_name=default_data_set, disposition="new", - type="seq", + type="SEQ", reuse=True, return_content=dict(type="text"), ), @@ -577,7 +577,7 @@ def test_replace_existing_data_set(ansible_zos_module): hosts = ansible_zos_module default_data_set = get_tmp_ds_name() hosts.all.zos_data_set( - name=default_data_set, type="seq", state="present", replace=True + name=default_data_set, type="SEQ", state="present", replace=True ) results = hosts.all.zos_mvs_raw( program_name="IDCAMS", @@ -588,7 +588,7 @@ def test_replace_existing_data_set(ansible_zos_module): dd_name=SYSPRINT_DD, data_set_name=default_data_set, disposition="new", - type="seq", + type="SEQ", replace=True, return_content=dict(type="text"), ), @@ -619,7 +619,7 @@ def test_replace_existing_data_set_make_backup(ansible_zos_module): dd_name=SYSPRINT_DD, data_set_name=default_data_set, disposition="new", - type="seq", + type="SEQ", replace=True, return_content=dict(type="text"), ), @@ -636,7 +636,7 @@ def test_replace_existing_data_set_make_backup(ansible_zos_module): dd_name=SYSPRINT_DD, data_set_name=default_data_set, disposition="new", - type="seq", + type="SEQ", replace=True, backup=True, return_content=dict(type="text"), @@ -687,7 +687,7 @@ def test_input_empty(ansible_zos_module): dd_name=SYSPRINT_DD, data_set_name=default_data_set, disposition="new", - type="seq", + type="SEQ", return_content=dict(type="text"), ), ), @@ -719,7 +719,7 @@ def test_input_large(ansible_zos_module): dd_name=SYSPRINT_DD, data_set_name=default_data_set, disposition="new", - type="seq", + type="SEQ", return_content=dict(type="text"), ), ), @@ -752,7 +752,7 @@ def test_input_provided_as_list(ansible_zos_module): dd_name=SYSPRINT_DD, data_set_name=default_data_set, disposition="new", - type="seq", + type="SEQ", return_content=dict(type="text"), ), ), @@ -792,7 +792,7 @@ def test_input_return_content_types(ansible_zos_module, return_content_type, exp dd_name=SYSPRINT_DD, data_set_name=default_data_set, disposition="new", - type="seq", + type="SEQ", ), ), dict( @@ -844,7 +844,7 @@ def test_input_return_text_content_encodings( dd_name=SYSPRINT_DD, data_set_name=default_data_set, disposition="new", - type="seq", + type="SEQ", ), ), dict( @@ -1164,7 +1164,7 @@ def test_file_record_length(ansible_zos_module, record_length): @pytest.mark.parametrize( "record_format", - ["u", "vb", "vba", "fb", "fba"], + ["U", "VB", "VBA", "FB", "FBA"], ) def test_file_record_format(ansible_zos_module, record_format): try: @@ -1353,7 +1353,7 @@ def test_concatenation_with_data_set_dd_and_response(ansible_zos_module): dd_data_set=dict( data_set_name=default_data_set, disposition="new", - type="seq", + type="SEQ", return_content=dict(type="text"), ) ), @@ -1361,7 +1361,7 @@ def test_concatenation_with_data_set_dd_and_response(ansible_zos_module): dd_data_set=dict( data_set_name=DEFAULT_DATA_SET_2, disposition="new", - type="seq", + type="SEQ", ) ), ], @@ -1405,7 +1405,7 @@ def test_concatenation_with_data_set_dd_with_replace_and_backup(ansible_zos_modu dd_data_set=dict( data_set_name=default_data_set, disposition="new", - type="seq", + type="SEQ", replace=True, backup=True, return_content=dict(type="text"), @@ -1415,7 +1415,7 @@ def test_concatenation_with_data_set_dd_with_replace_and_backup(ansible_zos_modu dd_data_set=dict( data_set_name=DEFAULT_DATA_SET_2, disposition="new", - type="seq", + type="SEQ", replace=True, backup=True, ) @@ -1482,7 +1482,7 @@ def test_concatenation_with_data_set_member(ansible_zos_module): dd_data_set=dict( data_set_name=DEFAULT_DATA_SET_2, disposition="new", - type="seq", + type="SEQ", ) ), ], @@ -1538,7 +1538,7 @@ def test_concatenation_with_unix_dd_and_response_datasets(ansible_zos_module): dd_data_set=dict( data_set_name=DEFAULT_DATA_SET_2, disposition="new", - type="seq", + type="SEQ", ) ), ],