Debian Codegraph @

ansible_collections/dellemc/openmanage/docs/modules/ome_template_network_vlan.rst

raw
1 .. _ome_template_network_vlan_module:
2
3
4 ome_template_network_vlan -- Set tagged and untagged vlans to native network card supported by a template on OpenManage Enterprise
5 ==================================================================================================================================
6
7 .. contents::
8 :local:
9 :depth: 1
10
11
12 Synopsis
13 --------
14
15 This module allows to set tagged and untagged vlans to native network card supported by a template on OpenManage Enterprise.
16
17
18
19 Requirements
20 ------------
21 The below requirements are needed on the host that executes this module.
22
23 - python \>= 3.9.6
24
25
26
27 Parameters
28 ----------
29
30 template_name (optional, str, None)
31 Name of the template.
32
33 It is mutually exclusive with \ :emphasis:`template\_id`\ .
34
35
36 template_id (optional, int, None)
37 Id of the template.
38
39 It is mutually exclusive with \ :emphasis:`template\_name`\ .
40
41
42 nic_identifier (True, str, None)
43 Display name of NIC port in the template for VLAN configuration.
44
45
46 propagate_vlan (optional, bool, True)
47 To deploy the modified VLAN settings immediately without rebooting the server.
48
49 This option will be applied only when there are changes to the VLAN configuration.
50
51
52 untagged_networks (optional, list, None)
53 List of untagged networks and their corresponding NIC ports.
54
55
56 port (True, int, None)
57 NIC port number of the untagged VLAN.
58
59
60 untagged_network_id (optional, int, None)
61 ID of the untagged VLAN
62
63 Enter 0 to clear the untagged VLAN from the port.
64
65 This option is mutually exclusive with \ :emphasis:`untagged\_network\_name`\
66
67 To get the VLAN network ID use the API \ %20https://I(hostname\ /api/NetworkConfigurationService/Networks)
68
69
70 untagged_network_name (optional, str, None)
71 name of the vlan for untagging
72
73 provide 0 for clearing the untagging for this \ :emphasis:`port`\
74
75 This parameter is mutually exclusive with \ :emphasis:`untagged\_network\_id`\
76
77
78
79 tagged_networks (optional, list, None)
80 List of tagged VLANs and their corresponding NIC ports.
81
82
83 port (True, int, None)
84 NIC port number of the tagged VLAN
85
86
87 tagged_network_ids (optional, list, None)
88 List of IDs of the tagged VLANs
89
90 Enter [] to remove the tagged VLAN from a port.
91
92 List of \ :emphasis:`tagged\_network\_ids`\ is combined with list of \ :emphasis:`tagged\_network\_names`\ when adding tagged VLANs to a port.
93
94 To get the VLAN network ID use the API \ %20https://I(hostname\ /api/NetworkConfigurationService/Networks)
95
96
97 tagged_network_names (optional, list, None)
98 List of names of tagged VLANs
99
100 Enter [] to remove the tagged VLAN from a port.
101
102 List of \ :emphasis:`tagged\_network\_names`\ is combined with list of \ :emphasis:`tagged\_network\_ids`\ when adding tagged VLANs to a port.
103
104
105
106 hostname (True, str, None)
107 OpenManage Enterprise or OpenManage Enterprise Modular IP address or hostname.
108
109
110 username (False, str, None)
111 OpenManage Enterprise or OpenManage Enterprise Modular username.
112
113 If the username is not provided, then the environment variable \ :envvar:`OME\_USERNAME`\ is used.
114
115 Example: export OME\_USERNAME=username
116
117
118 password (False, str, None)
119 OpenManage Enterprise or OpenManage Enterprise Modular password.
120
121 If the password is not provided, then the environment variable \ :envvar:`OME\_PASSWORD`\ is used.
122
123 Example: export OME\_PASSWORD=password
124
125
126 x_auth_token (False, str, None)
127 Authentication token.
128
129 If the x\_auth\_token is not provided, then the environment variable \ :envvar:`OME\_X\_AUTH\_TOKEN`\ is used.
130
131 Example: export OME\_X\_AUTH\_TOKEN=x\_auth\_token
132
133
134 port (optional, int, 443)
135 OpenManage Enterprise or OpenManage Enterprise Modular HTTPS port.
136
137
138 validate_certs (optional, bool, True)
139 If \ :literal:`false`\ , the SSL certificates will not be validated.
140
141 Configure \ :literal:`false`\ only on personally controlled sites where self-signed certificates are used.
142
143 Prior to collection version \ :literal:`5.0.0`\ , the \ :emphasis:`validate\_certs`\ is \ :literal:`false`\ by default.
144
145
146 ca_path (optional, path, None)
147 The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation.
148
149
150 timeout (optional, int, 30)
151 The socket level timeout in seconds.
152
153
154
155
156
157 Notes
158 -----
159
160 .. note::
161 - Run this module from a system that has direct access to Dell OpenManage Enterprise.
162 - This module supports \ :literal:`check\_mode`\ .
163
164
165
166
167 Examples
168 --------
169
170 .. code-block:: yaml+jinja
171
172
173 ---
174 - name: Add tagged or untagged VLANs to a template using VLAN ID and name
175 dellemc.openmanage.ome_template_network_vlan:
176 hostname: "192.168.0.1"
177 username: "username"
178 password: "password"
179 ca_path: "/path/to/ca_cert.pem"
180 template_id: 78
181 nic_identifier: NIC Slot 4
182 untagged_networks:
183 - port: 1
184 untagged_network_id: 127656
185 - port: 2
186 untagged_network_name: vlan2
187 tagged_networks:
188 - port: 1
189 tagged_network_ids:
190 - 12767
191 - 12768
192 - port: 4
193 tagged_network_ids:
194 - 12767
195 - 12768
196 tagged_network_names:
197 - vlan3
198 - port: 2
199 tagged_network_names:
200 - vlan4
201 - vlan1
202
203 - name: Clear the tagged and untagged VLANs from a template
204 dellemc.openmanage.ome_template_network_vlan:
205 hostname: "192.168.0.1"
206 username: "username"
207 password: "password"
208 ca_path: "/path/to/ca_cert.pem"
209 template_id: 78
210 nic_identifier: NIC Slot 4
211 untagged_networks:
212 # For removing the untagged VLANs for the port 1 and 2
213 - port: 1
214 untagged_network_id: 0
215 - port: 2
216 untagged_network_name: 0
217 tagged_networks:
218 # For removing the tagged VLANs for port 1, 4 and 2
219 - port: 1
220 tagged_network_ids: []
221 - port: 4
222 tagged_network_ids: []
223 tagged_network_names: []
224 - port: 2
225 tagged_network_names: []
226
227
228
229 Return Values
230 -------------
231
232 msg (always, str, Successfully applied the network settings to template.)
233 Overall status of the template vlan operation.
234
235
236 error_info (on HTTP error, dict, {'error': {'@Message.ExtendedInfo': [{'Message': 'Unable to complete the request because TemplateId does not exist or is not applicable for the resource URI.', 'MessageArgs': ['TemplateId'], 'MessageId': 'CGEN1004', 'RelatedProperties': [], 'Resolution': "Check the request resource URI. Refer to the OpenManage Enterprise-Modular User's Guide for more information about resource URI and its properties.", 'Severity': 'Critical'}], 'code': 'Base.1.0.GeneralError', 'message': 'A general error has occurred. See ExtendedInfo for more information.'}})
237 Details of the HTTP Error.
238
239
240
241
242
243 Status
244 ------
245
246
247
248
249
250 Authors
251 ~~~~~~~
252
253 - Jagadeesh N V(@jagadeeshnv)
254