22
22
# #############################################
23
23
# # MERGE ##
24
24
# #############################################
25
+
26
+ - name : Put Parent Interface for Sub-Interface into routed mode
27
+ cisco.dcnm.dcnm_interface :
28
+ check_deploy : False
29
+ fabric : " {{ ansible_it_fabric }}"
30
+ state : merged # only choose form [merged, replaced, deleted, overridden, query]
31
+ config :
32
+ - name : " {{ ansible_parent_intf1 }}" # should be of the form eth<port-id>
33
+ type : eth # choose from this list [pc, vpc, sub_int, lo, eth, svi]
34
+ switch :
35
+ - " {{ ansible_switch1 }}" # provide the switch information where the config is to be deployed
36
+ deploy : false # choose from [true, false]
37
+ profile :
38
+ admin_state : true # choose from [true, false]
39
+ mode : routed # choose from [trunk, access, routed, monitor, epl_routed]
40
+ description : " Parent Interface for Sub-Interface test"
41
+
25
42
- name : Create interfaces to check various delete form 1
26
43
cisco.dcnm.dcnm_interface :
27
- check_deploy : True
44
+ check_deploy : False
28
45
fabric : " {{ ansible_it_fabric }}"
29
46
state : merged # only choose form [merged, replaced, deleted, overridden, query]
30
47
config :
31
48
- name : po333 # should be of the form po<port-id>
32
49
type : pc # choose from this list [pc, vpc, sub_int, lo, eth, svi]
33
50
switch :
34
51
- " {{ ansible_switch1 }}" # provide the switch information where the config is to be deployed
35
- deploy : true # choose from [true, false]
52
+ deploy : false # choose from [true, false]
36
53
profile :
37
54
mode : trunk # choose from [trunk, access, l3, monitor]
38
55
39
56
- name : " {{ ansible_sub_intf1 }}" # should be of the form eth<port-num>.<port-id>
40
57
type : sub_int # choose from this list [pc, vpc, sub_int, lo, eth, svi]
41
58
switch :
42
59
- " {{ ansible_switch1 }}" # provide the switch information where the config is to be deployed
43
- deploy : true # choose from [true, false]
60
+ deploy : false # choose from [true, false]
44
61
profile :
45
62
mode : subint # choose from [subint]
46
63
vlan : 100 # vlan ID [min:2, max:3967]
51
68
type : lo # choose from this list [pc, vpc, sub_int, lo, eth, svi]
52
69
switch :
53
70
- " {{ ansible_switch1 }}" # provide the switch where to deploy the config
54
- deploy : true # choose from [true, false]
71
+ deploy : false # choose from [true, false]
55
72
profile :
56
73
mode : lo # choose from [lo]
57
74
ipv4_addr : 193.168.2.1 # ipv4 address for the loopback interface
61
78
switch : # provide switches of vPC pair
62
79
- " {{ ansible_switch1 }}"
63
80
- " {{ ansible_switch2 }}"
64
- deploy : true # choose from [true, false]
81
+ deploy : false # choose from [true, false]
65
82
profile :
66
83
admin_state : true # choose from [true, false]
67
84
mode : trunk # choose from [trunk, access]
88
105
- ' (result["diff"][0]["deleted"] | length) == 0'
89
106
- ' (result["diff"][0]["replaced"] | length) == 0'
90
107
- ' (result["diff"][0]["overridden"] | length) == 0'
91
- - ' (result["diff"][0]["deploy"] | length) == 4 '
108
+ - ' (result["diff"][0]["deploy"] | length) == 0 '
92
109
93
110
- assert :
94
111
that :
101
118
102
119
- name : Delete all interfaces form 1
103
120
cisco.dcnm.dcnm_interface :
104
- check_deploy : True
121
+ check_deploy : False
105
122
fabric : " {{ ansible_it_fabric }}"
106
123
state : deleted # only choose form [merged, replaced, deleted, overridden,query]
107
124
register : result
124
141
# # MERGE ##
125
142
# #############################################
126
143
144
+ - name : Put Parent Interface for Sub-Interface into routed mode
145
+ cisco.dcnm.dcnm_interface :
146
+ check_deploy : False
147
+ fabric : " {{ ansible_it_fabric }}"
148
+ state : merged # only choose form [merged, replaced, deleted, overridden, query]
149
+ config :
150
+ - name : " {{ ansible_parent_intf1 }}" # should be of the form eth<port-id>
151
+ type : eth # choose from this list [pc, vpc, sub_int, lo, eth, svi]
152
+ switch :
153
+ - " {{ ansible_switch1 }}" # provide the switch information where the config is to be deployed
154
+ deploy : false # choose from [true, false]
155
+ profile :
156
+ admin_state : true # choose from [true, false]
157
+ mode : routed # choose from [trunk, access, routed, monitor, epl_routed]
158
+ description : " Parent Interface for Sub-Interface test"
159
+
127
160
- name : Create all interfaces to check delete form 2
128
161
cisco.dcnm.dcnm_interface :
129
- check_deploy : True
162
+ check_deploy : False
130
163
fabric : " {{ ansible_it_fabric }}"
131
164
state : merged # only choose form [merged, replaced, deleted, overridden, query]
132
165
config :
133
166
- name : po333 # should be of the form po<port-id>
134
167
type : pc # choose from this list [pc, vpc, sub_int, lo, eth, svi]
135
168
switch :
136
169
- " {{ ansible_switch1 }}" # provide the switch information where the config is to be deployed
137
- deploy : true # choose from [true, false]
170
+ deploy : false # choose from [true, false]
138
171
profile :
139
172
mode : trunk # choose from [trunk, access, l3, monitor]
140
173
141
174
- name : " {{ ansible_sub_intf1 }}" # should be of the form eth<port-num>.<port-id>
142
175
type : sub_int # choose from this list [pc, vpc, sub_int, lo, eth, svi]
143
176
switch :
144
177
- " {{ ansible_switch1 }}" # provide the switch information where the config is to be deployed
145
- deploy : true # choose from [true, false]
178
+ deploy : false # choose from [true, false]
146
179
profile :
147
180
mode : subint # choose from [subint]
148
181
vlan : 100 # vlan ID [min:2, max:3967]
153
186
type : lo # choose from this list [pc, vpc, sub_int, lo, eth, svi]
154
187
switch :
155
188
- " {{ ansible_switch1 }}" # provide the switch where to deploy the config
156
- deploy : true # choose from [true, false]
189
+ deploy : false # choose from [true, false]
157
190
profile :
158
191
mode : lo # choose from [lo]
159
192
ipv4_addr : 193.168.2.1 # ipv4 address for the loopback interface
163
196
switch : # provide switches of vPC pair
164
197
- " {{ ansible_switch1 }}"
165
198
- " {{ ansible_switch2 }}"
166
- deploy : true # choose from [true, false]
199
+ deploy : false # choose from [true, false]
167
200
profile :
168
201
admin_state : true # choose from [true, false]
169
202
mode : trunk # choose from [trunk, access]
190
223
- ' (result["diff"][0]["deleted"] | length) == 0'
191
224
- ' (result["diff"][0]["replaced"] | length) == 0'
192
225
- ' (result["diff"][0]["overridden"] | length) == 0'
193
- - ' (result["diff"][0]["deploy"] | length) == 4 '
226
+ - ' (result["diff"][0]["deploy"] | length) == 0 '
194
227
195
228
- assert :
196
229
that :
203
236
204
237
- name : Delete all interfaces form 2
205
238
cisco.dcnm.dcnm_interface :
206
- check_deploy : True
239
+ check_deploy : False
207
240
fabric : " {{ ansible_it_fabric }}"
208
241
state : deleted # only choose form [merged, replaced, deleted, overridden,query]
209
242
config :
210
243
- switch :
211
- - " {{ ansible_switch1 }}" # provide the switch information where the config is to be deployed
212
- - " {{ ansible_switch1 }}"
213
244
- " {{ ansible_switch2 }}" # provide the switch where to deploy the config
214
245
register : result
215
246
220
251
- ' (result["diff"][0]["deleted"] | length) == 4'
221
252
- ' (result["diff"][0]["replaced"] | length) != 0'
222
253
- ' (result["diff"][0]["overridden"] | length) == 0'
223
- - ' (result["diff"][0]["deploy"] | length) ! = 0'
254
+ - ' (result["diff"][0]["deploy"] | length) = = 0'
224
255
225
256
- assert :
226
257
that :
231
262
# # MERGE ##
232
263
# #############################################
233
264
265
+ - name : Put Parent Interface for Sub-Interface into routed mode
266
+ cisco.dcnm.dcnm_interface :
267
+ check_deploy : False
268
+ fabric : " {{ ansible_it_fabric }}"
269
+ state : merged # only choose form [merged, replaced, deleted, overridden, query]
270
+ config :
271
+ - name : " {{ ansible_parent_intf1 }}" # should be of the form eth<port-id>
272
+ type : eth # choose from this list [pc, vpc, sub_int, lo, eth, svi]
273
+ switch :
274
+ - " {{ ansible_switch1 }}" # provide the switch information where the config is to be deployed
275
+ deploy : false # choose from [true, false]
276
+ profile :
277
+ admin_state : true # choose from [true, false]
278
+ mode : routed # choose from [trunk, access, routed, monitor, epl_routed]
279
+ description : " Parent Interface for Sub-Interface test"
280
+
234
281
- name : Create all interfaces to check delete form 3
235
282
cisco.dcnm.dcnm_interface :
236
- check_deploy : True
283
+ check_deploy : False
237
284
fabric : " {{ ansible_it_fabric }}"
238
285
state : merged # only choose form [merged, replaced, deleted, overridden, query]
239
286
config :
240
287
- name : po333 # should be of the form po<port-id>
241
288
type : pc # choose from this list [pc, vpc, sub_int, lo, eth, svi]
242
289
switch :
243
290
- " {{ ansible_switch1 }}" # provide the switch information where the config is to be deployed
244
- deploy : true # choose from [true, false]
291
+ deploy : false # choose from [true, false]
245
292
profile :
246
293
mode : trunk # choose from [trunk, access, l3, monitor]
247
294
248
295
- name : " {{ ansible_sub_intf1 }}" # should be of the form eth<port-num>.<port-id>
249
296
type : sub_int # choose from this list [pc, vpc, sub_int, lo, eth, svi]
250
297
switch :
251
298
- " {{ ansible_switch1 }}" # provide the switch information where the config is to be deployed
252
- deploy : true # choose from [true, false]
299
+ deploy : false # choose from [true, false]
253
300
profile :
254
301
mode : subint # choose from [subint]
255
302
vlan : 100 # vlan ID [min:2, max:3967]
260
307
type : lo # choose from this list [pc, vpc, sub_int, lo, eth, svi]
261
308
switch :
262
309
- " {{ ansible_switch1 }}" # provide the switch where to deploy the config
263
- deploy : true # choose from [true, false]
310
+ deploy : false # choose from [true, false]
264
311
profile :
265
312
mode : lo # choose from [lo]
266
313
ipv4_addr : 193.168.2.1 # ipv4 address for the loopback interface
270
317
switch : # provide switches of vPC pair
271
318
- " {{ ansible_switch1 }}"
272
319
- " {{ ansible_switch2 }}"
273
- deploy : true # choose from [true, false]
320
+ deploy : false # choose from [true, false]
274
321
profile :
275
322
admin_state : true # choose from [true, false]
276
323
mode : trunk # choose from [trunk, access]
297
344
- ' (result["diff"][0]["deleted"] | length) == 0'
298
345
- ' (result["diff"][0]["replaced"] | length) == 0'
299
346
- ' (result["diff"][0]["overridden"] | length) == 0'
300
- - ' (result["diff"][0]["deploy"] | length) == 4 '
347
+ - ' (result["diff"][0]["deploy"] | length) == 0 '
301
348
302
349
- assert :
303
350
that :
310
357
311
358
- name : Delete all interfaces form 3
312
359
cisco.dcnm.dcnm_interface :
313
- check_deploy : True
360
+ check_deploy : False
314
361
fabric : " {{ ansible_it_fabric }}"
315
362
state : deleted # only choose form [merged, replaced, deleted, overridden,query]
316
363
config :
351
398
352
399
- name : Put fabric to default state
353
400
cisco.dcnm.dcnm_interface :
354
- check_deploy : True
401
+ check_deploy : False
355
402
fabric : " {{ ansible_it_fabric }}"
356
403
state : overridden # only choose form [merged, replaced, deleted, overridden, query]
357
404
register : result
361
408
that :
362
409
- ' item["RETURN_CODE"] == 200'
363
410
loop : ' {{ result.response }}'
364
- when : IT_CONTEXT is not defined
411
+ when : IT_CONTEXT is not defined
0 commit comments