diff --git a/.github/workflow/main.yml b/.github/workflow/main.yml new file mode 100644 index 00000000..58ff1da5 --- /dev/null +++ b/.github/workflow/main.yml @@ -0,0 +1,46 @@ +name: NetApp.ontap Ansible CI + +on: + push: + pull_request: + schedule: + - cron: '0 6 * * *' + +jobs: + sanity: + name: Sanity (${{ matrix.ansible }} on ONTAP + runs-on: ubuntu-latest + strategy: + matrix: + ansible: + - stable-2.9 + - stable-2.10 + - stable-2.11 + - devel + + steps: + - name: Check out code + uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.8 + + - name: Install ansible (${{ matrix.ansible }}) + run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check + + - name: Make directory to make ansible-test happy + run: | + pwd + mkdir -p ansible_collections/netapp/ontap/ + rsync -av . ansible_collections/netapp/ontap/ --exclude ansible_collections/netapp/ontap/ + + + - name: Run sanity tests ONTAP + run: ansible-test sanity --docker -v --color + working-directory: ansible_collections/netapp/ontap/ + + - name: Run Unit Tests + run: ansible-test unit --docker -v --color + working-directory: ansible_collections/netapp/ontap/ \ No newline at end of file diff --git a/CHANGELOG.rst b/CHANGELOG.rst index b69bde99..dca9ebeb 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -5,6 +5,14 @@ NetApp ONTAP Collection Release Notes .. contents:: Topics +v21.6.1 +======= + +Bugfixes +-------- + +- na_ontap_autosupport - KeyError - No element by given name validate-digital-certificate. + v21.6.0 ======= diff --git a/README.md b/README.md index f5a104db..603c1b5d 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,11 @@ Join our Slack Channel at [Netapp.io](http://netapp.io/slack) # Release Notes +## 21.6.1 + +### Bug Fixes + - na_ontap_autosupport - KeyError: No element by given name validate-digital-certificate. + ## 21.6.0 ### New Options diff --git a/changelogs/changelog.yaml b/changelogs/changelog.yaml index efcfd357..c512b1f7 100644 --- a/changelogs/changelog.yaml +++ b/changelogs/changelog.yaml @@ -1311,3 +1311,10 @@ releases: - DEVOPS-3926.yaml - DEVOPS-3950.yaml release_date: '2021-05-06' + 21.6.1: + changes: + bugfixes: + - na_ontap_autosupport - KeyError - No element by given name validate-digital-certificate. + fragments: + - DEVOPS-3971.yaml + release_date: '2021-05-11' diff --git a/changelogs/fragments/DEVOPS-3971.yaml b/changelogs/fragments/DEVOPS-3971.yaml new file mode 100644 index 00000000..54e9fade --- /dev/null +++ b/changelogs/fragments/DEVOPS-3971.yaml @@ -0,0 +1,2 @@ +bugfixes: + - na_ontap_autosupport - KeyError - No element by given name validate-digital-certificate. diff --git a/galaxy.yml b/galaxy.yml index d2860ce4..92557437 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -1,12 +1,12 @@ namespace: "netapp" name: "ontap" -version: "21.6.0" +version: "21.6.1" authors: - "NetApp Ansible Team " license: "GPL-2.0-or-later" readme: README.md description: NetApp ONTAP Collection -repository: https://github.com/ansible-collections/netapp +repository: https://github.com/ansible-collections/netapp.ontap homepage: https://netapp.io/configuration-management-and-automation/ tags: - storage diff --git a/plugins/module_utils/netapp.py b/plugins/module_utils/netapp.py index 1a7a7b81..51933045 100644 --- a/plugins/module_utils/netapp.py +++ b/plugins/module_utils/netapp.py @@ -47,7 +47,7 @@ except ImportError: ansible_version = 'unknown' -COLLECTION_VERSION = "21.6.0" +COLLECTION_VERSION = "21.6.1" CLIENT_APP_VERSION = "%s/" + COLLECTION_VERSION IMPORT_EXCEPTION = None diff --git a/plugins/modules/na_ontap_autosupport.py b/plugins/modules/na_ontap_autosupport.py index b9a9d5c3..5c7da206 100644 --- a/plugins/modules/na_ontap_autosupport.py +++ b/plugins/modules/na_ontap_autosupport.py @@ -320,12 +320,16 @@ def get_autosupport_config(self): asup_attr_info = result.get_child_by_name('attributes').get_child_by_name('autosupport-config-info') asup_info['service_state'] = 'started' if asup_attr_info['is-enabled'] == 'true' else 'stopped' for item_key, zapi_key in self.na_helper.zapi_string_keys.items(): - value = asup_attr_info[zapi_key] + value = asup_attr_info.get_child_content(zapi_key) asup_info[item_key] = value if value is not None else "" for item_key, zapi_key in self.na_helper.zapi_int_keys.items(): - asup_info[item_key] = self.na_helper.get_value_for_int(from_zapi=True, value=asup_attr_info[zapi_key]) + value = asup_attr_info.get_child_content(zapi_key) + if value is not None: + asup_info[item_key] = self.na_helper.get_value_for_int(from_zapi=True, value=value) for item_key, zapi_key in self.na_helper.zapi_bool_keys.items(): - asup_info[item_key] = self.na_helper.get_value_for_bool(from_zapi=True, value=asup_attr_info[zapi_key]) + value = asup_attr_info.get_child_content(zapi_key) + if value is not None: + asup_info[item_key] = self.na_helper.get_value_for_bool(from_zapi=True, value=value) for item_key, zapi_key in self.na_helper.zapi_list_keys.items(): parent, dummy = zapi_key asup_info[item_key] = self.na_helper.get_value_for_list(from_zapi=True, zapi_parent=asup_attr_info.get_child_by_name(parent))