public class BankDefn extends AbstractDefn
Modifier and Type | Class and Description |
---|---|
static class |
BankDefn.SwitchInfo
Encapsulates a binding of switch variable name to
definition filename.
|
EOL, EOLI, EOLI_DASH, reader
Constructor and Description |
---|
BankDefn(String path,
boolean showOutput)
Constructs a switch-bank definition reader, for the given file path.
|
Modifier and Type | Method and Description |
---|---|
MockOpenflowSwitch |
findSwitch(DataPathId dpid)
Returns the mock switch with the specified datapath id.
|
MockOpenflowSwitch |
findSwitch(String var)
Returns the mock switch with the specified scenario variable name.
|
List<ScenarioCommand> |
getCommands()
Returns an unmodifiable view of the scenario commands.
|
List<BankDefn.SwitchInfo> |
getSwitches()
Returns an unmodifiable view of the switch bindings.
|
String |
toDebugString()
Provides a multi-line string representation of this definition,
suitable for debugging.
|
getPath, toString
public BankDefn(String path, boolean showOutput)
path
- the bank definition file pathnameshowOutput
- true if output is enabledpublic String toDebugString()
AbstractDefn
toDebugString
in class AbstractDefn
public List<BankDefn.SwitchInfo> getSwitches()
public List<ScenarioCommand> getCommands()
public MockOpenflowSwitch findSwitch(DataPathId dpid)
dpid
- the datapath ID to matchNullPointerException
- if dpid is nullIllegalArgumentException
- if dpid does not match a configured
switchpublic MockOpenflowSwitch findSwitch(String var)
var
- the variable name for the switchNullPointerException
- if var is nullIllegalArgumentException
- if var does not match a configured
switchCopyright © 2015. All Rights Reserved.