Merge "[SDFAB-504] Improve scapy CLI driver to generate GTP traffic"
diff --git a/TestON/drivers/common/cli/emulator/scapyclidriver.py b/TestON/drivers/common/cli/emulator/scapyclidriver.py
index bd9c102..1e6d730 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"
 
@@ -166,9 +169,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 ca3c725..0976b83 100644
--- a/TestON/tests/USECASE/SegmentRouting/SRBridging/SRBridging.topo.0x2.tucson
+++ b/TestON/tests/USECASE/SegmentRouting/SRBridging/SRBridging.topo.0x2.tucson
@@ -6,7 +6,7 @@
             <password></password>
             <type>OnosClusterDriver</type>
             <connect_order>1</connect_order>
-            <home></home>   # defines where onos home is on the build machine. Defaults to "~/onos/" if empty.
+            <home>~/onos</home>   # defines where onos home is on the build machine. Defaults to "~/onos/" if empty.
             <COMPONENTS>
                 <kubeConfig>~/.kube/dev-pairedleaves-tucson</kubeConfig>  # If set, will attempt to use this file for setting up port-forwarding
                 <useDocker>True</useDocker>  # Whether to use docker for ONOS nodes
@@ -15,27 +15,24 @@
                 <diff_clihost>True</diff_clihost> # if it has different host other than localhost for CLI. True or empty. OC# will be used if True.
                 <karaf_username>karaf</karaf_username>
                 <karaf_password>karaf</karaf_password>
-                <node_username>sdn</node_username>
-                <node_password>rocks</node_password>
                 <karafPrompt_username>karaf</karafPrompt_username>
                 <karafPrompt_password>karaf</karafPrompt_password>
                 <web_user>karaf</web_user>
                 <web_pass>karaf</web_pass>
                 <rest_port></rest_port>
                 <prompt></prompt>  # TODO: we technically need a few of these, one per component
-                <onos_home></onos_home>  # defines where onos home is on the target cell machine. Defaults to entry in "home" if empty.
+                <onos_home>~/onos/</onos_home>  # defines where onos home is on the target cell machine. Defaults to entry in "home" if empty.
                 <nodes> 3 </nodes>  # number of nodes in the cluster
             </COMPONENTS>
         </ONOScell>
 
         <Leaf1>
-            <host>10.128.13.209</host>
+            <host>10.76.28.70</host>
             <user>root</user>
             <password>onl</password>
             <type>StratumOSSwitchDriver</type>
             <connect_order>2</connect_order>
             <COMPONENTS>
-                <prompt>#</prompt>
                 <shortName>leaf1</shortName>
                 <port1>1</port1>
                 <link1>Host1</link1>
@@ -45,13 +42,12 @@
         </Leaf1>
 
         <Leaf2>
-            <host>10.128.13.211</host>
+            <host>10.76.28.71</host>
             <user>root</user>
             <password>onl</password>
             <type>StratumOSSwitchDriver</type>
             <connect_order>2</connect_order>
             <COMPONENTS>
-                <prompt>#</prompt>
                 <shortName>leaf2</shortName>
                 <port1>2</port1>
                 <link1>Host2</link1>
@@ -76,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>
@@ -104,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>
@@ -132,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>
@@ -159,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>
@@ -173,7 +173,7 @@
         </ManagmentServer>
 
         <NetworkBench>
-            <host>10.128.13.253</host>
+            <host>10.76.28.66</host>
             <user>jenkins</user>
             <password></password>
             <type>NetworkDriver</type>
diff --git a/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/netcfg/CASE06.cfg b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/netcfg/CASE06.cfg
index ced0429..a10a0ca 100644
--- a/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/netcfg/CASE06.cfg
+++ b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/netcfg/CASE06.cfg
@@ -4,9 +4,10 @@
             "interfaces":[
                 {
                     "ips":[
-                        "192.168.103.1/24"
+                        "10.32.11.126/25"
                     ],
-                    "vlan-untagged":102
+                    "vlan-untagged":111,
+                    "name": "compute-1-1"
                 }
             ]
         },
@@ -14,11 +15,34 @@
             "interfaces":[
                 {
                     "ips":[
-                        "192.168.103.2/24"
+                        "10.32.11.126/25"
                     ],
-                    "vlan-untagged":102
+                    "vlan-untagged":111,
+                    "name": "compute-1-2"
                 }
             ]
-        }
+        },
+        "device:leaf1/40": {
+            "interfaces": [
+              {
+                "ips": [
+                  "10.32.11.126/25"
+                ],
+                "vlan-untagged": 111,
+                "name": "compute-2-1"
+              }
+            ]
+          },
+          "device:leaf2/40": {
+            "interfaces": [
+              {
+                "ips": [
+                  "10.32.11.126/25"
+                ],
+                "vlan-untagged": 111,
+                "name": "compute-2-2"
+              }
+            ]
+          }
     }
 }