A few changes to server parts
diff --git a/TestON/drivers/common/cli/ramcloudclidriver.py b/TestON/drivers/common/cli/ramcloudclidriver.py
index 6f72403..2ac7835 100644
--- a/TestON/drivers/common/cli/ramcloudclidriver.py
+++ b/TestON/drivers/common/cli/ramcloudclidriver.py
@@ -79,13 +79,21 @@
self.handle.expect("onos.sh rc-server start")
self.handle.expect("\$")
response = self.handle.before + self.handle.after
- print response
+ print ("RESPONSE IS: "+response)
time.sleep(5)
- if re.search("Starting\sRAMCloud\sserver\s(.*)", response):
- main.log.info(self.name + ": RAMCloud Server Started ")
- return main.TRUE
- else:
- main.log.error(self.name + ": Failed to start RAMCloud Server"+ response)
+ if re.search("Killed\sexisting\process", response):
+ main.log.info(self.name + ": Previous RAMCloud killed. ")
+ if re.search("Starting\sRAMCloud\sserver",response):
+ main.log.info(self.name + ": RAMCloud Server Started")
+ return main.TRUE
+ else:
+ main.log.info(self.name + ": Failed to start RAMCloud Server"+response)
+ return main.FALSE
+ if re.search("Starting\sRAMCloud\sserver",response):
+ main.log.info(self.name + ": RAMCloud Server Started")
+ return main.TRUE
+ else:
+ main.log.info(self.name + ": Failed to start RAMCloud Server"+response)
return main.FALSE
@@ -152,9 +160,9 @@
'''
self.execute(cmd="\n",prompt="\$",timeout=10)
time.sleep(5)
- response = self.execute(cmd=slef.home + "/onos.sh rc-server stop ",prompt="Killed\sexisting\sprosess(.*)",timeout=10)
+ response = self.execute(cmd=slef.home + "/onos.sh rc-server stop ",prompt="Killed\sexisting\sprocess(.*)",timeout=10)
self.execute(cmd="\n",prompt="\$",timeout=10)
- if re.search("Killed\sexisting\sprosess(.*)",response):
+ if re.search("Killed\sexisting\sprocess(.*)",response):
main.log.info("RAMCloud Server Stopped")
return main.TRUE
else:
@@ -168,9 +176,9 @@
'''
self.execute(cmd="\n",prompt="\$",timeout=10)
time.sleep(5)
- response = self.execute(cmd=self.home + "/onos.sh rc-coord stop ",prompt="Killed\sexisting\sprosess(.*)",timeout=10)
+ response = self.execute(cmd=self.home + "/onos.sh rc-coord stop ",prompt="Killed\sexisting\sprocess(.*)",timeout=10)
self.execute(cmd="\n",prompt="\$",timeout=10)
- if re.search("Killed\sexisting\sprosess(.*)",response):
+ if re.search("Killed\sexisting\sprocess(.*)",response):
main.log.info("RAMCloud Coordinator Stopped")
return main.TRUE
else:
@@ -189,25 +197,3 @@
response = main.FALSE
return response
- def isup(self):
- '''
- A more complete status check of ramcloud.
- Tries 5 times to call start-ramcloud-server.sh status
- returns TRUE if it sees four occurances of both Up, and Normal
- '''
- tries = 5
- main.log.info("trying %i times" % tries )
- for i in range(tries):
- self.execute(cmd="\n",prompt="\$",timeout=10)
- self.handle.sendline("")
- self.handle.expect("\$")
- self.handle.sendline(self.home + "/onos.sh rc-server status")
- data = self.handle.expect(['1 RAMCloud server running','0 RAMCloud server running',pexpect.TIMEOUT],timeout=30)
- if data==0:
- main.log.report("RAMCloud Up and Running!")
- return main.TRUE
- elif data==1:
- main.log.report("RAMCloud is down!")
-
-
- return main.FALSE