Skip to content

Commit 87218ea

Browse files
[Documentation][zos_apf] Add and standarize docstrings on modules/zos_apf.py (#1393)
* Add and standarize docstrings on modules/zos_apf.py * Add changelog fragment * Modified docstring --------- Co-authored-by: Fernando Flores <[email protected]>
1 parent ec630df commit 87218ea

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
trivial:
2+
- zos_apf - Updated docstrings to numpy style for visual aid to developers.
3+
(https://github.com/ansible-collections/ibm_zos_core/pull/1393).

plugins/modules/zos_apf.py

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,30 @@
312312

313313

314314
def backupOper(module, src, backup, tmphlq=None):
315+
"""Create a backup for a specified USS file or MVS data set.
316+
317+
Parameters
318+
----------
319+
module : AnsibleModule
320+
src : str
321+
Source USS file or data set to backup.
322+
backup : str
323+
Name for the backup.
324+
tmphlq : str
325+
The name of the temporary high level qualifier to use.
326+
327+
Returns
328+
-------
329+
str
330+
Backup name.
331+
332+
Raises
333+
------
334+
fail_json
335+
Data set type is NOT supported.
336+
fail_json
337+
Creating backup has failed.
338+
"""
315339
# analysis the file type
316340
ds_utils = data_set.DataSetUtils(src)
317341
file_type = ds_utils.ds_type()
@@ -336,6 +360,19 @@ def backupOper(module, src, backup, tmphlq=None):
336360

337361

338362
def main():
363+
"""Initialize the module.
364+
365+
Raises
366+
------
367+
fail_json
368+
Parameter verification failed.
369+
fail_json
370+
Marker length may not exceed 72 characters.
371+
fail_json
372+
library is required.
373+
fail_json
374+
An exception occurred.
375+
"""
339376
module = AnsibleModule(
340377
argument_spec=dict(
341378
library=dict(

0 commit comments

Comments
 (0)