Fixed Linc-OE <-> ONOS connection issues
diff --git a/TestON/drivers/common/cli/emulator/lincoedriver.py b/TestON/drivers/common/cli/emulator/lincoedriver.py
index 0885d9e..4d2cc01 100644
--- a/TestON/drivers/common/cli/emulator/lincoedriver.py
+++ b/TestON/drivers/common/cli/emulator/lincoedriver.py
@@ -42,6 +42,8 @@
'''
Create ssh handle for Linc-OE cli
'''
+ import time
+
for key in connectargs:
vars(self)[key] = connectargs[key]
@@ -63,21 +65,22 @@
main.log.info("Building Linc-OE")
self.handle.sendline("make rel")
- i = self.handle.expect(["ERROR","\$"])
+ i = self.handle.expect(["ERROR","linc-oe\$"],timeout=60)
if i == 0:
self.handle.sendline("sudo pkill -9 epmd")
self.handle.expect("\$")
self.handle.sendline("make rel")
- x = self.handle.expect(["\$",pespect.EOF,pexpect.TIMEOUT])
+ x = self.handle.expect(["\$",pexpect.EOF,pexpect.TIMEOUT])
main.log.info("make rel returned: "+ str(x))
-
- main.log.info(self.name+": Starting Linc-OE CLI")
- cmdStr = "sudo ./rel/linc/bin/linc console"
-
- self.handle.sendline(cmdStr)
- self.handle.expect([">",pexpect.EOF,pexpect.TIMEOUT])
-
- return main.TRUE
+ else:
+ main.log.info(self.name+": Starting Linc-OE CLI.. This may take a while")
+ time.sleep(30)
+ self.handle.sendline("sudo ./rel/linc/bin/linc console")
+ j = self.handle.expect(["linc@",pexpect.EOF,pexpect.TIMEOUT])
+
+ if j == 0:
+ main.log.info("Linc-OE CLI started")
+ return main.TRUE
else:
main.log.error(self.name+
diff --git a/TestON/tests/LincOETest/LincOETest.params b/TestON/tests/LincOETest/LincOETest.params
index e4dd3c8..46e4f19 100755
--- a/TestON/tests/LincOETest/LincOETest.params
+++ b/TestON/tests/LincOETest/LincOETest.params
@@ -1,6 +1,6 @@
<PARAMS>
- <testcases>1</testcases>
+ <testcases>1,2</testcases>
#Environment variables
<ENV>
diff --git a/TestON/tests/LincOETest/LincOETest.py b/TestON/tests/LincOETest/LincOETest.py
index 82cf707..bb52ca8 100755
--- a/TestON/tests/LincOETest/LincOETest.py
+++ b/TestON/tests/LincOETest/LincOETest.py
@@ -71,6 +71,12 @@
main.step("Starting ONOS service")
start_result = main.ONOSbench.onos_start(ONOS1_ip)
+ main.step("Setting cell for ONOScli")
+ main.ONOScli.set_cell(cell_name)
+
+ main.step("Starting ONOScli")
+ main.ONOScli.start_onos_cli(ONOS1_ip)
+
case1_result = (clean_install_result and package_result and\
cell_result and verify_result and onos_install_result and\
onos1_isup and start_result )
@@ -80,4 +86,29 @@
time.sleep(10)
+ def CASE2(self, main):
+ '''
+ Configure topology
+ '''
+ import time
+
+ ONOS1_ip = main.params['CTRL']['ip1']
+ default_sw_port = main.params['CTRL']['port1']
+
+ #Assign packet level switches to controller
+ main.Mininet1.assign_sw_controller(sw="1",
+ ip1=ONOS1_ip, port1=default_sw_port)
+ main.Mininet1.assign_sw_controller(sw="2",
+ ip1=ONOS1_ip, port1=default_sw_port)
+
+ #Check devices in controller
+ #This should include Linc-OE devices as well
+ devices = main.ONOScli.devices()
+ main.log.info(devices)
+
+ def CASE3(self, main):
+ '''
+ Install multi-layer intents
+ '''
+