]> git.proxmox.com Git - mirror_ovs.git/blame - tests/vtep-ctl.at
dpctl: Add the option 'pmd' for dump-flows.
[mirror_ovs.git] / tests / vtep-ctl.at
CommitLineData
ffc759c6
JP
1dnl VTEP_OVSDB_INIT([$1])
2dnl
3dnl Creates an empty database named $1.
4m4_define([VTEP_OVSDB_INIT],
6132b241 5 [AT_CHECK(
ffc759c6
JP
6 [ovsdb-tool create $1 $abs_top_srcdir/vtep/vtep.ovsschema],
7 [0], [stdout], [ignore])
8 AT_CHECK(
9 [[ovsdb-tool transact $1 \
10 '["hardware_vtep",
11 {"op": "insert",
12 "table": "Global",
13 "row": {}}]']],
14 [0], [ignore], [ignore])])
15
16dnl VTEP_CTL_SETUP
17dnl
18dnl Creates an empty database in the current directory and then starts
19dnl an ovsdb-server on it for vtep-ctl to connect to.
20m4_define([VTEP_CTL_SETUP],
21 [VTEP_OVSDB_INIT([db])
56120500 22 AT_CHECK([ovsdb-server --detach --no-chdir --pidfile --remote=punix:socket db >/dev/null 2>&1], [0], [ignore], [ignore])])
ffc759c6
JP
23
24dnl VTEP_CTL_CLEANUP
25dnl
26dnl Kills off the database server.
27m4_define([VTEP_CTL_CLEANUP], [OVSDB_SERVER_SHUTDOWN])
28
29dnl RUN_VTEP_CTL(COMMAND, ...)
30dnl
31dnl Executes each vtep-ctl COMMAND.
32m4_define([RUN_VTEP_CTL],
15394e0f 33 [m4_foreach([command], [$@], [vtep-ctl -vreconnect:emer --db=unix:socket command
ffc759c6
JP
34])])
35m4_define([RUN_VTEP_CTL_ONELINE],
15394e0f 36 [m4_foreach([command], [$@], [vtep-ctl -vreconnect:emer --db=unix:socket --oneline -- command
ffc759c6
JP
37])])
38
39dnl RUN_VTEP_CTL_TOGETHER(COMMAND, ...)
40dnl
41dnl Executes each vtep-ctl COMMAND in a single run of vtep-ctl.
42m4_define([RUN_VTEP_CTL_TOGETHER],
15394e0f 43 [vtep-ctl -vreconnect:emer --db=unix:socket --oneline dnl
ffc759c6
JP
44m4_foreach([command], [$@], [ -- command])])
45
46dnl CHECK_PSWITCHES([PSWITCH], ...)
47dnl
48dnl Verifies that "vtep-ctl list-ps" prints the specified list of
49dnl physical switches, which must be in alphabetical order.
50m4_define([CHECK_PSWITCHES],
51 [dnl Check that the pswitches appear on list-ps, without --oneline.
52 AT_CHECK(
53 [RUN_VTEP_CTL([list-ps])],
54 [0],
55 [m4_foreach([psinfo], [$@], [m4_car(psinfo)
56])],
57 [],
58 [VTEP_CTL_CLEANUP])
59
60 dnl Check that the pswitches appear on list-ps, with --oneline.
61 AT_CHECK(
62 [RUN_VTEP_CTL_ONELINE([list-ps])],
63 [0],
64 [m4_join([\n], m4_foreach([psinfo], [$@], [m4_car(psinfo),]))
65],
66 [],
67 [VTEP_CTL_CLEANUP])
68
69 dnl Check that each pswitch exists according to ps-exists and that
70 dnl a pswitch that should not exist does not.
71 m4_foreach([psinfo], [$@],
72 [AT_CHECK([RUN_VTEP_CTL([ps-exists m4_car(psinfo)])], [0], [],
73 [], [VTEP_CTL_CLEANUP])])
74 AT_CHECK([RUN_VTEP_CTL([ps-exists nonexistent])], [2], [], [],
75 [VTEP_CTL_CLEANUP])])
76
77dnl CHECK_PORTS(PSWITCH, PORT[, PORT...])
78dnl
79dnl Verifies that "vtep-ctl list-ports PSWITCH" prints the specified
80dnl list of ports, which must be in alphabetical order.
81m4_define([CHECK_PORTS],
82 [dnl Check ports without --oneline.
83 AT_CHECK(
84 [RUN_VTEP_CTL([list-ports $1])],
85 [0],
86 [m4_foreach([port], m4_cdr($@), [port
87])],
88 [],
89 [VTEP_CTL_CLEANUP])
90
91 dnl Check ports with --oneline.
92 AT_CHECK(
93 [RUN_VTEP_CTL_ONELINE([list-ports $1])],
94 [0],
95 [m4_join([\n], m4_shift($@))
96],
97 [],
98 [VTEP_CTL_CLEANUP])])
99
100
101dnl CHECK_LSWITCHES([LSWITCH], ...)
102dnl
103dnl Verifies that "vtep-ctl list-ls" prints the specified list of
104dnl logical switches, which must be in alphabetical order.
105m4_define([CHECK_LSWITCHES],
106 [dnl Check that the lswitches appear on list-ls, without --oneline.
107 AT_CHECK(
108 [RUN_VTEP_CTL([list-ls])],
109 [0],
110 [m4_foreach([lsinfo], [$@], [m4_car(lsinfo)
111])],
112 [],
113 [VTEP_CTL_CLEANUP])
114
115 dnl Check that the lswitches appear on list-ls, with --oneline.
116 AT_CHECK(
117 [RUN_VTEP_CTL_ONELINE([list-ls])],
118 [0],
119 [m4_join([\n], m4_foreach([lsinfo], [$@], [m4_car(lsinfo),]))
120],
121 [],
122 [VTEP_CTL_CLEANUP])
123
124 dnl Check that each lswitch exists according to ls-exists and that
125 dnl a pswitch that should not exist does not.
126 m4_foreach([lsinfo], [$@],
127 [AT_CHECK([RUN_VTEP_CTL([ls-exists m4_car(lsinfo)])], [0], [],
128 [], [VTEP_CTL_CLEANUP])])
129 AT_CHECK([RUN_VTEP_CTL([ls-exists nonexistent])], [2], [], [],
130 [VTEP_CTL_CLEANUP])])
131
c3428f43
DS
132
133dnl CHECK_LROUTERS([LROUTER], ...)
134dnl
135dnl Verifies that "vtep-ctl list-lr" prints the specified list of
136dnl logical routers, which must be in alphabetical order.
137m4_define([CHECK_LROUTERS],
138 [dnl Check that the lrouters appear on list-lr, without --oneline.
139 AT_CHECK(
140 [RUN_VTEP_CTL([list-lr])],
141 [0],
142 [m4_foreach([lrinfo], [$@], [m4_car(lrinfo)
143])],
144 [],
145 [VTEP_CTL_CLEANUP])
146
147 dnl Check that the lswitches appear on list-lr, with --oneline.
148 AT_CHECK(
149 [RUN_VTEP_CTL_ONELINE([list-lr])],
150 [0],
151 [m4_join([\n], m4_foreach([lrinfo], [$@], [m4_car(lrinfo),]))
152],
153 [],
154 [VTEP_CTL_CLEANUP])
155
156 dnl Check that each lrouter exists according to lr-exists and that
157 dnl a prouter that should not exist does not.
158 m4_foreach([lrinfo], [$@],
159 [AT_CHECK([RUN_VTEP_CTL([lr-exists m4_car(lrinfo)])], [0], [],
160 [], [VTEP_CTL_CLEANUP])])
161 AT_CHECK([RUN_VTEP_CTL([lr-exists nonexistent])], [2], [], [],
162 [VTEP_CTL_CLEANUP])])
163
164
ffc759c6
JP
165dnl ----------------------------------------------------------------------
166AT_BANNER([vtep-ctl unit tests -- physical switch tests])
167
168AT_SETUP([add-ps a])
169AT_KEYWORDS([vtep-ctl])
170VTEP_CTL_SETUP
171AT_CHECK([RUN_VTEP_CTL([add-ps a])], [0], [], [], [VTEP_CTL_CLEANUP])
172CHECK_PSWITCHES([a])
173VTEP_CTL_CLEANUP
174AT_CLEANUP
175
176AT_SETUP([add-ps a, add-ps a])
177AT_KEYWORDS([vtep-ctl])
178VTEP_CTL_SETUP
179AT_CHECK([RUN_VTEP_CTL([add-ps a])], [0], [], [], [VTEP_CTL_CLEANUP])
180AT_CHECK([RUN_VTEP_CTL([add-ps a])], [1], [],
181 [vtep-ctl: cannot create physical switch a because it already exists
182], [VTEP_CTL_CLEANUP])
183VTEP_CTL_CLEANUP
184AT_CLEANUP
185
186AT_SETUP([add-ps a, add-ps b])
187AT_KEYWORDS([vtep-ctl])
188VTEP_CTL_SETUP
189AT_CHECK([RUN_VTEP_CTL([add-ps a], [add-ps b])], [0], [], [],
190 [VTEP_CTL_CLEANUP])
191CHECK_PSWITCHES([a], [b])
192VTEP_CTL_CLEANUP
193AT_CLEANUP
194
195AT_SETUP([add-ps a, add-ps b, del-ps a])
196AT_KEYWORDS([vtep-ctl])
197VTEP_CTL_SETUP
198AT_CHECK([RUN_VTEP_CTL([add-ps a], [add-ps b], [del-ps a])], [0], [], [],
199 [VTEP_CTL_CLEANUP])
200CHECK_PSWITCHES([b])
201VTEP_CTL_CLEANUP
202AT_CLEANUP
203
204AT_SETUP([add-ps a, del-ps a, add-ps a])
205AT_KEYWORDS([vtep-ctl])
206VTEP_CTL_SETUP
207AT_CHECK([RUN_VTEP_CTL_TOGETHER(
208 [add-ps a],
209 [del-ps a],
210 [add-ps a])], [0], [
211
212
213], [], [VTEP_CTL_CLEANUP])
214CHECK_PSWITCHES([a])
215VTEP_CTL_CLEANUP
216AT_CLEANUP
217
218AT_SETUP([add-ps a, add-port a a1, add-port a a2])
219AT_KEYWORDS([vtep-ctl])
220VTEP_CTL_SETUP
221AT_CHECK([RUN_VTEP_CTL(
222 [add-ps a],
223 [--if-exists del-ps b],
224 [add-port a a1],
225 [add-port a a2])], [0], [], [], [VTEP_CTL_CLEANUP])
226CHECK_PSWITCHES([a])
227CHECK_PORTS([a], [a1], [a2])
228VTEP_CTL_CLEANUP
229AT_CLEANUP
230
231AT_SETUP([add-ps a, add-port a a1, add-port a a1])
232AT_KEYWORDS([vtep-ctl])
233VTEP_CTL_SETUP
234AT_CHECK([RUN_VTEP_CTL(
235 [add-ps a],
236 [add-port a a1])], [0], [], [], [VTEP_CTL_CLEANUP])
237AT_CHECK([RUN_VTEP_CTL([add-port a a1])], [1], [],
238 [vtep-ctl: cannot create a port named a1 on a because a port with that name already exists
239], [VTEP_CTL_CLEANUP])
240VTEP_CTL_CLEANUP
241AT_CLEANUP
242
243AT_SETUP([add-ps a b, add-port a a1, add-port b b1, del-ps a])
244AT_KEYWORDS([vtep-ctl])
245VTEP_CTL_SETUP
246AT_CHECK([RUN_VTEP_CTL_TOGETHER(
247 [add-ps a],
248 [add-ps b],
249 [add-port a a1],
250 [add-port b b1],
251 [--if-exists del-port b b2],
252 [del-ps a])], [0], [
253
254
255
256
257
258], [], [VTEP_CTL_CLEANUP])
259CHECK_PSWITCHES([b])
260CHECK_PORTS([b], [b1])
261VTEP_CTL_CLEANUP
262AT_CLEANUP
263
264AT_SETUP([add-ps a b, add-port a a1, add-port b b1, del-port a a1])
265AT_KEYWORDS([vtep-ctl])
266VTEP_CTL_SETUP
267AT_CHECK([RUN_VTEP_CTL(
268 [add-ps a],
269 [add-ps b],
270 [add-port a a1],
271 [--may-exist add-port b b1],
272 [del-port a a1])], [0], [], [], [VTEP_CTL_CLEANUP])
273AT_CHECK([RUN_VTEP_CTL([--may-exist add-port b b1])], [0], [], [],
274 [VTEP_CTL_CLEANUP])
275CHECK_PSWITCHES([a], [b])
276CHECK_PORTS([a])
277CHECK_PORTS([b], [b1])
278VTEP_CTL_CLEANUP
279AT_CLEANUP
280
281AT_SETUP([add-ps a b, add-port a p1, add-port b p1, del-port a p1])
282AT_KEYWORDS([vtep-ctl])
283VTEP_CTL_SETUP
284AT_CHECK([RUN_VTEP_CTL(
285 [add-ps a],
286 [add-ps b],
287 [add-port a p1],
288 [add-port b p1])], [0], [], [], [VTEP_CTL_CLEANUP])
289CHECK_PSWITCHES([a], [b])
290CHECK_PORTS([a], [p1])
291CHECK_PORTS([b], [p1])
292AT_CHECK([RUN_VTEP_CTL([del-port a p1])], [0], [], [],
293 [VTEP_CTL_CLEANUP])
294CHECK_PSWITCHES([a], [b])
295CHECK_PORTS([a])
296CHECK_PORTS([b], [p1])
297VTEP_CTL_CLEANUP
298AT_CLEANUP
299
300
301dnl ----------------------------------------------------------------------
302AT_BANNER([vtep-ctl unit tests -- logical switch tests])
303
304AT_SETUP([add-ls a])
305AT_KEYWORDS([vtep-ctl])
306VTEP_CTL_SETUP
307AT_CHECK([RUN_VTEP_CTL([add-ls a])], [0], [], [], [VTEP_CTL_CLEANUP])
308CHECK_LSWITCHES([a])
309VTEP_CTL_CLEANUP
310AT_CLEANUP
311
312AT_SETUP([add-ls a, add-ls a])
313AT_KEYWORDS([vtep-ctl])
314VTEP_CTL_SETUP
315AT_CHECK([RUN_VTEP_CTL([add-ls a])], [0], [], [], [VTEP_CTL_CLEANUP])
316AT_CHECK([RUN_VTEP_CTL([add-ls a])], [1], [],
317 [vtep-ctl: cannot create logical switch a because it already exists
318], [VTEP_CTL_CLEANUP])
319VTEP_CTL_CLEANUP
320AT_CLEANUP
321
322AT_SETUP([add-ls a, add-ls b])
323AT_KEYWORDS([vtep-ctl])
324VTEP_CTL_SETUP
325AT_CHECK([RUN_VTEP_CTL([add-ls a], [add-ls b])], [0], [], [],
326 [VTEP_CTL_CLEANUP])
327CHECK_LSWITCHES([a], [b])
328VTEP_CTL_CLEANUP
329AT_CLEANUP
330
331AT_SETUP([add-ls a, add-ls b, del-ls a])
332AT_KEYWORDS([vtep-ctl])
333VTEP_CTL_SETUP
334AT_CHECK([RUN_VTEP_CTL([add-ls a], [add-ls b], [del-ls a])], [0], [], [],
335 [VTEP_CTL_CLEANUP])
336CHECK_LSWITCHES([b])
337VTEP_CTL_CLEANUP
338AT_CLEANUP
339
340AT_SETUP([add-ls a, del-ls a, add-ls a])
341AT_KEYWORDS([vtep-ctl])
342VTEP_CTL_SETUP
343AT_CHECK([RUN_VTEP_CTL_TOGETHER(
344 [add-ls a],
345 [del-ls a],
346 [add-ls a])], [0], [
347
348
349], [], [VTEP_CTL_CLEANUP])
350CHECK_LSWITCHES([a])
351VTEP_CTL_CLEANUP
352AT_CLEANUP
353
b351ac0c
DB
354AT_SETUP([add-ls a, get-replication-mode a])
355AT_KEYWORDS([vtep-ctl])
356VTEP_CTL_SETUP
357AT_CHECK([RUN_VTEP_CTL(
358 [add-ls a],
359 [get-replication-mode a])],
360 [0], [[(null)]
361], [], [VTEP_CTL_CLEANUP])
362VTEP_CTL_CLEANUP
363AT_CLEANUP
364
365AT_SETUP([add-ls a, set-replication-mode a source_node])
366AT_KEYWORDS([vtep-ctl])
367VTEP_CTL_SETUP
368AT_CHECK([RUN_VTEP_CTL(
369 [add-ls a],[set-replication-mode a source_node],
370 [get-replication-mode a])],
371 [0], [source_node
372], [], [VTEP_CTL_CLEANUP])
373VTEP_CTL_CLEANUP
374AT_CLEANUP
375
376AT_SETUP([add-ls a, set-replication-mode a service_node])
377AT_KEYWORDS([vtep-ctl])
378VTEP_CTL_SETUP
379AT_CHECK([RUN_VTEP_CTL(
380 [add-ls a],[set-replication-mode a service_node],
381 [get-replication-mode a])],
382 [0], [service_node
383], [], [VTEP_CTL_CLEANUP])
384VTEP_CTL_CLEANUP
385AT_CLEANUP
ffc759c6 386
c3428f43
DS
387
388dnl ----------------------------------------------------------------------
389AT_BANNER([vtep-ctl unit tests -- logical router tests])
390
391AT_SETUP([add-lr a])
392AT_KEYWORDS([vtep-ctl])
393VTEP_CTL_SETUP
394AT_CHECK([RUN_VTEP_CTL([add-lr a])], [0], [], [], [VTEP_CTL_CLEANUP])
395CHECK_LROUTERS([a])
396VTEP_CTL_CLEANUP
397AT_CLEANUP
398
399AT_SETUP([add-lr a, add-lr a])
400AT_KEYWORDS([vtep-ctl])
401VTEP_CTL_SETUP
402AT_CHECK([RUN_VTEP_CTL([add-lr a])], [0], [], [], [VTEP_CTL_CLEANUP])
403AT_CHECK([RUN_VTEP_CTL([add-lr a])], [1], [],
404 [vtep-ctl: cannot create logical router a because it already exists
405], [VTEP_CTL_CLEANUP])
406VTEP_CTL_CLEANUP
407AT_CLEANUP
408
409AT_SETUP([add-lr a, add-lr b])
410AT_KEYWORDS([vtep-ctl])
411VTEP_CTL_SETUP
412AT_CHECK([RUN_VTEP_CTL([add-lr a], [add-lr b])], [0], [], [],
413 [VTEP_CTL_CLEANUP])
414CHECK_LROUTERS([a], [b])
415VTEP_CTL_CLEANUP
416AT_CLEANUP
417
418AT_SETUP([add-lr a, add-lr b, del-lr a])
419AT_KEYWORDS([vtep-ctl])
420VTEP_CTL_SETUP
421AT_CHECK([RUN_VTEP_CTL([add-lr a], [add-lr b], [del-lr a])], [0], [], [],
422 [VTEP_CTL_CLEANUP])
423CHECK_LROUTERS([b])
424VTEP_CTL_CLEANUP
425AT_CLEANUP
426
427AT_SETUP([add-lr a, del-lr a, add-lr a])
428AT_KEYWORDS([vtep-ctl])
429VTEP_CTL_SETUP
430AT_CHECK([RUN_VTEP_CTL_TOGETHER(
431 [add-lr a],
432 [del-lr a],
433 [add-lr a])], [0], [
434
435
436], [], [VTEP_CTL_CLEANUP])
437CHECK_LROUTERS([a])
438VTEP_CTL_CLEANUP
439AT_CLEANUP
440
ffc759c6
JP
441dnl ----------------------------------------------------------------------
442AT_BANNER([vtep-ctl unit tests -- logical binding tests])
443
444AT_SETUP([bind-ls ps1 pp1 300 ls1])
445AT_KEYWORDS([vtep-ctl])
446VTEP_CTL_SETUP
447AT_CHECK([RUN_VTEP_CTL(
448 [add-ps ps1],
449 [add-port ps1 pp1],
450 [add-ls ls1])], [0], [], [], [VTEP_CTL_CLEANUP])
451CHECK_PSWITCHES([ps1])
452CHECK_PORTS([ps1], [pp1])
453CHECK_LSWITCHES([ls1])
454AT_CHECK([RUN_VTEP_CTL(
455 [bind-ls ps1 pp1 300 ls1])], [0], [], [], [VTEP_CTL_CLEANUP])
456AT_CHECK([RUN_VTEP_CTL([list-bindings ps1 pp1])], [0],
457 [0300 ls1
458], [], [VTEP_CTL_CLEANUP])
459VTEP_CTL_CLEANUP
460AT_CLEANUP
461
462AT_SETUP([bind-ls ps1 pp1 300 ls1, bind-ls ps1 pp1 400 ls2])
463AT_KEYWORDS([vtep-ctl])
464VTEP_CTL_SETUP
465AT_CHECK([RUN_VTEP_CTL(
466 [add-ps ps1],
467 [add-port ps1 pp1],
468 [add-ls ls1],
469 [add-ls ls2])], [0], [], [], [VTEP_CTL_CLEANUP])
470CHECK_PSWITCHES([ps1])
471CHECK_PORTS([ps1], [pp1])
472CHECK_LSWITCHES([ls1], [ls2])
473AT_CHECK([RUN_VTEP_CTL(
474 [bind-ls ps1 pp1 300 ls1])], [0], [], [], [VTEP_CTL_CLEANUP])
475AT_CHECK([RUN_VTEP_CTL(
476 [bind-ls ps1 pp1 400 ls2])], [0], [], [], [VTEP_CTL_CLEANUP])
477AT_CHECK([RUN_VTEP_CTL([list-bindings ps1 pp1])], [0],
478 [0300 ls1
4790400 ls2
480], [], [VTEP_CTL_CLEANUP])
481VTEP_CTL_CLEANUP
482AT_CLEANUP
483
484AT_SETUP([bind-ls ps1 pp1 300, bind-ls ps2 pp2 300 ls2])
485AT_KEYWORDS([vtep-ctl])
486VTEP_CTL_SETUP
487AT_CHECK([RUN_VTEP_CTL(
488 [add-ps ps1],
489 [add-ps ps2],
490 [add-port ps1 pp1],
491 [add-port ps2 pp2],
492 [add-ls ls1],
493 [add-ls ls2])], [0], [], [], [VTEP_CTL_CLEANUP])
494CHECK_PSWITCHES([ps1], [ps2])
495CHECK_PORTS([ps1], [pp1])
496CHECK_PORTS([ps2], [pp2])
497CHECK_LSWITCHES([ls1], [ls2])
498AT_CHECK([RUN_VTEP_CTL(
499 [bind-ls ps1 pp1 300 ls1])], [0], [], [], [VTEP_CTL_CLEANUP])
500AT_CHECK([RUN_VTEP_CTL(
501 [bind-ls ps2 pp2 300 ls2])], [0], [], [], [VTEP_CTL_CLEANUP])
502AT_CHECK([RUN_VTEP_CTL([list-bindings ps1 pp1])], [0],
503 [0300 ls1
504], [], [VTEP_CTL_CLEANUP])
505AT_CHECK([RUN_VTEP_CTL([list-bindings ps2 pp2])], [0],
506 [0300 ls2
507], [], [VTEP_CTL_CLEANUP])
508VTEP_CTL_CLEANUP
509AT_CLEANUP
510
511
512dnl ----------------------------------------------------------------------
513AT_BANNER([vtep-ctl unit tests -- MAC binding tests])
514
515AT_SETUP([add-ucast-local ls1])
516AT_KEYWORDS([vtep-ctl])
517VTEP_CTL_SETUP
518AT_CHECK([RUN_VTEP_CTL(
519 [add-ls ls1])], [0], [], [], [VTEP_CTL_CLEANUP])
520CHECK_LSWITCHES([ls1])
521AT_CHECK([RUN_VTEP_CTL(
522 [add-ucast-local ls1 00:11:22:33:44:55 10.0.0.10],
523 [add-ucast-local ls1 00:11:22:33:44:66 vxlan_over_ipv4 10.0.0.11])
524], [0], [], [], [VTEP_CTL_CLEANUP])
525AT_CHECK([RUN_VTEP_CTL([list-local-macs ls1])], [0],
526 [ucast-mac-local
527 00:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.10
528 00:11:22:33:44:66 -> vxlan_over_ipv4/10.0.0.11
529
530mcast-mac-local
531
532], [], [VTEP_CTL_CLEANUP])
533AT_CHECK([RUN_VTEP_CTL([list-remote-macs ls1])], [0],
534 [ucast-mac-remote
535
536mcast-mac-remote
537
538], [], [VTEP_CTL_CLEANUP])
539VTEP_CTL_CLEANUP
540AT_CLEANUP
541
542AT_SETUP([add-ucast-local ls1, overwrite])
543AT_KEYWORDS([vtep-ctl])
544VTEP_CTL_SETUP
545AT_CHECK([RUN_VTEP_CTL(
546 [add-ls ls1])], [0], [], [], [VTEP_CTL_CLEANUP])
547CHECK_LSWITCHES([ls1])
548AT_CHECK([RUN_VTEP_CTL(
549 [add-ucast-local ls1 00:11:22:33:44:55 10.0.0.10],
550 [add-ucast-local ls1 00:11:22:33:44:55 10.0.0.11])
551], [0], [], [], [VTEP_CTL_CLEANUP])
552AT_CHECK([RUN_VTEP_CTL([list-local-macs ls1])], [0],
553 [ucast-mac-local
554 00:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.11
555
556mcast-mac-local
557
558], [], [VTEP_CTL_CLEANUP])
559VTEP_CTL_CLEANUP
560AT_CLEANUP
561
562AT_SETUP([add-ucast-local ls1, del-ucast-local ls1])
563AT_KEYWORDS([vtep-ctl])
564VTEP_CTL_SETUP
565AT_CHECK([RUN_VTEP_CTL(
566 [add-ls ls1])], [0], [], [], [VTEP_CTL_CLEANUP])
567CHECK_LSWITCHES([ls1])
568AT_CHECK([RUN_VTEP_CTL(
569 [add-ucast-local ls1 00:11:22:33:44:55 10.0.0.10],
570 [add-ucast-local ls1 00:11:22:33:44:66 vxlan_over_ipv4 10.0.0.11])
571], [0], [], [], [VTEP_CTL_CLEANUP])
572AT_CHECK([RUN_VTEP_CTL([list-local-macs ls1])], [0],
573 [ucast-mac-local
574 00:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.10
575 00:11:22:33:44:66 -> vxlan_over_ipv4/10.0.0.11
576
577mcast-mac-local
578
579], [], [VTEP_CTL_CLEANUP])
580AT_CHECK([RUN_VTEP_CTL(
581 [del-ucast-local ls1 00:11:22:33:44:55])
582], [0], [], [], [VTEP_CTL_CLEANUP])
583AT_CHECK([RUN_VTEP_CTL([list-local-macs ls1])], [0],
584 [ucast-mac-local
585 00:11:22:33:44:66 -> vxlan_over_ipv4/10.0.0.11
586
587mcast-mac-local
588
589], [], [VTEP_CTL_CLEANUP])
590VTEP_CTL_CLEANUP
591AT_CLEANUP
592
593AT_SETUP([add-ucast-remote ls1])
594AT_KEYWORDS([vtep-ctl])
595VTEP_CTL_SETUP
596AT_CHECK([RUN_VTEP_CTL(
597 [add-ls ls1])], [0], [], [], [VTEP_CTL_CLEANUP])
598CHECK_LSWITCHES([ls1])
599AT_CHECK([RUN_VTEP_CTL(
600 [add-ucast-remote ls1 00:11:22:33:44:55 10.0.0.10],
601 [add-ucast-remote ls1 00:11:22:33:44:66 vxlan_over_ipv4 10.0.0.11])
602], [0], [], [], [VTEP_CTL_CLEANUP])
603AT_CHECK([RUN_VTEP_CTL([list-remote-macs ls1])], [0],
604 [ucast-mac-remote
605 00:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.10
606 00:11:22:33:44:66 -> vxlan_over_ipv4/10.0.0.11
607
608mcast-mac-remote
609
610], [], [VTEP_CTL_CLEANUP])
611AT_CHECK([RUN_VTEP_CTL([list-local-macs ls1])], [0],
612 [ucast-mac-local
613
614mcast-mac-local
615
616], [], [VTEP_CTL_CLEANUP])
617VTEP_CTL_CLEANUP
618AT_CLEANUP
619
620AT_SETUP([add-ucast-remote ls1, overwrite])
621AT_KEYWORDS([vtep-ctl])
622VTEP_CTL_SETUP
623AT_CHECK([RUN_VTEP_CTL(
624 [add-ls ls1])], [0], [], [], [VTEP_CTL_CLEANUP])
625CHECK_LSWITCHES([ls1])
626AT_CHECK([RUN_VTEP_CTL(
627 [add-ucast-remote ls1 00:11:22:33:44:55 10.0.0.10],
628 [add-ucast-remote ls1 00:11:22:33:44:55 10.0.0.11])
629], [0], [], [], [VTEP_CTL_CLEANUP])
630AT_CHECK([RUN_VTEP_CTL([list-remote-macs ls1])], [0],
631 [ucast-mac-remote
632 00:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.11
633
634mcast-mac-remote
635
636], [], [VTEP_CTL_CLEANUP])
637VTEP_CTL_CLEANUP
638AT_CLEANUP
639
640AT_SETUP([add-ucast-remote ls1, del-ucast-remote ls1])
641AT_KEYWORDS([vtep-ctl])
642VTEP_CTL_SETUP
643AT_CHECK([RUN_VTEP_CTL(
644 [add-ls ls1])], [0], [], [], [VTEP_CTL_CLEANUP])
645CHECK_LSWITCHES([ls1])
646AT_CHECK([RUN_VTEP_CTL(
647 [add-ucast-remote ls1 00:11:22:33:44:55 10.0.0.10],
648 [add-ucast-remote ls1 00:11:22:33:44:66 vxlan_over_ipv4 10.0.0.11])
649], [0], [], [], [VTEP_CTL_CLEANUP])
650AT_CHECK([RUN_VTEP_CTL([list-remote-macs ls1])], [0],
651 [ucast-mac-remote
652 00:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.10
653 00:11:22:33:44:66 -> vxlan_over_ipv4/10.0.0.11
654
655mcast-mac-remote
656
657], [], [VTEP_CTL_CLEANUP])
658AT_CHECK([RUN_VTEP_CTL(
659 [del-ucast-remote ls1 00:11:22:33:44:55])
660], [0], [], [], [VTEP_CTL_CLEANUP])
661AT_CHECK([RUN_VTEP_CTL([list-remote-macs ls1])], [0],
662 [ucast-mac-remote
663 00:11:22:33:44:66 -> vxlan_over_ipv4/10.0.0.11
664
665mcast-mac-remote
666
667], [], [VTEP_CTL_CLEANUP])
668VTEP_CTL_CLEANUP
669AT_CLEANUP
670
671AT_SETUP([add-ucast-local ls1, add-ucast-remote ls1])
672AT_KEYWORDS([vtep-ctl])
673VTEP_CTL_SETUP
674AT_CHECK([RUN_VTEP_CTL(
675 [add-ls ls1])], [0], [], [], [VTEP_CTL_CLEANUP])
676CHECK_LSWITCHES([ls1])
677AT_CHECK([RUN_VTEP_CTL(
678 [add-ucast-local ls1 00:11:22:33:44:55 10.0.0.10],
679 [add-ucast-local ls1 00:11:22:33:44:66 10.0.0.11],
680 [add-ucast-remote ls1 02:11:22:33:44:55 10.0.0.10],
681 [add-ucast-remote ls1 02:11:22:33:44:66 vxlan_over_ipv4 10.0.0.11])
682], [0], [], [], [VTEP_CTL_CLEANUP])
683AT_CHECK([RUN_VTEP_CTL([list-local-macs ls1])], [0],
684 [ucast-mac-local
685 00:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.10
686 00:11:22:33:44:66 -> vxlan_over_ipv4/10.0.0.11
687
688mcast-mac-local
689
690], [], [VTEP_CTL_CLEANUP])
691AT_CHECK([RUN_VTEP_CTL([list-remote-macs ls1])], [0],
692 [ucast-mac-remote
693 02:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.10
694 02:11:22:33:44:66 -> vxlan_over_ipv4/10.0.0.11
695
696mcast-mac-remote
697
698], [], [VTEP_CTL_CLEANUP])
699VTEP_CTL_CLEANUP
700AT_CLEANUP
701
702AT_SETUP([add-mcast-local ls1])
703AT_KEYWORDS([vtep-ctl])
704VTEP_CTL_SETUP
705AT_CHECK([RUN_VTEP_CTL(
706 [add-ls ls1])], [0], [], [], [VTEP_CTL_CLEANUP])
707CHECK_LSWITCHES([ls1])
708AT_CHECK([RUN_VTEP_CTL(
709 [add-mcast-local ls1 01:11:22:33:44:55 10.0.0.10],
710 [add-mcast-local ls1 01:11:22:33:44:66 vxlan_over_ipv4 10.0.0.11],
711 [add-mcast-local ls1 01:11:22:33:44:55 10.0.0.12])
712], [0], [], [], [VTEP_CTL_CLEANUP])
713AT_CHECK([RUN_VTEP_CTL([list-local-macs ls1])], [0],
714 [ucast-mac-local
715
716mcast-mac-local
717 01:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.10
718 01:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.12
719 01:11:22:33:44:66 -> vxlan_over_ipv4/10.0.0.11
720
721], [], [VTEP_CTL_CLEANUP])
722AT_CHECK([RUN_VTEP_CTL([list-remote-macs ls1])], [0],
723 [ucast-mac-remote
724
725mcast-mac-remote
726
727], [], [VTEP_CTL_CLEANUP])
728VTEP_CTL_CLEANUP
729AT_CLEANUP
730
731AT_SETUP([add-mcast-local ls1, del-mcast-local ls1])
732AT_KEYWORDS([vtep-ctl])
733VTEP_CTL_SETUP
734AT_CHECK([RUN_VTEP_CTL(
735 [add-ls ls1])], [0], [], [], [VTEP_CTL_CLEANUP])
736CHECK_LSWITCHES([ls1])
737AT_CHECK([RUN_VTEP_CTL(
738 [add-mcast-local ls1 01:11:22:33:44:55 10.0.0.10],
739 [add-mcast-local ls1 01:11:22:33:44:66 vxlan_over_ipv4 10.0.0.11],
740 [add-mcast-local ls1 01:11:22:33:44:55 10.0.0.12],
741 [add-mcast-local ls1 01:11:22:33:44:55 10.0.0.13])
742], [0], [], [], [VTEP_CTL_CLEANUP])
743AT_CHECK([RUN_VTEP_CTL([list-local-macs ls1])], [0],
744 [ucast-mac-local
745
746mcast-mac-local
747 01:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.10
748 01:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.12
749 01:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.13
750 01:11:22:33:44:66 -> vxlan_over_ipv4/10.0.0.11
751
752], [], [VTEP_CTL_CLEANUP])
753AT_CHECK([RUN_VTEP_CTL(
754 [del-mcast-local ls1 01:11:22:33:44:55 10.0.0.12])
755], [0], [], [], [VTEP_CTL_CLEANUP])
756AT_CHECK([RUN_VTEP_CTL([list-local-macs ls1])], [0],
757 [ucast-mac-local
758
759mcast-mac-local
760 01:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.10
761 01:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.13
762 01:11:22:33:44:66 -> vxlan_over_ipv4/10.0.0.11
763
764], [], [VTEP_CTL_CLEANUP])
765VTEP_CTL_CLEANUP
766AT_CLEANUP
767
768AT_SETUP([add-mcast-remote ls1])
769AT_KEYWORDS([vtep-ctl])
770VTEP_CTL_SETUP
771AT_CHECK([RUN_VTEP_CTL(
772 [add-ls ls1])], [0], [], [], [VTEP_CTL_CLEANUP])
773CHECK_LSWITCHES([ls1])
774AT_CHECK([RUN_VTEP_CTL(
775 [add-mcast-remote ls1 01:11:22:33:44:55 10.0.0.10],
776 [add-mcast-remote ls1 01:11:22:33:44:66 vxlan_over_ipv4 10.0.0.11],
777 [add-mcast-remote ls1 01:11:22:33:44:55 10.0.0.12])
778], [0], [], [], [VTEP_CTL_CLEANUP])
779AT_CHECK([RUN_VTEP_CTL([list-remote-macs ls1])], [0],
780 [ucast-mac-remote
781
782mcast-mac-remote
783 01:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.10
784 01:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.12
785 01:11:22:33:44:66 -> vxlan_over_ipv4/10.0.0.11
786
787], [], [VTEP_CTL_CLEANUP])
788AT_CHECK([RUN_VTEP_CTL([list-local-macs ls1])], [0],
789 [ucast-mac-local
790
791mcast-mac-local
792
793], [], [VTEP_CTL_CLEANUP])
794VTEP_CTL_CLEANUP
795AT_CLEANUP
796
797AT_SETUP([add-mcast-remote ls1, del-mcast-remote ls1])
798AT_KEYWORDS([vtep-ctl])
799VTEP_CTL_SETUP
800AT_CHECK([RUN_VTEP_CTL(
801 [add-ls ls1])], [0], [], [], [VTEP_CTL_CLEANUP])
802CHECK_LSWITCHES([ls1])
803AT_CHECK([RUN_VTEP_CTL(
804 [add-mcast-remote ls1 01:11:22:33:44:55 10.0.0.10],
805 [add-mcast-remote ls1 01:11:22:33:44:66 vxlan_over_ipv4 10.0.0.11],
806 [add-mcast-remote ls1 01:11:22:33:44:55 10.0.0.12],
807 [add-mcast-remote ls1 01:11:22:33:44:55 10.0.0.13])
808], [0], [], [], [VTEP_CTL_CLEANUP])
809AT_CHECK([RUN_VTEP_CTL([list-remote-macs ls1])], [0],
810 [ucast-mac-remote
811
812mcast-mac-remote
813 01:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.10
814 01:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.12
815 01:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.13
816 01:11:22:33:44:66 -> vxlan_over_ipv4/10.0.0.11
817
818], [], [VTEP_CTL_CLEANUP])
819AT_CHECK([RUN_VTEP_CTL(
820 [del-mcast-remote ls1 01:11:22:33:44:55 10.0.0.12])
821], [0], [], [], [VTEP_CTL_CLEANUP])
822AT_CHECK([RUN_VTEP_CTL([list-remote-macs ls1])], [0],
823 [ucast-mac-remote
824
825mcast-mac-remote
826 01:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.10
827 01:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.13
828 01:11:22:33:44:66 -> vxlan_over_ipv4/10.0.0.11
829
830], [], [VTEP_CTL_CLEANUP])
831VTEP_CTL_CLEANUP
832AT_CLEANUP
833
834AT_SETUP([add-mcast-local ls1, add-mcast-remote ls1])
835AT_KEYWORDS([vtep-ctl])
836VTEP_CTL_SETUP
837AT_CHECK([RUN_VTEP_CTL(
838 [add-ls ls1])], [0], [], [], [VTEP_CTL_CLEANUP])
839CHECK_LSWITCHES([ls1])
840AT_CHECK([RUN_VTEP_CTL(
841 [add-mcast-local ls1 01:11:22:33:44:55 10.0.0.10],
842 [add-mcast-local ls1 01:11:22:33:44:66 10.0.0.11],
843 [add-mcast-local ls1 01:11:22:33:44:55 10.0.0.12],
844 [add-mcast-remote ls1 03:11:22:33:44:55 10.0.0.10],
845 [add-mcast-remote ls1 03:11:22:33:44:66 vxlan_over_ipv4 10.0.0.11],
846 [add-mcast-remote ls1 03:11:22:33:44:55 10.0.0.12])
847], [0], [], [], [VTEP_CTL_CLEANUP])
848AT_CHECK([RUN_VTEP_CTL([list-local-macs ls1])], [0],
849 [ucast-mac-local
850
851mcast-mac-local
852 01:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.10
853 01:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.12
854 01:11:22:33:44:66 -> vxlan_over_ipv4/10.0.0.11
855
856], [], [VTEP_CTL_CLEANUP])
857AT_CHECK([RUN_VTEP_CTL([list-remote-macs ls1])], [0],
858 [ucast-mac-remote
859
860mcast-mac-remote
861 03:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.10
862 03:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.12
863 03:11:22:33:44:66 -> vxlan_over_ipv4/10.0.0.11
864
865], [], [VTEP_CTL_CLEANUP])
866VTEP_CTL_CLEANUP
867AT_CLEANUP
868
869AT_SETUP([add local and remote macs, clear-local-macs])
870AT_KEYWORDS([vtep-ctl])
871VTEP_CTL_SETUP
872AT_CHECK([RUN_VTEP_CTL(
873 [add-ls ls1])], [0], [], [], [VTEP_CTL_CLEANUP])
874CHECK_LSWITCHES([ls1])
875AT_CHECK([RUN_VTEP_CTL(
876 [add-ucast-local ls1 00:11:22:33:44:55 10.0.0.10],
877 [add-mcast-local ls1 01:11:22:33:44:55 10.0.0.10],
878 [add-mcast-local ls1 01:11:22:33:44:66 vxlan_over_ipv4 10.0.0.11],
879 [add-mcast-local ls1 01:11:22:33:44:55 10.0.0.12],
880 [add-ucast-remote ls1 00:11:22:33:44:55 10.0.0.10],
881 [add-mcast-remote ls1 01:11:22:33:44:55 10.0.0.10],
882 [add-mcast-remote ls1 01:11:22:33:44:66 vxlan_over_ipv4 10.0.0.11],
883 [add-mcast-remote ls1 01:11:22:33:44:55 10.0.0.12])
884], [0], [], [], [VTEP_CTL_CLEANUP])
885AT_CHECK([RUN_VTEP_CTL([list-local-macs ls1])], [0],
886 [ucast-mac-local
887 00:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.10
888
889mcast-mac-local
890 01:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.10
891 01:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.12
892 01:11:22:33:44:66 -> vxlan_over_ipv4/10.0.0.11
893
894], [], [VTEP_CTL_CLEANUP])
895AT_CHECK([RUN_VTEP_CTL([list-remote-macs ls1])], [0],
896 [ucast-mac-remote
897 00:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.10
898
899mcast-mac-remote
900 01:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.10
901 01:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.12
902 01:11:22:33:44:66 -> vxlan_over_ipv4/10.0.0.11
903
904], [], [VTEP_CTL_CLEANUP])
905AT_CHECK([RUN_VTEP_CTL(
906 [clear-local-macs ls1])], [0], [], [], [VTEP_CTL_CLEANUP])
907AT_CHECK([RUN_VTEP_CTL([list-local-macs ls1])], [0],
908 [ucast-mac-local
909
910mcast-mac-local
911
912], [], [VTEP_CTL_CLEANUP])
913AT_CHECK([RUN_VTEP_CTL([list-remote-macs ls1])], [0],
914 [ucast-mac-remote
915 00:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.10
916
917mcast-mac-remote
918 01:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.10
919 01:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.12
920 01:11:22:33:44:66 -> vxlan_over_ipv4/10.0.0.11
921
922], [], [VTEP_CTL_CLEANUP])
923VTEP_CTL_CLEANUP
924AT_CLEANUP
925
926AT_SETUP([add local and remote macs, clear-remote-macs])
927AT_KEYWORDS([vtep-ctl])
928VTEP_CTL_SETUP
929AT_CHECK([RUN_VTEP_CTL(
930 [add-ls ls1])], [0], [], [], [VTEP_CTL_CLEANUP])
931CHECK_LSWITCHES([ls1])
932AT_CHECK([RUN_VTEP_CTL(
933 [add-ucast-local ls1 00:11:22:33:44:55 10.0.0.10],
934 [add-mcast-local ls1 01:11:22:33:44:55 10.0.0.10],
935 [add-mcast-local ls1 01:11:22:33:44:66 vxlan_over_ipv4 10.0.0.11],
936 [add-mcast-local ls1 01:11:22:33:44:55 10.0.0.12],
937 [add-ucast-remote ls1 00:11:22:33:44:55 10.0.0.10],
938 [add-mcast-remote ls1 01:11:22:33:44:55 10.0.0.10],
939 [add-mcast-remote ls1 01:11:22:33:44:66 vxlan_over_ipv4 10.0.0.11],
940 [add-mcast-remote ls1 01:11:22:33:44:55 10.0.0.12])
941], [0], [], [], [VTEP_CTL_CLEANUP])
942AT_CHECK([RUN_VTEP_CTL([list-local-macs ls1])], [0],
943 [ucast-mac-local
944 00:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.10
945
946mcast-mac-local
947 01:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.10
948 01:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.12
949 01:11:22:33:44:66 -> vxlan_over_ipv4/10.0.0.11
950
951], [], [VTEP_CTL_CLEANUP])
952AT_CHECK([RUN_VTEP_CTL([list-remote-macs ls1])], [0],
953 [ucast-mac-remote
954 00:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.10
955
956mcast-mac-remote
957 01:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.10
958 01:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.12
959 01:11:22:33:44:66 -> vxlan_over_ipv4/10.0.0.11
960
961], [], [VTEP_CTL_CLEANUP])
962AT_CHECK([RUN_VTEP_CTL(
963 [clear-remote-macs ls1])], [0], [], [], [VTEP_CTL_CLEANUP])
964AT_CHECK([RUN_VTEP_CTL([list-local-macs ls1])], [0],
965 [ucast-mac-local
966 00:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.10
967
968mcast-mac-local
969 01:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.10
970 01:11:22:33:44:55 -> vxlan_over_ipv4/10.0.0.12
971 01:11:22:33:44:66 -> vxlan_over_ipv4/10.0.0.11
972
973], [], [VTEP_CTL_CLEANUP])
974AT_CHECK([RUN_VTEP_CTL([list-remote-macs ls1])], [0],
975 [ucast-mac-remote
976
977mcast-mac-remote
978
979], [], [VTEP_CTL_CLEANUP])
980VTEP_CTL_CLEANUP
981AT_CLEANUP
982
983dnl ----------------------------------------------------------------------
984AT_BANNER([vtep-ctl unit tests -- manager commands])
985
986AT_SETUP([managers])
987AT_KEYWORDS([manager vtep-ctl])
988VTEP_CTL_SETUP
989AT_CHECK([RUN_VTEP_CTL_TOGETHER(
990 [del-manager],
991 [get-manager],
992 [set-manager tcp:4.5.6.7],
993 [get-manager],
994 [set-manager tcp:8.9.10.11 tcp:5.4.3.2],
995 [get-manager],
3ffed5cb
GL
996 [--inactivity-probe=30000 set-manager tcp:1.2.3.4],
997 [get-manager],
ffc759c6
JP
998 [del-manager],
999 [get-manager])], [0], [
1000
1001
1002tcp:4.5.6.7
1003
1004tcp:5.4.3.2\ntcp:8.9.10.11
1005
3ffed5cb
GL
1006tcp:1.2.3.4
1007
ffc759c6
JP
1008
1009], [], [VTEP_CTL_CLEANUP])
1010VTEP_CTL_CLEANUP
1011AT_CLEANUP
3935f67d
AW
1012
1013AT_SETUP([show command])
1014AT_KEYWORDS([vtep-ctl show])
1015VTEP_CTL_SETUP
1016AT_CHECK([RUN_VTEP_CTL(
1017 [set-manager tcp:4.5.6.7],
1018 [add-ps a],
1019 [add-port a a1],
1020 [add-ls ls1],
1021 [bind-ls a a1 100 ls1],
31d2b7c0 1022 [set Physical_Switch a management_ips=[[4.3.2.1]] tunnel_ips=[[1.2.3.4]]])], [0], [ignore], [], [VTEP_CTL_CLEANUP])
3935f67d 1023
15394e0f 1024AT_CHECK([vtep-ctl -vreconnect:emer --db=unix:socket show | tail -n+2 | sed 's/=[[a-f0-9-]][[a-f0-9-]]*}/=<ls>}/' ], [0], [dnl
3935f67d
AW
1025 Manager "tcp:4.5.6.7"
1026 Physical_Switch a
31d2b7c0 1027 management_ips: [["4.3.2.1"]]
3935f67d 1028 tunnel_ips: [["1.2.3.4"]]
29004db2 1029 Physical_Port a1
31d2b7c0 1030 vlan_bindings:
29004db2 1031 100=ls1
3935f67d
AW
1032], [], [VTEP_CTL_CLEANUP])
1033
1034VTEP_CTL_CLEANUP
1035AT_CLEANUP