backing up
[vsorcdistro/.git] / ryu / build / lib.linux-armv7l-2.7 / ryu / tests / integrated / test_vrrp_multi.sh
1 #! /bin/sh
2
3 # Copyright (C) 2013 Nippon Telegraph and Telephone Corporation.
4 # Copyright (C) 2013 YAMAMOTO Takashi <yamamoto at valinux co jp>
5 #
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
9 #
10 #    http://www.apache.org/licenses/LICENSE-2.0
11 #
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
15 # implied.
16 # See the License for the specific language governing permissions and
17 # limitations under the License.
18
19 if [ -z "$VSCTL" ]; then
20     VSCTL=ovs-vsctl
21 fi
22
23 # create two bridges.
24 # conncect them using patch ports.
25
26 create() {
27     BR=$1
28     LOCAL_PORT=patch$2
29     PEER_PORT=patch$3
30     CONT=$4
31     ${VSCTL} add-br ${BR} -- set bridge ${BR} datapath_type=netdev
32     ${VSCTL} add-port ${BR} ${LOCAL_PORT}
33     ${VSCTL} set interface ${LOCAL_PORT} type=patch
34     ${VSCTL} set interface ${LOCAL_PORT} options:peer=${PEER_PORT}
35     ${VSCTL} set bridge ${BR} protocols='[OpenFlow12]'
36     ${VSCTL} set-controller ${BR} ${CONT}
37 }
38
39 CONT=tcp:127.0.0.1:6633
40
41 create s0 0 1 ${CONT}
42 create s1 1 0 ${CONT}