Merge "Add option for scapy path"
diff --git a/TestON/drivers/common/cli/emulator/scapyclidriver.py b/TestON/drivers/common/cli/emulator/scapyclidriver.py
index e5d2deb..b9eea51 100644
--- a/TestON/drivers/common/cli/emulator/scapyclidriver.py
+++ b/TestON/drivers/common/cli/emulator/scapyclidriver.py
@@ -48,6 +48,7 @@
self.scapyPrompt = ">>>"
self.sudoRequired = True
self.ifaceName = None
+ self.scapyPath = "scapy"
def connect( self, **connectargs ):
"""
@@ -65,6 +66,8 @@
self.sudoRequired = False if self.options[ key ] == "false" else True
elif key == "ifaceName":
self.ifaceName = self.options[ key ]
+ elif key == "scapy_path":
+ self.scapyPath = self.options[ key ]
if self.ifaceName is None:
self.ifaceName = self.name + "-eth0"
@@ -162,9 +165,9 @@
try:
main.log.debug( self.name + ": Starting scapy" )
if self.sudoRequired:
- self.handle.sendline( "sudo scapy" )
+ self.handle.sendline( "sudo %s" % self.scapyPath )
else:
- self.handle.sendline( "scapy" )
+ self.handle.sendline( self.scapyPath )
i = self.handle.expect( [ "not found", "password for", self.scapyPrompt ] )
if i == 1:
main.log.debug( "Sudo asking for password" )
diff --git a/TestON/tests/USECASE/SegmentRouting/SRBridging/SRBridging.topo.0x2.tucson b/TestON/tests/USECASE/SegmentRouting/SRBridging/SRBridging.topo.0x2.tucson
index 0b4791b..0976b83 100644
--- a/TestON/tests/USECASE/SegmentRouting/SRBridging/SRBridging.topo.0x2.tucson
+++ b/TestON/tests/USECASE/SegmentRouting/SRBridging/SRBridging.topo.0x2.tucson
@@ -72,6 +72,7 @@
<port1></port1>
<link1></link1>
<interfaceName>pairbond</interfaceName>
+ <scapy_path>/usr/bin/scapy</scapy_path>
<routes>
<route1>
<network>10.32.11.126</network>
@@ -100,6 +101,7 @@
<port1></port1>
<link1></link1>
<interfaceName>pairbond</interfaceName>
+ <scapy_path>/usr/bin/scapy</scapy_path>
<routes>
<route1>
<network>10.32.11.126</network>
@@ -128,6 +130,7 @@
<port1></port1>
<link1></link1>
<interfaceName>eno2</interfaceName>
+ <scapy_path>/usr/bin/scapy</scapy_path>
<routes>
<route1>
<network>10.32.11.254</network>
@@ -155,6 +158,7 @@
<port1></port1>
<link1></link1>
<interfaceName>pairbond</interfaceName>
+ <scapy_path>/usr/bin/scapy</scapy_path>
<routes>
<route1>
<network>10.32.11.126</network>