]>
Commit | Line | Data |
---|---|---|
5acf2e91 BP |
1 | AT_BANNER([dpctl]) |
2 | ||
3 | AT_SETUP([dpctl - add-dp del-dp]) | |
4 | OVS_VSWITCHD_START | |
5 | AT_CHECK([ovs-appctl dpctl/add-dp dummy@br0]) | |
6 | AT_CHECK([ovs-appctl dpctl/add-dp dummy@br0], [2], [], | |
7 | [ovs-vswitchd: add_dp (File exists) | |
8 | ovs-appctl: ovs-vswitchd: server returned an error | |
9 | ]) | |
10 | AT_CHECK([ovs-appctl dpctl/del-dp dummy@br0]) | |
186de419 BP |
11 | AT_CHECK([ovs-appctl dpctl/del-dp dummy@br0], [2], [], [stderr]) |
12 | AT_CHECK([sed 's/(.*)/(...)/' stderr], [0], [dnl | |
13 | ovs-vswitchd: opening datapath (...) | |
5acf2e91 BP |
14 | ovs-appctl: ovs-vswitchd: server returned an error |
15 | ]) | |
16 | OVS_VSWITCHD_STOP | |
17 | AT_CLEANUP | |
18 | ||
19 | AT_SETUP([dpctl - add-if set-if del-if]) | |
20 | OVS_VSWITCHD_START([], [], [=override]) | |
21 | AT_CHECK([ovs-appctl dpctl/add-dp dummy@br0]) | |
22 | AT_CHECK([ovs-appctl dpctl/show dummy@br0], [0], [dnl | |
23 | dummy@br0: | |
24 | lookups: hit:0 missed:0 lost:0 | |
25 | flows: 0 | |
e98d0cb3 | 26 | port 0: br0 (dummy-internal) |
5acf2e91 | 27 | ]) |
8cc0bed4 | 28 | AT_CHECK([ovs-appctl dpctl/add-if dummy@br0 vif1.0,type=dummy,port_no=5]) |
5acf2e91 BP |
29 | AT_CHECK([ovs-appctl dpctl/show dummy@br0], [0], [dnl |
30 | dummy@br0: | |
31 | lookups: hit:0 missed:0 lost:0 | |
32 | flows: 0 | |
e98d0cb3 | 33 | port 0: br0 (dummy-internal) |
8cc0bed4 | 34 | port 5: vif1.0 (dummy) |
5acf2e91 | 35 | ]) |
8cc0bed4 | 36 | AT_CHECK([ovs-appctl dpctl/add-if dummy@br0 vif1.0,type=dummy], [2], [], |
186de419 BP |
37 | [stderr]) |
38 | AT_CHECK([sed 's/(.*)/(...)/' stderr], [0], | |
39 | [ovs-vswitchd: adding vif1.0 to dummy@br0 failed (...) | |
5acf2e91 BP |
40 | ovs-appctl: ovs-vswitchd: server returned an error |
41 | ]) | |
42 | AT_CHECK([ovs-appctl dpctl/set-if dummy@br0 vif1.0,port_no=5]) | |
43 | AT_CHECK([ovs-appctl dpctl/set-if dummy@br0 vif1.0,type=system], [2], [], | |
8cc0bed4 | 44 | [ovs-vswitchd: vif1.0: can't change type from dummy to system |
5acf2e91 BP |
45 | ovs-appctl: ovs-vswitchd: server returned an error |
46 | ]) | |
e98d0cb3 | 47 | AT_CHECK([ovs-appctl dpctl/set-if dummy@br0 br0,type=dummy-internal], [0]) |
a3e8437a | 48 | AT_CHECK([ovs-appctl dpctl/set-if dummy@br0 br0,type=internal], [2], [], |
e98d0cb3 | 49 | [ovs-vswitchd: br0: can't change type from dummy-internal to internal |
5acf2e91 BP |
50 | ovs-appctl: ovs-vswitchd: server returned an error |
51 | ]) | |
52 | AT_CHECK([ovs-appctl dpctl/del-if dummy@br0 vif1.0]) | |
53 | AT_CHECK([ovs-appctl dpctl/show dummy@br0], [0], [dnl | |
54 | dummy@br0: | |
55 | lookups: hit:0 missed:0 lost:0 | |
56 | flows: 0 | |
e98d0cb3 | 57 | port 0: br0 (dummy-internal) |
5acf2e91 BP |
58 | ]) |
59 | AT_CHECK([ovs-appctl dpctl/del-if dummy@br0 vif1.0], [2], [], | |
60 | [ovs-vswitchd: no port named vif1.0 | |
61 | ovs-appctl: ovs-vswitchd: server returned an error | |
62 | ]) | |
63 | AT_CHECK([ovs-appctl dpctl/show dummy@br0], [0], [dnl | |
64 | dummy@br0: | |
65 | lookups: hit:0 missed:0 lost:0 | |
66 | flows: 0 | |
e98d0cb3 | 67 | port 0: br0 (dummy-internal) |
5acf2e91 BP |
68 | ]) |
69 | AT_CHECK([ovs-appctl dpctl/del-if dummy@br0 nonexistent], [2], [], | |
70 | [ovs-vswitchd: no port named nonexistent | |
71 | ovs-appctl: ovs-vswitchd: server returned an error | |
72 | ]) | |
186de419 BP |
73 | AT_CHECK([ovs-appctl dpctl/del-if dummy@br0 br0], [2], [], [stderr]) |
74 | AT_CHECK([sed 's/(.*)/(...)/' stderr], [0], | |
75 | [ovs-vswitchd: deleting port br0 from dummy@br0 failed (...) | |
5acf2e91 BP |
76 | ovs-appctl: ovs-vswitchd: server returned an error |
77 | ]) | |
78 | AT_CHECK([ovs-appctl dpctl/del-dp dummy@br0]) | |
186de419 BP |
79 | AT_CHECK([ovs-appctl dpctl/del-if dummy@br0 br0], [2], [], [stderr]) |
80 | AT_CHECK([sed 's/(.*)/(...)/' stderr], [0], | |
81 | [ovs-vswitchd: opening datapath (...) | |
5acf2e91 BP |
82 | ovs-appctl: ovs-vswitchd: server returned an error |
83 | ]) | |
186de419 | 84 | OVS_VSWITCHD_STOP(["/dummy@br0: port_del failed/d |
096d7135 PB |
85 | /dummy@br0: failed to add vif1.0 as port/d |
86 | /Dropped 1 log messages in last/d"]) | |
5acf2e91 | 87 | AT_CLEANUP |