Beispiel #1
0
# Use POX as our controller
start_cmd = (
    '''./pox.py --verbose '''
    #'''sts.syncproto.pox_syncer --blocking=False '''
    '''openflow.discovery topology '''
    '''host_tracker '''
    '''sts.util.socket_mux.pox_monkeypatcher '''
    '''openflow.of_01 --address=__address__ --port=__port__ --max_connections=15'''
)

controllers = [ControllerConfig(start_cmd, cwd="pox")]
topology_class = MeshTopology
topology_params = "num_switches=2"

simulation_config = SimulationConfig(controller_configs=controllers,
                                     topology_class=topology_class,
                                     topology_params=topology_params,
                                     multiplex_sockets=True)

control_flow = Fuzzer(
    simulation_config,
    check_interval=150,
    fuzzer_params='experiments/trigger_memory_leak2/fuzzer_params.py',
    halt_on_violation=True,
    initialization_rounds=30,
    input_logger=InputLogger(),
    invariant_check_name="InvariantChecker.check_liveness")

raise RuntimeError(
    "Please add this parameter to Fuzzer: fuzzer_params='experiments/trigger_memory_leak3/fuzzer_params.py'"
)
Beispiel #2
0
from experiment_config_lib import ControllerConfig
from sts.control_flow import Fuzzer
from sts.simulation_state import SimulationConfig

# Use POX as our controller
#command_line = "./pox.py --verbose --no-cli openflow.of_01 --address=__address__ --port=__port__ sts.syncproto.pox_syncer samples.topo forwarding.l2_learning messenger.messenger samples.nommessenger"
command_line = "./pox.py --verbose --no-cli openflow.of_01 --address=__address__ --port=__port__ sts.syncproto.pox_syncer samples.topo forwarding.l2_multi messenger.messenger samples.nommessenger"
controllers = [
    ControllerConfig(command_line, cwd="pox", sync="tcp:localhost:18899")
]

dataplane_trace = "dataplane_traces/ping_pong_fat_tree.trace"

simulation_config = SimulationConfig(controller_configs=controllers,
                                     dataplane_trace=dataplane_trace)

control_flow = Fuzzer(simulation_config, check_interval=1)
Beispiel #3
0
    }


# Use POX as our controller
start_cmd = "./pox.py --verbose openflow.of_01 --address=__address__ --port=__port__ openflow.discovery forwarding.l2_multi"
controllers = [
    ControllerConfig(start_cmd, cwd="pox_carp", address="127.0.0.1", port=8888)
]
topology_class = MeshTopology
topology_params = "num_switches=4"

simulation_config = SimulationConfig(controller_configs=controllers,
                                     topology_class=topology_class,
                                     topology_params=topology_params)

control_flow = Fuzzer(
    simulation_config,
    check_interval=1,
    #mock_link_discovery=True,
    fuzzer_params="experiments/syn_mem_corruption_3switch/fuzzer_params.py",
    halt_on_violation=True,
    input_logger=InputLogger(),
    invariant_check_name="InvariantChecker.check_liveness",
    steps=5000,
    #random_seed=466448715
)

raise RuntimeError(
    "Please add this parameter to Fuzzer: fuzzer_params='experiments/pox_switch_hash_bug_fuzz_fuzzer/fuzzer_params.py'"
)
Beispiel #4
0
from config.experiment_config_lib import ControllerConfig
from sts.control_flow import Fuzzer
from sts.input_traces.input_logger import InputLogger
from sts.invariant_checker import InvariantChecker
from sts.simulation_state import SimulationConfig

# Use NOX as our controller
command_line = "./nox_core -i ptcp:6633 routing"
controllers = [
    ControllerConfig(command_line,
                     cwd="nox_classic/build/src",
                     address="127.0.0.1",
                     port=6633)
]

dataplane_trace = "dataplane_traces/ping_pong_fat_tree.trace"

simulation_config = SimulationConfig(controller_configs=controllers,
                                     dataplane_trace=dataplane_trace)

# Use a Fuzzer (already the default)
control_flow = Fuzzer(simulation_config,
                      input_logger=InputLogger(),
                      check_interval=80,
                      invariant_check=InvariantChecker.check_connectivity)
Beispiel #5
0
# Use POX as our controller
command_line = (
    '''./pox.py --verbose --no-cli sts.syncproto.pox_syncer '''
    '''openflow.discovery openflow.spanning_tree forwarding.l2_multi '''
    '''sts.util.socket_mux.pox_monkeypatcher '''
    '''openflow.of_01 --address=__address__ --port=__port__''')
controllers = [
    ControllerConfig(command_line,
                     port=6632,
                     cwd="pox",
                     sync="tcp:localhost:18901")
]

simulation_config = SimulationConfig(controller_configs=controllers,
                                     multiplex_sockets=True)

timestamp_results = True

# Use a Fuzzer (already the default)
control_flow = Fuzzer(
    simulation_config,
    #fuzzer_params="exp/config/fuzzer_params_migration_and_switches.py",
    check_interval=20,
    halt_on_violation=True,
    single_hm_wait_rounds=30,
    initialization_rounds=70,
    steps=300,
    input_logger=InputLogger(),
    invariant_check_name="check_stale_entries")
from config.experiment_config_lib import ControllerConfig
from sts.topology import MeshTopology
from sts.control_flow import Fuzzer
from sts.input_traces.input_logger import InputLogger
from sts.invariant_checker import InvariantChecker
from sts.simulation_state import SimulationConfig

# Use POX as our controller
command_line = "./pox.py --verbose --no-cli openflow.of_01 --address=__address__ --port=__port__ sts.syncproto.pox_syncer samples.topo forwarding.l2_multi messenger.messenger samples.nommessenger"
controllers = [ControllerConfig(command_line, cwd="pox", sync="tcp:localhost:18899")]

topology_class = MeshTopology
topology_params = "num_switches=4"
dataplane_trace = "dataplane_traces/ping_pong_same_subnet_4_switches.trace"

simulation_config = SimulationConfig(controller_configs=controllers,
                                     topology_class=topology_class,
                                     topology_params=topology_params,
                                     dataplane_trace=dataplane_trace)

control_flow = Fuzzer(simulation_config, check_interval=1, halt_on_violation=True,
                      input_logger=InputLogger(),
                      invariant_check=InvariantChecker.check_liveness)
Beispiel #7
0
# Use POX as our controller
command_line = (
    '''./pox.py --verbose --no-cli sts.syncproto.pox_syncer '''
    '''openflow.discovery openflow.spanning_tree forwarding.l2_multi '''
    '''sts.util.socket_mux.pox_monkeypatcher '''
    '''openflow.of_01 --address=../sts_socket_pipe''')
controllers = [
    ControllerConfig(command_line,
                     address="sts_socket_pipe",
                     port=6635,
                     cwd="pox",
                     sync="tcp:localhost:18900")
]

simulation_config = SimulationConfig(controller_configs=controllers,
                                     multiplex_sockets=True)

#timestamp_results = True
#exp_name = "fat_tree_migrations_and_switches"

# Use a Fuzzer (already the default)
control_flow = Fuzzer(
    simulation_config,
    #fuzzer_params="exp/config/fuzzer_params_migration_and_switches.py",
    check_interval=20,
    halt_on_violation=False,
    initialization_rounds=65,
    steps=2000,
    input_logger=InputLogger(),
    invariant_check=InvariantChecker.python_check_connectivity)
Beispiel #8
0
        'branch': backtick("git rev-parse --abbrev-ref HEAD", cwd=path),
        'remote': backtick("git remote show origin", cwd=path),
    }


# Use POX as our controller
start_cmd = (
    '''./pox.py --verbose --unthreaded-sh '''
    '''sts.util.socket_mux.pox_monkeypatcher '''
    #'''sts.syncproto.pox_syncer --blocking=False '''
    '''openflow.discovery forwarding.topo_proactive '''
    '''openflow.of_01 --address=__address__ --port=__port__''')

controllers = [ControllerConfig(start_cmd, cwd="dart_pox")]
topology_class = FatTree
topology_params = "num_pods=3"

simulation_config = SimulationConfig(controller_configs=controllers,
                                     topology_class=topology_class,
                                     multiplex_sockets=True,
                                     topology_params=topology_params)

control_flow = Fuzzer(simulation_config,
                      check_interval=20,
                      halt_on_violation=True,
                      input_logger=InputLogger(),
                      invariant_check_name="check_for_invalid_ports")

raise RuntimeError(
    "Please add this parameter to Fuzzer: fuzzer_params='experiments/snapshot_proactive_pox/fuzzer_params.py'"
)
from config.experiment_config_lib import ControllerConfig
from sts.control_flow import Fuzzer
from sts.input_traces.input_logger import InputLogger
from sts.simulation_state import SimulationConfig
from sts.invariant_checker import InvariantChecker

# Use POX as our controller
command_line = ('''./pox.py openflow.spanning_tree openflow.discovery '''
                '''forwarding.l2_pairs ''')
controllers = [ControllerConfig(command_line, cwd="carp")]

simulation_config = SimulationConfig(controller_configs=controllers)

# Use a Fuzzer (already the default)
control_flow = Fuzzer(
    simulation_config,
    fuzzer_params="experiments/config/fuzzer_params_heavy_failures.py",
    halt_on_violation=True,
    check_interval=20,
    input_logger=InputLogger(),
    invariant_check_name="check_for_loops_blackholes",
    initialization_rounds=150)
Beispiel #10
0
from sts.control_flow import Fuzzer
from sts.input_traces.input_logger import InputLogger
from sts.simulation_state import SimulationConfig

# Use POX as our controller
start_cmd = (
    '''./pox.py --verbose '''
    #'''sts.syncproto.pox_syncer --interpose_on_logging=False --blocking=False '''
    '''openflow.discovery forwarding.l2_multi_synthetic_link_failure_crash '''
    '''sts.util.socket_mux.pox_monkeypatcher '''
    '''openflow.of_01 --address=__address__ --port=__port__''')

controllers = [ControllerConfig(start_cmd, cwd="pox")]
topology_class = MeshTopology
topology_params = "num_switches=3"

simulation_config = SimulationConfig(controller_configs=controllers,
                                     topology_class=topology_class,
                                     topology_params=topology_params,
                                     multiplex_sockets=True)

control_flow = Fuzzer(
    simulation_config,
    check_interval=5,
    fuzzer_params=
    'experiments/snapshot_demo_synthetic_link_failure/fuzzer_params.py',
    steps=2000,
    halt_on_violation=True,
    input_logger=InputLogger(),
    invariant_check_name="InvariantChecker.check_liveness")
Beispiel #11
0
    try:
        # module path might not have been specified. Try again with path prepended
        config = __import__("config.%s" % args.config, globals(), locals(),
                            ["*"])
    except ImportError:
        raise e

# Set up the experiment results directories
experiment_setup.setup_experiment(args, config)

# Simulator controls the simulation
if hasattr(config, 'control_flow'):
    simulator = config.control_flow
else:
    # We default to a Fuzzer
    simulator = Fuzzer(SimulationConfig())


# Set an interrupt handler
def handle_int(signal, frame):
    import os
    from sts.util.rpc_forker import LocalForker
    sys.stderr.write("Caught signal %d, stopping sdndebug (pid %d)\n" %
                     (signal, os.getpid()))
    if (simulator.simulation_cfg.current_simulation is not None):
        simulator.simulation_cfg.current_simulation.clean_up()
    # kill fork()ed procs
    LocalForker.kill_all()
    sys.exit(13)

from sts.topology import MeshTopology
from sts.control_flow import Fuzzer, Interactive
from sts.input_traces.input_logger import InputLogger
from sts.invariant_checker import InvariantChecker
from sts.simulation_state import SimulationConfig

# Use POX as our controller
command_line = ('''./pox.py --verbose openflow.debug ''' #sts.syncproto.pox_syncer '''
                '''forwarding.l2_multi '''
                #'''sts.util.socket_mux.pox_monkeypatcher '''
                '''openflow.of_01 --address=__address__ --port=__port__''')
controllers = [ControllerConfig(command_line, cwd="betta")]

topology_class = MeshTopology
topology_params = "num_switches=2"
dataplane_trace = "dataplane_traces/ping_pong_same_subnet.trace"

simulation_config = SimulationConfig(controller_configs=controllers,
                                     topology_class=topology_class,
                                     topology_params=topology_params,
                                     dataplane_trace=dataplane_trace,
                                     multiplex_sockets=False)

control_flow = Fuzzer(simulation_config, check_interval=80,
                      halt_on_violation=True,
                      input_logger=InputLogger(),
                      invariant_check=InvariantChecker.check_connectivity,
                      steps=81,
                      random_seed=1738290519)
#control_flow = Interactive(simulation_config, input_logger=InputLogger())
Beispiel #13
0
from sts.input_traces.input_logger import InputLogger
from sts.simulation_state import SimulationConfig

# Use POX as our controller
start_cmd = (
    '''./pox.py --verbose '''
    #'''sts.syncproto.pox_syncer --blocking=False '''
    '''openflow.discovery topology '''
    '''host_tracker '''
    '''sts.util.socket_mux.pox_monkeypatcher '''
    '''openflow.of_01 --address=__address__ --port=__port__''')

controllers = [ControllerConfig(start_cmd, cwd="pox")]
topology_class = MeshTopology
topology_params = "num_switches=2"

simulation_config = SimulationConfig(controller_configs=controllers,
                                     topology_class=topology_class,
                                     topology_params=topology_params,
                                     multiplex_sockets=True)

control_flow = Fuzzer(simulation_config,
                      check_interval=150,
                      halt_on_violation=True,
                      initialization_rounds=30,
                      input_logger=InputLogger(),
                      invariant_check_name="InvariantChecker.check_liveness")

raise RuntimeError(
    "Please add this parameter to Fuzzer: fuzzer_params='experiments/trigger_memory_leak/fuzzer_params.py'"
)
Beispiel #14
0
simulation_config = SimulationConfig(controller_configs=controllers,
                                     topology_class=topology_class,
                                     topology_params=topology_params)
#                          dataplane_trace=dataplane_trace)

#simulation_config = SimulationConfig(controller_configs=controllers,
#                                     dataplane_trace=dataplane_trace)


def fast_die_invariant_check(simulation):
    from sts.invariant_checker import InvariantChecker
    result = InvariantChecker.check_loops(simulation)
    if result:
        return result
    result = InvariantChecker.python_check_connectivity(simulation)
    if not result:
        print "Connectivity established - bailing out"
        import sys
        sys.exit(0)
    return []


# Use a Fuzzer (already the default)
control_flow = Fuzzer(simulation_config,
                      input_logger=InputLogger(),
                      check_interval=20,
                      halt_on_violation=True,
                      steps=300,
                      invariant_check=fast_die_invariant_check)
Beispiel #15
0
from config.experiment_config_lib import ControllerConfig
from sts.topology import MeshTopology
from sts.control_flow import Fuzzer, Interactive
from sts.input_traces.input_logger import InputLogger
from sts.simulation_state import SimulationConfig

# Work directory must be absolute path
dummy_cmd = "sleep 1" 

# Use Floodlight as our controller
controllers = [ ControllerConfig(dummy_cmd, cwd="experiments/scripts/bsc", address="10.192.5.191", port=6633, controller_type="bsc", label="c1"), 
                ControllerConfig(dummy_cmd, cwd="experiments/scripts/bsc", address="10.192.5.192", port=6633, controller_type="bsc", label="c2")]
topology_class = MeshTopology
topology_params = "num_switches=3"

simulation_config = SimulationConfig(controller_configs=controllers,
                                     topology_class=topology_class,
                                     topology_params=topology_params,
                                     kill_controllers_on_exit=False
                                     )

control_flow = Fuzzer(simulation_config,
                      check_interval=5,
                      halt_on_violation=True,
                      input_logger=InputLogger(),
                      invariant_check_name="check_everything",
                      steps=600,
                      fuzzer_params="experiments/config/fuzzer_params_heavy_failures.py",
                      initialization_rounds=200
                      )
Beispiel #16
0
command_line = (
    '''./pox.py --verbose '''
    '''sts.syncproto.pox_syncer --blocking=False '''
    #'''openflow.mock_discovery forwarding.l2_multi '''
    '''openflow.discovery forwarding.l2_multi '''
    '''sts.util.socket_mux.pox_monkeypatcher '''
    '''openflow.of_01 --address=__address__ --port=__port__''')
controllers = [
    ControllerConfig(command_line, cwd="pox", sync="tcp:localhost:18899")
]
topology_class = MeshTopology
topology_params = "num_switches=2"
dataplane_trace = "dataplane_traces/ping_pong_same_subnet.trace"

simulation_config = SimulationConfig(controller_configs=controllers,
                                     topology_class=topology_class,
                                     topology_params=topology_params,
                                     dataplane_trace=dataplane_trace,
                                     multiplex_sockets=True)
control_flow = Fuzzer(
    simulation_config,
    check_interval=20,
    #mock_link_discovery=True,
    halt_on_violation=True,
    input_logger=InputLogger(),
    invariant_check_name="check_for_loops_or_connectivity",
    steps=241,
    #random_seed=466448715
)
#control_flow = Interactive(simulation_config, input_logger=InputLogger())
Beispiel #17
0
topology_class = MeshTopology
topology_params = "num_switches=2"  # ",netns_hosts=True"

simulation_config = SimulationConfig(
    controller_configs=controllers,
    topology_class=topology_class,
    topology_params=topology_params,
    #violation_persistence_threshold=1,
    kill_controllers_on_exit=False)

#control_flow = Fuzzer(simulation_config, check_interval=20,
#                      halt_on_violation=True,
#                      input_logger=InputLogger(),
#                      invariant_check_name="InvariantChecker.check_loops")

control_flow = Fuzzer(
    simulation_config,
    check_interval=40,
    halt_on_violation=True,
    input_logger=InputLogger(),
    #steps=100,
    invariant_check_name="InvariantChecker.check_liveness")
#invariant_check_name="check_for_flow_entry")
#invariant_check_name="InvariantChecker.check_connectivity")
#invariant_check_name="check_everything")

#control_flow = Interactive(simulation_config, input_logger=InputLogger())

raise RuntimeError(
    "Please add this parameter to Fuzzer: fuzzer_params='experiments/distributed_onos_2014_01_31_01_23_34/fuzzer_params.py'"
)
Beispiel #18
0
# Allow configs to be specified as paths as well as module names
if args.config.endswith('.py'):
  args.config = args.config[:-3].replace("/", ".")

try:
  config = __import__(args.config, globals(), locals(), ["*"])
except ImportError:
  # try again, but prepend config module path
  config = __import__("config.%s" % args.config, globals(), locals(), ["*"])

# For controlling the simulation
if hasattr(config, 'control_flow'):
  simulator = config.control_flow
else:
  # We default to a Fuzzer
  simulator = Fuzzer(SimulationConfig())

# Set an interrupt handler
def handle_int(signal, frame):
  print >> sys.stderr, "Caught signal %d, stopping sdndebug" % signal
  if (simulator.simulation_cfg.current_simulation is not None):
    simulator.simulation_cfg.current_simulation.clean_up()
  sys.exit(0)

signal.signal(signal.SIGINT, handle_int)
signal.signal(signal.SIGTERM, handle_int)

# Start the simulation
try:
  simulator.simulate()
finally:
Beispiel #19
0
start_cmd = (
    '''vagrant halt onosdev1; vagrant up onosdev1 ; ./scripts/conf_setup.sh 1 ;  '''
    ''' vagrant ssh onosdev1 -c "cd ONOS; ./start-zk.sh start; sleep 5; '''
    ''' ./start-cassandra.sh start; sleep 10; '''
    ''' ./start-onos.sh start; sleep 15"''')
restart_cmd = 'vagrant ssh onosdev1 -c "cd ONOS; ./start-onos.sh start"'
kill_cmd = 'vagrant ssh onosdev1 -c "cd ONOS; ./start-onos.sh stop"'

controllers = [
    ControllerConfig(start_cmd,
                     address="192.168.56.11",
                     port=6633,
                     restart_cmd=restart_cmd,
                     kill_cmd=kill_cmd,
                     controller_type="onos",
                     cwd="/home/rcs/vagrant_onosdev")
]
topology_class = MeshTopology
topology_params = "num_switches=2"

simulation_config = SimulationConfig(controller_configs=controllers,
                                     topology_class=topology_class,
                                     topology_params=topology_params,
                                     kill_controllers_on_exit=False)

control_flow = Fuzzer(simulation_config,
                      check_interval=20,
                      halt_on_violation=True,
                      input_logger=InputLogger(),
                      invariant_check_name="InvariantChecker.check_loops")
Beispiel #20
0
from config.experiment_config_lib import ControllerConfig
from sts.topology import MeshTopology
from sts.control_flow import Fuzzer
from sts.input_traces.input_logger import InputLogger
from sts.simulation_state import SimulationConfig

# Use POX as our controller
command_line = ('''./pox.py --verbose '''
                '''sts.syncproto.pox_syncer --blocking=False '''
                '''openflow.discovery forwarding.l2_multi '''
                '''sts.util.socket_mux.pox_monkeypatcher '''
                '''openflow.of_01 --address=__address__ --port=__port__''')
controllers = [ControllerConfig(command_line, cwd="pox", sync="tcp:localhost:18899")]
topology_class = MeshTopology
topology_params = "num_switches=2"

simulation_config = SimulationConfig(controller_configs=controllers,
                                     topology_class=topology_class,
                                     topology_params=topology_params,
                                     multiplex_sockets=True)

control_flow = Fuzzer(simulation_config, check_interval=20,
                      halt_on_violation=True,
                      input_logger=InputLogger(),
                      invariant_check_name="check_for_loops_blackholes_or_connectivity")

Beispiel #21
0
    '''./pox.py --verbose '''
    #'''sts.syncproto.pox_syncer --blocking=False '''
    '''openflow.discovery forwarding.l2_multi '''
    '''forwarding.capabilities_manager '''
    '''sts.util.socket_mux.pox_monkeypatcher '''
    '''openflow.of_01 --address=__address__ --port=__port__''')

controllers = [ControllerConfig(start_cmd, cwd="pox")]
#topology_class = FatTree
#topology_params = "num_pods=4"
topology_class = MeshTopology
topology_params = "num_switches=2"

simulation_config = SimulationConfig(controller_configs=controllers,
                                     topology_class=topology_class,
                                     topology_params=topology_params,
                                     multiplex_sockets=True)

control_flow = Fuzzer(
    simulation_config,
    check_interval=1,
    fuzzer_params='experiments/trigger_priority_mismatch/fuzzer_params.py',
    halt_on_violation=True,
    initialization_rounds=50,
    send_all_to_all=False,
    input_logger=InputLogger(),
    invariant_check_name="check_for_flow_entry")

raise RuntimeError(
    "Please add this parameter to Fuzzer: fuzzer_params='experiments/trigger_priority_mismatch_small/fuzzer_params.py'"
)
Beispiel #22
0
except ImportError as e:
    try:
        # module path might not have been specified. Try again with path prepended
        config = __import__("config.%s" % args.config, globals(), locals(), ["*"])
    except ImportError:
        raise e

# Set up the experiment results directories
experiment_setup.setup_experiment(args, config)

# Simulator controls the simulation
if hasattr(config, "control_flow"):
    simulator = config.control_flow
else:
    # We default to a Fuzzer
    simulator = Fuzzer(SimulationConfig())

# Set an interrupt handler
def handle_int(signal, frame):
    import os
    from sts.util.rpc_forker import LocalForker

    sys.stderr.write("Caught signal %d, stopping sdndebug (pid %d)\n" % (signal, os.getpid()))
    if simulator.simulation_cfg.current_simulation is not None:
        simulator.simulation_cfg.current_simulation.clean_up()
    # kill fork()ed procs
    LocalForker.kill_all()
    sys.exit(13)


signal.signal(signal.SIGINT, handle_int)
Beispiel #23
0
from sts.invariant_checker import InvariantChecker
from sts.simulation_state import SimulationConfig
from sts.topology import MeshTopology, FatTree

# Use NOX as our controller
command_line = "./nox_core -v -i ptcp:6635 routing"
controllers = [ControllerConfig(command_line, cwd="nox_classic/build/src", address="127.0.0.1", port=6635)]

# exp_name = "nox_mesh_4_loop"
topology_class = MeshTopology
topology_params = "num_switches=4"
# dataplane_trace = "dataplane_traces/ping_pong_same_subnet_4_switches.trace"
# dataplane_trace = "dataplane_traces/ping_pong_fat_tree.trace"

simulation_config = SimulationConfig(controller_configs=controllers,
                                     topology_class=topology_class,
                                     topology_params=topology_params)
           #                          dataplane_trace=dataplane_trace)

#simulation_config = SimulationConfig(controller_configs=controllers,
#                                     dataplane_trace=dataplane_trace)

# Use a Fuzzer (already the default)
control_flow =  Fuzzer(
                       simulation_config, input_logger=InputLogger(),
                       fuzzer_params="experiments/nox_mesh_4_loop/fuzzer_params.py",
                       check_interval=20,
                       halt_on_violation=True,
                       steps=300,
                       invariant_check_name="check_for_loops_or_connectivity")
    dataplane_trace=dataplane_trace,
    #multiplex_sockets=True
)


def my_funky_invariant_check(simulation):
    from sts.invariant_checker import InvariantChecker
    result = InvariantChecker.check_loops(simulation)
    if result:
        return result
    result = InvariantChecker.check_connectivity(simulation)
    if not result:
        print "Connectivity established - bailing out"
        import sys
        sys.exit(0)
    return []


control_flow = Fuzzer(
    simulation_config,
    check_interval=20,
    #mock_link_discovery=True,
    halt_on_violation=True,
    input_logger=InputLogger(),
    invariant_check=my_funky_invariant_check,
    steps=999,
    fuzzer_params="exp/config/fuzzer_params_heavy_failures.py"
    #random_seed=466448715
)
#control_flow = Interactive(simulation_config, input_logger=InputLogger())
Beispiel #25
0
simulation_config = SimulationConfig(controller_configs=controllers,
                                     topology_class=topology_class,
                                     topology_params=topology_params,
                                     multiplex_sockets=True
                                     )

def my_funky_invariant_check(simulation):
  from sts.invariant_checker import InvariantChecker
  result = InvariantChecker.check_loops(simulation)
  if result:
    return result
  result = InvariantChecker.check_connectivity(simulation)
  if not result:
    print "Connectivity established - bailing out"
    import sys
    sys.exit(0)
  return []



control_flow = Fuzzer(simulation_config, check_interval=20,
                      #mock_link_discovery=True,
                      halt_on_violation=True,
                      input_logger=InputLogger(),
                      invariant_check=my_funky_invariant_check,
                      #steps=141,
                      #random_seed=466448715
                      )
#control_flow = Interactive(simulation_config, input_logger=InputLogger())
Beispiel #26
0
# Use Floodlight as our controller
additional_ports = find_ports(of=range(6633, 6833),
                              rest=range(8080, 8280),
                              jython=range(7655, 7855))
controllers = [
    ControllerConfig(command_line,
                     cwd="floodlight",
                     port=additional_ports['of'],
                     additional_ports=additional_ports,
                     label="c1",
                     config_template=
                     "experiments/config/floodlightconfig.properties.template")
]
topology_class = MeshTopology
topology_params = "num_switches=3"

simulation_config = SimulationConfig(
    controller_configs=controllers,
    topology_class=topology_class,
    topology_params=topology_params,
)

control_flow = Fuzzer(
    simulation_config,
    check_interval=20,
    halt_on_violation=True,
    input_logger=InputLogger(),
    invariant_check_name="check_for_loops_or_connectivity",
    steps=999,
    fuzzer_params="experiments/config/fuzzer_params_heavy_failures.py")