| Home | Trees | Indices | Help |
|
|---|
|
|
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Inherited from Inherited from |
|||
|
|||
|
Inherited from |
|||
|
|||
Initialize client
|
Creates ssh handle for ONOS cli.
|
Called when Test is complete to disconnect the ONOS handle.
|
Sends 'logout' command to ONOS cli
Returns main.TRUE if exited CLI and
main.FALSE on timeout (not guranteed you are disconnected)
None on TypeError
Exits test on unknown error or pexpect exits unexpectedly
|
Calls 'cell <name>' to set the environment variables on ONOSbench Before issuing any cli commands, set the environment variable first. |
karafTimeout is an optional argument. karafTimeout value passed by user would be used to set the current karaf shell idle timeout. Note that when ever this property is modified the shell will exit and the subsequent login would reflect new idle timeout. Below is an example to start a session with 60 seconds idle timeout ( input value is in milliseconds ): tValue = "60000" main.ONOScli1.startOnosCli( ONOSIp, karafTimeout=tValue ) Note: karafTimeout is left as str so that this could be read and passed to startOnosCli from PARAMS file as str. |
log the commands in the onos CLI. returns main.TRUE on success returns main.FALSE if Error occurred Available level: DEBUG, TRACE, INFO, WARN, ERROR Level defaults to INFO
|
Send a completely user specified string to the onos> prompt. Use this function if you have a very specific command to send. Warning: There are no sanity checking to commands sent using this method. |
Adds a new cluster node by ID and address information.
Required:
* nodeId
* ONOSIp
Optional:
* tcpPort
|
Removes a cluster by ID
Issues command: 'remove-node [<node-id>]'
Required:
* nodeId
|
List the nodes currently visible
Issues command: 'nodes'
Optional argument:
* jsonFormat - boolean indicating if you want output in json
|
Definition:
Returns the output of topology command.
Return:
topology = current ONOS topology
|
Installs a specified feature by issuing command:
'feature:install <feature_str>'
NOTE: This is now deprecated, you should use the activateApp method
instead
|
Uninstalls a specified feature by issuing command:
'feature:uninstall <feature_str>'
NOTE: This is now deprecated, you should use the deactivateApp method
instead
|
Removes particular device from storage TODO: refactor this function |
Lists all infrastructure devices or switches
Optional argument:
* jsonFormat - boolean indicating if you want output in json
|
Returns the output of the masters command.
Optional argument:
* jsonFormat - boolean indicating if you want output in json
|
Uses the master command to check that the devices' leadership is evenly divided Dependencies: checkMasters() and summary() Returns main.True if the devices are balanced Returns main.False if the devices are unbalanced Exits on Exception Returns None on TypeError |
Lists all core links
Optional argument:
* jsonFormat - boolean indicating if you want output in json
|
Lists all ports
Optional argument:
* jsonFormat - boolean indicating if you want output in json
|
Lists all devices and the controllers with roles assigned to them
Optional argument:
* jsonFormat - boolean indicating if you want output in json
|
Given the a string containing the json representation of the "roles" cli command and a partial or whole device id, returns a json object containing the roles output for the first device whose id contains "device_id" Returns: A dict of the role assignments for the given device or None if no match |
Iterates through each device and checks if there is a master assigned
Returns: main.TRUE if each device has a master
main.FALSE any device has no master
|
Returns string of paths, and the cost. Issues command: onos:paths <src> <dst> |
Lists all discovered hosts
Optional argument:
* jsonFormat - boolean indicating if you want output in json
|
Return the first host from the hosts api whose 'id' contains 'mac'
Note: mac must be a colon separated mac address, but could be a
partial mac address
Return None if there is no match
|
Obtain list of hosts
Issues command: 'onos> hosts'
Required:
* hostList: List of hosts obtained by Mininet
IMPORTANT:
This function assumes that you started your
topology with the option '--mac'.
Furthermore, it assumes that value of VLAN is '-1'
Description:
Converts mininet hosts ( h1, h2, h3... ) into
ONOS format ( 00:00:00:00:00:01/-1 , ... )
|
Required:
* hostIdOne: ONOS host id for host1
* hostIdTwo: ONOS host id for host2
Description:
Adds a host-to-host intent ( bidirectional ) by
specifying the two hosts.
Returns:
A string of the intent id or None on Error
|
Required:
* ingressDevice: device id of ingress device
* egressDevice: device id of egress device
Optional:
TODO: Still needs to be implemented via dev side
Description:
Adds an optical intent by specifying an ingress and egress device
Returns:
A string of the intent id or None on error
|
Required:
* ingressDevice: device id of ingress device
* egressDevice: device id of egress device
Optional:
* ethType: specify ethType
* ethSrc: specify ethSrc ( i.e. src mac addr )
* ethDst: specify ethDst ( i.e. dst mac addr )
* bandwidth: specify bandwidth capacity of link
* lambdaAlloc: if True, intent will allocate lambda
for the specified intent
* ipProto: specify ip protocol
* ipSrc: specify ip source address
* ipDst: specify ip destination address
* tcpSrc: specify tcp source port
* tcpDst: specify tcp destination port
Description:
Adds a point-to-point intent ( uni-directional ) by
specifying device id's and optional fields
Returns:
A string of the intent id or None on error
NOTE: This function may change depending on the
options developers provide for point-to-point
intent via cli
|
Note:
This function assumes the format of all ingress devices
is same. That is, all ingress devices include port numbers
with a "/" or all ingress devices could specify device
ids and port numbers seperately.
Required:
* ingressDeviceList: List of device ids of ingress device
( Atleast 2 ingress devices required in the list )
* egressDevice: device id of egress device
Optional:
* ethType: specify ethType
* ethSrc: specify ethSrc ( i.e. src mac addr )
* ethDst: specify ethDst ( i.e. dst mac addr )
* bandwidth: specify bandwidth capacity of link
* lambdaAlloc: if True, intent will allocate lambda
for the specified intent
* ipProto: specify ip protocol
* ipSrc: specify ip source address
* ipDst: specify ip destination address
* tcpSrc: specify tcp source port
* tcpDst: specify tcp destination port
* setEthSrc: action to Rewrite Source MAC Address
* setEthDst: action to Rewrite Destination MAC Address
Description:
Adds a multipoint-to-singlepoint intent ( uni-directional ) by
specifying device id's and optional fields
Returns:
A string of the intent id or None on error
NOTE: This function may change depending on the
options developers provide for multipoint-to-singlepoint
intent via cli
|
Note:
This function assumes the format of all egress devices
is same. That is, all egress devices include port numbers
with a "/" or all egress devices could specify device
ids and port numbers seperately.
Required:
* EgressDeviceList: List of device ids of egress device
( Atleast 2 eress devices required in the list )
* ingressDevice: device id of ingress device
Optional:
* ethType: specify ethType
* ethSrc: specify ethSrc ( i.e. src mac addr )
* ethDst: specify ethDst ( i.e. dst mac addr )
* bandwidth: specify bandwidth capacity of link
* lambdaAlloc: if True, intent will allocate lambda
for the specified intent
* ipProto: specify ip protocol
* ipSrc: specify ip source address
* ipDst: specify ip destination address
* tcpSrc: specify tcp source port
* tcpDst: specify tcp destination port
* setEthSrc: action to Rewrite Source MAC Address
* setEthDst: action to Rewrite Destination MAC Address
Description:
Adds a singlepoint-to-multipoint intent ( uni-directional ) by
specifying device id's and optional fields
Returns:
A string of the intent id or None on error
NOTE: This function may change depending on the
options developers provide for singlepoint-to-multipoint
intent via cli
|
Required:
* ingressDevice: device id of ingress device
* egressDevice: device id of egress device
Optional:
* ethType: specify ethType
* ethSrc: specify ethSrc ( i.e. src mac addr )
* ethDst: specify ethDst ( i.e. dst mac addr )
* bandwidth: specify bandwidth capacity of link
* lambdaAlloc: if True, intent will allocate lambda
for the specified intent
* ipProto: specify ip protocol
* ipSrc: specify ip source address
* ipDst: specify ip destination address
* tcpSrc: specify tcp source port
* tcpDst: specify tcp destination port
* ingressLabel: Ingress MPLS label
* egressLabel: Egress MPLS label
Description:
Adds MPLS intent by
specifying device id's and optional fields
Returns:
A string of the intent id or None on error
NOTE: This function may change depending on the
options developers provide for MPLS
intent via cli
|
Remove intent for specified application id and intent id
Optional args:-
-s or --sync: Waits for the removal before returning
-p or --purge: Purge the intent from the store after removal
Returns:
main.False on error and
cli output otherwise
|
NOTE: This method should be used after installing application:
onos-app-sdnip
Optional:
* jsonFormat: enable output formatting in json
Description:
Obtain all routes in the system
|
Optional:
* jsonFormat: enable output formatting in json
Description:
Obtain intents currently installed
|
Check intent state. Accepts a single intent ID (string type) or a list of intent IDs. Returns the state(string type) of the id if a single intent ID is accepted. Returns a dictionary with intent IDs as the key and its corresponding states as the values Parameters: intentId: intent ID (string type) intentsJson: parsed json object from the onos:intents api Returns: state = An intent's state- INSTALL,WITHDRAWN etc. stateDict = Dictionary of intent's state. intent ID as the keys and state as the values. |
Description:
Check intents state
Required:
intentsId - List of intents ID to be checked
Optional:
expectedState - Check the expected state(s) of each intents
state in the list.
*NOTE: You can pass in a list of expected state,
Eg: expectedState = [ 'INSTALLED' , 'INSTALLING' ]
Return:
Returns main.TRUE only if all intent are the same as expected states
, otherwise, returns main.FALSE.
|
Optional:
* jsonFormat: enable output formatting in json
Description:
Obtain flows currently installed
|
Description:
Push a number of intents in a batch format to
a specific point-to-point intent definition
Required:
* dpidSrc: specify source dpid
* dpidDst: specify destination dpid
* numIntents: specify number of intents to push
Optional:
* numMult: number multiplier for multiplying
the number of intents specified
* appId: specify the application id init to further
modularize the intents
* report: default True, returns latency information
|
Description:Returns topology metrics
Optional:
* jsonFormat: enable json formatting of output
|
Description:Returns topology metrics
Optional:
* jsonFormat: enable json formatting of output
|
Description:
Obtain all intent id's in a list
|
Use 'devices' function to obtain list of all devices and parse the result to obtain a list of all device id's. Returns this list. Returns empty list if no devices exist List is ordered sequentially This function may be useful if you are not sure of the device id, and wish to execute other commands using the ids. By obtaining the list of device ids on the fly, you can iterate through the list to get mastership, etc. |
Uses 'nodes' function to obtain list of all nodes
and parse the result of nodes to obtain just the
node id's.
Returns:
list of node id's
|
Checks the number of switches & links that ONOS sees against the
supplied values. By default this will report to main.log, but the
log level can be specified.
Params: ip = ip used for the onos cli
numoswitch = expected number of switches
numolink = expected number of links
logLevel = level to log to. Currently accepts
'info', 'warn' and 'report'
logLevel can
Returns: main.TRUE if the number of switches and links are correct,
main.FALSE if the number of switches and links is incorrect,
and main.ERROR otherwise
|
Calls the device-role cli command.
deviceId must be the id of a device as seen in the onos devices command
onosNode is the ip of one of the onos nodes in the cluster
role must be either master, standby, or none
Returns:
main.TRUE or main.FALSE based on argument verification and
main.ERROR if command returns and error
|
Lists all clusters
Optional argument:
* jsonFormat - boolean indicating if you want output in json
|
CLI command to get the current leader for the Election test application
NOTE: Requires installation of the onos-app-election feature
Returns: Node IP of the leader if one exists
None if none exists
Main.FALSE on error
|
CLI command to run for leadership of the Election test application.
NOTE: Requires installation of the onos-app-election feature
Returns: Main.TRUE on success
Main.FALSE on error
|
* CLI command to withdraw the local node from leadership election for
* the Election test application.
#NOTE: Requires installation of the onos-app-election feature
Returns: Main.TRUE on success
Main.FALSE on error
|
Returns the output of the leaders command.
Optional argument:
* jsonFormat - boolean indicating if you want output in json
|
Returns the output of the leaders -c command.
Optional argument:
* jsonFormat - boolean indicating if you want output in json
|
Returns the output of the apps command for ONOS. This command lists information about installed ONOS applications |
Uses the onos:apps cli command to return the status of an application.
Returns:
"ACTIVE" - If app is installed and activated
"INSTALLED" - If app is installed and deactivated
"UNINSTALLED" - If app is not installed
None - on error
|
Interacts with the app command for ONOS. This command manages application inventory. |
Activate an app that is already installed in ONOS
appName is the hierarchical app name, not the feature name
If check is True, method will check the status of the app after the
command is issued
Returns main.TRUE if the command was successfully sent
main.FALSE if the cli responded with an error or given
incorrect input
|
Deactivate an app that is already activated in ONOS
appName is the hierarchical app name, not the feature name
If check is True, method will check the status of the app after the
command is issued
Returns main.TRUE if the command was successfully sent
main.FALSE if the cli responded with an error or given
incorrect input
|
Uninstall an app that is already installed in ONOS
appName is the hierarchical app name, not the feature name
If check is True, method will check the status of the app after the
command is issued
Returns main.TRUE if the command was successfully sent
main.FALSE if the cli responded with an error or given
incorrect input
|
This method will check that each application's ID listed in 'apps' is
the same as the ID listed in 'app-ids'. The check will also check that
there are no duplicate IDs issued. Note that an app ID should be
a globaly unique numerical identifier for app/app-like features. Once
an ID is registered, the ID is never freed up so that if an app is
reinstalled it will have the same ID.
Returns: main.TRUE if the check passes and
main.FALSE if the check fails or
main.ERROR if there is some error in processing the test
|
Get configuration settings from onos cli
Optional arguments:
component - Optionally only list configurations for a specific
component. If None, all components with configurations
are displayed. Case Sensitive string.
propName - If component is specified, propName option will show
only this specific configuration from that component.
Case Sensitive string.
jsonFormat - Returns output as json. Note that this will override
the short option
short - Short, less verbose, version of configurations.
This is overridden by the json option
returns:
Output from cli as a string or None on error
|
Set/Unset configuration settings from ONOS cli
Required arguments:
component - The case sensitive name of the component whose
property is to be set
propName - The case sensitive name of the property to be set/unset
Optional arguments:
value - The value to set the property to. If None, will unset the
property and revert it to it's default value(if applicable)
check - Boolean, Check whether the option was successfully set this
only applies when a value is given.
returns:
main.TRUE on success or main.FALSE on failure. If check is False,
will return main.TRUE unless there is an error
|
CLI command to add elements to a distributed set.
Arguments:
setName - The name of the set to add to.
values - The value(s) to add to the set, space seperated.
Example usages:
setTestAdd( "set1", "a b c" )
setTestAdd( "set2", "1" )
returns:
main.TRUE on success OR
main.FALSE if elements were already in the set OR
main.ERROR on error
|
CLI command to remove elements from a distributed set.
Required arguments:
setName - The name of the set to remove from.
values - The value(s) to remove from the set, space seperated.
Optional arguments:
clear - Clear all elements from the set
retain - Retain only the given values. (intersection of the
original set and the given set)
returns:
main.TRUE on success OR
main.FALSE if the set was not changed OR
main.ERROR on error
|
CLI command to get the elements in a distributed set.
Required arguments:
setName - The name of the set to remove from.
Optional arguments:
values - The value(s) to check if in the set, space seperated.
returns:
main.ERROR on error OR
A list of elements in the set if no optional arguments are
supplied OR
A tuple containing the list then:
main.FALSE if the given values are not in the set OR
main.TRUE if the given values are in the set OR
|
CLI command to get the elements in a distributed set.
Required arguments:
setName - The name of the set to remove from.
returns:
The integer value of the size returned or
None on error
|
Command to list the various counters in the system.
returns:
if jsonFormat, a string of the json object returned by the cli
command
if not jsonFormat, the normal string output of the cli command
None on error
|
CLI command to add a delta to then get a distributed counter.
Required arguments:
counter - The name of the counter to increment.
Optional arguments:
delta - The long to add to the counter
inMemory - use in memory map for the counter
returns:
integer value of the counter or
None on Error
|
CLI command to get a distributed counter then add a delta to it.
Required arguments:
counter - The name of the counter to increment.
Optional arguments:
delta - The long to add to the counter
inMemory - use in memory map for the counter
returns:
integer value of the counter or
None on Error
|
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Mon Aug 10 11:12:35 2015 | http://epydoc.sourceforge.net |