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