]>
Commit | Line | Data |
---|---|---|
a2cb9dfd BP |
1 | AT_BANNER([ofproto]) |
2 | ||
a2cb9dfd BP |
3 | AT_SETUP([ofproto - echo request]) |
4 | OFPROTO_START | |
5 | AT_CHECK([ovs-ofctl -vANY:ANY:WARN probe br0]) | |
6 | OFPROTO_STOP | |
7 | AT_CLEANUP | |
8 | ||
9 | AT_SETUP([ofproto - feature request, config request]) | |
10 | OFPROTO_START | |
11 | AT_CHECK([ovs-ofctl -vANY:ANY:WARN show br0], [0], [stdout]) | |
640c7c94 | 12 | AT_CHECK([STRIP_XIDS stdout], [0], [dnl |
d1e2cf21 | 13 | OFPT_FEATURES_REPLY: ver:0x1, dpid:fedcba9876543210 |
a2cb9dfd BP |
14 | n_tables:2, n_buffers:256 |
15 | features: capabilities:0x87, actions:0xfff | |
16 | LOCAL(br0): addr:aa:55:aa:55:00:00, config: 0x1, state:0x1 | |
3b62feba | 17 | OFPT_GET_CONFIG_REPLY: frags=normal miss_send_len=0 |
a2cb9dfd BP |
18 | ]) |
19 | OFPROTO_STOP | |
20 | AT_CLEANUP | |
21 | ||
22 | AT_SETUP([ofproto - mod-port]) | |
23 | OFPROTO_START | |
24 | for command_config_state in \ | |
25 | 'up 0 0' \ | |
26 | 'noflood 0x10 0' \ | |
27 | 'down 0x11 0x1' \ | |
28 | 'flood 0x1 0x1' | |
29 | do | |
30 | set $command_config_state | |
31 | command=$[1] config=$[2] state=$[3] | |
32 | AT_CHECK([ovs-ofctl -vANY:ANY:WARN mod-port br0 br0 $command]) | |
33 | AT_CHECK([ovs-ofctl -vANY:ANY:WARN show br0], [0], [stdout]) | |
640c7c94 | 34 | AT_CHECK_UNQUOTED([STRIP_XIDS stdout], [0], [dnl |
d1e2cf21 | 35 | OFPT_FEATURES_REPLY: ver:0x1, dpid:fedcba9876543210 |
a2cb9dfd BP |
36 | n_tables:2, n_buffers:256 |
37 | features: capabilities:0x87, actions:0xfff | |
38 | LOCAL(br0): addr:aa:55:aa:55:00:00, config: $config, state:$state | |
3b62feba | 39 | OFPT_GET_CONFIG_REPLY: frags=normal miss_send_len=0 |
a2cb9dfd BP |
40 | ]) |
41 | done | |
42 | OFPROTO_STOP | |
43 | AT_CLEANUP | |
640c7c94 BP |
44 | |
45 | AT_SETUP([ofproto - basic flow_mod commands]) | |
46 | OFPROTO_START | |
47 | AT_CHECK([ovs-ofctl dump-flows br0 | STRIP_XIDS], [0], [NXST_FLOW reply: | |
48 | ]) | |
70315176 | 49 | AT_CHECK([echo 'in_port=1,actions=0' | ovs-ofctl add-flows br0 -]) |
640c7c94 BP |
50 | AT_CHECK([ovs-ofctl add-flow br0 in_port=0,actions=1]) |
51 | AT_CHECK([ovs-ofctl dump-flows br0 | STRIP_XIDS | STRIP_DURATION], [0], [dnl | |
8961de6a | 52 | NXST_FLOW reply: |
f904747b BP |
53 | cookie=0x0, duration=?s, table_id=0, n_packets=0, n_bytes=0, in_port=1 actions=output:0 |
54 | cookie=0x0, duration=?s, table_id=0, n_packets=0, n_bytes=0, in_port=65534 actions=output:1 | |
640c7c94 BP |
55 | ]) |
56 | AT_CHECK([ovs-ofctl del-flows br0]) | |
57 | AT_CHECK([ovs-ofctl dump-flows br0 | STRIP_XIDS], [0], [NXST_FLOW reply: | |
58 | ]) | |
59 | OFPROTO_STOP | |
60 | AT_CLEANUP |