]> git.proxmox.com Git - mirror_frr.git/blame - tests/topotests/docker/inner/openvswitch.sh
Merge pull request #12798 from donaldsharp/rib_match_multicast
[mirror_frr.git] / tests / topotests / docker / inner / openvswitch.sh
CommitLineData
31eae3e3 1#!/bin/bash
47a3a827 2# SPDX-License-Identifier: MIT
31eae3e3
CF
3#
4# Copyright 2018 Network Device Education Foundation, Inc. ("NetDEF")
31eae3e3
CF
5
6# Load shared functions
7CDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
8. $CDIR/funcs.sh
9
10#
11# Script begin
12#
13
14log_info "Configuring OpenvSwitch...."
15
16# Configure OpenvSwitch so we are able to run mininet
17mkdir -p /var/run/openvswitch
18ovsdb-tool create /etc/openvswitch/conf.db \
19 /usr/share/openvswitch/vswitch.ovsschema
20ovsdb-server /etc/openvswitch/conf.db \
21 --remote=punix:/var/run/openvswitch/db.sock \
22 --remote=ptcp:6640 --pidfile=ovsdb-server.pid >/dev/null 2>/dev/null & \
23 disown
24ovs-vswitchd >/dev/null 2>/dev/null & disown
25
26sleep 2
27
28ovs-vsctl --no-wait -- init
29ovs_version=$(ovs-vsctl -V | grep ovs-vsctl | awk '{print $4}')
30ovs_db_version=$(\
31 ovsdb-tool schema-version /usr/share/openvswitch/vswitch.ovsschema)
32ovs-vsctl --no-wait -- set Open_vSwitch . db-version="${ovs_db_version}"
33ovs-vsctl --no-wait -- set Open_vSwitch . ovs-version="${ovs_version}"
34ovs-vsctl --no-wait -- set Open_vSwitch . system-type="docker-ovs"
35ovs-vsctl --no-wait -- set Open_vSwitch . system-version="0.1"
36ovs-vsctl --no-wait -- \
37 set Open_vSwitch . external-ids:system-id=`cat /proc/sys/kernel/random/uuid`
38ovs-vsctl --no-wait -- set-manager ptcp:6640
39ovs-appctl -t ovsdb-server \
40 ovsdb-server/add-remote db:Open_vSwitch,Open_vSwitch,manager_options