Skip to content

Commit

Permalink
Cleanup files from misc (faucetsdn#464)
Browse files Browse the repository at this point in the history
  • Loading branch information
pbatta authored Jun 8, 2020
1 parent 0356852 commit 8510b81
Show file tree
Hide file tree
Showing 115 changed files with 119 additions and 117 deletions.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,24 +43,30 @@ The top-level DAQ folders correspond to the following structure:
* `bin/`: System setup and management commands.
* _`build/`_: Dynamically created directory for build logs.
* `cmd/`: Primary commands for running DAQ testing.
* `config/`: System and module configuration files.
* `daq/`: Python source for DAQ runtime.
* `docker/`: Docker build files for DAQ components and tests.
* `docs/`: Documentation.
* `etc/`: Version files and external switch setup files.
* _`faucet/`_: Dynamically downloaded version of SDN controller.
* _`forch/`_: Dynamically downloaded version of SDN orchestrator.
* `firebase/`: Hosted pages and functions for web dashboard.
* `functions/`: Additional Cloud Functions for data processing.
* _`inst/`_: Install directory for specific runtime contents.
* **`local/`**: Local setup and config information.
* _`mininet/`_: Local version of the mininet virtual network host framework.
* `misc/`: Miscellaneous support files.
* `mudacl/`: Utilities for managing and testing MUD network files.
* `mud_files/`: Examples and prototype device MUD files.
* _`out/`_: Misc transitory output files.
* `proto/`: Protobuf related files.
* _`protoc-gen-doc/`_: Dynamically downloaded Protobuf documentation generator.
* `pubber/`: Sample code for generating cloud-ingest traffic.
* `resources/`: Templates for reports, module configs, test-site definitions.
* `schemas/`: Device/cloud data exchange schemas.
* `subset/`: Subsets of device tests (e.g. penetration tests).
* `testing/`: Scripts for system continuous integration testing.
* `topology/`: Network topology setups.
* `utils/`: Helper utilities.
* `validator/`: Tools for validating data exchange schemas.
* _`venv/`_: Dynamically downloaded python virtual environment files.

Expand Down
2 changes: 1 addition & 1 deletion bin/automated_run
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ PIDFILE=inst/daq.pid
SYSCONF=local/system.conf

cd $ROOT
source misc/config_base.sh
source etc/config_base.sh

if [ "$1" == debug ]; then
auto_args+=" daq_loglevel=debug"
Expand Down
2 changes: 1 addition & 1 deletion bin/build_hash
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ build_built=.build_built
faucet_version=$(cd faucet; git rev-list -n 1 HEAD)
echo "$faucet_version faucet/HEAD" > $build_files

find misc/ docker/ subset/ utils/ -type f | sort | xargs sha1sum >> $build_files
find docker/ subset/ utils/ -type f | sort | xargs sha1sum >> $build_files
build_hash=`cat $build_files | sha256sum | awk '{print $1}'`

if [ "$1" == check ]; then
Expand Down
2 changes: 1 addition & 1 deletion bin/combine_reports_from_date_range
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
ROOT=$(dirname $0)/..
cd $ROOT

source misc/config_base.sh
source etc/config_base.sh

PYTHONPATH=daq python3 bin/python/combine_reports_from_date_range.py $conf_file $@
2 changes: 1 addition & 1 deletion bin/docker_build
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -o pipefail

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

build_root=build
sudo rm -rf $build_root .build_hash .build_files
Expand Down
2 changes: 1 addition & 1 deletion bin/docker_build_files
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ echo > $build_list_file
true
}

include ${host_tests:-misc/host_tests.conf}
include ${host_tests:-config/modules/host.conf}
)
cat $build_list_file
rm -f $build_list_file
File renamed without changes.
2 changes: 1 addition & 1 deletion bin/external_ovs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

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

ext_intf=$switch_setup_data_intf
ext_dpid=$switch_setup_of_dpid
Expand Down
2 changes: 1 addition & 1 deletion bin/generate_topology
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

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

FAUCET=$(realpath $ROOT/faucet)
MININET=$(realpath $ROOT/mininet)
Expand Down
4 changes: 2 additions & 2 deletions bin/install_daq
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash -e

ROOT=$(dirname $(realpath $0))/..
sudo cp misc/daq.service /etc/systemd/system/
sudo cp etc/daq.service /etc/systemd/system/
sudo sed -i "s#%ROOT%#$ROOT#" /etc/systemd/system/daq.service

sudo systemctl enable daq.service
sudo systemctl start daq.service
sudo systemctl start daq.service
2 changes: 1 addition & 1 deletion bin/mudacl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ port_acls=inst/port_acls
cd $ROOT
mudacl/bin/test.sh

source misc/config_base.sh
source etc/config_base.sh

if [ $# -gt 0 ]; then
echo Unexpected command line argument: $*
Expand Down
2 changes: 1 addition & 1 deletion bin/physical_sec
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ fi

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

iprefix=ctrl
ctrl_bridge=${iprefix}-br
Expand Down
2 changes: 1 addition & 1 deletion bin/registrar
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
ROOT=$(realpath $(dirname $0)/..)
cd $ROOT

source misc/config_base.sh
source etc/config_base.sh

if [ -z "$gcp_cred" ]; then
echo Need to define [gcp_cred] config variable.
Expand Down
2 changes: 1 addition & 1 deletion bin/setup_stack
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ add_iface corp 1 faux-3
echo Starting faucet instances...
sudo rm -rf inst/faucet
mkdir -p inst/faucet/daq-faucet-corp
cp misc/corp_$mode.yaml inst/faucet/daq-faucet-corp/faucet.yaml
cp topology/corp-$mode/faucet.yaml inst/faucet/daq-faucet-corp/faucet.yaml
docker kill daq-faucet-corp || true
sudo modprobe bonding
cmd/faucet corp 6683
Expand Down
2 changes: 1 addition & 1 deletion bin/setup_switch
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ EOM
}
interface_setup

curl -u manager:friend "https://$switch_ip/fs/flash/af.cfg" -k -X PUT -H 'Content-Type: ' --data-binary @misc/switch_configs/at.cfg
curl -u manager:friend "https://$switch_ip/fs/flash/af.cfg" -k -X PUT -H 'Content-Type: ' --data-binary @etc/switch_configs/at.cfg

curl -u manager:friend "https://$switch_ip/api/boot/config" -k -H 'content-type: application/json' --data '{"name":"flash:/af.cfg"}'

Expand Down
2 changes: 1 addition & 1 deletion bin/simple_bridge
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ iface_b=enx00e04c680029
rm -rf inst/faucet/daq-faucet-simple
mkdir -p inst/faucet/daq-faucet-simple

cp misc/corp_bond.yaml inst/faucet/daq-faucet-simple/faucet.yaml
cp topology/corp-bond/faucet.yaml inst/faucet/daq-faucet-simple/faucet.yaml

cmd/faucet simple 6789

Expand Down
2 changes: 1 addition & 1 deletion bin/techsupport
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ done
CONF_PROBE=inst/config/system.conf
touch $CONF_PROBE || sudo chown $USER -R inst

source misc/config_base.sh
source etc/config_base.sh
ext_ctrl=$switch_setup_ctrl_intf
ext_addr=$switch_setup_ip_addr
ext_intf=$switch_setup_data_intf
Expand Down
2 changes: 1 addition & 1 deletion bin/test_all
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Just sanity checks to make sure it's a proper directory structure.
test -d bin
test -d misc
test -d resources
test -d cmd

sudo rm -rf inst/ local/ out/
Expand Down
2 changes: 1 addition & 1 deletion bin/user_enable
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
ROOT=$(dirname $0)/..
cd $ROOT

source misc/config_base.sh
source etc/config_base.sh

python daq/gcp.py register_offenders=true $conf_file
2 changes: 1 addition & 1 deletion bin/validate
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
ROOT=$(realpath $(dirname $0)/..)
cd $ROOT

source misc/config_base.sh
source etc/config_base.sh

if [ -z "$gcp_cred" ]; then
echo Please make sure gcp_cred is defined in local/system.conf
Expand Down
2 changes: 1 addition & 1 deletion cmd/auto
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
ROOT=$(realpath $(dirname $0)/..)
cd $ROOT
run_args="$@"
source misc/config_base.sh
source etc/config_base.sh

cleanup_file=inst/exrun_cleanup.sh
CFILE=inst/config/system.conf
Expand Down
2 changes: 1 addition & 1 deletion cmd/build
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ DOCKER_IMAGE_LIST=docker_images.txt
DOCKER_IMAGE_VER=docker_images.ver

cd $ROOT
source misc/config_base.sh
source etc/config_base.sh
host_tests=$host_tests bin/docker_build_files
function pull_images {
TAG=$1
Expand Down
2 changes: 1 addition & 1 deletion cmd/clean
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ cd $ROOT

# Sanity checks to make sure we're in a proper directory before we go nuke-happy.
test -d daq
test -d misc
test -d resources

sudo rm -rf inst build
sudo rm -f .build_hash
Expand Down
2 changes: 1 addition & 1 deletion cmd/exrun
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ if ! git show $TAGGED_VERSION > /dev/null; then
fi

cd $ROOT
source misc/config_base.sh
source etc/config_base.sh

while [ -f $INSTLOCK ]; do
echo Waiting for $INSTLOCK to disappear!
Expand Down
2 changes: 1 addition & 1 deletion cmd/faucet
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ docker_volumes=
port_opts=

cd $ROOT
source misc/config_base.sh
source etc/config_base.sh

if [ -n "$switch_setup_lo_port" ]; then
faucet_pt=$switch_setup_lo_port
Expand Down
2 changes: 1 addition & 1 deletion cmd/faux
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ image=daqf/faux1
build=

cd $ROOT
source misc/config_base.sh
source etc/config_base.sh

# If the argument is -n then create a networking container
if [ "$1" == "-n" ]; then
Expand Down
2 changes: 1 addition & 1 deletion cmd/run
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ run_args="$@"
cmdrun_log=inst/cmdrun.log

cd $ROOT
source misc/config_base.sh
source etc/config_base.sh

echo Starting `date`
echo Clearing previous state...
Expand Down
2 changes: 1 addition & 1 deletion misc/all_tests.conf → config/modules/all.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Baseline configuration.
include misc/host_tests.conf
include config/modules/host.conf

# All contributed modules.
include subset/switches/build.conf
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion misc/local_tests.conf → config/modules/local.conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Baseline test file for officially included tests.

# Default built-in tests.
include misc/host_tests.conf
include config/modules/host.conf

# Local tests to build.
build local/docker
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions misc/system_all.conf → config/system/all.conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Base configuration file for DAQ.

# Load defaults.
source misc/system.conf
source config/system/system.conf

# Description description for dashboard.
site_description="Multi-Device All-Tests Configuration"
Expand All @@ -16,4 +16,4 @@ interfaces.faux-2.opts=
interfaces.faux-3.opts=

# For this run all tests.
host_tests=misc/all_tests.conf
host_tests=config/modules/all.conf
2 changes: 1 addition & 1 deletion misc/system_base.yaml → config/system/base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# adapter, modify the interfaces entry with the appripriate interface name(s).

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

# Description for dashboard.
site_description: "Baseline Configuration"
Expand Down
2 changes: 1 addition & 1 deletion misc/system_ext.conf → config/system/ext.conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Base configuration file for using an OVS switch external to DAQ itself.

# Load defaults.
source misc/system.conf
source config/system/system.conf

# Description description for dashboard.
site_description="External (not integrated with DAQ) OVS switch configuration"
Expand Down
6 changes: 3 additions & 3 deletions misc/system_muddy.conf → config/system/muddy.conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Config file for testing basic MUD configurations.

# Load defaults.
source misc/system.conf
source config/system/system.conf

# Description description for dashboard.
site_description="Multi-Device Configuration"
Expand All @@ -15,5 +15,5 @@ interfaces.faux-1.opts=bacnet
interfaces.faux-2.opts=discover
interfaces.faux-3.opts=discover

host_tests=misc/ping_only.conf
test_config=misc/runtime_configs/discover
host_tests=config/modules/ping.conf
test_config=resources/runtime_configs/discover
2 changes: 1 addition & 1 deletion misc/system_multi.conf → config/system/multi.conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Base configuration file for DAQ.

# Load defaults.
source misc/system.conf
source config/system/system.conf

# Description description for dashboard.
site_description="Multi-Device Configuration"
Expand Down
2 changes: 1 addition & 1 deletion misc/system.conf → config/system/system.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
#
# All concent should be in the new file/format.
#
source misc/system.yaml
source config/system/system.yaml
2 changes: 1 addition & 1 deletion misc/system.yaml → config/system/system.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ dhcp_lease_time: 500s
long_dhcp_response_sec: 105

# finish hook: executed at the end of every test
finish_hook: misc/dump_network.sh
finish_hook: bin/dump_network
2 changes: 1 addition & 1 deletion daq/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class owns the main event loop and shards out work to subclasses."""
_DEFAULT_RETENTION_DAYS = 30
_MODULE_CONFIG = 'module_config.json'
_RUNNER_CONFIG_PATH = 'runner/setup'
_DEFAULT_TESTS_FILE = 'misc/host_tests.conf'
_DEFAULT_TESTS_FILE = 'config/modules/host.conf'
_RESULT_LOG_FILE = 'inst/result.log'

def __init__(self, config):
Expand Down
Loading

0 comments on commit 8510b81

Please sign in to comment.