Skip to content

Commit 032c1b2

Browse files
kiera-bennettledinaandrewhughes101Tom-Latham
authored
Casing change to space_type and input_location (#151)
* Casing change to space_type and input_location * Update rst files * Minor fixes and improvements * Ensure we set the module arg after tarnsforming it to lowercase * Cleanup plugins/modules/csd.py Co-authored-by: Tom Latham <[email protected]> --------- Co-authored-by: Ledina Hido-Evans <[email protected]> Co-authored-by: Andrew Hughes <[email protected]> Co-authored-by: Drew Hughes <[email protected]> Co-authored-by: Tom Latham <[email protected]>
1 parent 878e589 commit 032c1b2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+251
-225
lines changed

docs/source/modules/aux_temp_storage.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,13 @@ space_type
102102

103103
This option takes effect only when the auxiliary temporary storage data set is being created. If the data set already exists, the option has no effect.
104104

105-
The size can be specified in megabytes (\ :literal:`M`\ ), kilobytes (\ :literal:`K`\ ), records (\ :literal:`REC`\ ), cylinders (\ :literal:`CYL`\ ), or tracks (\ :literal:`TRK`\ ).
105+
The size can be specified in megabytes (\ :literal:`m`\ ), kilobytes (\ :literal:`k`\ ), records (\ :literal:`rec`\ ), cylinders (\ :literal:`cyl`\ ), or tracks (\ :literal:`trk`\ ).
106106

107107

108108
| **required**: False
109109
| **type**: str
110-
| **default**: REC
111-
| **choices**: M, K, REC, CYL, TRK
110+
| **default**: rec
111+
| **choices**: m, k, rec, cyl, trk
112112
113113

114114

@@ -162,7 +162,7 @@ Examples
162162
region_data_sets:
163163
template: "REGIONS.ABCD0001.<< data_set_name >>"
164164
space_primary: 50
165-
space_type: "M"
165+
space_type: "m"
166166
state: "initial"
167167

168168
- name: Retain the existing state of an auxiliary temporary storage data set defined by the template

docs/source/modules/aux_trace.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,13 +135,13 @@ space_type
135135

136136
This option takes effect only when the auxiliary trace data set is being created. If the data set already exists, the option has no effect.
137137

138-
The size can be specified in megabytes (\ :literal:`M`\ ), kilobytes (\ :literal:`K`\ ), cylinders (\ :literal:`CYL`\ ), or tracks (\ :literal:`TRK`\ ).
138+
The size can be specified in megabytes (\ :literal:`m`\ ), kilobytes (\ :literal:`k`\ ), cylinders (\ :literal:`cyl`\ ), or tracks (\ :literal:`trk`\ ).
139139

140140

141141
| **required**: False
142142
| **type**: str
143-
| **default**: M
144-
| **choices**: M, K, CYL, TRK
143+
| **default**: m
144+
| **choices**: m, k, cyl, trk
145145
146146

147147

docs/source/modules/csd.rst

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -73,19 +73,19 @@ input_content
7373
input_location
7474
The type of location from which to load the DFHCSDUP script.
7575

76-
Specify :literal:`DATA\_SET` to load from a PDS, PDSE, or sequential data set.
76+
Specify :literal:`data\_set` to load from a PDS, PDSE, or sequential data set.
7777

78-
Specify :literal:`USS` to load from a file on UNIX System Services (USS).
78+
Specify :literal:`uss` to load from a file on UNIX System Services (USS).
7979

80-
Specify :literal:`LOCAL` to load from a file local to the Ansible control node.
80+
Specify :literal:`local` to load from a file local to the Ansible control node.
8181

82-
Specify :literal:`INLINE` to allow a script to be passed directly through the :literal:`input\_content` parameter.
82+
Specify :literal:`inline` to allow a script to be passed directly through the :literal:`input\_content` parameter.
8383

8484

8585
| **required**: False
8686
| **type**: str
87-
| **default**: DATA_SET
88-
| **choices**: DATA_SET, USS, LOCAL, INLINE
87+
| **default**: data_set
88+
| **choices**: data_set, uss, local, inline
8989
9090

9191

@@ -198,13 +198,13 @@ space_type
198198

199199
This option takes effect only when the CSD is being created. If the CSD already exists, the option has no effect.
200200

201-
The size can be specified in megabytes (\ :literal:`M`\ ), kilobytes (\ :literal:`K`\ ), records (\ :literal:`REC`\ ), cylinders (\ :literal:`CYL`\ ), or tracks (\ :literal:`TRK`\ ).
201+
The size can be specified in megabytes (\ :literal:`m`\ ), kilobytes (\ :literal:`k`\ ), records (\ :literal:`rec`\ ), cylinders (\ :literal:`cyl`\ ), or tracks (\ :literal:`trk`\ ).
202202

203203

204204
| **required**: False
205205
| **type**: str
206-
| **default**: M
207-
| **choices**: M, K, REC, CYL, TRK
206+
| **default**: m
207+
| **choices**: m, k, rec, cyl, trk
208208
209209

210210

@@ -266,7 +266,7 @@ Examples
266266
cics_data_sets:
267267
template: "CICSTS61.CICS.<< lib_name >>"
268268
space_primary: 10
269-
space_type: "M"
269+
space_type: "m"
270270
state: "initial"
271271

272272
- name: Delete a CSD defined by the template
@@ -310,7 +310,7 @@ Examples
310310
cics_data_sets:
311311
template: "CICSTS61.CICS.<< lib_name >>"
312312
state: "changed"
313-
input_location: "DATA_SET"
313+
input_location: "data_set"
314314
input_src: "TESTER.DEFS.SCRIPT"
315315

316316
- name: Run a DFHCSDUP script from a USS file
@@ -320,7 +320,7 @@ Examples
320320
cics_data_sets:
321321
template: "CICSTS61.CICS.<< lib_name >>"
322322
state: changed
323-
input_location: "USS"
323+
input_location: "uss"
324324
input_src: "/u/tester/defs/script.csdup"
325325

326326
- name: Run a DFHCSDUP script from a local file
@@ -330,7 +330,7 @@ Examples
330330
cics_data_sets:
331331
template: "CICSTS61.CICS.<< lib_name >>"
332332
state: changed
333-
input_location: "LOCAL"
333+
input_location: "local"
334334
input_src: "/User/tester/defs/script.csdup"
335335

336336
- name: Run a DFHCSDUP script inline
@@ -340,7 +340,7 @@ Examples
340340
cics_data_sets:
341341
template: "CICSTS61.CICS.<< lib_name >>"
342342
state: changed
343-
input_location: "INLINE"
343+
input_location: "inline"
344344
input_content: |
345345
DEFINE PROGRAM(TESTPRG1) GROUP(TESTGRP1)
346346
DEFINE PROGRAM(TESTPRG2) GROUP(TESTGRP2)

docs/source/modules/global_catalog.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -132,13 +132,13 @@ space_type
132132

133133
This option takes effect only when the global catalog data set is being created. If the global catalog data set already exists, the option has no effect.
134134

135-
The size can be specified in megabytes (\ :literal:`M`\ ), kilobytes (\ :literal:`K`\ ), records (\ :literal:`REC`\ ), cylinders (\ :literal:`CYL`\ ), or tracks (\ :literal:`TRK`\ ).
135+
The size can be specified in megabytes (\ :literal:`m`\ ), kilobytes (\ :literal:`k`\ ), records (\ :literal:`rec`\ ), cylinders (\ :literal:`cyl`\ ), or tracks (\ :literal:`trk`\ ).
136136

137137

138138
| **required**: False
139139
| **type**: str
140-
| **default**: M
141-
| **choices**: M, K, REC, CYL, TRK
140+
| **default**: m
141+
| **choices**: m, k, rec, cyl, trk
142142
143143

144144

@@ -191,7 +191,7 @@ Examples
191191
cics_data_sets:
192192
template: "CICSTS61.CICS.<< lib_name >>"
193193
space_primary: 100
194-
space_type: "M"
194+
space_type: "m"
195195
state: "initial"
196196

197197
- name: Initialize a large user specified global catalog
@@ -202,7 +202,7 @@ Examples
202202
cics_data_sets:
203203
sdfhload: "CICSTS61.CICS.SDFHLOAD"
204204
space_primary: 100
205-
space_type: "M"
205+
space_type: "m"
206206
state: "initial"
207207

208208
- name: Set the autostart override record to AUTOASIS for a global catalog defined by the template

docs/source/modules/local_catalog.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,13 +132,13 @@ space_type
132132

133133
This option takes effect only when the local catalog data set is being created. If the local catalog data set already exists, the option has no effect.
134134

135-
The size can be specified in megabytes (\ :literal:`M`\ ), kilobytes (\ :literal:`K`\ ), records (\ :literal:`REC`\ ), cylinders (\ :literal:`CYL`\ ), or tracks (\ :literal:`TRK`\ ).
135+
The size can be specified in megabytes (\ :literal:`m`\ ), kilobytes (\ :literal:`k`\ ), records (\ :literal:`rec`\ ), cylinders (\ :literal:`cyl`\ ), or tracks (\ :literal:`trk`\ ).
136136

137137

138138
| **required**: False
139139
| **type**: str
140-
| **default**: REC
141-
| **choices**: M, K, REC, CYL, TRK
140+
| **default**: rec
141+
| **choices**: m, k, rec, cyl, trk
142142
143143

144144

@@ -198,7 +198,7 @@ Examples
198198
cics_data_sets:
199199
template: "CICSTS61.CICS.<< lib_name >>"
200200
space_primary: 500
201-
space_type: "REC"
201+
space_type: "rec"
202202
state: "initial"
203203

204204
- name: Retain the existing local catalog defined by the template

docs/source/modules/local_request_queue.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,13 @@ space_type
102102

103103
This option takes effect only when the local request queue data set is being created. If the data set already exists, the option has no effect.
104104

105-
The size can be specified in megabytes (\ :literal:`M`\ ), kilobytes (\ :literal:`K`\ ), records (\ :literal:`REC`\ ), cylinders (\ :literal:`CYL`\ ), or tracks (\ :literal:`TRK`\ ).
105+
The size can be specified in megabytes (\ :literal:`m`\ ), kilobytes (\ :literal:`k`\ ), records (\ :literal:`rec`\ ), cylinders (\ :literal:`cyl`\ ), or tracks (\ :literal:`trk`\ ).
106106

107107

108108
| **required**: False
109109
| **type**: str
110-
| **default**: M
111-
| **choices**: M, K, REC, CYL, TRK
110+
| **default**: m
111+
| **choices**: m, k, rec, cyl, trk
112112
113113

114114

@@ -162,7 +162,7 @@ Examples
162162
region_data_sets:
163163
template: "REGIONS.ABCD0001.<< data_set_name >>"
164164
space_primary: 50
165-
space_type: "M"
165+
space_type: "m"
166166
state: "initial"
167167

168168
- name: Retain the existing state of a local request queue data set defined by the template

docs/source/modules/region_jcl.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3474,7 +3474,7 @@ space_type
34743474

34753475
This option takes effect only when the CICS startup JCL data set is being created. If the CICS startup JCL data set already exists, the option has no effect.
34763476

3477-
The size can be specified in megabytes (\ :literal:`M`\ ), kilobytes (\ :literal:`K`\ ), cylinders (\ :literal:`CYL`\ ), or tracks (\ :literal:`TRK`\ ).
3477+
The size can be specified in megabytes (\ :literal:`m`\ ), kilobytes (\ :literal:`k`\ ), cylinders (\ :literal:`cyl`\ ), or tracks (\ :literal:`trk`\ ).
34783478

34793479
If neither :literal:`space\_secondary` nor :literal:`space\_primary` is set, then this value does not have any effect.
34803480

@@ -3483,8 +3483,8 @@ space_type
34833483

34843484
| **required**: False
34853485
| **type**: str
3486-
| **default**: M
3487-
| **choices**: M, K, CYL, TRK
3486+
| **default**: m
3487+
| **choices**: m, k, cyl, trk
34883488
34893489

34903490

docs/source/modules/td_intrapartition.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,13 @@ space_type
102102

103103
This option takes effect only when the transient data intrapartition data set is being created. If the data set already exists, the option has no effect.
104104

105-
The size can be specified in megabytes (\ :literal:`M`\ ), kilobytes (\ :literal:`K`\ ), records (\ :literal:`REC`\ ), cylinders (\ :literal:`CYL`\ ), or tracks (\ :literal:`TRK`\ ).
105+
The size can be specified in megabytes (\ :literal:`m`\ ), kilobytes (\ :literal:`k`\ ), records (\ :literal:`rec`\ ), cylinders (\ :literal:`cyl`\ ), or tracks (\ :literal:`trk`\ ).
106106

107107

108108
| **required**: False
109109
| **type**: str
110-
| **default**: REC
111-
| **choices**: M, K, REC, CYL, TRK
110+
| **default**: rec
111+
| **choices**: m, k, rec, cyl, trk
112112
113113

114114

@@ -162,7 +162,7 @@ Examples
162162
region_data_sets:
163163
template: "REGIONS.ABCD0001.<< data_set_name >>"
164164
space_primary: 50
165-
space_type: "M"
165+
space_type: "m"
166166
state: "initial"
167167

168168
- name: Retain the existing state of a transient data intrapartition data set data set defined by the template

docs/source/modules/transaction_dump.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,13 +133,13 @@ space_type
133133

134134
This option takes effect only when the transaction dump data set is being created. If the data set already exists, the option has no effect.
135135

136-
The size can be specified in megabytes (\ :literal:`M`\ ), kilobytes (\ :literal:`K`\ ), cylinders (\ :literal:`CYL`\ ), or tracks (\ :literal:`TRK`\ ).
136+
The size can be specified in megabytes (\ :literal:`m`\ ), kilobytes (\ :literal:`k`\ ), cylinders (\ :literal:`cyl`\ ), or tracks (\ :literal:`trl`\ ).
137137

138138

139139
| **required**: False
140140
| **type**: str
141-
| **default**: M
142-
| **choices**: M, K, CYL, TRK
141+
| **default**: m
142+
| **choices**: m, k, cyl, trk
143143
144144

145145

plugins/action/csd.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ def run(self, tmp=None, task_vars=None):
2121

2222
def _process_module_args(self, module_args, _templar, ds_name, task_vars, cics_data_sets_required):
2323
super(ActionModule, self)._process_module_args(module_args, _templar, ds_name, task_vars, cics_data_sets_required)
24-
input_location = module_args.get(INPUT_LOCATION)
25-
if input_location == LOCAL:
26-
input_src = module_args.get(INPUT_SOURCE)
27-
with open(input_src, 'r') as input_file:
28-
module_args[INPUT_CONTENT] = input_file.read()
24+
if module_args.get(INPUT_LOCATION):
25+
module_args[INPUT_LOCATION] = module_args[INPUT_LOCATION].lower()
26+
if module_args[INPUT_LOCATION] == LOCAL and module_args.get(INPUT_SOURCE):
27+
with open(module_args[INPUT_SOURCE], 'r') as input_file:
28+
module_args[INPUT_CONTENT] = input_file.read()

0 commit comments

Comments
 (0)