ansible-collections / ibm_zos_core

Red Hat Ansible Certified Content for IBM Z
76 stars 44 forks source link

[Enabler] [zos_apf] Special character support #1380

Closed ddimatos closed 3 months ago

ddimatos commented 5 months ago

Enabler description

MVSDataSet(
            name = params.get("name"),
            record_format = params.get("record_format", None),
            volumes = params.get("volumes", None),
            data_set_type = params.get("type", None),
            block_size = params.get("block_size", None),
            record_length = params.get("record_length", None),
            space_primary = params.get("space_primary", None),
            space_secondary = params.get("space_secondary", None),
            space_type = params.get("space_type", None),
            directory_blocks = params.get("directory_blocks", None),
            key_length = params.get("key_length", None),
            key_offset = params.get("key_offset", None),
            sms_storage_class = params.get("sms_storage_class", None),
            sms_data_class = params.get("sms_data_class", None),
            sms_management_class = params.get("sms_management_class", None),
        )

Symbols support

Data set names in library option can contain different permitted symbols, goal is to add support into the module.

Changes done to the BetterArgParser should be adopted in the module to not break and use the correct escaped name in case of the data set name having a symbol in it.

- name: Add a library to the APF list
  zos_apf:
    library: USER.TE$T

For this task completion we need:

That way, the modules will have to retrieve the new escaped named and the original user provided name inside the dictionary like:

name = DataSet.escape_data_set_name(name)

Ansible module

zos_apf

richp405 commented 3 months ago

PR 1493 awaiting reviewers, but has passed testing already.