diff --git a/dev-requirements.txt b/dev-requirements.txt index 9aa92887..3f7fbd22 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -9,7 +9,7 @@ pytest-xdist==1.34.0 # Need this to work around a problem running ansible-test pytest==4.6.11; python_version < '3' pytest==6.2.1; python_version >= '3' # Non-test requirements (python 3+ only) -pylint==2.6.0; python_version >= '3' +pylint==2.5.3; python_version >= '3' shellcheck-py==0.7.1.1; python_version >= '3' rstcheck==3.3.1; python_version >= '3' yamllint==1.25.0; python_version >= '3' diff --git a/docs/source/release_notes.rst b/docs/source/release_notes.rst index 7fc3c8e7..aec112d4 100644 --- a/docs/source/release_notes.rst +++ b/docs/source/release_notes.rst @@ -7,7 +7,7 @@ Releases ======== -Version 1.0.0 +Version 1.0.1 ============= What's New diff --git a/docs/source/requirements_managed.rst b/docs/source/requirements_managed.rst index a509d640..8ebfa357 100644 --- a/docs/source/requirements_managed.rst +++ b/docs/source/requirements_managed.rst @@ -21,6 +21,7 @@ The requirements of the managed node are as follows: * `requests`_ * `xmltodict`_ + * `typing`_ (For python versions < 3.5) If you delegate the tasks to run on your localhost, the Python module dependencies need to be installed on your localhost instead. @@ -40,6 +41,9 @@ The requirements of the managed node are as follows: .. _xmltodict: https://pypi.org/project/xmltodict/ +.. _typing: + https://pypi.org/project/typing/ + .. _CICS sample playbook: https://github.com/IBM/z_ansible_collections_samples/tree/master/cics/cmci/reporting diff --git a/galaxy.yml b/galaxy.yml index b97c3479..2a3ed3ce 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -5,7 +5,7 @@ namespace: ibm name: ibm_zos_cics # The collection version -version: 1.0.0 +version: 1.0.1 # Collection README file readme: README.md diff --git a/plugins/doc_fragments/cmci.py b/plugins/doc_fragments/cmci.py index 33134060..a84d9e80 100644 --- a/plugins/doc_fragments/cmci.py +++ b/plugins/doc_fragments/cmci.py @@ -72,8 +72,7 @@ class ModuleDocFragment(object): C(PLEX1). To determine whether a CMAS can be specified as I(context), see the B(CMAS context) entry in the CICSPlex SM resource table reference of a resource. For example, according to the - L(PROGRAM resource table, - https://www.ibm.com/support/knowledgecenter/en/SSGMCP_5.6.0/reference-cpsm-restables/cpsm-restables/PROGRAMtab.html), + L(PROGRAM resource table,https://www.ibm.com/support/knowledgecenter/en/SSGMCP_5.6.0/reference-cpsm-restables/cpsm-restables/PROGRAMtab.html), CMAS context is not supported for PROGRAM. - If CMCI is installed in a single region (SMSS), I(context) is the APPLID of the CICS region associate with the request. @@ -96,8 +95,8 @@ class ModuleDocFragment(object): description: - The CMCI external resource name that maps to the target CICS or CICSPlex SM resource type. - For a list of CMCI external resource names, see L(CMCI resource names, - https://www.ibm.com/support/knowledgecenter/SSGMCP_5.6.0/reference-system-programming/cmci/clientapi_resources.html). + For a list of CMCI external resource names, see + L(CMCI resource names,https://www.ibm.com/support/knowledgecenter/SSGMCP_5.6.0/reference-system-programming/cmci/clientapi_resources.html). type: str required: true scheme: @@ -139,13 +138,12 @@ class ModuleDocFragment(object): - To use more complicated filter expressions, including a range of different filter operators, and the ability to compose filters with C(and) and C(or) operators, see the C(complex_filter) parameter. - - For examples, see "Examples" in M(cmci_get). - - For more details, see L(How to build a filter expression, - https://www.ibm.com/support/knowledgecenter/SSGMCP_5.6.0/system-programming/cpsm/eyup1a0.html). + - For more details, see + L(How to build a filter expression,https://www.ibm.com/support/knowledgecenter/SSGMCP_5.6.0/system-programming/cpsm/eyup1a0.html). + - For examples, see M(cmci_get) - For supported attributes of different resource types, see their resource table reference, for example, - L(PROGDEF resource table reference, - https://www.ibm.com/support/knowledgecenter/en/SSGMCP_5.6.0/reference-cpsm-restables/cpsm-restables/PROGDEFtab.html). + L(PROGDEF resource table reference,https://www.ibm.com/support/knowledgecenter/en/SSGMCP_5.6.0/reference-cpsm-restables/cpsm-restables/PROGDEFtab.html). type: dict required: false complex_filter: @@ -192,9 +190,8 @@ class ModuleDocFragment(object): description: - The name of a resource table attribute on which to filter. - For supported attributes of different resource types, see their - resource table reference, for example, L(PROGDEF resource table - reference, - https://www.ibm.com/support/knowledgecenter/en/SSGMCP_5.6.0/reference-cpsm-restables/cpsm-restables/PROGDEFtab.html). + resource table reference, for example, + L(PROGDEF resource table reference, https://www.ibm.com/support/knowledgecenter/en/SSGMCP_5.6.0/reference-cpsm-restables/cpsm-restables/PROGDEFtab.html). type: str required: false operator: @@ -227,8 +224,7 @@ class ModuleDocFragment(object): - The value by which you are to filter the resource attributes. - The value must be a valid one for the resource table attribute as documented in the resource table reference, for example, - L(PROGDEF resource table reference, - https://www.ibm.com/support/knowledgecenter/en/SSGMCP_5.6.0/reference-cpsm-restables/cpsm-restables/PROGDEFtab.html). + L(PROGDEF resource table reference,https://www.ibm.com/support/knowledgecenter/en/SSGMCP_5.6.0/reference-cpsm-restables/cpsm-restables/PROGDEFtab.html). type: str required: false get_parameters: @@ -239,8 +235,8 @@ class ModuleDocFragment(object): the target resource type, as valid parameters for the GET operation in the "Valid CPSM operations" table. For example, the valid parameters for identifying a PROGDEF resource are CICSSYS, CSDGROUP and RESGROUP, - as found in the L(PROGDEF resource table reference, - https://www.ibm.com/support/knowledgecenter/en/SSGMCP_5.6.0/reference-cpsm-restables/cpsm-restables/PROGDEFtab.html). + as found in the + L(PROGDEF resource table reference,https://www.ibm.com/support/knowledgecenter/en/SSGMCP_5.6.0/reference-cpsm-restables/cpsm-restables/PROGDEFtab.html). type: list elements: dict suboptions: @@ -261,8 +257,8 @@ class ModuleDocFragment(object): description: - The resource attributes to be created or updated. Available attributes can be found in the CICSPlex® SM resource table reference for the - target resource type, for example, L(PROGDEF resource table reference, - https://www.ibm.com/support/knowledgecenter/en/SSGMCP_5.6.0/reference-cpsm-restables/cpsm-restables/PROGDEFtab.html). + target resource type, for example, + L(PROGDEF resource table reference,https://www.ibm.com/support/knowledgecenter/en/SSGMCP_5.6.0/reference-cpsm-restables/cpsm-restables/PROGDEFtab.html). type: dict required: false ''' diff --git a/plugins/modules/cmci_action.py b/plugins/modules/cmci_action.py index 91b2caf2..6dd36c7a 100644 --- a/plugins/modules/cmci_action.py +++ b/plugins/modules/cmci_action.py @@ -15,10 +15,10 @@ - Perform actions on CICS® or CICSPlex® SM definitions and resources, by initiating PUT requests via the CMCI REST API. The CMCI REST API can be configured in CICSPlex SM or stand-alone regions (SMSS). For information - about the API, see L(CMCI REST API, - https://www.ibm.com/support/knowledgecenter/SSGMCP_5.6.0/reference-system-programming/cmci/clientapi_overview.html). - For information about how to compose PUT requests, see L(CMCI PUT requests, - https://www.ibm.com/support/knowledgecenter/SSGMCP_5.6.0/reference-system-programming/cmci/clientapi_put.html). + about the API, see + L(CMCI REST API,https://www.ibm.com/support/knowledgecenter/SSGMCP_5.6.0/reference-system-programming/cmci/clientapi_overview.html). + For information about how to compose PUT requests, see + L(CMCI PUT requests,https://www.ibm.com/support/knowledgecenter/SSGMCP_5.6.0/reference-system-programming/cmci/clientapi_put.html). author: - Stewart Francis (@stewartfrancis) - Tom Latham (@Tom-Latham) @@ -32,8 +32,8 @@ description: > The name of the target action. To find the name of the appropriate action, consult the CICSPlex SM resource tables for the target resource type. For - example, the L(PROGRAM resource table reference, - https://www.ibm.com/support/knowledgecenter/en/SSGMCP_5.6.0/reference-cpsm-restables/cpsm-restables/PROGRAMtab.html) + example, the + L(PROGRAM resource table reference,https://www.ibm.com/support/knowledgecenter/en/SSGMCP_5.6.0/reference-cpsm-restables/cpsm-restables/PROGRAMtab.html) lists the eligible actions for CICS programs. type: str required: true @@ -45,8 +45,7 @@ listed in the PERFORM SET operation section of the "Valid CPSM operations" table. For example, the valid parameters for a PROGDEF CSDCOPY action are C(AS_RESOURCE), C(DUPACTION) and C(TO_CSDGROUP), as found in the - L(PROGDEF resource table reference, - https://www.ibm.com/support/knowledgecenter/en/SSGMCP_5.6.0/reference-cpsm-restables/cpsm-restables/PROGDEFtab.html). + L(PROGDEF resource table reference,https://www.ibm.com/support/knowledgecenter/en/SSGMCP_5.6.0/reference-cpsm-restables/cpsm-restables/PROGDEFtab.html). type: list elements: dict suboptions: @@ -262,11 +261,9 @@ class AnsibleCMCIInstallModule(AnsibleCMCIModule): def __init__(self): - # pylint: disable=super-with-arguments super(AnsibleCMCIInstallModule, self).__init__('PUT') def init_argument_spec(self): # type: () -> Dict - # pylint: disable=super-with-arguments argument_spec = super(AnsibleCMCIInstallModule, self)\ .init_argument_spec() argument_spec.update({ diff --git a/plugins/modules/cmci_create.py b/plugins/modules/cmci_create.py index 2339c978..717ed4d1 100644 --- a/plugins/modules/cmci_create.py +++ b/plugins/modules/cmci_create.py @@ -15,11 +15,10 @@ - Create definitional CICS® or CICSPlex® SM resources in CSD and BAS repositories, by initiating POST requests via the CMCI REST API. The CMCI REST API can be configured in CICSPlex SM or stand-alone regions (SMSS). For - information about the API, see L(CMCI REST API, - https://www.ibm.com/support/knowledgecenter/SSGMCP_5.6.0/reference-system-programming/cmci/clientapi_overview.html). + information about the API, see + L(CMCI REST API,https://www.ibm.com/support/knowledgecenter/SSGMCP_5.6.0/reference-system-programming/cmci/clientapi_overview.html). For information about how to compose POST requests, see - L(CMCI POST requests, - https://www.ibm.com/support/knowledgecenter/SSGMCP_5.6.0/reference-system-programming/cmci/clientapi_post.html). + L(CMCI POST requests,https://www.ibm.com/support/knowledgecenter/SSGMCP_5.6.0/reference-system-programming/cmci/clientapi_post.html). author: - Stewart Francis (@stewartfrancis) - Tom Latham (@Tom-Latham) @@ -36,8 +35,8 @@ table reference for the target resource type, as listed in the CREATE operation section of the "Valid CPSM operations" table. For example, the valid parameters for a PROGDEF CREATE operation are CSD and RESGROUP, as - found in the L(PROGDEF resource table reference, - https://www.ibm.com/support/knowledgecenter/en/SSGMCP_5.6.0/reference-cpsm-restables/cpsm-restables/PROGDEFtab.html). + found in the + L(PROGDEF resource table reference,https://www.ibm.com/support/knowledgecenter/en/SSGMCP_5.6.0/reference-cpsm-restables/cpsm-restables/PROGDEFtab.html). type: list elements: dict suboptions: @@ -229,11 +228,9 @@ class AnsibleCMCICreateModule(AnsibleCMCIModule): def __init__(self): - # pylint: disable=super-with-arguments super(AnsibleCMCICreateModule, self).__init__('POST') def init_argument_spec(self): # type: () -> Dict - # pylint: disable=super-with-arguments argument_spec = super(AnsibleCMCICreateModule, self)\ .init_argument_spec() argument_spec.update(parameters_argument(CREATE_PARAMETERS)) diff --git a/plugins/modules/cmci_delete.py b/plugins/modules/cmci_delete.py index 73165f27..87bdd1cc 100644 --- a/plugins/modules/cmci_delete.py +++ b/plugins/modules/cmci_delete.py @@ -15,11 +15,10 @@ - Remove or discard definitional or installed CICS® and CICSPlex® SM resources from CICS regions, by initiating DELETE requests via the CMCI REST API. The CMCI REST API can be configured in CICSPlex SM or stand-alone regions - (SMSS). For information about the API, see L(CMCI REST API, - https://www.ibm.com/support/knowledgecenter/SSGMCP_5.6.0/reference-system-programming/cmci/clientapi_overview.html). - For information about how to compose DELETE requests, see L(CMCI DELETE - requests, - https://www.ibm.com/support/knowledgecenter/SSGMCP_5.6.0/reference-system-programming/cmci/clientapi_delete.html). + (SMSS). For information about the API, see + L(CMCI REST API,https://www.ibm.com/support/knowledgecenter/SSGMCP_5.6.0/reference-system-programming/cmci/clientapi_overview.html). + For information about how to compose DELETE requests, see + L(CMCI DELETE requests, https://www.ibm.com/support/knowledgecenter/SSGMCP_5.6.0/reference-system-programming/cmci/clientapi_delete.html). author: - Stewart Francis (@stewartfrancis) - Tom Latham (@Tom-Latham) @@ -218,11 +217,9 @@ class AnsibleCMCIDeleteModule(AnsibleCMCIModule): def __init__(self): - # pylint: disable=super-with-arguments super(AnsibleCMCIDeleteModule, self).__init__('DELETE') def init_argument_spec(self): # type: () -> Dict - # pylint: disable=super-with-arguments argument_spec = super(AnsibleCMCIDeleteModule, self)\ .init_argument_spec() argument_spec.update(RESOURCES_ARGUMENT) diff --git a/plugins/modules/cmci_get.py b/plugins/modules/cmci_get.py index 1c51b38e..19eb36ce 100644 --- a/plugins/modules/cmci_get.py +++ b/plugins/modules/cmci_get.py @@ -15,10 +15,10 @@ - Get information about installed and definitional CICS® and CICSPlex® SM resources from CICS regions, by initiating GET requests via the CMCI REST API. The CMCI REST API can be configured in CICSPlex SM or stand-alone - regions (SMSS). For information about the API, see L(CMCI REST API, - https://www.ibm.com/support/knowledgecenter/SSGMCP_5.6.0/reference-system-programming/cmci/clientapi_overview.html). - For information about how to compose GET requests, see L(CMCI GET requests, - https://www.ibm.com/support/knowledgecenter/SSGMCP_5.6.0/reference-system-programming/cmci/clientapi_get.html). + regions (SMSS). For information about the API, see + L(CMCI REST API,https://www.ibm.com/support/knowledgecenter/SSGMCP_5.6.0/reference-system-programming/cmci/clientapi_overview.html). + For information about how to compose GET requests, see + L(CMCI GET requests,https://www.ibm.com/support/knowledgecenter/SSGMCP_5.6.0/reference-system-programming/cmci/clientapi_get.html). author: - Stewart Francis (@stewartfrancis) - Tom Latham (@Tom-Latham) @@ -268,11 +268,9 @@ class AnsibleCMCIGetModule(AnsibleCMCIModule): def __init__(self): - # pylint: disable=super-with-arguments super(AnsibleCMCIGetModule, self).__init__('GET') def init_argument_spec(self): # type: () -> Dict - # pylint: disable=super-with-arguments argument_spec = super(AnsibleCMCIGetModule, self).init_argument_spec() argument_spec.update({ _RECORD_COUNT: { @@ -286,7 +284,6 @@ def init_request_params(self): # type: () -> Optional[Dict[str, str]] return self.get_resources_request_params() def init_url(self): # type: () -> str - # pylint: disable=super-with-arguments url = super(AnsibleCMCIGetModule, self).init_url() if self._p.get(_RECORD_COUNT): diff --git a/plugins/modules/cmci_update.py b/plugins/modules/cmci_update.py index f25685e9..8d58e2d7 100644 --- a/plugins/modules/cmci_update.py +++ b/plugins/modules/cmci_update.py @@ -15,11 +15,10 @@ - Make changes to CICS® and CICSPlex® SM resources in CICS regions, by initiating PUT requests via the CMCI REST API. The CMCI REST API can be configured in CICSPlex SM or stand-alone regions (SMSS). For information - about the API, - see L(CMCI REST API, - https://www.ibm.com/support/knowledgecenter/SSGMCP_5.6.0/reference-system-programming/cmci/clientapi_overview.html). - For information about how to compose PUT requests, see L(CMCI PUT requests, - https://www.ibm.com/support/knowledgecenter/SSGMCP_5.6.0/reference-system-programming/cmci/clientapi_put.html). + about the API, see + L(CMCI REST API, https://www.ibm.com/support/knowledgecenter/SSGMCP_5.6.0/reference-system-programming/cmci/clientapi_overview.html). + For information about how to compose PUT requests, see + L(CMCI PUT requests,https://www.ibm.com/support/knowledgecenter/SSGMCP_5.6.0/reference-system-programming/cmci/clientapi_put.html). author: - Stewart Francis (@stewartfrancis) - Tom Latham (@Tom-Latham) @@ -37,8 +36,8 @@ table reference for the target resource type, as listed in the UPDATE operation section of the "Valid CPSM operations" table. For example, the only valid parameter for a PROGDEF UPDATE operation is CSD, as found in - the L(PROGDEF resource table reference, - https://www.ibm.com/support/knowledgecenter/en/SSGMCP_5.6.0/reference-cpsm-restables/cpsm-restables/PROGDEFtab.html). + the + L(PROGDEF resource table reference,https://www.ibm.com/support/knowledgecenter/en/SSGMCP_5.6.0/reference-cpsm-restables/cpsm-restables/PROGDEFtab.html). type: list elements: dict suboptions: @@ -235,11 +234,9 @@ class AnsibleCMCIUpdateModule(AnsibleCMCIModule): def __init__(self): - # pylint: disable=super-with-arguments super(AnsibleCMCIUpdateModule, self).__init__('PUT') def init_argument_spec(self): # type: () -> Dict - # pylint: disable=super-with-arguments argument_spec = super(AnsibleCMCIUpdateModule, self)\ .init_argument_spec() argument_spec.update(RESOURCES_ARGUMENT) diff --git a/tests/sanity/ignore-2.10.txt b/tests/sanity/ignore-2.10.txt index 34e837cb..26fa9c20 100644 --- a/tests/sanity/ignore-2.10.txt +++ b/tests/sanity/ignore-2.10.txt @@ -3,4 +3,5 @@ plugins/modules/cmci_get.py validate-modules:missing-gplv3-license # Licence is plugins/modules/cmci_action.py validate-modules:missing-gplv3-license # Licence is Apache-2.0 plugins/modules/cmci_create.py validate-modules:missing-gplv3-license # Licence is Apache-2.0 plugins/modules/cmci_delete.py validate-modules:missing-gplv3-license # Licence is Apache-2.0 -plugins/modules/cmci_update.py validate-modules:missing-gplv3-license # Licence is Apache-2.0 \ No newline at end of file +plugins/modules/cmci_update.py validate-modules:missing-gplv3-license # Licence is Apache-2.0 +plugins/doc_fragments/cmci.py pep8:E501 # Link can't be split or it does not render correctly \ No newline at end of file diff --git a/tests/sanity/ignore-2.9.txt b/tests/sanity/ignore-2.9.txt index 34e837cb..26fa9c20 100644 --- a/tests/sanity/ignore-2.9.txt +++ b/tests/sanity/ignore-2.9.txt @@ -3,4 +3,5 @@ plugins/modules/cmci_get.py validate-modules:missing-gplv3-license # Licence is plugins/modules/cmci_action.py validate-modules:missing-gplv3-license # Licence is Apache-2.0 plugins/modules/cmci_create.py validate-modules:missing-gplv3-license # Licence is Apache-2.0 plugins/modules/cmci_delete.py validate-modules:missing-gplv3-license # Licence is Apache-2.0 -plugins/modules/cmci_update.py validate-modules:missing-gplv3-license # Licence is Apache-2.0 \ No newline at end of file +plugins/modules/cmci_update.py validate-modules:missing-gplv3-license # Licence is Apache-2.0 +plugins/doc_fragments/cmci.py pep8:E501 # Link can't be split or it does not render correctly \ No newline at end of file