�
�Udac @` s d d l m Z m Z m Z e Z i d d 6d g d 6d d 6Z d Z d Z d
Z d d l
Z
d d l Z d d l Z d d l
m Z d d
l m Z d d l m Z m Z d d l m Z i d d 6d d 6Z d e f d � � YZ d � Z e d k re � n d S( i ( t absolute_importt divisiont print_functions 1.1t metadata_versiont previewt statust communityt supported_bys^
---
module: netapp_e_host
short_description: NetApp E-Series manage eseries hosts
description: Create, update, remove hosts on NetApp E-series storage arrays
version_added: '2.2'
author:
- Kevin Hulquest (@hulquest)
- Nathan Swartz (@ndswartz)
extends_documentation_fragment:
- netapp.eseries
options:
name:
description:
- If the host doesn't yet exist, the label/name to assign at creation time.
- If the hosts already exists, this will be used to uniquely identify the host to make any required changes
required: True
aliases:
- label
state:
description:
- Set to absent to remove an existing host
- Set to present to modify or create a new host definition
choices:
- absent
- present
default: present
version_added: 2.7
host_type:
description:
- This is the type of host to be mapped
- Required when C(state=present)
- Either one of the following names can be specified, Linux DM-MP, VMWare, Windows, Windows Clustered, or a
host type index which can be found in M(netapp_e_facts)
type: str
aliases:
- host_type_index
ports:
description:
- A list of host ports you wish to associate with the host.
- Host ports are uniquely identified by their WWN or IQN. Their assignments to a particular host are
uniquely identified by a label and these must be unique.
required: False
suboptions:
type:
description:
- The interface type of the port to define.
- Acceptable choices depend on the capabilities of the target hardware/software platform.
required: true
choices:
- iscsi
- sas
- fc
- ib
- nvmeof
- ethernet
label:
description:
- A unique label to assign to this port assignment.
required: true
port:
description:
- The WWN or IQN of the hostPort to assign to this port definition.
required: true
force_port:
description:
- Allow ports that are already assigned to be re-assigned to your current host
required: false
type: bool
version_added: 2.7
group:
description:
- The unique identifier of the host-group you want the host to be a member of; this is used for clustering.
required: False
aliases:
- cluster
log_path:
description:
- A local path to a file to be used for debug logging
required: False
version_added: 2.7
s;
- name: Define or update an existing host named 'Host1'
netapp_e_host:
ssid: "1"
api_url: "10.113.1.101:8443"
api_username: admin
api_password: myPassword
name: "Host1"
state: present
host_type_index: Linux DM-MP
ports:
- type: 'iscsi'
label: 'PORT_1'
port: 'iqn.1996-04.de.suse:01:56f86f9bd1fe'
- type: 'fc'
label: 'FC_1'
port: '10:00:FF:7C:FF:FF:FF:01'
- type: 'fc'
label: 'FC_2'
port: '10:00:FF:7C:FF:FF:FF:00'
- name: Ensure a host named 'Host2' doesn't exist
netapp_e_host:
ssid: "1"
api_url: "10.113.1.101:8443"
api_username: admin
api_password: myPassword
name: "Host2"
state: absent
s
msg:
description:
- A user-readable description of the actions performed.
returned: on success
type: str
sample: The host has been created.
id:
description:
- the unique identifier of the host on the E-Series storage-system
returned: on success when state=present
type: str
sample: 00000000600A098000AAC0C3003004700AD86A52
version_added: "2.6"
ssid:
description:
- the unique identifier of the E-Series storage-system with the current api
returned: on success
type: str
sample: 1
version_added: "2.6"
api_url:
description:
- the url of the API that this request was processed by
returned: on success
type: str
sample: https://webservices.example.com:8443
version_added: "2.6"
N( t pformat( t
AnsibleModule( t requestt eseries_host_argument_spec( t to_natives application/jsons Content-Typet Acceptt Hostc B` s� e Z i d d 6d d 6d d 6d d 6Z d � Z d � Z e d
� Z d � Z d � Z d
� Z d � Z
d � Z d � Z d � Z
d d � Z d � Z RS( i s linux dm-mpi
t vmwarei t windowsi s windows clusteredc C` s� t � } | j t d t d d d d d d d g � d t d d d t d
d g � d t d d
d t � d t d d d t � d t d d d t d
d g � d t d d d
d g � d t d d d t � � � t d | d t � | _ | j j | _ | j j } | d | _ | d | _
| d | _ | d | _ | d | _
| d | _ | d | _ | d | _ | d | _ | d | _ t � | _ t � | _ t � | _ t � | _ t � | _ t � | _ | d } | re| j � } | g t | j j � � D] } | j � ^ q�k r-| j | | _ qe| j � rOt | d � | _ qe| j j d d � n t! j"