Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 8 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,14 @@ validations/
*.save

# Runtime or sub-module files
inst/
faucet/
forch/
mininet/
local/
local_xxx
local.old
firebase/.firebaserc
firebase/.firebase
firebase/functions/package-lock.json
/inst/
/faucet/
/forch/
/mininet/
/local/
/firebase/.firebaserc
/firebase/.firebase
/firebase/functions/package-lock.json
nohup.out
**/node_modules/
.vscode/
Expand Down
24 changes: 24 additions & 0 deletions bin/alt_faucet
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash -e

ROOT=$(realpath $(dirname $0)/..)
cd $ROOT
source etc/config_base.sh

if [ -z "$switch_setup_ext_br" ]; then
echo switch_setup.ext_br not defined for alternate faucet setup.
false
fi

if [ -z "$switch_setup_alt_port" ]; then
echo switch_setup.alt_port not defined for alternate faucet setup.
false
fi

inst_name=$switch_setup_ext_br

inst_dir=inst/faucet/daq-faucet-$inst_name
mkdir -p $inst_dir
cp config/faucet/faucet_$inst_name.yaml $inst_dir/faucet.yaml
echo Launching alternate faucet install $inst_name on $switch_setup_alt_port
echo DAQ autoclean docker kill daq-faucet-$inst_name
cmd/faucet $inst_name $switch_setup_alt_port
7 changes: 6 additions & 1 deletion bin/build_proto
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ sha1sum $proto_files > $WEB_ROOT/protos.hash

gen_path=$ROOT/protoc-gen-doc/bin/protoc-gen-doc

if [ -d venv ]; then
echo Entering virtual python environment...
source venv/bin/activate
fi

mkdir -p build/daq/proto build/proto
cp $proto_files build/daq/proto/
proto_files2=
Expand All @@ -57,4 +62,4 @@ touch libs/proto/__init__.py
cp build/daq/proto/*.py libs/proto/
cp build/protos.html $WEB_ROOT/

python -m grpc_tools.protoc -I usi/src/main/proto/ --python_out=libs/proto/ --grpc_python_out=libs/proto/ usi/src/main/proto/usi.proto
python3 -m grpc_tools.protoc -I usi/src/main/proto/ --python_out=libs/proto/ --grpc_python_out=libs/proto/ usi/src/main/proto/usi.proto
9 changes: 7 additions & 2 deletions bin/external_ovs
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,19 @@ source etc/config_base.sh

ext_intf=$switch_setup_data_intf
ext_dpid=$switch_setup_of_dpid
ext_ofpt=$switch_setup_lo_port
ext_brid=$switch_setup_ext_br
ext_brpt=$switch_setup_uplink_port

ext_pri=${ext_intf}
ext_sec=${ext_intf%-pri}-sec

echo ext_dpid is $ext_dpid
if [ -z "$switch_setup_alt_port" ]; then
ext_ofpt=$switch_setup_lo_port
else
ext_ofpt=$switch_setup_alt_port
fi

echo ext_dpid is $ext_dpid on port $ext_ofpt
echo network_config is $network_config

dpid=$(printf %016x $ext_dpid)
Expand Down
6 changes: 5 additions & 1 deletion cmd/exrun
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ fi
export PYTHONPATH=$FORCH:$FAUCET:$MININET:$LIBS:$PROTO

mkdir -p $INSTDIR
rm -f $INSTDIR/faucet* $cleanup_file
rm -rf $INSTDIR/faucet* $cleanup_file

docker ps > /dev/null 2>&1 || service docker start

Expand Down Expand Up @@ -101,6 +101,10 @@ if [ -n "$switch_setup_ext_br" ]; then
autostart bin/external_ovs
fi

if [ -n "$switch_setup_alt_port" ]; then
autostart bin/alt_faucet
fi

if [ -n "$switch_setup_model" ]; then
autostart bin/physical_sec
else
Expand Down
22 changes: 22 additions & 0 deletions config/faucet/faucet_alt-switch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
dps:
alt-switch:
dp_id: 2
interfaces:
1:
native_vlan: 1001
2:
native_vlan: 1002
3:
native_vlan: 1003
4:
native_vlan: 1004
5:
native_vlan: 1005
100:
tagged_vlans: [1001, 1002, 1003, 1004, 1005]
vlans:
1001:
1002:
1003:
1004:
1005:
2 changes: 1 addition & 1 deletion config/system/all.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Load defaults.
source config/system/default.yaml

# Description description for dashboard.
# Description for dashboard.
site_description="Multi-Device All-Tests Configuration"

# Upstream dataplane port from the external (secondary) switch.
Expand Down
20 changes: 20 additions & 0 deletions config/system/alt.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Example configuration file for using an OVS switch not managed by DAQ.

# Load defaults.
include: config/system/default.yaml

# Description for dashboard.
site_description: "Alternate (not managed by DAQ) OVS switch configuration"

# Network switch configuration.
switch_setup:
data_intf: alt-intf
alt_port: 6669
uplink_port: 100
ext_br: alt-switch

# Faux device connection for testing.
interfaces:
faux:
opts:
port: 2
2 changes: 1 addition & 1 deletion config/system/ext.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Load defaults.
source config/system/default.yaml

# Description description for dashboard.
# Description for dashboard.
site_description="External (not integrated with DAQ) OVS switch configuration"

# Network switch configuration.
Expand Down
2 changes: 1 addition & 1 deletion config/system/ext.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Load defaults.
include: config/system/default.yaml

# Description description for dashboard.
# Description for dashboard.
site_description: "External (not integrated with DAQ) OVS switch configuration"

# Network switch configuration.
Expand Down
2 changes: 1 addition & 1 deletion config/system/muddy.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Load defaults.
source config/system/default.yaml

# Description description for dashboard.
# Description for dashboard.
site_description="Multi-Device Configuration"

# Upstream dataplane port from the external (secondary) switch.
Expand Down
2 changes: 1 addition & 1 deletion config/system/multi.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Load defaults.
source config/system/default.yaml

# Description description for dashboard.
# Description for dashboard.
site_description="Multi-Device Configuration"

# Upstream dataplane port from the external (secondary) switch.
Expand Down
8 changes: 5 additions & 3 deletions daq/topology.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,22 +231,24 @@ def _make_acl_include(self):
def _make_pri_topology(self):
pri_dp = {}
pri_dp['dp_id'] = self.PRI_DPID
pri_dp['name'] = self.pri_name
pri_dp['interfaces'] = self._make_pri_interfaces()
return pri_dp

def _make_sec_topology(self):
sec_dp = {}
sec_dp['dp_id'] = self.sec_dpid
sec_dp['name'] = self.sec_name
sec_dp['interfaces'] = self._make_sec_interfaces()
return sec_dp

def _has_sec_switch(self):
return self.sec_dpid and self.sec_port

def _make_base_network_topology(self):
assert self.pri, 'pri dataplane not configured'
dps = {}
dps['pri'] = self._make_pri_topology()
dps['sec'] = self._make_sec_topology()
if self._has_sec_switch():
dps['sec'] = self._make_sec_topology()
topology = {}
topology['dps'] = dps
topology['vlans'] = self._make_vlan_description(10)
Expand Down
2 changes: 1 addition & 1 deletion firebase/public/protos.hash
Original file line number Diff line number Diff line change
@@ -1 +1 @@
96148b4135bc7326586f96fc38a18beeca8147c4 proto/system_config.proto
b335b4bd73bb5242e822a9b72cf4de6bd010cea3 proto/system_config.proto
9 changes: 8 additions & 1 deletion firebase/public/protos.html
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,14 @@ <h3 id="SwitchSetup">SwitchSetup</h3>
<td>lo_port</td>
<td><a href="#int32">int32</a></td>
<td></td>
<td><p>Local port of open flow controller </p></td>
<td><p>Local port of DAQ OpenFlow controller </p></td>
</tr>

<tr>
<td>alt_port</td>
<td><a href="#int32">int32</a></td>
<td></td>
<td><p>Local port for an alternate OpenFlow controller </p></td>
</tr>

<tr>
Expand Down
Loading