Skip to content

Commit

Permalink
Sync bitbucket and GitHub
Browse files Browse the repository at this point in the history
  • Loading branch information
carchi8py committed May 11, 2021
1 parent 0adee5f commit ff6d7bb
Show file tree
Hide file tree
Showing 8 changed files with 78 additions and 6 deletions.
46 changes: 46 additions & 0 deletions .github/workflow/main.yml
Original file line number Diff line number Diff line change
@@ -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/
8 changes: 8 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
=======

Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions changelogs/changelog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
2 changes: 2 additions & 0 deletions changelogs/fragments/DEVOPS-3971.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bugfixes:
- na_ontap_autosupport - KeyError - No element by given name validate-digital-certificate.
4 changes: 2 additions & 2 deletions galaxy.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
namespace: "netapp"
name: "ontap"
version: "21.6.0"
version: "21.6.1"
authors:
- "NetApp Ansible Team <[email protected]>"
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
Expand Down
2 changes: 1 addition & 1 deletion plugins/module_utils/netapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
10 changes: 7 additions & 3 deletions plugins/modules/na_ontap_autosupport.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit ff6d7bb

Please sign in to comment.