summaryrefslogtreecommitdiffstats
path: root/ansible_collections/dellemc/unity/docs/modules/interface.rst
blob: cc33254f5f4b75f8650a4da7814a5e8799562f0b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
.. _interface_module:


interface -- Manage Interfaces on Unity storage system
======================================================

.. contents::
   :local:
   :depth: 1


Synopsis
--------

Managing the Interfaces on the Unity storage system includes adding Interfaces to NAS Server, getting details of interface and deleting configured interfaces.



Requirements
------------
The below requirements are needed on the host that executes this module.

- A Dell Unity Storage device version 5.1 or later.
- Ansible-core 2.13 or later.
- Python 3.9, 3.10 or 3.11.
- Storops Python SDK 1.2.11.



Parameters
----------

  nas_server_name (optional, str, None)
    Name of the NAS server for which interface will be configured.


  nas_server_id (optional, str, None)
    ID of the NAS server for which interface will be configured.


  ethernet_port_name (optional, str, None)
    Name of the ethernet port.


  ethernet_port_id (optional, str, None)
    ID of the ethernet port.


  role (optional, str, None)
    Indicates whether interface is configured as production or backup.


  interface_ip (True, str, None)
    IP of network interface.


  netmask (optional, str, None)
    Netmask of network interface.


  prefix_length (optional, int, None)
    Prefix length is mutually exclusive with *netmask*.


  gateway (optional, str, None)
    Gateway of network interface.


  vlan_id (optional, int, None)
    Vlan id of the interface.


  state (True, str, None)
    Define whether the interface should exist or not.


  unispherehost (True, str, None)
    IP or FQDN of the Unity management server.


  username (True, str, None)
    The username of the Unity management server.


  password (True, str, None)
    The password of the Unity management server.


  validate_certs (optional, bool, True)
    Boolean variable to specify whether or not to validate SSL certificate.

    ``true`` - Indicates that the SSL certificate should be verified.

    ``false`` - Indicates that the SSL certificate should not be verified.


  port (optional, int, 443)
    Port number through which communication happens with Unity management server.





Notes
-----

.. note::
   - The *check_mode* is supported.
   - Modify operation for interface is not supported.
   - The modules present in this collection named as 'dellemc.unity' are built to support the Dell Unity storage platform.




Examples
--------

.. code-block:: yaml+jinja

    

        - name: Add Interface as Backup to NAS Server
          dellemc.unity.interface:
            unispherehost: "{{unispherehost}}"
            username: "{{username}}"
            password: "{{password}}"
            validate_certs: "{{validate_certs}}"
            nas_server_name: "dummy_nas"
            ethernet_port_name: "SP A 4-Port Card Ethernet Port 0"
            role: "BACKUP"
            interface_ip: "xx.xx.xx.xx"
            netmask: "xx.xx.xx.xx"
            gateway: "xx.xx.xx.xx"
            vlan_id: 324
            state: "present"

        - name: Add Interface as Production to NAS Server
          dellemc.unity.interface:
            unispherehost: "{{unispherehost}}"
            username: "{{username}}"
            password: "{{password}}"
            validate_certs: "{{validate_certs}}"
            nas_server_name: "dummy_nas"
            ethernet_port_name: "SP A 4-Port Card Ethernet Port 0"
            role: "PRODUCTION"
            interface_ip: "xx.xx.xx.xx"
            netmask: "xx.xx.xx.xx"
            gateway: "xx.xx.xx.xx"
            vlan_id: 324
            state: "present"

        - name: Get interface details
          dellemc.unity.interface:
            unispherehost: "{{unispherehost}}"
            username: "{{username}}"
            password: "{{password}}"
            validate_certs: "{{validate_certs}}"
            nas_server_name: "dummy_nas"
            interface_ip: "xx.xx.xx.xx"
            state: "present"

        - name: Delete Interface
          dellemc.unity.interface:
          unispherehost: "{{unispherehost}}"
          username: "{{username}}"
          password: "{{password}}"
          validate_certs: "{{validate_certs}}"
          nas_server_name: "dummy_nas"
          interface_ip: "xx.xx.xx.xx"
          state: "absent"



Return Values
-------------

changed (always, bool, True)
  Whether or not the resource has changed.


interface_details (When interface is configured for NAS Server., dict, {'existed': True, 'gateway': 'xx.xx.xx.xx', 'hash': 8785300560421, 'health': {'UnityHealth': {'hash': 8785300565468}}, 'id': 'if_69', 'ip_address': '10.10.10.10', 'ip_port': {'UnityIpPort': {'hash': 8785300565300, 'id': 'spb_ocp_0_eth0'}}, 'ip_protocol_version': 'IpProtocolVersionEnum.IPv4', 'is_disabled': False, 'is_preferred': True, 'mac_address': '0C:48:C6:9F:57:BF', 'name': '36_APM00213404194', 'nas_server': {'UnityNasServer': {'hash': 8785300565417, 'id': 'nas_10'}}, 'netmask': '10.10.10.10', 'replication_policy': None, 'role': 'FileInterfaceRoleEnum.PRODUCTION', 'source_parameters': None, 'v6_prefix_length': None, 'vlan_id': 324})
  Details of the interface.


  existed (, bool, )
    Indicates if interface exists.


  gateway (, str, )
    Gateway of network interface.


  id (, str, )
    Unique identifier interface.


  ip_address (, str, )
    IP address of interface.


  ip_port (, dict, )
    Port on which network interface is configured.


    id (, str, )
      ID of ip_port.



  ip_protocol_version (, str, )
    IP protocol version.


  is_disabled (, bool, )
    Indicates whether interface is disabled.


  is_preferred (, bool, )
    Indicates whether interface is preferred.


  mac_address (, bool, )
    Mac address of ip_port.


  name (, bool, )
    System configured name of interface.


  nas_server (, dict, )
    Details of NAS server where interface is configured.


    id (, str, )
      ID of NAS Server.







Status
------





Authors
~~~~~~~

- Meenakshi Dembi (@dembim) <ansible.team@dell.com>