Debian Codegraph @

ansible_collections/netapp/ontap/plugins/doc_fragments/netapp.py

raw
1 # -*- coding: utf-8 -*-
2
3 # Copyright: (c) 2018-2022, Sumit Kumar <[email protected]>, chris Archibald <[email protected]>
4 # Copyright (c) 2018-2025, NetApp, Inc
5 # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
6
7 from __future__ import (absolute_import, division, print_function)
8 __metaclass__ = type
9
10
11 class ModuleDocFragment(object):
12
13 DOCUMENTATION = r'''
14 options:
15 - See respective platform section for more details
16 requirements:
17 - See respective platform section for more details
18 notes:
19 - Ansible modules are available for the following NetApp Storage Platforms: E-Series, ONTAP, SolidFire
20 '''
21 # Documentation fragment for ONTAP (na_ontap) that contains REST
22 NA_ONTAP = r'''
23 options:
24 hostname:
25 description:
26 - The hostname or IP address of the ONTAP instance.
27 type: str
28 required: true
29 username:
30 description:
31 - This can be a Cluster-scoped or SVM-scoped account, depending on whether a Cluster-level or SVM-level API is required.
32 - For more information, please read the documentation U(https://docs.netapp.com/us-en/ontap/authentication/create-svm-user-accounts-task.html).
33 - Two authentication methods are supported
34 - 1. Basic authentication, using username and password.
35 - 2. SSL certificate authentication, using a ssl client cert file, and optionally a private key file.
36 - To use a certificate, the certificate must have been installed in the ONTAP cluster, and cert authentication must have been enabled.
37 type: str
38 aliases: [ user ]
39 password:
40 description:
41 - Password for the specified user.
42 type: str
43 aliases: [ pass ]
44 cert_filepath:
45 description:
46 - path to SSL client cert file (.pem).
47 - not supported with python 2.6.
48 type: str
49 version_added: 20.6.0
50 key_filepath:
51 description:
52 - path to SSL client key file.
53 type: str
54 version_added: 20.6.0
55 https:
56 description:
57 - Enable and disable https.
58 - Ignored when using REST as only https is supported.
59 - Ignored when using SSL certificate authentication as it requires SSL.
60 type: bool
61 default: no
62 validate_certs:
63 description:
64 - If set to C(no), the SSL certificates will not be validated.
65 - This should only set to C(False) used on personally controlled sites using self-signed certificates.
66 type: bool
67 default: yes
68 http_port:
69 description:
70 - Override the default port (80 or 443) with this port
71 type: int
72 ontapi:
73 description:
74 - The ontap api version to use
75 type: int
76 use_rest:
77 description:
78 - Whether to use REST or ZAPI.
79 - always -- will always use the REST API if the module supports REST.
80 A warning is issued if the module does not support REST.
81 An error is issued if a module option is not supported in REST.
82 - never -- will always use ZAPI if the module supports ZAPI. An error may be issued if a REST option is not supported in ZAPI.
83 - auto -- will try to use the REST API if the module supports REST and modules options are supported. Reverts to ZAPI otherwise.
84 default: always
85 type: str
86 feature_flags:
87 description:
88 - Enable or disable a new feature.
89 - This can be used to enable an experimental feature or disable a new feature that breaks backward compatibility.
90 - Supported keys and values are subject to change without notice. Unknown keys are ignored.
91 type: dict
92 version_added: "20.5.0"
93 force_ontap_version:
94 description:
95 - Override the cluster ONTAP version when using REST.
96 - The behavior is undefined if the version does not match the target cluster.
97 - This is provided as a work-around when the cluster version cannot be read because of permission issues.
98 See https://github.com/ansible-collections/netapp.ontap/wiki/Known-issues.
99 - This should be in the form 9.10 or 9.10.1 with each element being an integer number.
100 - When C(use_rest) is set to auto, this may force a switch to ZAPI based on the version and platform capabilities.
101 - Ignored with ZAPI.
102 type: str
103 version_added: "21.23.0"
104 use_lambda:
105 description:
106 - Specifies if AWS Lambda proxy functionality should be used to connect to the ONTAP system.
107 - Supported only with REST.
108 type: bool
109 default: false
110 version_added: "23.2.0"
111 requirements:
112 - Ansible 2.9 or later - 2.12 or later is recommended.
113 - Python3 - 3.9 or later is recommended.
114 - netapp-lib only when using ZAPI (install using 'pip install netapp-lib'),
115 Please note that netapp-lib is deprecated and no longer maintained. Proceed at your own risk.
116 - A physical or virtual clustered Data ONTAP system, the modules support Data ONTAP 9.1 and onward,
117 REST support requires ONTAP 9.6 or later.
118
119 notes:
120 - The modules prefixed with na_ontap are built to support the ONTAP storage platform.
121 - https is enabled by default and recommended.
122 To enable http on the cluster you must run the following commands 'set -privilege advanced;' 'system services web modify -http-enabled true;'
123 '''
124
125 # Documentation fragment for ONTAP (na_ontap) that are ZAPI ONLY
126 NA_ONTAP_ZAPI = r'''
127 options:
128 hostname:
129 description:
130 - The hostname or IP address of the ONTAP instance.
131 type: str
132 required: true
133 username:
134 description:
135 - This can be a Cluster-scoped or SVM-scoped account, depending on whether a Cluster-level or SVM-level API is required.
136 - For more information, please read the documentation U(https://docs.netapp.com/us-en/ontap/authentication/create-svm-user-accounts-task.html).
137 - Two authentication methods are supported
138 - 1. Basic authentication, using username and password.
139 - 2. SSL certificate authentication, using a ssl client cert file, and optionally a private key file.
140 - To use a certificate, the certificate must have been installed in the ONTAP cluster, and cert authentication must have been enabled.
141 type: str
142 aliases: [ user ]
143 password:
144 description:
145 - Password for the specified user.
146 type: str
147 aliases: [ pass ]
148 cert_filepath:
149 description:
150 - path to SSL client cert file (.pem).
151 - not supported with python 2.6.
152 type: str
153 version_added: 20.6.0
154 key_filepath:
155 description:
156 - path to SSL client key file.
157 type: str
158 version_added: 20.6.0
159 https:
160 description:
161 - Enable and disable https.
162 - Ignored when using REST as only https is supported.
163 - Ignored when using SSL certificate authentication as it requires SSL.
164 type: bool
165 default: no
166 validate_certs:
167 description:
168 - If set to C(no), the SSL certificates will not be validated.
169 - This should only set to C(False) used on personally controlled sites using self-signed certificates.
170 type: bool
171 default: yes
172 http_port:
173 description:
174 - Override the default port (80 or 443) with this port
175 type: int
176 ontapi:
177 description:
178 - The ontap api version to use
179 type: int
180 use_rest:
181 description:
182 - This module only supports ZAPI and can not be swtiched to REST.
183 - never -- will always use ZAPI if the module supports ZAPI. An error may be issued if a REST option is not supported in ZAPI.
184 - auto -- will always use ZAPI.
185 default: never
186 type: str
187 feature_flags:
188 description:
189 - Enable or disable a new feature.
190 - This can be used to enable an experimental feature or disable a new feature that breaks backward compatibility.
191 - Supported keys and values are subject to change without notice. Unknown keys are ignored.
192 type: dict
193 version_added: "20.5.0"
194 requirements:
195 - Ansible 2.9 or later - 2.12 or later is recommended.
196 - Python3 - 3.9 or later is recommended.
197 - netapp-lib only when using ZAPI (install using 'pip install netapp-lib'),
198 Please note that netapp-lib is deprecated and no longer maintained. Proceed at your own risk.
199 - A physical or virtual clustered Data ONTAP system, the modules support Data ONTAP 9.1 and onward,
200 REST support requires ONTAP 9.6 or later.
201
202 notes:
203 - The modules prefixed with na_ontap are built to support the ONTAP storage platform.
204 - https is enabled by default and recommended.
205 To enable http on the cluster you must run the following commands 'set -privilege advanced;' 'system services web modify -http-enabled true;'
206 '''
207
208 # Documentation fragment for ONTAP (na_ontap) that are REST ONLY
209 NA_ONTAP_REST = r'''
210 options:
211 hostname:
212 description:
213 - The hostname or IP address of the ONTAP instance.
214 type: str
215 required: true
216 username:
217 description:
218 - This can be a Cluster-scoped or SVM-scoped account, depending on whether a Cluster-level or SVM-level API is required.
219 - For more information, please read the documentation U(https://docs.netapp.com/us-en/ontap/authentication/create-svm-user-accounts-task.html).
220 - Two authentication methods are supported
221 - 1. Basic authentication, using username and password.
222 - 2. SSL certificate authentication, using a ssl client cert file, and optionally a private key file.
223 - To use a certificate, the certificate must have been installed in the ONTAP cluster, and cert authentication must have been enabled.
224 type: str
225 aliases: [ user ]
226 password:
227 description:
228 - Password for the specified user.
229 type: str
230 aliases: [ pass ]
231 cert_filepath:
232 description:
233 - path to SSL client cert file (.pem).
234 - not supported with python 2.6.
235 type: str
236 version_added: 20.6.0
237 key_filepath:
238 description:
239 - path to SSL client key file.
240 type: str
241 version_added: 20.6.0
242 https:
243 description:
244 - Enable and disable https.
245 - Ignored when using REST as only https is supported.
246 - Ignored when using SSL certificate authentication as it requires SSL.
247 type: bool
248 default: no
249 validate_certs:
250 description:
251 - If set to C(no), the SSL certificates will not be validated.
252 - This should only set to C(False) used on personally controlled sites using self-signed certificates.
253 type: bool
254 default: yes
255 http_port:
256 description:
257 - Override the default port (80 or 443) with this port
258 type: int
259 use_rest:
260 description:
261 - This module only supports REST.
262 - always -- will always use the REST API.
263 A warning is issued if the module does not support REST.
264 default: always
265 type: str
266 feature_flags:
267 description:
268 - Enable or disable a new feature.
269 - This can be used to enable an experimental feature or disable a new feature that breaks backward compatibility.
270 - Supported keys and values are subject to change without notice. Unknown keys are ignored.
271 type: dict
272 version_added: "20.5.0"
273 force_ontap_version:
274 description:
275 - Override the cluster ONTAP version when using REST.
276 - The behavior is undefined if the version does not match the target cluster.
277 - This is provided as a work-around when the cluster version cannot be read because of permission issues.
278 See https://github.com/ansible-collections/netapp.ontap/wiki/Known-issues.
279 - This should be in the form 9.10 or 9.10.1 with each element being an integer number.
280 type: str
281 version_added: "21.23.0"
282 use_lambda:
283 description:
284 - Specifies if AWS Lambda proxy functionality should be used to connect to the ONTAP system.
285 - Supported only with REST.
286 type: bool
287 default: false
288 version_added: "23.4.0"
289 requirements:
290 - Ansible 2.9 or later - 2.12 or later is recommended.
291 - Python3 - 3.9 or later is recommended.
292 - netapp-lib only when using ZAPI (install using 'pip install netapp-lib'),
293 Please note that netapp-lib is deprecated and no longer maintained. Proceed at your own risk.
294 - A physical or virtual clustered Data ONTAP system, the modules support Data ONTAP 9.1 and onward,
295 REST support requires ONTAP 9.6 or later.
296
297 notes:
298 - The modules prefixed with na_ontap are built to support the ONTAP storage platform.
299 - https is enabled by default and recommended.
300 To enable http on the cluster you must run the following commands 'set -privilege advanced;' 'system services web modify -http-enabled true;'
301 '''
302
303 # Documentation fragment for ONTAP (na_ontap) peer options
304 NA_ONTAP_PEER = r'''
305 options:
306 peer_options:
307 version_added: 21.8.0
308 description:
309 - IP address and connection options for the peer system.
310 - If any if these options is not specified, the corresponding source option is used.
311 type: dict
312 suboptions:
313 hostname:
314 description:
315 - The hostname or IP address of the ONTAP instance.
316 type: str
317 required: true
318 username:
319 description:
320 - Username when using basic authentication.
321 type: str
322 aliases: [ user ]
323 password:
324 description:
325 - Password for the specified user.
326 type: str
327 aliases: [ pass ]
328 cert_filepath:
329 description:
330 - path to SSL client cert file (.pem).
331 type: str
332 key_filepath:
333 description:
334 - path to SSL client key file.
335 type: str
336 https:
337 description:
338 - Enable and disable https.
339 type: bool
340 validate_certs:
341 description:
342 - If set to C(no), the SSL certificates will not be validated.
343 - This should only set to C(False) used on personally controlled sites using self-signed certificates.
344 type: bool
345 http_port:
346 description:
347 - Override the default port (80 or 443) with this port
348 type: int
349 ontapi:
350 description:
351 - The ontap api version to use
352 type: int
353 use_rest:
354 description:
355 - REST API if supported by the target system for all the resources and attributes the module requires. Otherwise will revert to ZAPI.
356 - always -- will always use the REST API
357 - never -- will always use the ZAPI
358 - auto -- will try to use the REST Api
359 type: str
360 force_ontap_version:
361 description:
362 - Override the cluster ONTAP version when using REST.
363 - The behavior is undefined if the version does not match the target cluster.
364 - This is provided as a work-around when the cluster version cannot be read because of permission issues.
365 See https://github.com/ansible-collections/netapp.ontap/wiki/Known-issues.
366 - This should be in the form 9.10 or 9.10.1 with each element being an integer number.
367 - When C(use_rest) is set to auto, this may force a switch to ZAPI based on the version and platform capabilities.
368 - Ignored with ZAPI.
369 type: str
370 version_added: "21.23.0"
371 use_lambda:
372 description:
373 - Specifies if AWS Lambda proxy functionality should be used to connect to the ONTAP system.
374 - Supported only with REST.
375 type: bool
376 version_added: "23.4.0"
377 lambda_config:
378 description:
379 - Configuration parameters for AWS Lambda proxy functionality.
380 - These option and suboptions are only supported with REST.
381 type: dict
382 version_added: "23.4.0"
383 suboptions:
384 function_name:
385 description:
386 - The name of the AWS Lambda function to invoke.
387 type: str
388 required: true
389 aws_region:
390 description:
391 - The name of the AWS region.
392 type: str
393 required: true
394 aws_profile:
395 description:
396 - The name of the AWS profile to use for authentication.
397 type: str
398 '''