Adjust the test script for Jenkins
diff --git a/TestON/drivers/common/cli/quaggaclidriver.py b/TestON/drivers/common/cli/quaggaclidriver.py
index e0f793b..27ce71f 100644
--- a/TestON/drivers/common/cli/quaggaclidriver.py
+++ b/TestON/drivers/common/cli/quaggaclidriver.py
@@ -22,17 +22,27 @@
self.name = self.options['name']
# self.handle = super(QuaggaCliDriver,self).connect(user_name = self.user_name, ip_address = self.ip_address,port = self.port, pwd = self.pwd)
self.handle = super(QuaggaCliDriver, self).connect(user_name=self.user_name, ip_address="1.1.1.1", port=self.port, pwd=self.pwd)
+ main.log.info("quagga handle" + str(self.handle) )
+ main.log.info("where is this timeout from?")
main.log.info("connect parameters:" + str(self.user_name) + ";" + str(self.ip_address) + ";" + str(self.port) + ";" + str(self.pwd))
if self.handle:
- self.handle.expect("")
- self.handle.expect("\$")
+ #self.handle.expect("",timeout=10)
+ #self.handle.expect("\$",timeout=10)
+ #main.log.info(self.handle.before)
+ #main.log.info(self.handle.after)
self.handle.sendline("telnet localhost 2605")
- self.handle.expect("Password:", timeout=5)
+ #self.handle.expect("Password:", timeout=5)
+ self.handle.expect("Password:")
+ main.log.info("TEST1")
self.handle.sendline("hello")
- self.handle.expect("bgpd", timeout=5)
+ #self.handle.expect("bgpd", timeout=5)
+ self.handle.expect("bgpd")
+ main.log.info("TEST2")
self.handle.sendline("enable")
- self.handle.expect("bgpd#", timeout=5)
+ #self.handle.expect("bgpd#", timeout=5)
+ self.handle.expect("bgpd#")
+ main.log.info("TEST3")
return self.handle
else :
main.log.info("NO HANDLE")
@@ -47,8 +57,8 @@
+ str(self.ip_address) + ";" + str(self.port) + ";" + str(self.pwd))
if self.handle:
- self.handle.expect("")
- self.handle.expect("\$")
+ #self.handle.expect("")
+ #self.handle.expect("\$")
self.handle.sendline("telnet localhost 2605")
self.handle.expect("Password:", timeout=5)
self.handle.sendline("hello")
diff --git a/TestON/tests/SdnIpTest/SdnIpTest.py b/TestON/tests/SdnIpTest/SdnIpTest.py
index 6580c20..17516fa 100755
--- a/TestON/tests/SdnIpTest/SdnIpTest.py
+++ b/TestON/tests/SdnIpTest/SdnIpTest.py
@@ -57,20 +57,20 @@
routeIntents_expected = routeIntents_expected_host3 + routeIntents_expected_host4
- main.step("Login all BGP peers and add routes into peers")
- main.log.info("Login Quagga CLI on host3")
- main.QuaggaCliHost3.loginQuagga("1.168.30.2")
- main.log.info("Enter configuration model of Quagga CLI on host3")
- main.QuaggaCliHost3.enter_config(64514)
- main.log.info("Add routes to Quagga on host3")
- main.QuaggaCliHost3.add_routes(prefixes_host3, 1)
+ # main.step("Login all BGP peers and add routes into peers")
+ # main.log.info("Login Quagga CLI on host3")
+ # main.QuaggaCliHost3.loginQuagga("1.168.30.2")
+ # main.log.info("Enter configuration model of Quagga CLI on host3")
+ # main.QuaggaCliHost3.enter_config(64514)
+ # main.log.info("Add routes to Quagga on host3")
+ # main.QuaggaCliHost3.add_routes(prefixes_host3, 1)
- main.log.info("Login Quagga CLI on host4")
- main.QuaggaCliHost4.loginQuagga("1.168.30.3")
- main.log.info("Enter configuration model of Quagga CLI on host4")
- main.QuaggaCliHost4.enter_config(64516)
- main.log.info("Add routes to Quagga on host4")
- main.QuaggaCliHost4.add_routes(prefixes_host4, 1)
+ #main.log.info("Login Quagga CLI on host4")
+ #main.QuaggaCliHost4.loginQuagga("1.168.30.3")
+ #main.log.info("Enter configuration model of Quagga CLI on host4")
+ #main.QuaggaCliHost4.enter_config(64516)
+ #main.log.info("Add routes to Quagga on host4")
+ #main.QuaggaCliHost4.add_routes(prefixes_host4, 1)
cell_name = main.params['ENV']['cellName']
ONOS1_ip = main.params['CTRL']['ip1']
@@ -107,7 +107,22 @@
time.sleep(10)
main.log.info("Installing sdn-ip feature")
main.ONOScli.feature_install("onos-app-sdnip")
- time.sleep(30)
+ time.sleep(10)
+ main.step("Login all BGP peers and add routes into peers")
+ main.log.info("Login Quagga CLI on host3")
+ main.QuaggaCliHost3.loginQuagga("1.168.30.2")
+ main.log.info("Enter configuration model of Quagga CLI on host3")
+ main.QuaggaCliHost3.enter_config(64514)
+ main.log.info("Add routes to Quagga on host3")
+ main.QuaggaCliHost3.add_routes(prefixes_host3, 1)
+
+ main.log.info("Login Quagga CLI on host4")
+ main.QuaggaCliHost4.loginQuagga("1.168.30.3")
+ main.log.info("Enter configuration model of Quagga CLI on host4")
+ main.QuaggaCliHost4.enter_config(64516)
+ main.log.info("Add routes to Quagga on host4")
+ main.QuaggaCliHost4.add_routes(prefixes_host4, 1)
+ time.sleep(60)
# get all routes inside SDN-IP
get_routes_result = main.ONOScli.routes(json_format=True)
@@ -166,7 +181,7 @@
# wait until all MultiPointToSinglePoint
time.sleep(20)
ping_test_script = "~/SDNIP/SdnIpIntentDemo/CASE1-ping-as2host.sh"
- ping_test_results_file = "~/SDNIP/SdnIpIntentDemo/CASE1-ping-results-before-delete-routes-" + strftime("%Y-%m-%d_%H:%M:%S", localtime()) + ".txt"
+ ping_test_results_file = "~/SDNIP/SdnIpIntentDemo/log/CASE1-ping-results-before-delete-routes-" + strftime("%Y-%m-%d_%H:%M:%S", localtime()) + ".txt"
ping_test_results = main.QuaggaCliHost.ping_test("1.168.30.100", ping_test_script, ping_test_results_file)
main.log.info(ping_test_results)
@@ -201,7 +216,7 @@
time.sleep(20)
ping_test_script = "~/SDNIP/SdnIpIntentDemo/CASE1-ping-as2host.sh"
- ping_test_results_file = "~/SDNIP/SdnIpIntentDemo/CASE1-ping-results-after-delete-routes-" + strftime("%Y-%m-%d_%H:%M:%S", localtime()) + ".txt"
+ ping_test_results_file = "~/SDNIP/SdnIpIntentDemo/log/CASE1-ping-results-after-delete-routes-" + strftime("%Y-%m-%d_%H:%M:%S", localtime()) + ".txt"
ping_test_results = main.QuaggaCliHost.ping_test("1.168.30.100", ping_test_script, ping_test_results_file)
main.log.info(ping_test_results)
time.sleep(30)