Define module for managing E-Series email alerts (#42643)

Email alerts can be enabled for an E-Series system to provide
information to interested users by email when a warning or critical
level event occurs on the system. This module will allow a system owner
to configure whether or not system alerts are enabled, and who will
receive them.
This commit is contained in:
Michael Price
2018-08-28 11:40:51 -05:00
committed by John R Barker
parent 97157cf876
commit 054b87acb8
5 changed files with 514 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
# This test is not enabled by default, but can be utilized by defining required variables in integration_config.yml
# Example integration_config.yml:
# ---
#netapp_e_api_host: 10.113.1.111:8443
#netapp_e_api_username: admin
#netapp_e_api_password: myPass
#netapp_e_ssid: 1
unsupported
netapp/eseries

View File

@@ -0,0 +1 @@
- include_tasks: run.yml

View File

@@ -0,0 +1,39 @@
# Test code for the netapp_e_iscsi_interface module
# (c) 2018, NetApp, Inc
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
- name: NetApp Test ASUP module
fail:
msg: 'Please define netapp_e_api_username, netapp_e_api_password, netapp_e_api_host, and netapp_e_ssid.'
when: netapp_e_api_username is undefined or netapp_e_api_password is undefined
or netapp_e_api_host is undefined or netapp_e_ssid is undefined
vars:
defaults: &defaults
api_url: "https://{{ netapp_e_api_host }}/devmgr/v2"
api_username: "{{ netapp_e_api_username }}"
api_password: "{{ netapp_e_api_password }}"
ssid: "{{ netapp_e_ssid }}"
validate_certs: no
state: enabled
server: mail.example.com
sender: noreply@example.com
recipients:
- noreply@example.com
- name: set default vars
set_fact:
vars: *defaults
- name: Set the initial alerting settings
netapp_e_alerts:
<<: *defaults
register: result
- name: Validate the idempotency of the module
netapp_e_alerts:
<<: *defaults
register: result
- name: Ensure we still have the same settings, but had no change
assert:
that: not result.changed