[ONOS-7765] Run SRMulticast test case 1 on Flex POD

Change-Id: I854d0ddf55754fd89ae8b29709e1589674c0a5fc
diff --git a/TestON/tests/USECASE/SegmentRouting/SRMulticast/dependencies/SRMulticastTest.py b/TestON/tests/USECASE/SegmentRouting/SRMulticast/dependencies/SRMulticastTest.py
index 27b6dd0..8758fd8 100644
--- a/TestON/tests/USECASE/SegmentRouting/SRMulticast/dependencies/SRMulticastTest.py
+++ b/TestON/tests/USECASE/SegmentRouting/SRMulticast/dependencies/SRMulticastTest.py
@@ -37,10 +37,10 @@
     lib.installOnos( main, skipPackage=skipPackage, cliSleep=5 )
     # Load configuration files
     main.step( "Load configurations" )
-    main.cfgName = "TEST_CONFIG_ipv4=1_ipv6=1"
+    main.cfgName = "TEST_CONFIG_ipv4=1_ipv6=1" if hasattr( main, "Mininet1" ) else "flex"
     lib.loadJson( main )
     time.sleep( float( main.params[ "timers" ][ "loadNetcfgSleep" ] ) )
-    main.cfgName = "common"
+    main.cfgName = "common" if hasattr( main, "Mininet1" ) else "flex"
     lib.loadMulticastConfig( main )
     lib.loadHost( main )
 
@@ -51,9 +51,7 @@
         time.sleep( float( main.params[ "timers" ][ "startMininetSleep" ] ) )
     else:
         # Run the test with physical devices
-        lib.connectToPhysicalNetwork( main, self.switchNames )
-        # Check if the devices are up
-        lib.checkDevices( main, switches=len( self.switchNames ) )
+        lib.connectToPhysicalNetwork( main )
 
     # Create scapy components
     lib.startScapyHosts( main )
diff --git a/TestON/tests/USECASE/SegmentRouting/SRMulticast/dependencies/conf/zebradbgp1.conf b/TestON/tests/USECASE/SegmentRouting/SRMulticast/dependencies/conf/zebradbgp1.conf
index d4f09ea..e288bc4 100644
--- a/TestON/tests/USECASE/SegmentRouting/SRMulticast/dependencies/conf/zebradbgp1.conf
+++ b/TestON/tests/USECASE/SegmentRouting/SRMulticast/dependencies/conf/zebradbgp1.conf
@@ -6,4 +6,4 @@
 !
 ip route 0.0.0.0/0 172.16.0.1
 !
-fpm connection ip 10.128.100.67 port 2620
+fpm connection ip 10.192.19.151 port 2620
diff --git a/TestON/tests/USECASE/SegmentRouting/SRMulticast/dependencies/conf/zebradbgp2.conf b/TestON/tests/USECASE/SegmentRouting/SRMulticast/dependencies/conf/zebradbgp2.conf
index 95e97fd..47fc14a 100644
--- a/TestON/tests/USECASE/SegmentRouting/SRMulticast/dependencies/conf/zebradbgp2.conf
+++ b/TestON/tests/USECASE/SegmentRouting/SRMulticast/dependencies/conf/zebradbgp2.conf
@@ -6,4 +6,4 @@
 !
 ip route 0.0.0.0/0 172.16.0.1
 !
-fpm connection ip 10.128.100.69 port 2620
+fpm connection ip 10.192.19.152 port 2620
diff --git a/TestON/tests/USECASE/SegmentRouting/SRMulticast/dependencies/host/flex.host b/TestON/tests/USECASE/SegmentRouting/SRMulticast/dependencies/host/flex.host
new file mode 100644
index 0000000..7647b9e
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRMulticast/dependencies/host/flex.host
@@ -0,0 +1,12 @@
+{
+    "onos":
+    {
+        "12:1C:B7:5C:69:68/None": "10.0.202.8",
+        "A2:9B:16:E8:2A:52/None": "10.0.204.8"
+    },
+    "network":
+    {
+        "h1": "10.0.202.8",
+        "h2": "10.0.204.8"
+    }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/SRMulticast/dependencies/json/flex.json b/TestON/tests/USECASE/SegmentRouting/SRMulticast/dependencies/json/flex.json
new file mode 100644
index 0000000..c8f1ff2
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRMulticast/dependencies/json/flex.json
@@ -0,0 +1,460 @@
+{
+    "ports" : {
+        "of:0000000000000205/1" : {
+    	    "interfaces" : [{
+    		    "ips" : [ "10.0.205.254/24" ],
+    		    "vlan-untagged": 205
+    	    }]
+    	},
+        "of:0000000000000205/2" : {
+            "interfaces" : [{
+                "ips" : [ "10.0.205.254/24" ],
+                "vlan-untagged": 205
+            }]
+        },
+        "of:0000000000000206/1" : {
+            "interfaces" : [{
+                "ips" : [ "10.0.206.254/24" ],
+                "vlan-untagged": 206
+            }]
+        },
+        "of:0000000000000206/2" : {
+            "interfaces" : [{
+                "ips" : [ "10.0.206.254/24" ],
+                "vlan-untagged": 206
+            }]
+        },
+        "of:0000000000000203/1" : {
+            "interfaces" : [{
+                "ips" : [ "10.0.204.254/24" ],
+                "vlan-untagged": 204
+            }]
+        },
+        "of:0000000000000203/2" : {
+            "interfaces" : [{
+                "ips" : [ "10.0.204.254/24" ],
+                "vlan-untagged": 204
+            }]
+        },
+        "of:0000000000000203/3" : {
+            "interfaces" : [{
+                "ips" : [ "10.0.204.254/24" ],
+                "vlan-untagged": 204
+            }]
+        },
+        "of:0000000000000203/4" : {
+            "interfaces" : [{
+                "ips" : [ "10.0.204.254/24" ],
+                "vlan-untagged": 204
+            }]
+        },
+        "of:0000000000000203/5" : {
+            "interfaces" : [{
+                "ips" : [ "10.0.204.254/24" ],
+                "vlan-untagged": 204
+            }]
+        },
+        "of:0000000000000203/6" : {
+            "interfaces" : [{
+                "ips" : [ "10.0.204.254/24" ],
+                "vlan-untagged": 204
+            }]
+        },
+        "of:0000000000000203/7" : {
+            "interfaces" : [{
+                "ips" : [ "10.0.204.254/24" ],
+                "vlan-untagged": 204
+            }]
+        },
+        "of:0000000000000203/8" : {
+            "interfaces" : [{
+                "ips" : [ "10.0.204.254/24" ],
+                "vlan-untagged": 204
+            }]
+        },
+        "of:0000000000000203/20" : {
+            "interfaces" : [{
+                "ips" : [ "10.0.204.254/24" ],
+                "vlan-tagged": [204]
+            }]
+        },
+        "of:0000000000000204/1" : {
+            "interfaces" : [{
+                "ips" : [ "10.0.204.254/24" ],
+                "vlan-untagged": 204
+            }]
+        },
+        "of:0000000000000204/2" : {
+            "interfaces" : [{
+                "ips" : [ "10.0.204.254/24" ],
+                "vlan-untagged": 204
+            }]
+        },
+        "of:0000000000000204/3" : {
+            "interfaces" : [{
+                "ips" : [ "10.0.204.254/24" ],
+                "vlan-untagged": 204
+            }]
+        },
+        "of:0000000000000204/4" : {
+            "interfaces" : [{
+                "ips" : [ "10.0.204.254/24" ],
+                "vlan-untagged": 204
+            }]
+        },
+        "of:0000000000000204/5" : {
+            "interfaces" : [{
+                "ips" : [ "10.0.204.254/24" ],
+                "vlan-untagged": 204
+            }]
+        },
+        "of:0000000000000204/6" : {
+            "interfaces" : [{
+                "ips" : [ "10.0.204.254/24" ],
+                "vlan-untagged": 204
+            }]
+        },
+        "of:0000000000000204/7" : {
+            "interfaces" : [{
+                "ips" : [ "10.0.204.254/24" ],
+                "vlan-untagged": 204
+            }]
+        },
+        "of:0000000000000204/8" : {
+            "interfaces" : [{
+                "ips" : [ "10.0.204.254/24" ],
+                "vlan-untagged": 204
+            }]
+        },
+        "of:0000000000000204/20" : {
+            "interfaces" : [{
+                "ips" : [ "10.0.204.254/24" ],
+                "vlan-tagged": [204]
+            }]
+        },
+        "of:0000000000000201/1" : {
+            "interfaces" : [{
+                "ips" : [ "10.0.202.254/24" ],
+                "vlan-untagged": 202
+            }]
+        },
+        "of:0000000000000201/2" : {
+            "interfaces" : [{
+                "ips" : [ "10.0.202.254/24" ],
+                "vlan-untagged": 202
+            }]
+        },
+        "of:0000000000000201/3" : {
+            "interfaces" : [{
+                "ips" : [ "10.0.202.254/24" ],
+                "vlan-untagged": 202
+            }]
+        },
+        "of:0000000000000201/4" : {
+            "interfaces" : [{
+                "ips" : [ "10.0.202.254/24" ],
+                "vlan-untagged": 202
+            }]
+        },
+        "of:0000000000000201/5" : {
+            "interfaces" : [{
+                "ips" : [ "10.0.202.254/24" ],
+                "vlan-untagged": 202
+            }]
+        },
+        "of:0000000000000201/6" : {
+            "interfaces" : [{
+                "ips" : [ "10.0.202.254/24" ],
+                "vlan-untagged": 202
+            }]
+        },
+        "of:0000000000000201/7" : {
+            "interfaces" : [{
+                "ips" : [ "10.0.202.254/24" ],
+                "vlan-untagged": 202
+            }]
+        },
+        "of:0000000000000201/8" : {
+            "interfaces" : [{
+                "ips" : [ "10.0.202.254/24" ],
+                "vlan-untagged": 202
+            }]
+        },
+        "of:0000000000000201/17" : {
+            "interfaces" : [{
+                "ips" : [ "10.0.101.254/24" ],
+                "vlan-untagged": 101
+            }]
+        },
+        "of:0000000000000201/18" : {
+            "interfaces" : [{
+                "ips" : [ "10.0.101.254/24" ],
+                "vlan-untagged": 101
+            }]
+        },
+        "of:0000000000000201/20" : {
+            "interfaces" : [{
+                "ips" : [ "10.0.202.254/24" ],
+                "vlan-tagged": [202]
+            }]
+        },
+        "of:0000000000000202/1" : {
+            "interfaces" : [{
+                "ips" : [ "10.0.202.254/24" ],
+                "vlan-untagged": 202
+            }]
+        },
+        "of:0000000000000202/2" : {
+            "interfaces" : [{
+                "ips" : [ "10.0.202.254/24" ],
+                "vlan-untagged": 202
+            }]
+        },
+        "of:0000000000000202/3" : {
+            "interfaces" : [{
+                "ips" : [ "10.0.202.254/24" ],
+                "vlan-untagged": 202
+            }]
+        },
+        "of:0000000000000202/4" : {
+            "interfaces" : [{
+                "ips" : [ "10.0.202.254/24" ],
+                "vlan-untagged": 202
+            }]
+        },
+        "of:0000000000000202/5" : {
+            "interfaces" : [{
+                "ips" : [ "10.0.202.254/24" ],
+                "vlan-untagged": 202
+            }]
+        },
+        "of:0000000000000202/6" : {
+            "interfaces" : [{
+                "ips" : [ "10.0.202.254/24" ],
+                "vlan-untagged": 202
+            }]
+        },
+        "of:0000000000000202/7" : {
+            "interfaces" : [{
+                "ips" : [ "10.0.202.254/24" ],
+                "vlan-untagged": 202
+            }]
+        },
+        "of:0000000000000202/8" : {
+            "interfaces" : [{
+                "ips" : [ "10.0.202.254/24" ],
+                "vlan-untagged": 202
+            }]
+        },
+        "of:0000000000000202/17" : {
+            "interfaces" : [{
+                "ips" : [ "10.0.102.254/24" ],
+                "vlan-untagged": 102
+            }]
+        },
+        "of:0000000000000202/18" : {
+            "interfaces" : [{
+                "ips" : [ "10.0.102.254/24" ],
+                "vlan-untagged": 102
+            }]
+        },
+        "of:0000000000000202/20" : {
+            "interfaces" : [{
+                "ips" : [ "10.0.202.254/24" ],
+                "vlan-tagged": [202]
+            }]
+        }
+    },
+    "devices" : {
+        "of:0000000000000201" : {
+	        "basic" : {
+	    	    "name": "201-qmx",
+	    	    "latitude" : 34,
+	    	    "longitude": -95
+	        },
+            "segmentrouting" : {
+                "ipv4NodeSid" : 201,
+                "ipv4Loopback" : "192.168.0.201",
+                "ipv6NodeSid" : 201,
+                "ipv6Loopback" : "2000::c0a8:0201",
+                "routerMac" : "00:00:02:01:02:02",
+	    	    "pairDeviceId" : "of:0000000000000202",
+	    	    "pairLocalPort" : 20,
+                "isEdgeRouter" : true,
+                "adjacencySids" : []
+                }
+            },
+	    "of:0000000000000202" : {
+	        "basic" : {
+	    	    "name": "202-qmx",
+	    	    "latitude" : 34,
+	    	    "longitude": -90
+	        },
+	        "segmentrouting" : {
+                "ipv4NodeSid" : 202,
+                "ipv4Loopback" : "192.168.0.202",
+                "ipv6NodeSid" : 202,
+                "ipv6Loopback" : "2000::c0a8:0202",
+                "routerMac" : "00:00:02:01:02:02",
+                "isEdgeRouter" : true,
+                "pairDeviceId" : "of:0000000000000201",
+                "pairLocalPort" : 20,
+	    	    "adjacencySids" : []
+            }
+        },
+        "of:0000000000000203" : {
+	        "basic" : {
+	            "name": "203-qmx",
+	            "latitude" : 34,
+	            "longitude": -108
+	        },
+            "segmentrouting" : {
+                "name" : "Leaf2-R1",
+                "ipv4NodeSid" : 203,
+                "ipv4Loopback" : "192.168.0.203",
+                "ipv6NodeSid" : 203,
+                "ipv6Loopback" : "2000::c0a8:0203",
+                "routerMac" : "00:00:02:03:02:04",
+                "isEdgeRouter" : true,
+                "pairDeviceId" : "of:0000000000000204",
+                "pairLocalPort" : 20,
+                "adjacencySids" : []
+            }
+        },
+        "of:0000000000000204" : {
+	        "basic" : {
+	            "name": "204-qmx",
+	            "latitude" : 34,
+	            "longitude": -103
+	        },
+            "segmentrouting" : {
+                "name" : "Leaf1-R1",
+                "ipv4NodeSid" : 204,
+                "ipv4Loopback" : "192.168.0.204",
+                "ipv6NodeSid" : 204,
+                "ipv6Loopback" : "2000::c0a8:0204",
+                "routerMac" : "00:00:02:03:02:04",
+                "pairDeviceId" : "of:0000000000000203",
+                "pairLocalPort" : 20,
+                "isEdgeRouter" : true,
+                "adjacencySids" : []
+            }
+        },
+   	    "of:0000000000000225" : {
+	        "basic" : {
+	    	    "name": "225-t2",
+	    	    "latitude" : 42,
+	    	    "longitude": -100
+	        },
+        	"segmentrouting" : {
+                "name" : "SpineToma-0",
+                "ipv4NodeSid" : 225,
+                "ipv4Loopback" : "192.168.0.225",
+	    	    "ipv6NodeSid" : 225,
+                "ipv6Loopback" : "2000::c0a8:0225",
+                "routerMac" : "00:00:02:25:00:01",
+                "isEdgeRouter" : false,
+	    	    "adjacencySids" : []
+            }
+        },
+        "of:0000000000000226" : {
+	        "basic" : {
+	    	    "name": "226-tmhk",
+	    	    "latitude" : 42,
+	    	    "longitude": -95
+	        },
+            "segmentrouting" : {
+                "name" : "Spine1",
+                "ipv4NodeSid" : 226,
+                "ipv4Loopback" : "192.168.0.226",
+                "ipv6NodeSid" : 226,
+                "ipv6Loopback" : "2000::c0a8:0226",
+                "routerMac" : "00:00:02:26:00:01",
+                "isEdgeRouter" : false,
+                "adjacencySids" : []
+            }
+        },
+        "of:0000000000000205":{
+            "basic":{
+                "name":"205-qmx",
+                "latitude":34,
+                "longitude":-120
+            },
+            "segmentrouting":{
+                "name":"Leaf1",
+                "ipv4NodeSid":205,
+                "ipv4Loopback":"192.168.0.205",
+                "ipv6NodeSid":205,
+                "ipv6Loopback":"2000::c0a8:0205",
+                "routerMac":"00:00:02:05:06:01",
+                "isEdgeRouter":true,
+                "adjacencySids":[
+                ]
+            }
+        },
+        "of:0000000000000206":{
+            "basic":{
+                "name":"206-qmx",
+                "latitude":34,
+                "longitude":-115
+            },
+            "segmentrouting":{
+                "name":"Leaf2",
+                "ipv4NodeSid":206,
+                "ipv4Loopback":"192.168.0.206",
+                "ipv6NodeSid":206,
+                "ipv6Loopback":"2000::c0a8:0206",
+                "routerMac":"00:00:02:06:06:01",
+                "isEdgeRouter":true,
+                "adjacencySids":[
+                ]
+            }
+        },
+        "of:0000000000000227":{
+            "basic":{
+                "name":"227-tmhk",
+                "latitude":38,
+                "longitude":-119
+            },
+            "segmentrouting":{
+                "name":"Spine1",
+                "ipv4NodeSid":227,
+                "ipv4Loopback":"192.168.0.227",
+                "ipv6NodeSid":227,
+                "ipv6Loopback":"2000::c0a8:0227",
+                "routerMac":"00:00:02:27:00:01",
+                "isEdgeRouter":false,
+                "adjacencySids":[
+                ]
+            }
+        },
+        "of:0000000000000228":{
+            "basic":{
+                "name":"228-t2",
+                "latitude":38,
+                "longitude":-116
+            },
+            "segmentrouting":{
+                "name":"Spine2",
+                "ipv4NodeSid":228,
+                "ipv4Loopback":"192.168.0.228",
+                "ipv6NodeSid":228,
+                "ipv6Loopback":"2000::c0a8:0228",
+                "routerMac":"00:00:02:28:00:01",
+                "isEdgeRouter":false,
+                "adjacencySids":[
+                ]
+            }
+        }
+    },
+    "apps" : {
+            "org.onosproject.dhcprelay" : {
+    	    "default" : [
+    		    {
+                    "dhcpServerConnectPoint": "of:0000000000000204/8",
+                    "serverIps": ["10.0.204.8"]
+    		    }
+    	    ]
+        }
+    }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/SRMulticast/dependencies/multicast/flex.multicastConfig b/TestON/tests/USECASE/SegmentRouting/SRMulticast/dependencies/multicast/flex.multicastConfig
new file mode 100644
index 0000000..0e0ccc9
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRMulticast/dependencies/multicast/flex.multicastConfig
@@ -0,0 +1,27 @@
+{
+    "ipv4": {
+        "ipVersion": 4,
+        "group": "224.2.0.1",
+        "src": [
+            {
+                "host": "h1",
+                "ip": "10.0.202.8",
+                "id": "12:1C:B7:5C:69:68/None",
+                "port": "of:0000000000000202/8",
+                "interface": "bond0",
+                "Ether": "01:00:5e:02:00:01",
+                "UDP": 40051,
+                "filter": "ip host 224.2.0.1",
+                "packet": "dst=01:00:5e:02:00:01 src=12:1c:b7:5c:69:68"
+            }
+        ],
+        "dst": [
+            {
+                "host": "h2",
+                "id": "A2:9B:16:E8:2A:52/None",
+                "interface": "bond0",
+                "dualHomed": "True"
+            }
+        ]
+    }
+}