Refactor ONOS Drivers
Changes include:
Include component handle in log messages
Replace carriage returns with new line characters
Remove static IP addresses and passwords
Add exception handling to prevent TestON crashes
Delete old tests and duplicate files
Onoscli driver
Remove assert from isup()
Parameterize REST port and set default to 8080
Add ONOS home directory, default to ~/ONOS
Merge onosrestapidriver.py into onosclidriver.py
Remove ctrl_one and ctrl_none functions
Improve git_pull() error checking
Parameterize the interface for tcpdump
Print more information in get_version
Parameterize the scp source username and password for add_flow
Remove Link_up and Link_down - see link() in mininet driver
Mininet Driver
assign_sw_controller takes COUNT to indicate how many controllers to assign to a switch - requires change to each test that uses this function to assign more than 1 controller to a switch
remove static password
doubled timeout for cleanup(larger networks can take longer to clean)
Zookeeper Driver
Remove start() call from connect()
add Zookeeper home directory, with default as ~/zookeeper-3.4.5
Cassandra Driver
Improve logic of status function
Check if self is up in isup instead of 4 instances running
diff --git a/TestON/drivers/common/cli/emulator/flowvisordriver.py b/TestON/drivers/common/cli/emulator/flowvisordriver.py
index 8df7338..66946bd 100644
--- a/TestON/drivers/common/cli/emulator/flowvisordriver.py
+++ b/TestON/drivers/common/cli/emulator/flowvisordriver.py
@@ -91,7 +91,7 @@
else :
self.execute(cmd="clear",prompt="\$",timeout=10)
self.execute(cmd="./fvctl.sh removeFlowSpace "+id,prompt="passwd:",timeout=10)
- self.execute(cmd="\r",prompt="\$",timeout=10)
+ self.execute(cmd="\n",prompt="\$",timeout=10)
main.log.info("Removed flowSpace which is having id :"+id)
return main.TRUE
@@ -129,7 +129,7 @@
#self.execute(cmd="clear",prompt="\$",timeout=10)
self.execute(cmd="./fvctl.sh addFlowSpace "+flowspace,prompt="passwd:",timeout=10)
- self.execute(cmd="\r",prompt="\$",timeout=10)
+ self.execute(cmd="\n",prompt="\$",timeout=10)
sucess_match = re.search("success\:\s+(\d+)", main.last_response)
if sucess_match :
main.log.info("Added flow Space and id is "+sucess_match.group(1))
@@ -142,7 +142,7 @@
def listFlowSpace(self):
self.execute(cmd="clear",prompt="\$",timeout=10)
self.execute(cmd="./fvctl.sh listFlowSpace ",prompt="passwd:",timeout=10)
- self.execute(cmd="\r",prompt="\$",timeout=10)
+ self.execute(cmd="\n",prompt="\$",timeout=10)
flow_space = main.last_response
flow_space = self.remove_contol_chars( flow_space)
flow_space = re.sub("rule\s(\d+)\:", "\nrule "+r'\1'+":",flow_space)
@@ -153,7 +153,7 @@
def listDevices(self):
#self.execute(cmd="clear",prompt="\$",timeout=10)
#self.execute(cmd="./fvctl.sh listDevices ",prompt="passwd:",timeout=10)
- #self.execute(cmd="\r",prompt="\$",timeout=10)
+ #self.execute(cmd="\n",prompt="\$",timeout=10)
devices_list = ''
last_response = re.findall("(Device\s\d+\:\s((\d|[a-z])(\d|[a-z])\:)+(\d|[a-z])(\d|[a-z]))", main.last_response)