| Home | Trees | Indices | Help |
|
|---|
|
|
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Inherited from Inherited from |
|||
|
|||
|
Inherited from |
|||
|
|||
x.__init__(...) initializes x; see help(type(x)) for signature
|
Connection will establish to the remote host using ssh. It will take user_name ,ip_address and password as arguments<br> and will return the handle.
|
Arguments:
str ip: ONOS IP Address
str port: ONOS REST Port
str url: ONOS REST url path.
NOTE that this is is only the relative path. IE "/devices"
str base: The base url for the given REST api. Applications could
potentially have their own base url
str method: HTTP method type
dict query: Dictionary to be sent in the query string for
the request
dict data: Dictionary to be sent in the body of the request
|
Description:
Gets a list of dictionary of all intents in the system
Returns:
A list of dictionary of intents in string type to match the cli
version for now; Returns main.FALSE if error on request;
Returns None for exception
|
Description:
Get the specific intent information of the given application ID and
intent ID
Required:
str intentId - Intent id in hexadecimal form
Optional:
str appId - application id of intent
Returns:
Returns an information dictionary of the given intent;
Returns main.FALSE if error on requests; Returns None for exception
NOTE:
The GET /intents REST api command accepts application id but the
api will get updated to accept application name instead
|
Description:
Returns all the current application installed in the system
Returns:
List of dictionary of installed application; Returns main.FALSE for
error on request; Returns None for exception
|
Decription:
Activate an app that is already installed in ONOS
Optional:
bool check - If check is True, method will check the status
of the app after the command is issued
Returns:
Returns main.TRUE if the command was successfully or main.FALSE
if the REST responded with an error or given incorrect input;
Returns None for exception
|
Required:
Deactivate an app that is already activated in ONOS
Optional:
bool check - If check is True, method will check the status of the
app after the command is issued
Returns:
Returns main.TRUE if the command was successfully sent
main.FALSE if the REST responded with an error or given
incorrect input; Returns None for exception
|
Decription:
Gets the informaion of the given application
Required:
str name - Name of onos application
Returns:
Returns a dictionary of information ONOS application in string type;
Returns main.FALSE if error on requests; Returns None for exception
|
Description:
Adds a host-to-host intent ( bidirectional ) by
specifying the two hosts.
Required:
* hostIdOne: ONOS host id for host1
* hostIdTwo: ONOS host id for host2
Optional:
str appId - Application name of intent identifier
Returns:
Returns main.TRUE for successful requests; Returns main.FALSE if
error on requests; Returns None for exceptions
|
Description:
Adds a point-to-point intent ( uni-directional ) by
specifying device id's and optional fields
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 (TODO)
* lambdaAlloc: if True, intent will allocate lambda
for the specified intent (TODO)
* ipProto: specify ip protocol
* ipSrc: specify ip source address with mask eg. ip#/24
* ipDst: specify ip destination address eg. ip#/24
* tcpSrc: specify tcp source port
* tcpDst: specify tcp destination port
Returns:
Returns main.TRUE for successful requests; Returns main.FALSE if
no ingress|egress port found and if error on requests;
Returns None for exceptions
NOTE:
The ip and port option are for the requests input's ip and port
of the ONOS node
|
Description:
Remove all the intents
Returns:
Returns main.TRUE if all intents are removed, otherwise returns
main.FALSE; Returns None for exception
|
Description:
Get a list of dictionary of all discovered hosts
Returns:
Returns a list of dictionary of information of the hosts currently
discovered by ONOS; Returns main.FALSE if error on requests;
Returns None for exception
|
Description:
Gets the information from the given host
Required:
str mac - MAC address of the host
Optional:
str vlan - VLAN tag of the host, defaults to -1
Returns:
Return the host id from the hosts/mac/vlan output in REST api
whose 'id' contains mac/vlan; Returns None for exception;
Returns main.FALSE if error on requests
NOTE:
Not sure what this function should do, any suggestion?
|
Description:
Gets the overview of network topology
Returns:
Returns a dictionary containing information about network topology;
Returns None for exception
|
Description:
Get 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.
Required:
intentId: intent ID (string type)
intentsJson: parsed json object from the onos:intents api
Returns:
Returns a dictionary with intent IDs as the key and its
corresponding states as the values; Returns None for invalid IDs or
Type error and any exceptions
NOTE:
An intent's state consist of INSTALLED,WITHDRAWN etc.
|
Description:
Check intents state based on expected state which defaults to
INSTALLED 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; Returns None for general exception
|
Description:
Get flows currently added to the system
NOTE:
The flows -j cli command has completely different format than
the REST output; Returns None for exception
|
Description:
Gets all the flows of the device or get a specific flow in the
device by giving its flow ID
Required:
str device - device/switch Id
Optional:
int/hex flowId - ID of the flow
|
Description:
Creates a single flow in the specified device
Required:
* deviceId: id of the device
Optional:
* ingressPort: port ingress device
* egressPort: port of egress device
* ethType: specify ethType
* ethSrc: specify ethSrc ( i.e. src mac addr )
* ethDst: specify ethDst ( i.e. dst mac addr )
* ipProto: specify ip protocol
* ipSrc: specify ip source address with mask eg. ip#/24
* ipDst: specify ip destination address eg. ip#/24
* tcpSrc: specify tcp source port
* tcpDst: specify tcp destination port
Returns:
Returns main.TRUE for successful requests; Returns main.FALSE
if error on requests;
Returns None for exceptions
NOTE:
The ip and port option are for the requests input's ip and port
of the ONOS node
|
Description:
Remove specific device flow
Required:
str deviceId - id of the device
str flowId - id of the flow
Return:
Returns main.TRUE if successfully deletes flows, otherwise
Returns main.FALSE, Returns None on error
|
Description:
Check if all the current flows are in ADDED state
Return:
returnValue - Returns main.TRUE only if all flows are in
return main.FALSE otherwise;
Returns None for exception
|
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Mon Aug 10 11:12:35 2015 | http://epydoc.sourceforge.net |