|
|
|
|
|
|
|
|
|
onosPackage(self,
opTimeout=30)
Produce a self-contained tar.gz file that can be deployed and
executed on any platform with Java 7 JRE. |
source code
|
|
|
onosBuild(self)
Use the pre defined script to build onos via mvn |
source code
|
|
|
cleanInstall(self,
skipTest=False,
mciTimeout=600)
Runs mvn clean install in the root of the ONOS directory. |
source code
|
|
|
gitPull(self,
comp1="",
fastForward=True)
Assumes that "git pull" works without login |
source code
|
|
|
|
|
|
|
getVersion(self,
report=False)
Writes the COMMIT number to the report to be parsed
by Jenkins data collector. |
source code
|
|
|
createCellFile(self,
benchIp,
fileName,
mnIpAddrs,
appString,
onosIpAddrs)
Creates a cell file based on arguments
Required:
* Bench IP address ( benchIp )
- Needed to copy the cell file over
* File name of the cell file ( fileName )
* Mininet IP address ( mnIpAddrs )
- Note that only 1 ip address is
supported currently
* ONOS IP addresses ( onosIpAddrs )
- Must be passed in as last arguments |
source code
|
|
|
setCell(self,
cellname)
Calls 'cell <name>' to set the environment variables on
ONOSbench |
source code
|
|
|
verifyCell(self)
Calls 'onos-verify-cell' to check for cell installation |
source code
|
|
|
onosCfgSet(self,
ONOSIp,
configName,
configParam)
Uses 'onos <node-ip> cfg set' to change a parameter value of an
application. |
source code
|
|
|
onosCli(self,
ONOSIp,
cmdstr)
Uses 'onos' command to send various ONOS CLI arguments. |
source code
|
|
|
|
|
onosStart(self,
nodeIp)
Calls onos command: 'onos-service [<node-ip>] start' This
command is a remote management of the ONOS upstart daemon |
source code
|
|
|
onosStop(self,
nodeIp)
Calls onos command: 'onos-service [<node-ip>] stop' This
command is a remote management of the ONOS upstart daemon |
source code
|
|
|
onosUninstall(self,
nodeIp="")
Calls the command: 'onos-uninstall' Uninstalls ONOS from the
designated cell machine, stopping if needed |
source code
|
|
|
onosDie(self,
nodeIp)
Issues the command 'onos-die <node-ip>' This command calls
onos-kill and also stops the node |
source code
|
|
|
onosKill(self,
nodeIp)
Calls the command: 'onos-kill [<node-ip>]' "Remotely, and
unceremoniously kills the ONOS instance running on the specified cell
machine" - Tom V |
source code
|
|
|
|
|
onosStartNetwork(self,
mntopo)
Calls the command 'onos-start-network [ <mininet-topo> ]
"remotely starts the specified topology on the cell's
mininet machine against all controllers configured in the
cell."
* Specify mininet topology file name for mntopo
* Topo files should be placed at:
~/<your-onos-directory>/tools/test/topos |
source code
|
|
|
isup(self,
node="",
timeout=120)
Run's onos-wait-for-start which only returns once ONOS is at run
level 100(ready for use) |
source code
|
|
|
|
|
|
|
checkStatus(self,
topologyResult,
numoswitch,
numolink,
logLevel="info")
Checks the number of switches & links that ONOS sees against the
supplied values. |
source code
|
|
|
tsharkPcap(self,
interface,
dirFile)
Capture all packet activity and store in specified
directory/file |
source code
|
|
|
runOnosTopoCfg(self,
instanceName,
jsonFile)
On ONOS bench, run this command:
{ONOS_HOME}/tools/test/bin/onos-topo-cfg $OC1 filename which starts
the rest and copies the json file to the onos instance |
source code
|
|
|
tsharkGrep(self,
grep,
directory,
interface='eth0',
grepOptions='')
Required:
* grep string
* directory to store results
Optional:
* interface - default: eth0
* grepOptions - options for grep
Description:
Uses tshark command to grep specific group of packets
and stores the results to specified directory. |
source code
|
|
|
tsharkStop(self)
Removes wireshark files from /tmp and kills all tshark processes |
source code
|
|
|
|
|
|
|
|
|
onosStatus(self,
node="")
Calls onos command: 'onos-service [<node-ip>] status' |
source code
|
|
|
setIpTables(self,
ip,
port='',
action='add',
packet_type='',
direction='INPUT',
rule='DROP',
states=True)
Description:
add or remove iptables rule to DROP (default) packets from
specific IP and PORT
Usage:
* specify action ('add' or 'remove')
when removing, pass in the same argument as you would add. |
source code
|
|
|
detailed_status(self,
log_filename)
This method is used by STS to check the status of the controller
Reports RUNNING, STARTING, STOPPED, FROZEN, ERROR (and reason) |
source code
|
|
|
createLinkGraphFile(self,
benchIp,
ONOSIpList,
deviceCount)
Create/formats the LinkGraph.cfg file based on arguments
-only creates a linear topology and connects islands
-evenly distributes devices
-must be called by ONOSbench |
source code
|
|
|
configNullDev(self,
ONOSIpList,
deviceCount,
numPorts=10)
ONOSIpList = list of Ip addresses of nodes switches will be devided
amongst deviceCount = number of switches to distribute, or list of
values to use as custom distribution numPorts = number of ports per
device. |
source code
|
|
|
configNullLink(self,
fileName="/opt/onos/apache-karaf-3.0.3/etc/linkGraph.cfg",
eventRate=0)
fileName default is currently the same as the default on ONOS,
specify alternate file if you want to use a different topology file
than linkGraph.cfg |
source code
|
|
|
getOnosIps(self)
Get all onos IPs stored in |
source code
|
|
|
logReport(self,
nodeIp,
searchTerms,
outputMode="s")
- accepts either a list or a string for "searchTerms" these
terms will be searched for in the log and have their
instances counted |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Inherited from component.Component :
__getattr__ ,
cleanup ,
close_log_handles ,
config ,
experimentRun ,
get_version ,
log
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__sizeof__ ,
__str__ ,
__subclasshook__
|