Additional work towards application subsystem drivers
- appStatus function
- activateApp function
- deactivateApp function
- uninstallApp function
- refactor PingallExample test to use the new functions
NOTE: PingallExample needs to be cleaned up before merged to master
diff --git a/TestON/tests/PingallExample/PingallExample.params b/TestON/tests/PingallExample/PingallExample.params
index 12bebcd..1e4cfc1 100644
--- a/TestON/tests/PingallExample/PingallExample.params
+++ b/TestON/tests/PingallExample/PingallExample.params
@@ -1,12 +1,12 @@
<PARAMS>
<testcases>1,2,3</testcases>
<ENV>
- <cellName>kelvin</cellName>
+ <cellName>SingleHA</cellName>
</ENV>
<Git>xe</Git>
<CTRL>
- <ip1>10.128.10.21</ip1>
+ <ip1>10.128.30.11</ip1>
<port1>6633</port1>
</CTRL>
</PARAMS>
diff --git a/TestON/tests/PingallExample/PingallExample.py b/TestON/tests/PingallExample/PingallExample.py
index dab380f..5f7334e 100644
--- a/TestON/tests/PingallExample/PingallExample.py
+++ b/TestON/tests/PingallExample/PingallExample.py
@@ -143,7 +143,7 @@
def CASE3( self, main ):
"""
- Assign intents
+ Install forwarding app, Pingall and unistall the app
"""
import time
@@ -152,7 +152,19 @@
# install onos-app-fwd
main.log.info( "Install reactive forwarding app" )
- main.ONOScli1.featureInstall( "onos-app-fwd" )
+ import json
+ main.log.warn(" pretty print json")
+ main.log.debug( json.dumps( json.loads( main.ONOScli1.apps() ),
+ sort_keys=True,
+ indent=4, separators=(',',':') ) )
+ main.log.warn(" get the status of the app")
+ print main.ONOScli1.appStatus( "org.onosproject.fwd" )
+ main.log.warn(" print the standard apps output")
+ main.log.debug( main.ONOScli1.apps( jsonFormat=False ) )
+ main.log.warn(" activate the app")
+ print main.ONOScli1.activateApp( "org.onosproject.fwd" )
+ main.log.warn(" print the standard apps output")
+ main.log.debug( main.ONOScli1.apps( jsonFormat=False ) )
# REACTIVE FWD test
pingResult = main.FALSE
@@ -163,7 +175,16 @@
# uninstall onos-app-fwd
main.log.info( "Uninstall reactive forwarding app" )
- main.ONOScli1.featureUninstall( "onos-app-fwd" )
+ main.log.warn(" print the standard apps output")
+ main.log.debug( main.ONOScli1.apps( jsonFormat=False ) )
+ main.log.warn(" deactivate the app")
+ print main.ONOScli1.deactivateApp( "org.onosproject.fwd" )
+ main.log.warn(" print the standard apps output")
+ main.log.debug( main.ONOScli1.apps( jsonFormat=False ) )
+ main.log.warn(" uninstall the app")
+ print main.ONOScli1.uninstallApp( "org.onosproject.fwd" )
+ main.log.warn(" print the standard apps output")
+ main.log.debug( main.ONOScli1.apps( jsonFormat=False ) )
utilities.assert_equals( expect=main.TRUE, actual=pingResult,
onpass="All hosts are reachable",
diff --git a/TestON/tests/PingallExample/PingallExample.topo b/TestON/tests/PingallExample/PingallExample.topo
index dba7a5d..3eda540 100644
--- a/TestON/tests/PingallExample/PingallExample.topo
+++ b/TestON/tests/PingallExample/PingallExample.topo
@@ -2,7 +2,7 @@
<COMPONENT>
<ONOSbench>
- <host>10.128.10.20</host>
+ <host>10.128.30.10</host>
<user>admin</user>
<password></password>
<type>OnosDriver</type>
@@ -11,7 +11,7 @@
</ONOSbench>
<ONOScli1>
- <host>10.128.10.20</host>
+ <host>10.128.30.10</host>
<user>admin</user>
<password></password>
<type>OnosCliDriver</type>
@@ -20,7 +20,7 @@
</ONOScli1>
<ONOS1>
- <host>10.128.10.21</host>
+ <host>10.128.30.11</host>
<user>admin</user>
<password></password>
<type>OnosDriver</type>
@@ -29,7 +29,7 @@
</ONOS1>
<Mininet1>
- <host>10.128.10.20</host>
+ <host>10.128.30.9</host>
<user>admin</user>
<password></password>
<type>MininetCliDriver</type>