3 # Copyright (C) 2013 Nippon Telegraph and Telephone Corporation.
4 # Copyright (C) 2013 YAMAMOTO Takashi <yamamoto at valinux co jp>
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
10 # http://www.apache.org/licenses/LICENSE-2.0
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
16 # See the License for the specific language governing permissions and
17 # limitations under the License.
19 if [ -z "$VSCTL" ]; then
24 # conncect them using patch ports.
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}
39 CONT=tcp:127.0.0.1:6633