On this page
netapp.ontap.na_ontap_rest_info – NetApp ONTAP information gatherer using REST APIs
Note
This plugin is part of the netapp.ontap collection (version 20.12.0).
To install it use: ansible-galaxy collection install netapp.ontap
.
To use it in a playbook, specify: netapp.ontap.na_ontap_rest_info
.
New in version 20.5.0: of netapp.ontap
Synopsis
- This module allows you to gather various information about ONTAP configuration using REST APIs
Requirements
The below requirements are needed on the host that executes this module.
- A physical or virtual clustered Data ONTAP system. The modules support Data ONTAP 9.1 and onward.
- REST support requires ONTAP 9.6 or later.
- Ansible 2.6
- Ansible 2.9 or later is strongly recommended as it enables the new collection delivery system.
- Python2 netapp-lib (2017.10.30) or later. Install using ‘pip install netapp-lib’
- Python3 netapp-lib (2018.11.13) or later. Install using ‘pip install netapp-lib’
- netapp-lib 2020.3.12 is strongly recommended as it provides better error reporting for connection issues.
- To enable http on the cluster you must run the following commands ‘set -privilege advanced;’ ‘system services web modify -http-enabled true;’
Parameters
Parameter | Choices/Defaults | Comments |
---|---|---|
cert_filepath
string
added in 20.6.0 of netapp.ontap
|
path to SSL client cert file (.pem).
not supported with python 2.6.
|
|
feature_flags
dictionary
added in 20.5.0 of netapp.ontap
|
Enable or disable a new feature.
This can be used to enable an experimental feature or disable a new feature that breaks backward compatibility.
Supported keys and values are subject to change without notice. Unknown keys are ignored.
|
|
fields
list / elements=string
added in 20.6.0 of netapp.ontap
|
Request specific fields from subset. '*' to return all the fields, one or more subsets are allowed. '<list of fields>' to return specified fields, only one subset will be allowed.
If the option is not present, return all the fields.
|
|
gather_subset
list / elements=string
|
Default:
"all"
|
When supplied, this argument will restrict the information collected to a given subset. Either the info name or the Rest API can be given. Possible values for this argument include "aggregate_info" or "storage/aggregates", "application_info" or "application/applications", "application_template_info" or "application/templates", "autosupport_config_info" or "support/autosupport", "autosupport_messages_history" or "support/autosupport/messages", "broadcast_domains_info" or "network/ethernet/broadcast-domains", "cifs_home_directory_info" or "protocols/cifs/home-directory/search-paths", "cifs_services_info" or "protocols/cifs/services", "cifs_share_info" or "protocols/cifs/shares", "cloud_targets_info" or "cloud/targets", "cluster_chassis_info" or "cluster/chassis", "cluster_jobs_info" or "cluster/jobs", "cluster_metrics_info" or "cluster/metrics", "cluster_node_info" or "cluster/nodes", "cluster_peer_info" or "cluster/peers", "cluster_schedules" or "cluster/schedules", "cluster_software_download" or "cluster/software/download", "cluster_software_history" or "cluster/software/history", "cluster_software_packages" or "cluster/software/packages", "disk_info" or "storage/disks", "event_notification_info" or "support/ems/destinations", "event_notification_destination_info" or "support/ems/destinations", "initiator_groups_info" or "protocols/san/igroups", "ip_interfaces_info" or "network/ip/interfaces", "ip_routes_info" or "network/ip/routes", "ip_service_policies" or "network/ip/service-policies", "network_ipspaces_info" or "network/ipspaces", "network_ports_info" or "network/ethernet/ports", "ontap_system_version" or "cluster/software", "san_fc_logins_info" or "network/fc/logins", "san_fc_wppn-aliases" or "network/fc/wwpn-aliases", "san_fcp_services" or "protocols/san/fcp/services", "san_iscsi_credentials" or "protocols/san/iscsi/credentials", "san_iscsi_services" or "protocols/san/iscsi/services", "san_lun_maps" or "protocols/san/lun-maps", "security_login_info" or "security/accounts", "security_login_rest_role_info" or "security/roles", "storage_flexcaches_info" or "storage/flexcache/flexcaches", "storage_flexcaches_origin_info" or "storage/flexcache/origins", "storage_luns_info" or "storage/luns", "storage_NVMe_namespaces" or "storage/namespaces", "storage_ports_info" or "storage/ports", "storage_qos_policies" or "storage/qos/policies", "storage_qtrees_config" or "storage/qtrees", "storage_quota_reports" or "storage/quota/reports", "storage_quota_policy_rules" or "storage/quota/rules", "storage_shelves_config" or "storage/shelves", "storage_snapshot_policies" or "storage/snapshot-policies", "support_ems_config" or "support/ems", "support_ems_events" or "support/ems/events", "support_ems_filters" or "support/ems/filters", "svm_dns_config_info" or "name-services/dns", "svm_ldap_config_info" or "name-services/ldap", "svm_name_mapping_config_info" or "name-services/name-mappings", "svm_nis_config_info" or "name-services/nis", "svm_peers_info" or "svm/peers", "svm_peer-permissions_info" or "svm/peer-permissions", "vserver_info" or "svm/svms", "volume_info" or "storage/volumes", Can specify a list of values to include a larger subset.
REST APIs are supported with ONTAP 9.6 onwards.
|
hostname
string / required
|
The hostname or IP address of the ONTAP instance.
|
|
http_port
integer
|
Override the default port (80 or 443) with this port
|
|
https
boolean
|
|
Enable and disable https.
Ignored when using REST as only https is supported.
Ignored when using SSL certificate authentication as it requires SSL.
|
key_filepath
string
added in 20.6.0 of netapp.ontap
|
path to SSL client key file.
|
|
max_records
integer
|
Default:
1024
|
Maximum number of records returned in a single call.
|
ontapi
integer
|
The ontap api version to use
|
|
parameters
dictionary
added in 20.7.0 of netapp.ontap
|
Allows for any rest option to be passed in
|
|
password
string
|
Password for the specified user.
aliases: pass |
|
state
string
|
|
Returns "info"
|
use_rest
string
|
Default:
"auto"
|
REST API if supported by the target system for all the resources and attributes the module requires. Otherwise will revert to ZAPI.
always -- will always use the REST API
never -- will always use the ZAPI
auto -- will try to use the REST Api
|
username
string
|
This can be a Cluster-scoped or SVM-scoped account, depending on whether a Cluster-level or SVM-level API is required.
For more information, please read the documentation https://mysupport.netapp.com/NOW/download/software/nmsdk/9.4/.
Two authentication methods are supported
1. basic authentication, using username and password,
2. SSL certificate authentication, using a ssl client cert file, and optionally a private key file.
To use a certificate, the certificate must have been installed in the ONTAP cluster, and cert authentication must have been enabled.
aliases: user |
|
validate_certs
boolean
|
|
If set to
no , the SSL certificates will not be validated.
This should only set to False used on personally controlled sites using self-signed certificates.
|
Notes
Note
- The modules prefixed with na\_ontap are built to support the ONTAP storage platform.
Examples
- name: run ONTAP gather facts for vserver info
na_ontap_info_rest:
hostname: "1.2.3.4"
username: "testuser"
password: "test-password"
https: true
validate_certs: false
use_rest: Always
gather_subset:
- vserver_info
- name: run ONTAP gather facts for aggregate info and volume info
na_ontap_info_rest:
hostname: "1.2.3.4"
username: "testuser"
password: "test-password"
https: true
validate_certs: false
use_rest: Always
gather_subset:
- aggregate_info
- volume_info
- name: run ONTAP gather facts for all subsets
na_ontap_info_rest:
hostname: "1.2.3.4"
username: "testuser"
password: "test-password"
https: true
validate_certs: false
use_rest: Always
gather_subset:
- all
- name: run ONTAP gather facts for aggregate info and volume info with fields section
na_ontap_info_rest:
hostname: "1.2.3.4"
username: "testuser"
password: "test-password"
https: true
fields:
- '*'
validate_certs: false
use_rest: Always
gather_subset:
- aggregate_info
- volume_info
- name: run ONTAP gather facts for aggregate info with specified fields
na_ontap_info_rest:
hostname: "1.2.3.4"
username: "testuser"
password: "test-password"
https: true
fields:
- 'uuid'
- 'name'
- 'node'
validate_certs: false
use_rest: Always
gather_subset:
- aggregate_info
Authors
- NetApp Ansible Team (@carchi8py) <ng-ansibleteam@netapp.com>
© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.10/collections/netapp/ontap/na_ontap_rest_info_module.html