Add tests on SegmentRouting - SRBridging (+ fix some bugs)

Change-Id: I8aa7dfedb65c5c508881c7ef7bf68b37c1764e54
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE54.json b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE54.json
new file mode 100644
index 0000000..7427516
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE54.json
@@ -0,0 +1,176 @@
+{
+    "ports" : {
+        "of:0000000000000001/6" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-untagged": 10
+                }
+            ]
+        },
+        "of:0000000000000001/7" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-untagged": 20
+                }
+            ]
+        },
+        "of:0000000000000002/6" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-untagged": 10
+                }
+            ]
+        },
+        "of:0000000000000002/7" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-untagged": 20
+                }
+            ]
+        },
+        "of:0000000000000003/6" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.2.254/24" ],
+                    "vlan-untagged": 30
+                }
+            ]
+        },
+        "of:0000000000000003/7" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.2.254/24" ],
+                    "vlan-untagged": 40
+                }
+            ]
+        },
+        "of:0000000000000004/6" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.2.254/24" ],
+                    "vlan-untagged": 30
+                }
+            ]
+        },
+        "of:0000000000000004/7" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.2.254/24" ],
+                    "vlan-untagged": 40
+                }
+            ]
+        }
+    },
+    "hosts": {
+        "00:AA:00:00:00:01/None": {
+            "basic": {
+                "ips": ["10.0.2.1"],
+                "locations": ["of:0000000000000001/6", "of:0000000000000002/6"]
+            }
+        },
+        "00:AA:00:00:00:02/None": {
+            "basic": {
+                "ips": ["10.0.2.2"],
+                "locations": ["of:0000000000000001/7", "of:0000000000000002/7"]
+            }
+        },
+        "00:AA:00:00:00:03/None": {
+            "basic": {
+                "ips": ["10.0.3.1"],
+                "locations": ["of:0000000000000003/6", "of:0000000000000004/6"]
+            }
+        },
+        "00:AA:00:00:00:04/None": {
+            "basic": {
+                "ips": ["10.0.3.2"],
+                "locations": ["of:0000000000000003/7", "of:0000000000000004/7"]
+            }
+        }
+    },
+    "devices" : {
+        "of:0000000000000001" : {
+            "segmentrouting" : {
+                "ipv4NodeSid" : 1,
+                "ipv4Loopback" : "192.168.0.1",
+                "routerMac" : "00:00:00:00:00:01",
+                "isEdgeRouter" : true,
+                "pairDeviceId" : "of:0000000000000002",
+                "pairLocalPort" : 5,
+                "adjacencySids" : []
+            },
+            "basic" : {
+                "driver" : "ofdpa-ovs"
+            }
+        },
+        "of:0000000000000002" : {
+            "segmentrouting" : {
+                "ipv4NodeSid" : 1,
+                "ipv4Loopback" : "192.168.0.2",
+                "routerMac" : "00:00:00:00:00:01",
+                "isEdgeRouter" : true,
+                "pairDeviceId" : "of:0000000000000001",
+                "pairLocalPort" : 5,
+                "adjacencySids" : []
+            },
+            "basic" : {
+                "driver" : "ofdpa-ovs"
+            }
+        },
+        "of:0000000000000003" : {
+            "segmentrouting" : {
+                "ipv4NodeSid" : 2,
+                "ipv4Loopback" : "192.168.0.3",
+                "routerMac" : "00:00:00:00:00:02",
+                "isEdgeRouter" : true,
+                "pairDeviceId" : "of:0000000000000004",
+                "pairLocalPort" : 5,
+                "adjacencySids" : []
+            },
+            "basic" : {
+                "driver" : "ofdpa-ovs"
+            }
+        },
+        "of:0000000000000004" : {
+            "segmentrouting" : {
+                "ipv4NodeSid" : 2,
+                "ipv4Loopback" : "192.168.0.4",
+                "routerMac" : "00:00:00:00:00:02",
+                "isEdgeRouter" : true,
+                "pairDeviceId" : "of:0000000000000003",
+                "pairLocalPort" : 5,
+                "adjacencySids" : []
+            },
+            "basic" : {
+                "driver" : "ofdpa-ovs"
+            }
+        },
+        "of:0000000000000101" : {
+            "segmentrouting" : {
+                "ipv4NodeSid" : 101,
+                "ipv4Loopback" : "192.168.0.101",
+                "routerMac" : "00:00:00:00:01:01",
+                "isEdgeRouter" : false,
+                "adjacencySids" : []
+            },
+            "basic" : {
+                "driver" : "ofdpa-ovs"
+            }
+        },
+        "of:0000000000000102" : {
+            "segmentrouting" : {
+                "ipv4NodeSid" : 102,
+                "ipv4Loopback" : "192.168.0.102",
+                "routerMac" : "00:00:00:00:01:02",
+                "isEdgeRouter" : false,
+                "adjacencySids" : []
+            },
+            "basic" : {
+                "driver" : "ofdpa-ovs"
+            }
+        }
+    }
+}