Debian Codegraph @

ansible_collections/cisco/nxos/docs/cisco.nxos.nxos_lldp_interfaces_module.rst

raw
1 .. _cisco.nxos.nxos_lldp_interfaces_module:
2
3
4 *******************************
5 cisco.nxos.nxos_lldp_interfaces
6 *******************************
7
8 **LLDP interfaces resource module**
9
10
11 Version added: 1.0.0
12
13 .. contents::
14 :local:
15 :depth: 1
16
17
18 Synopsis
19 --------
20 - This module manages interfaces' configuration for Link Layer Discovery Protocol (LLDP) on NX-OS platforms.
21
22
23
24
25 Parameters
26 ----------
27
28 .. raw:: html
29
30 <table border=0 cellpadding=0 class="documentation-table">
31 <tr>
32 <th colspan="3">Parameter</th>
33 <th>Choices/<font color="blue">Defaults</font></th>
34 <th width="100%">Comments</th>
35 </tr>
36 <tr>
37 <td colspan="3">
38 <div class="ansibleOptionAnchor" id="parameter-"></div>
39 <b>config</b>
40 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
41 <div style="font-size: small">
42 <span style="color: purple">list</span>
43 / <span style="color: purple">elements=dictionary</span>
44 </div>
45 </td>
46 <td>
47 </td>
48 <td>
49 <div>A list of link layer discovery configurations for interfaces.</div>
50 </td>
51 </tr>
52 <tr>
53 <td class="elbow-placeholder"></td>
54 <td colspan="2">
55 <div class="ansibleOptionAnchor" id="parameter-"></div>
56 <b>name</b>
57 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
58 <div style="font-size: small">
59 <span style="color: purple">string</span>
60 / <span style="color: red">required</span>
61 </div>
62 </td>
63 <td>
64 </td>
65 <td>
66 <div>Name of the interface</div>
67 </td>
68 </tr>
69 <tr>
70 <td class="elbow-placeholder"></td>
71 <td colspan="2">
72 <div class="ansibleOptionAnchor" id="parameter-"></div>
73 <b>receive</b>
74 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
75 <div style="font-size: small">
76 <span style="color: purple">boolean</span>
77 </div>
78 </td>
79 <td>
80 <ul style="margin: 0; padding: 0"><b>Choices:</b>
81 <li>no</li>
82 <li>yes</li>
83 </ul>
84 </td>
85 <td>
86 <div>Used to enable or disable the reception of LLDP packets on that interface. By default, this is enabled after LLDP is enabled globally.</div>
87 </td>
88 </tr>
89 <tr>
90 <td class="elbow-placeholder"></td>
91 <td colspan="2">
92 <div class="ansibleOptionAnchor" id="parameter-"></div>
93 <b>tlv_set</b>
94 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
95 <div style="font-size: small">
96 <span style="color: purple">dictionary</span>
97 </div>
98 </td>
99 <td>
100 </td>
101 <td>
102 <div>Used to configure TLV parameters on the interface</div>
103 </td>
104 </tr>
105 <tr>
106 <td class="elbow-placeholder"></td>
107 <td class="elbow-placeholder"></td>
108 <td colspan="1">
109 <div class="ansibleOptionAnchor" id="parameter-"></div>
110 <b>management_address</b>
111 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
112 <div style="font-size: small">
113 <span style="color: purple">string</span>
114 </div>
115 </td>
116 <td>
117 </td>
118 <td>
119 <div>Used to mention the IPv4 or IPv6 management address for the interface</div>
120 </td>
121 </tr>
122 <tr>
123 <td class="elbow-placeholder"></td>
124 <td class="elbow-placeholder"></td>
125 <td colspan="1">
126 <div class="ansibleOptionAnchor" id="parameter-"></div>
127 <b>vlan</b>
128 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
129 <div style="font-size: small">
130 <span style="color: purple">integer</span>
131 </div>
132 </td>
133 <td>
134 </td>
135 <td>
136 <div>Used to mention the VLAN for the interface</div>
137 </td>
138 </tr>
139
140 <tr>
141 <td class="elbow-placeholder"></td>
142 <td colspan="2">
143 <div class="ansibleOptionAnchor" id="parameter-"></div>
144 <b>transmit</b>
145 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
146 <div style="font-size: small">
147 <span style="color: purple">boolean</span>
148 </div>
149 </td>
150 <td>
151 <ul style="margin: 0; padding: 0"><b>Choices:</b>
152 <li>no</li>
153 <li>yes</li>
154 </ul>
155 </td>
156 <td>
157 <div>Used to enable or disable the transmission of LLDP packets on that interface. By default, this is enabled after LLDP is enabled globally.</div>
158 </td>
159 </tr>
160
161 <tr>
162 <td colspan="3">
163 <div class="ansibleOptionAnchor" id="parameter-"></div>
164 <b>running_config</b>
165 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
166 <div style="font-size: small">
167 <span style="color: purple">string</span>
168 </div>
169 </td>
170 <td>
171 </td>
172 <td>
173 <div>This option is used only with state <em>parsed</em>.</div>
174 <div>The value of this option should be the output received from the NX-OS device by executing the command <b>show running-config | section ^interface</b>.</div>
175 <div>The state <em>parsed</em> reads the configuration from <code>running_config</code> option and transforms it into Ansible structured data as per the resource module&#x27;s argspec and the value is then returned in the <em>parsed</em> key within the result.</div>
176 </td>
177 </tr>
178 <tr>
179 <td colspan="3">
180 <div class="ansibleOptionAnchor" id="parameter-"></div>
181 <b>state</b>
182 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
183 <div style="font-size: small">
184 <span style="color: purple">string</span>
185 </div>
186 </td>
187 <td>
188 <ul style="margin: 0; padding: 0"><b>Choices:</b>
189 <li><div style="color: blue"><b>merged</b>&nbsp;&larr;</div></li>
190 <li>replaced</li>
191 <li>overridden</li>
192 <li>deleted</li>
193 <li>gathered</li>
194 <li>rendered</li>
195 <li>parsed</li>
196 </ul>
197 </td>
198 <td>
199 <div>The state the configuration should be left in</div>
200 </td>
201 </tr>
202 </table>
203 <br/>
204
205
206 Notes
207 -----
208
209 .. note::
210 - Tested against NXOS 7.3.(0)D1(1) on VIRL
211 - Unsupported for Cisco MDS
212 - The LLDP feature needs to be enabled before using this module
213
214
215
216 Examples
217 --------
218
219 .. code-block:: yaml
220
221 # Using merged
222
223 # Before state:
224 # -------------
225 #
226
227 - name: Merge provided configuration with device configuration
228 cisco.nxos.nxos_lldp_interfaces:
229 config:
230 - name: Ethernet1/4
231 receive: false
232 transmit: true
233 tlv_set:
234 management_address: 192.168.122.64
235 vlan: 12
236 state: merged
237
238 # After state:
239 # -------------
240 #
241 # interface Ethernet1/4
242 # no lldp receive
243 # lldp tlv-set management-address 192.168.122.64
244 # lldp tlv-set vlan 12
245
246
247 # Using replaced
248
249 # Before state:
250 # ------------
251 #
252 # interface Ethernet1/4
253 # no lldp receive
254 # lldp tlv-set management-address 192.168.122.64
255 # interface Ethernet1/5
256 # no lldp transmit
257 # lldp tlv-set vlan 10
258
259 - name: Replace LLDP configuration on interfaces with given configuration
260 cisco.nxos.nxos_lldp_interfaces:
261 config:
262 - name: Ethernet1/4
263 transmit: false
264 tlv_set:
265 vlan: 2
266 state: replaced
267
268
269 # After state:
270 # -----------
271 #
272 # interface Ethernet1/4
273 # no lldp transmit
274 # lldp tlv_set vlan 2
275 # interface Ethernet1/5
276 # no lldp transmit
277 # lldp tlv-set vlan 10
278
279
280 # Using overridden
281
282 # Before state:
283 # ------------
284 #
285 # interface Ethernet1/4
286 # no lldp receive
287 # lldp tlv-set management-address 192.168.122.64
288 # interface Ethernet1/5
289 # no lldp transmit
290 # lldp tlv-set vlan 10
291
292 - name: Override LLDP configuration on all interfaces with given configuration
293 cisco.nxos.nxos_lldp_interfaces:
294 config:
295 - name: Ethernet1/7
296 receive: false
297 tlv_set:
298 vlan: 12
299 state: overridden
300
301
302 # After state:
303 # -----------
304 #
305 # interface Ethernet1/7
306 # no lldp receive
307 # lldp tlv_set vlan 12
308
309
310 # Using deleted
311
312 # Before state:
313 # ------------
314 #
315 # interface Ethernet1/4
316 # lldp tlv-set management vlan 24
317 # no lldp transmit
318 # interface mgmt0
319 # no lldp receive
320
321 - name: Delete LLDP interfaces configuration
322 cisco.nxos.nxos_lldp_interfaces:
323 state: deleted
324
325 # After state:
326 # ------------
327 #
328
329
330
331 Return Values
332 -------------
333 Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
334
335 .. raw:: html
336
337 <table border=0 cellpadding=0 class="documentation-table">
338 <tr>
339 <th colspan="1">Key</th>
340 <th>Returned</th>
341 <th width="100%">Description</th>
342 </tr>
343 <tr>
344 <td colspan="1">
345 <div class="ansibleOptionAnchor" id="return-"></div>
346 <b>after</b>
347 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
348 <div style="font-size: small">
349 <span style="color: purple">list</span>
350 </div>
351 </td>
352 <td>when changed</td>
353 <td>
354 <div>The resulting configuration model invocation.</div>
355 <br/>
356 <div style="font-size: smaller"><b>Sample:</b></div>
357 <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
358 of the parameters above.</div>
359 </td>
360 </tr>
361 <tr>
362 <td colspan="1">
363 <div class="ansibleOptionAnchor" id="return-"></div>
364 <b>before</b>
365 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
366 <div style="font-size: small">
367 <span style="color: purple">list</span>
368 </div>
369 </td>
370 <td>always</td>
371 <td>
372 <div>The configuration prior to the model invocation.</div>
373 <br/>
374 <div style="font-size: smaller"><b>Sample:</b></div>
375 <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned will always be in the same format
376 of the parameters above.</div>
377 </td>
378 </tr>
379 <tr>
380 <td colspan="1">
381 <div class="ansibleOptionAnchor" id="return-"></div>
382 <b>commands</b>
383 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
384 <div style="font-size: small">
385 <span style="color: purple">list</span>
386 </div>
387 </td>
388 <td>always</td>
389 <td>
390 <div>The set of commands pushed to the remote device.</div>
391 <br/>
392 <div style="font-size: smaller"><b>Sample:</b></div>
393 <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;interface Ethernet1/2&#x27;, &#x27;lldp receive&#x27;, &#x27;lldp tlv-set vlan 12&#x27;]</div>
394 </td>
395 </tr>
396 </table>
397 <br/><br/>
398
399
400 Status
401 ------
402
403
404 Authors
405 ~~~~~~~
406
407 - Adharsh Srivats Rangarajan (@adharshsrivatsr)