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

Change-Id: I8aa7dfedb65c5c508881c7ef7bf68b37c1764e54
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE01.chart b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE01.chart
new file mode 100644
index 0000000..4438f56
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE01.chart
@@ -0,0 +1,4 @@
+{
+  "leaf1": {"expect": "True",
+    "hosts":["h1", "h2"]}
+}
\ No newline at end of file
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE01.json b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE01.json
new file mode 100644
index 0000000..d85f60a
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE01.json
@@ -0,0 +1,34 @@
+{
+    "ports" : {
+        "of:0000000000000001/1" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-untagged": 10
+                }
+            ]
+        },
+        "of:0000000000000001/2" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-untagged": 10
+                }
+            ]
+        }
+    },
+    "devices" : {
+        "of:0000000000000001" : {
+            "segmentrouting" : {
+                "ipv4NodeSid" : 1,
+                "ipv4Loopback" : "192.168.0.1",
+                "routerMac" : "00:00:00:00:00:01",
+                "isEdgeRouter" : true,
+                "adjacencySids" : []
+            },
+            "basic" : {
+                "driver" : "ofdpa-ovs"
+            }
+        }
+    }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE02.chart b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE02.chart
new file mode 100644
index 0000000..4438f56
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE02.chart
@@ -0,0 +1,4 @@
+{
+  "leaf1": {"expect": "True",
+    "hosts":["h1", "h2"]}
+}
\ No newline at end of file
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE02.json b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE02.json
new file mode 100644
index 0000000..9410029
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE02.json
@@ -0,0 +1,80 @@
+{
+    "ports" : {
+        "of:0000000000000001/2" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-untagged": 10
+                }
+            ]
+        },
+        "of:0000000000000001/3" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-untagged": 10
+                }
+            ]
+        },
+        "of:0000000000000002/2" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-untagged": 10
+                }
+            ]
+        },
+        "of:0000000000000002/3" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-untagged": 10
+                }
+            ]
+        }
+    },
+    "hosts": {
+        "00:AA:00:00:00:01/None": {
+            "basic": {
+                "ips": ["10.0.2.1"],
+                "locations": ["of:0000000000000001/2", "of:0000000000000002/2"]
+            }
+        },
+        "00:AA:00:00:00:02/None": {
+            "basic": {
+                "ips": ["10.0.2.2"],
+                "locations": ["of:0000000000000001/3", "of:0000000000000002/3"]
+            }
+        }
+    },
+    "devices" : {
+        "of:0000000000000001" : {
+            "segmentrouting" : {
+                "ipv4NodeSid" : 1,
+                "ipv4Loopback" : "192.168.0.1",
+                "routerMac" : "00:00:00:00:00:01",
+                "isEdgeRouter" : true,
+                "pairDeviceId" : "of:0000000000000002",
+                "pairLocalPort" : 1,
+                "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" : 1,
+                "adjacencySids" : []
+            },
+            "basic" : {
+                "driver" : "ofdpa-ovs"
+            }
+        }
+    }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE03.chart b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE03.chart
new file mode 100644
index 0000000..0102621
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE03.chart
@@ -0,0 +1,6 @@
+{
+  "leaf1": {"expect": "True",
+    "hosts":["h1", "h2"]},
+  "leaf2": {"expect": "True",
+    "hosts":["h3", "h4"]}
+}
\ No newline at end of file
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE03.json b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE03.json
new file mode 100644
index 0000000..713067a
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE03.json
@@ -0,0 +1,86 @@
+{
+    "ports" : {
+        "of:0000000000000001/3" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-untagged": 10
+                }
+            ]
+        },
+        "of:0000000000000001/4" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-untagged": 10
+                }
+            ]
+        },
+        "of:0000000000000002/3" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.2.254/24" ],
+                    "vlan-untagged": 20
+                }
+            ]
+        },
+        "of:0000000000000002/4" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.2.254/24" ],
+                    "vlan-untagged": 20
+                }
+            ]
+        }
+    },
+    "devices" : {
+        "of:0000000000000001" : {
+            "segmentrouting" : {
+                "ipv4NodeSid" : 1,
+                "ipv4Loopback" : "192.168.0.1",
+                "routerMac" : "00:00:00:00:00:01",
+                "isEdgeRouter" : true,
+                "adjacencySids" : []
+            },
+            "basic" : {
+                "driver" : "ofdpa-ovs"
+            }
+        },
+        "of:0000000000000002" : {
+            "segmentrouting" : {
+                "ipv4NodeSid" : 2,
+                "ipv4Loopback" : "192.168.0.2",
+                "routerMac" : "00:00:00:00:00:02",
+                "isEdgeRouter" : true,
+                "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"
+            }
+        }
+    }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE04.chart b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE04.chart
new file mode 100644
index 0000000..0102621
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE04.chart
@@ -0,0 +1,6 @@
+{
+  "leaf1": {"expect": "True",
+    "hosts":["h1", "h2"]},
+  "leaf2": {"expect": "True",
+    "hosts":["h3", "h4"]}
+}
\ No newline at end of file
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE04.json b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE04.json
new file mode 100644
index 0000000..2df8dd3
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE04.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": 10
+                }
+            ]
+        },
+        "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": 10
+                }
+            ]
+        },
+        "of:0000000000000003/6" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.2.254/24" ],
+                    "vlan-untagged": 20
+                }
+            ]
+        },
+        "of:0000000000000003/7" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.2.254/24" ],
+                    "vlan-untagged": 20
+                }
+            ]
+        },
+        "of:0000000000000004/6" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.2.254/24" ],
+                    "vlan-untagged": 20
+                }
+            ]
+        },
+        "of:0000000000000004/7" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.2.254/24" ],
+                    "vlan-untagged": 20
+                }
+            ]
+        }
+    },
+    "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:0000000000000002",
+                "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"
+            }
+        }
+    }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE11.chart b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE11.chart
new file mode 100644
index 0000000..4438f56
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE11.chart
@@ -0,0 +1,4 @@
+{
+  "leaf1": {"expect": "True",
+    "hosts":["h1", "h2"]}
+}
\ No newline at end of file
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE11.json b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE11.json
new file mode 100644
index 0000000..df3be82
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE11.json
@@ -0,0 +1,46 @@
+{
+    "ports" : {
+        "of:0000000000000001/1" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-tagged": [10]
+                }
+            ]
+        },
+        "of:0000000000000001/2" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-tagged": [10]
+                }
+            ]
+        }
+    },
+    "hosts" : {
+        "00:aa:00:00:00:01/10" : {
+            "basic": {
+                "locations": ["of:0000000000000001/1"]
+            }
+        },
+        "00:aa:00:00:00:02/10" : {
+            "basic": {
+                "locations": ["of:0000000000000001/2"]
+            }
+        }
+    },
+    "devices" : {
+        "of:0000000000000001" : {
+            "segmentrouting" : {
+                "ipv4NodeSid" : 1,
+                "ipv4Loopback" : "192.168.0.1",
+                "routerMac" : "00:00:00:00:00:01",
+                "isEdgeRouter" : true,
+                "adjacencySids" : []
+            },
+            "basic" : {
+                "driver" : "ofdpa-ovs"
+            }
+        }
+    }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE12.chart b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE12.chart
new file mode 100644
index 0000000..4438f56
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE12.chart
@@ -0,0 +1,4 @@
+{
+  "leaf1": {"expect": "True",
+    "hosts":["h1", "h2"]}
+}
\ No newline at end of file
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE12.json b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE12.json
new file mode 100644
index 0000000..07a8dc2
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE12.json
@@ -0,0 +1,80 @@
+{
+    "ports" : {
+        "of:0000000000000001/2" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-tagged": [10]
+                }
+            ]
+        },
+        "of:0000000000000001/3" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-tagged": [10]
+                }
+            ]
+        },
+        "of:0000000000000002/2" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-tagged": [10]
+                }
+            ]
+        },
+        "of:0000000000000002/3" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-tagged": [10]
+                }
+            ]
+        }
+    },
+    "hosts" : {
+        "00:AA:00:00:00:01/10" : {
+            "basic": {
+                "ips": ["10.0.2.1"],
+                "locations": ["of:0000000000000001/2", "of:0000000000000002/2"]
+            }
+        },
+        "00:AA:00:00:00:02/10" : {
+            "basic": {
+                "ips": ["10.0.2.2"],
+                "locations": ["of:0000000000000001/3", "of:0000000000000002/3"]
+            }
+        }
+    },
+    "devices" : {
+        "of:0000000000000001" : {
+            "segmentrouting" : {
+                "ipv4NodeSid" : 1,
+                "ipv4Loopback" : "192.168.0.1",
+                "routerMac" : "00:00:00:00:00:01",
+                "isEdgeRouter" : true,
+                "pairDeviceId" : "of:0000000000000002",
+                "pairLocalPort" : 1,
+                "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" : 1,
+                "adjacencySids" : []
+            },
+            "basic" : {
+                "driver" : "ofdpa-ovs"
+            }
+        }
+    }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE13.chart b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE13.chart
new file mode 100644
index 0000000..0102621
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE13.chart
@@ -0,0 +1,6 @@
+{
+  "leaf1": {"expect": "True",
+    "hosts":["h1", "h2"]},
+  "leaf2": {"expect": "True",
+    "hosts":["h3", "h4"]}
+}
\ No newline at end of file
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE13.json b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE13.json
new file mode 100644
index 0000000..34e0bb5
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE13.json
@@ -0,0 +1,108 @@
+{
+    "ports" : {
+        "of:0000000000000001/3" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-tagged": [10]
+                }
+            ]
+        },
+        "of:0000000000000001/4" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-tagged": [10]
+                }
+            ]
+        },
+        "of:0000000000000002/3" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.2.254/24" ],
+                    "vlan-tagged": [20]
+                }
+            ]
+        },
+        "of:0000000000000002/4" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.2.254/24" ],
+                    "vlan-tagged": [20]
+                }
+            ]
+        }
+    },
+    "hosts" : {
+        "00:aa:00:00:00:01/10" : {
+            "basic": {
+                "locations": ["of:0000000000000001/3"]
+            }
+        },
+        "00:aa:00:00:00:02/10" : {
+            "basic": {
+                "locations": ["of:0000000000000001/4"]
+            }
+        },
+        "00:aa:00:00:00:03/20" : {
+            "basic": {
+                "locations": ["of:0000000000000002/3"]
+            }
+        },
+        "00:aa:00:00:00:04/20" : {
+            "basic": {
+                "locations": ["of:0000000000000002/4"]
+            }
+        }
+    },
+    "devices" : {
+        "of:0000000000000001" : {
+            "segmentrouting" : {
+                "ipv4NodeSid" : 1,
+                "ipv4Loopback" : "192.168.0.1",
+                "routerMac" : "00:00:00:00:00:01",
+                "isEdgeRouter" : true,
+                "adjacencySids" : []
+            },
+            "basic" : {
+                "driver" : "ofdpa-ovs"
+            }
+        },
+        "of:0000000000000002" : {
+            "segmentrouting" : {
+                "ipv4NodeSid" : 2,
+                "ipv4Loopback" : "192.168.0.2",
+                "routerMac" : "00:00:00:00:00:02",
+                "isEdgeRouter" : true,
+                "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"
+            }
+        }
+    }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE14.chart b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE14.chart
new file mode 100644
index 0000000..0102621
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE14.chart
@@ -0,0 +1,6 @@
+{
+  "leaf1": {"expect": "True",
+    "hosts":["h1", "h2"]},
+  "leaf2": {"expect": "True",
+    "hosts":["h3", "h4"]}
+}
\ No newline at end of file
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE14.json b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE14.json
new file mode 100644
index 0000000..05762da
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE14.json
@@ -0,0 +1,176 @@
+{
+    "ports" : {
+        "of:0000000000000001/6" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-tagged": [10]
+                }
+            ]
+        },
+        "of:0000000000000001/7" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-tagged": [10]
+                }
+            ]
+        },
+        "of:0000000000000002/6" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-tagged": [10]
+                }
+            ]
+        },
+        "of:0000000000000002/7" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-tagged": [10]
+                }
+            ]
+        },
+        "of:0000000000000003/6" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.2.254/24" ],
+                    "vlan-tagged": [20]
+                }
+            ]
+        },
+        "of:0000000000000003/7" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.2.254/24" ],
+                    "vlan-tagged": [20]
+                }
+            ]
+        },
+        "of:0000000000000004/6" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.2.254/24" ],
+                    "vlan-tagged": [20]
+                }
+            ]
+        },
+        "of:0000000000000004/7" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.2.254/24" ],
+                    "vlan-tagged": [20]
+                }
+            ]
+        }
+    },
+    "hosts" : {
+        "00:aa:00:00:00:01/10" : {
+            "basic": {
+                "ips": ["10.0.2.1"],
+                "locations": ["of:0000000000000001/6", "of:0000000000000002/6"]
+            }
+        },
+        "00:aa:00:00:00:02/10" : {
+            "basic": {
+                "ips": ["10.0.2.2"],
+                "locations": ["of:0000000000000001/7", "of:0000000000000002/7"]
+            }
+        },
+        "00:aa:00:00:00:03/20" : {
+            "basic": {
+                "ips": ["10.0.3.1"],
+                "locations": ["of:0000000000000003/6", "of:0000000000000004/6"]
+            }
+        },
+        "00:aa:00:00:00:04/20" : {
+            "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"
+            }
+        }
+    }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE21.chart b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE21.chart
new file mode 100644
index 0000000..4438f56
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE21.chart
@@ -0,0 +1,4 @@
+{
+  "leaf1": {"expect": "True",
+    "hosts":["h1", "h2"]}
+}
\ No newline at end of file
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE21.json b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE21.json
new file mode 100644
index 0000000..833f2c9
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE21.json
@@ -0,0 +1,36 @@
+{
+    "ports" : {
+        "of:0000000000000001/1" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-tagged": [10],
+                    "vlan-native": 20
+                }
+            ]
+        },
+        "of:0000000000000001/2" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-tagged": [10],
+                    "vlan-native": 20
+                }
+            ]
+        }
+    },
+    "devices" : {
+        "of:0000000000000001" : {
+            "segmentrouting" : {
+                "ipv4NodeSid" : 1,
+                "ipv4Loopback" : "192.168.0.1",
+                "routerMac" : "00:00:00:00:00:01",
+                "isEdgeRouter" : true,
+                "adjacencySids" : []
+            },
+            "basic" : {
+                "driver" : "ofdpa-ovs"
+            }
+        }
+    }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE22.chart b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE22.chart
new file mode 100644
index 0000000..4438f56
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE22.chart
@@ -0,0 +1,4 @@
+{
+  "leaf1": {"expect": "True",
+    "hosts":["h1", "h2"]}
+}
\ No newline at end of file
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE22.json b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE22.json
new file mode 100644
index 0000000..d4c09dd
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE22.json
@@ -0,0 +1,84 @@
+{
+    "ports" : {
+        "of:0000000000000001/2" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-tagged": [10],
+                    "vlan-native": 20
+                }
+            ]
+        },
+        "of:0000000000000001/3" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-tagged": [10],
+                    "vlan-native": 20
+                }
+            ]
+        },
+        "of:0000000000000002/2" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-tagged": [10],
+                    "vlan-native": 20
+                }
+            ]
+        },
+        "of:0000000000000002/3" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-tagged": [10],
+                    "vlan-native": 20
+                }
+            ]
+        }
+    },
+    "hosts": {
+        "00:AA:00:00:00:01/None": {
+            "basic": {
+                "ips": ["10.0.2.1"],
+                "locations": ["of:0000000000000001/2", "of:0000000000000002/2"]
+            }
+        },
+        "00:AA:00:00:00:02/None": {
+            "basic": {
+                "ips": ["10.0.2.2"],
+                "locations": ["of:0000000000000001/3", "of:0000000000000002/3"]
+            }
+        }
+    },
+    "devices" : {
+        "of:0000000000000001" : {
+            "segmentrouting" : {
+                "ipv4NodeSid" : 1,
+                "ipv4Loopback" : "192.168.0.1",
+                "routerMac" : "00:00:00:00:00:01",
+                "isEdgeRouter" : true,
+                "pairDeviceId" : "of:0000000000000002",
+                "pairLocalPort" : 1,
+                "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" : 1,
+                "adjacencySids" : []
+            },
+            "basic" : {
+                "driver" : "ofdpa-ovs"
+            }
+        }
+    }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE23.chart b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE23.chart
new file mode 100644
index 0000000..0102621
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE23.chart
@@ -0,0 +1,6 @@
+{
+  "leaf1": {"expect": "True",
+    "hosts":["h1", "h2"]},
+  "leaf2": {"expect": "True",
+    "hosts":["h3", "h4"]}
+}
\ No newline at end of file
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE23.json b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE23.json
new file mode 100644
index 0000000..cbfb189
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE23.json
@@ -0,0 +1,90 @@
+{
+    "ports" : {
+        "of:0000000000000001/3" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-tagged": [10],
+                    "vlan-native": 20
+                }
+            ]
+        },
+        "of:0000000000000001/4" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-tagged": [10],
+                    "vlan-native": 20
+                }
+            ]
+        },
+        "of:0000000000000002/3" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.2.254/24" ],
+                    "vlan-tagged": [30],
+                    "vlan-native": 40
+                }
+            ]
+        },
+        "of:0000000000000002/4" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.2.254/24" ],
+                    "vlan-tagged": [30],
+                    "vlan-native": 40
+                }
+            ]
+        }
+    },
+    "devices" : {
+        "of:0000000000000001" : {
+            "segmentrouting" : {
+                "ipv4NodeSid" : 1,
+                "ipv4Loopback" : "192.168.0.1",
+                "routerMac" : "00:00:00:00:00:01",
+                "isEdgeRouter" : true,
+                "adjacencySids" : []
+            },
+            "basic" : {
+                "driver" : "ofdpa-ovs"
+            }
+        },
+        "of:0000000000000002" : {
+            "segmentrouting" : {
+                "ipv4NodeSid" : 2,
+                "ipv4Loopback" : "192.168.0.2",
+                "routerMac" : "00:00:00:00:00:02",
+                "isEdgeRouter" : true,
+                "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"
+            }
+        }
+    }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE24.chart b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE24.chart
new file mode 100644
index 0000000..0102621
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE24.chart
@@ -0,0 +1,6 @@
+{
+  "leaf1": {"expect": "True",
+    "hosts":["h1", "h2"]},
+  "leaf2": {"expect": "True",
+    "hosts":["h3", "h4"]}
+}
\ No newline at end of file
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE24.json b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE24.json
new file mode 100644
index 0000000..f979115
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE24.json
@@ -0,0 +1,184 @@
+{
+    "ports" : {
+        "of:0000000000000001/6" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-tagged": [10],
+                    "vlan-native": 20
+                }
+            ]
+        },
+        "of:0000000000000001/7" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-tagged": [10],
+                    "vlan-native": 20
+                }
+            ]
+        },
+        "of:0000000000000002/6" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-tagged": [10],
+                    "vlan-native": 20
+                }
+            ]
+        },
+        "of:0000000000000002/7" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-tagged": [10],
+                    "vlan-native": 20
+                }
+            ]
+        },
+        "of:0000000000000003/6" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.2.254/24" ],
+                    "vlan-tagged": [30],
+                    "vlan-native": 40
+                }
+            ]
+        },
+        "of:0000000000000003/7" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.2.254/24" ],
+                    "vlan-tagged": [30],
+                    "vlan-native": 40
+                }
+            ]
+        },
+        "of:0000000000000004/6" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.2.254/24" ],
+                    "vlan-tagged": [30],
+                    "vlan-native": 40
+                }
+            ]
+        },
+        "of:0000000000000004/7" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.2.254/24" ],
+                    "vlan-tagged": [30],
+                    "vlan-native": 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"
+            }
+        }
+    }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE31.chart b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE31.chart
new file mode 100644
index 0000000..4438f56
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE31.chart
@@ -0,0 +1,4 @@
+{
+  "leaf1": {"expect": "True",
+    "hosts":["h1", "h2"]}
+}
\ No newline at end of file
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE31.json b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE31.json
new file mode 100644
index 0000000..9b389a2
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE31.json
@@ -0,0 +1,35 @@
+{
+    "ports" : {
+        "of:0000000000000001/1" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-tagged": [10],
+                    "vlan-native": 20
+                }
+            ]
+        },
+        "of:0000000000000001/2" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-untagged": 20
+                }
+            ]
+        }
+    },
+    "devices" : {
+        "of:0000000000000001" : {
+            "segmentrouting" : {
+                "ipv4NodeSid" : 1,
+                "ipv4Loopback" : "192.168.0.1",
+                "routerMac" : "00:00:00:00:00:01",
+                "isEdgeRouter" : true,
+                "adjacencySids" : []
+            },
+            "basic" : {
+                "driver" : "ofdpa-ovs"
+            }
+        }
+    }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE32.chart b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE32.chart
new file mode 100644
index 0000000..4438f56
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE32.chart
@@ -0,0 +1,4 @@
+{
+  "leaf1": {"expect": "True",
+    "hosts":["h1", "h2"]}
+}
\ No newline at end of file
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE32.json b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE32.json
new file mode 100644
index 0000000..6d5161c
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE32.json
@@ -0,0 +1,82 @@
+{
+    "ports" : {
+        "of:0000000000000001/2" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-tagged": [10],
+                    "vlan-native": 20
+                }
+            ]
+        },
+        "of:0000000000000001/3" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-untagged": 20
+                }
+            ]
+        },
+        "of:0000000000000002/2" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-tagged": [10],
+                    "vlan-native": 20
+                }
+            ]
+        },
+        "of:0000000000000002/3" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-untagged": 20
+                }
+            ]
+        }
+    },
+    "hosts": {
+        "00:AA:00:00:00:01/None": {
+            "basic": {
+                "ips": ["10.0.2.1"],
+                "locations": ["of:0000000000000001/2", "of:0000000000000002/2"]
+            }
+        },
+        "00:AA:00:00:00:02/None": {
+            "basic": {
+                "ips": ["10.0.2.2"],
+                "locations": ["of:0000000000000001/3", "of:0000000000000002/3"]
+            }
+        }
+    },
+    "devices" : {
+        "of:0000000000000001" : {
+            "segmentrouting" : {
+                "ipv4NodeSid" : 1,
+                "ipv4Loopback" : "192.168.0.1",
+                "routerMac" : "00:00:00:00:00:01",
+                "isEdgeRouter" : true,
+                "pairDeviceId" : "of:0000000000000002",
+                "pairLocalPort" : 1,
+                "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" : 1,
+                "adjacencySids" : []
+            },
+            "basic" : {
+                "driver" : "ofdpa-ovs"
+            }
+        }
+    }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE33.chart b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE33.chart
new file mode 100644
index 0000000..0102621
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE33.chart
@@ -0,0 +1,6 @@
+{
+  "leaf1": {"expect": "True",
+    "hosts":["h1", "h2"]},
+  "leaf2": {"expect": "True",
+    "hosts":["h3", "h4"]}
+}
\ No newline at end of file
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE33.json b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE33.json
new file mode 100644
index 0000000..ee1ab88
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE33.json
@@ -0,0 +1,88 @@
+{
+    "ports" : {
+        "of:0000000000000001/3" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-tagged": [10],
+                    "vlan-native": 20
+                }
+            ]
+        },
+        "of:0000000000000001/4" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-untagged": 20
+                }
+            ]
+        },
+        "of:0000000000000002/3" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.2.254/24" ],
+                    "vlan-tagged": [30],
+                    "vlan-native": 40
+                }
+            ]
+        },
+        "of:0000000000000002/4" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.2.254/24" ],
+                    "vlan-untagged": 40
+                }
+            ]
+        }
+    },
+    "devices" : {
+        "of:0000000000000001" : {
+            "segmentrouting" : {
+                "ipv4NodeSid" : 1,
+                "ipv4Loopback" : "192.168.0.1",
+                "routerMac" : "00:00:00:00:00:01",
+                "isEdgeRouter" : true,
+                "adjacencySids" : []
+            },
+            "basic" : {
+                "driver" : "ofdpa-ovs"
+            }
+        },
+        "of:0000000000000002" : {
+            "segmentrouting" : {
+                "ipv4NodeSid" : 2,
+                "ipv4Loopback" : "192.168.0.2",
+                "routerMac" : "00:00:00:00:00:02",
+                "isEdgeRouter" : true,
+                "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"
+            }
+        }
+    }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE34.chart b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE34.chart
new file mode 100644
index 0000000..0102621
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE34.chart
@@ -0,0 +1,6 @@
+{
+  "leaf1": {"expect": "True",
+    "hosts":["h1", "h2"]},
+  "leaf2": {"expect": "True",
+    "hosts":["h3", "h4"]}
+}
\ No newline at end of file
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE34.json b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE34.json
new file mode 100644
index 0000000..49843c5
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE34.json
@@ -0,0 +1,180 @@
+{
+    "ports" : {
+        "of:0000000000000001/6" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-tagged": [10],
+                    "vlan-native": 20
+                }
+            ]
+        },
+        "of:0000000000000001/7" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-untagged": 20
+                }
+            ]
+        },
+        "of:0000000000000002/6" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-tagged": [10],
+                    "vlan-native": 20
+                }
+            ]
+        },
+        "of:0000000000000002/7" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-untagged": 20
+                }
+            ]
+        },
+        "of:0000000000000003/6" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.2.254/24" ],
+                    "vlan-tagged": [30],
+                    "vlan-native": 40
+                }
+            ]
+        },
+        "of:0000000000000003/7" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.2.254/24" ],
+                    "vlan-untagged": 40
+                }
+            ]
+        },
+        "of:0000000000000004/6" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.2.254/24" ],
+                    "vlan-tagged": [30],
+                    "vlan-native": 40
+                }
+            ]
+        },
+        "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"
+            }
+        }
+    }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE41.chart b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE41.chart
new file mode 100644
index 0000000..4438f56
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE41.chart
@@ -0,0 +1,4 @@
+{
+  "leaf1": {"expect": "True",
+    "hosts":["h1", "h2"]}
+}
\ No newline at end of file
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE41.json b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE41.json
new file mode 100644
index 0000000..97d3059
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE41.json
@@ -0,0 +1,41 @@
+{
+    "ports" : {
+        "of:0000000000000001/1" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-untagged": 10
+                }
+            ]
+        },
+        "of:0000000000000001/2" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-tagged": [10]
+                }
+            ]
+        }
+    },
+    "hosts" : {
+        "00:aa:00:00:00:02/10" : {
+            "basic": {
+                "locations": ["of:0000000000000001/2"]
+            }
+        }
+    },
+    "devices" : {
+        "of:0000000000000001" : {
+            "segmentrouting" : {
+                "ipv4NodeSid" : 1,
+                "ipv4Loopback" : "192.168.0.1",
+                "routerMac" : "00:00:00:00:00:01",
+                "isEdgeRouter" : true,
+                "adjacencySids" : []
+            },
+            "basic" : {
+                "driver" : "ofdpa-ovs"
+            }
+        }
+    }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE42.chart b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE42.chart
new file mode 100644
index 0000000..4438f56
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE42.chart
@@ -0,0 +1,4 @@
+{
+  "leaf1": {"expect": "True",
+    "hosts":["h1", "h2"]}
+}
\ No newline at end of file
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE42.json b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE42.json
new file mode 100644
index 0000000..d070409
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE42.json
@@ -0,0 +1,80 @@
+{
+    "ports" : {
+        "of:0000000000000001/2" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-untagged": 10
+                }
+            ]
+        },
+        "of:0000000000000001/3" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-tagged": [10]
+                }
+            ]
+        },
+        "of:0000000000000002/2" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-untagged": 10
+                }
+            ]
+        },
+        "of:0000000000000002/3" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-tagged": [10]
+                }
+            ]
+        }
+    },
+    "hosts" : {
+        "00:AA:00:00:00:01/None": {
+            "basic": {
+                "ips": ["10.0.2.1"],
+                "locations": ["of:0000000000000001/2", "of:0000000000000002/2"]
+            }
+        },
+        "00:AA:00:00:00:02/10" : {
+            "basic": {
+                "ips": ["10.0.2.2"],
+                "locations": ["of:0000000000000001/3", "of:0000000000000002/3"]
+            }
+        }
+    },
+    "devices" : {
+        "of:0000000000000001" : {
+            "segmentrouting" : {
+                "ipv4NodeSid" : 1,
+                "ipv4Loopback" : "192.168.0.1",
+                "routerMac" : "00:00:00:00:00:01",
+                "isEdgeRouter" : true,
+                "pairDeviceId" : "of:0000000000000002",
+                "pairLocalPort" : 1,
+                "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" : 1,
+                "adjacencySids" : []
+            },
+            "basic" : {
+                "driver" : "ofdpa-ovs"
+            }
+        }
+    }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE43.chart b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE43.chart
new file mode 100644
index 0000000..0102621
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE43.chart
@@ -0,0 +1,6 @@
+{
+  "leaf1": {"expect": "True",
+    "hosts":["h1", "h2"]},
+  "leaf2": {"expect": "True",
+    "hosts":["h3", "h4"]}
+}
\ No newline at end of file
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE43.json b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE43.json
new file mode 100644
index 0000000..3002bc5
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE43.json
@@ -0,0 +1,98 @@
+{
+    "ports" : {
+        "of:0000000000000001/3" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-untagged": 10
+                }
+            ]
+        },
+        "of:0000000000000001/4" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-tagged": [10]
+                }
+            ]
+        },
+        "of:0000000000000002/3" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.2.254/24" ],
+                    "vlan-untagged": 20
+                }
+            ]
+        },
+        "of:0000000000000002/4" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.2.254/24" ],
+                    "vlan-tagged": [20]
+                }
+            ]
+        }
+    },
+    "hosts" : {
+        "00:aa:00:00:00:02/10" : {
+            "basic": {
+                "locations": ["of:0000000000000001/4"]
+            }
+        },
+        "00:aa:00:00:00:04/20" : {
+            "basic": {
+                "locations": ["of:0000000000000002/4"]
+            }
+        }
+    },
+    "devices" : {
+        "of:0000000000000001" : {
+            "segmentrouting" : {
+                "ipv4NodeSid" : 1,
+                "ipv4Loopback" : "192.168.0.1",
+                "routerMac" : "00:00:00:00:00:01",
+                "isEdgeRouter" : true,
+                "adjacencySids" : []
+            },
+            "basic" : {
+                "driver" : "ofdpa-ovs"
+            }
+        },
+        "of:0000000000000002" : {
+            "segmentrouting" : {
+                "ipv4NodeSid" : 2,
+                "ipv4Loopback" : "192.168.0.2",
+                "routerMac" : "00:00:00:00:00:02",
+                "isEdgeRouter" : true,
+                "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"
+            }
+        }
+    }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE44.chart b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE44.chart
new file mode 100644
index 0000000..0102621
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE44.chart
@@ -0,0 +1,6 @@
+{
+  "leaf1": {"expect": "True",
+    "hosts":["h1", "h2"]},
+  "leaf2": {"expect": "True",
+    "hosts":["h3", "h4"]}
+}
\ No newline at end of file
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE44.json b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE44.json
new file mode 100644
index 0000000..8adeccd
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE44.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-tagged": [10]
+                }
+            ]
+        },
+        "of:0000000000000002/6" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-untagged": 10
+                }
+            ]
+        },
+        "of:0000000000000002/7" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-tagged": [10]
+                }
+            ]
+        },
+        "of:0000000000000003/6" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.2.254/24" ],
+                    "vlan-untagged": 20
+                }
+            ]
+        },
+        "of:0000000000000003/7" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.2.254/24" ],
+                    "vlan-tagged": [20]
+                }
+            ]
+        },
+        "of:0000000000000004/6" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.2.254/24" ],
+                    "vlan-untagged": 20
+                }
+            ]
+        },
+        "of:0000000000000004/7" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.2.254/24" ],
+                    "vlan-tagged": [20]
+                }
+            ]
+        }
+    },
+    "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/10" : {
+            "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/20" : {
+            "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"
+            }
+        }
+    }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE51.chart b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE51.chart
new file mode 100644
index 0000000..ff7036f
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE51.chart
@@ -0,0 +1,4 @@
+{
+  "leaf1": {"expect": "False",
+    "hosts":["h1", "h2"]}
+}
\ No newline at end of file
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE51.json b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE51.json
new file mode 100644
index 0000000..acb782a
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE51.json
@@ -0,0 +1,34 @@
+{
+    "ports" : {
+        "of:0000000000000001/1" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-untagged": 10
+                }
+            ]
+        },
+        "of:0000000000000001/2" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-untagged": 20
+                }
+            ]
+        }
+    },
+    "devices" : {
+        "of:0000000000000001" : {
+            "segmentrouting" : {
+                "ipv4NodeSid" : 1,
+                "ipv4Loopback" : "192.168.0.1",
+                "routerMac" : "00:00:00:00:00:01",
+                "isEdgeRouter" : true,
+                "adjacencySids" : []
+            },
+            "basic" : {
+                "driver" : "ofdpa-ovs"
+            }
+        }
+    }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE52.chart b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE52.chart
new file mode 100644
index 0000000..ff7036f
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE52.chart
@@ -0,0 +1,4 @@
+{
+  "leaf1": {"expect": "False",
+    "hosts":["h1", "h2"]}
+}
\ No newline at end of file
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE52.json b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE52.json
new file mode 100644
index 0000000..915a7ea
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE52.json
@@ -0,0 +1,80 @@
+{
+    "ports" : {
+        "of:0000000000000001/2" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-untagged": 10
+                }
+            ]
+        },
+        "of:0000000000000001/3" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-untagged": 20
+                }
+            ]
+        },
+        "of:0000000000000002/2" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-untagged": 10
+                }
+            ]
+        },
+        "of:0000000000000002/3" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-untagged": 20
+                }
+            ]
+        }
+    },
+    "hosts": {
+        "00:AA:00:00:00:01/None": {
+            "basic": {
+                "ips": ["10.0.2.1"],
+                "locations": ["of:0000000000000001/2", "of:0000000000000002/2"]
+            }
+        },
+        "00:AA:00:00:00:02/None": {
+            "basic": {
+                "ips": ["10.0.2.2"],
+                "locations": ["of:0000000000000001/3", "of:0000000000000002/3"]
+            }
+        }
+    },
+    "devices" : {
+        "of:0000000000000001" : {
+            "segmentrouting" : {
+                "ipv4NodeSid" : 1,
+                "ipv4Loopback" : "192.168.0.1",
+                "routerMac" : "00:00:00:00:00:01",
+                "isEdgeRouter" : true,
+                "pairDeviceId" : "of:0000000000000002",
+                "pairLocalPort" : 1,
+                "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" : 1,
+                "adjacencySids" : []
+            },
+            "basic" : {
+                "driver" : "ofdpa-ovs"
+            }
+        }
+    }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE53.chart b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE53.chart
new file mode 100644
index 0000000..ba520ce
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE53.chart
@@ -0,0 +1,6 @@
+{
+  "leaf1": {"expect": "False",
+    "hosts":["h1", "h2"]},
+  "leaf2": {"expect": "False",
+    "hosts":["h3", "h4"]}
+}
\ No newline at end of file
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE53.json b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE53.json
new file mode 100644
index 0000000..2a3ba1d
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE53.json
@@ -0,0 +1,86 @@
+{
+    "ports" : {
+        "of:0000000000000001/3" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-untagged": 10
+                }
+            ]
+        },
+        "of:0000000000000001/4" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-untagged": 20
+                }
+            ]
+        },
+        "of:0000000000000002/3" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.2.254/24" ],
+                    "vlan-untagged": 30
+                }
+            ]
+        },
+        "of:0000000000000002/4" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.2.254/24" ],
+                    "vlan-untagged": 40
+                }
+            ]
+        }
+    },
+    "devices" : {
+        "of:0000000000000001" : {
+            "segmentrouting" : {
+                "ipv4NodeSid" : 1,
+                "ipv4Loopback" : "192.168.0.1",
+                "routerMac" : "00:00:00:00:00:01",
+                "isEdgeRouter" : true,
+                "adjacencySids" : []
+            },
+            "basic" : {
+                "driver" : "ofdpa-ovs"
+            }
+        },
+        "of:0000000000000002" : {
+            "segmentrouting" : {
+                "ipv4NodeSid" : 2,
+                "ipv4Loopback" : "192.168.0.2",
+                "routerMac" : "00:00:00:00:00:02",
+                "isEdgeRouter" : true,
+                "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"
+            }
+        }
+    }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE54.chart b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE54.chart
new file mode 100644
index 0000000..ba520ce
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE54.chart
@@ -0,0 +1,6 @@
+{
+  "leaf1": {"expect": "False",
+    "hosts":["h1", "h2"]},
+  "leaf2": {"expect": "False",
+    "hosts":["h3", "h4"]}
+}
\ No newline at end of file
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"
+            }
+        }
+    }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE61.chart b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE61.chart
new file mode 100644
index 0000000..ff7036f
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE61.chart
@@ -0,0 +1,4 @@
+{
+  "leaf1": {"expect": "False",
+    "hosts":["h1", "h2"]}
+}
\ No newline at end of file
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE61.json b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE61.json
new file mode 100644
index 0000000..7f539f9
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE61.json
@@ -0,0 +1,46 @@
+{
+    "ports" : {
+        "of:0000000000000001/1" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-tagged": [10]
+                }
+            ]
+        },
+        "of:0000000000000001/2" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-tagged": [20]
+                }
+            ]
+        }
+    },
+    "hosts" : {
+        "00:aa:00:00:00:01/10" : {
+            "basic": {
+                "locations": ["of:0000000000000001/1"]
+            }
+        },
+        "00:aa:00:00:00:02/20" : {
+            "basic": {
+                "locations": ["of:0000000000000001/2"]
+            }
+        }
+    },
+    "devices" : {
+        "of:0000000000000001" : {
+            "segmentrouting" : {
+                "ipv4NodeSid" : 1,
+                "ipv4Loopback" : "192.168.0.1",
+                "routerMac" : "00:00:00:00:00:01",
+                "isEdgeRouter" : true,
+                "adjacencySids" : []
+            },
+            "basic" : {
+                "driver" : "ofdpa-ovs"
+            }
+        }
+    }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE62.chart b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE62.chart
new file mode 100644
index 0000000..ff7036f
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE62.chart
@@ -0,0 +1,4 @@
+{
+  "leaf1": {"expect": "False",
+    "hosts":["h1", "h2"]}
+}
\ No newline at end of file
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE62.json b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE62.json
new file mode 100644
index 0000000..17f7592
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE62.json
@@ -0,0 +1,80 @@
+{
+    "ports" : {
+        "of:0000000000000001/2" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-tagged": [10]
+                }
+            ]
+        },
+        "of:0000000000000001/3" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-tagged": [20]
+                }
+            ]
+        },
+        "of:0000000000000002/2" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-tagged": [10]
+                }
+            ]
+        },
+        "of:0000000000000002/3" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-tagged": [20]
+                }
+            ]
+        }
+    },
+    "hosts" : {
+        "00:AA:00:00:00:01/10" : {
+            "basic": {
+                "ips": ["10.0.2.1"],
+                "locations": ["of:0000000000000001/2", "of:0000000000000002/2"]
+            }
+        },
+        "00:AA:00:00:00:02/20" : {
+            "basic": {
+                "ips": ["10.0.2.2"],
+                "locations": ["of:0000000000000001/3", "of:0000000000000002/3"]
+            }
+        }
+    },
+    "devices" : {
+        "of:0000000000000001" : {
+            "segmentrouting" : {
+                "ipv4NodeSid" : 1,
+                "ipv4Loopback" : "192.168.0.1",
+                "routerMac" : "00:00:00:00:00:01",
+                "isEdgeRouter" : true,
+                "pairDeviceId" : "of:0000000000000002",
+                "pairLocalPort" : 1,
+                "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" : 1,
+                "adjacencySids" : []
+            },
+            "basic" : {
+                "driver" : "ofdpa-ovs"
+            }
+        }
+    }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE63.chart b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE63.chart
new file mode 100644
index 0000000..ba520ce
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE63.chart
@@ -0,0 +1,6 @@
+{
+  "leaf1": {"expect": "False",
+    "hosts":["h1", "h2"]},
+  "leaf2": {"expect": "False",
+    "hosts":["h3", "h4"]}
+}
\ No newline at end of file
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE63.json b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE63.json
new file mode 100644
index 0000000..a114681
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE63.json
@@ -0,0 +1,108 @@
+{
+    "ports" : {
+        "of:0000000000000001/3" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-tagged": [10]
+                }
+            ]
+        },
+        "of:0000000000000001/4" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-tagged": [20]
+                }
+            ]
+        },
+        "of:0000000000000002/3" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.2.254/24" ],
+                    "vlan-tagged": [30]
+                }
+            ]
+        },
+        "of:0000000000000002/4" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.2.254/24" ],
+                    "vlan-tagged": [40]
+                }
+            ]
+        }
+    },
+    "hosts" : {
+        "00:aa:00:00:00:01/10": {
+            "basic": {
+                "locations": ["of:0000000000000001/3"]
+            }
+        },
+        "00:aa:00:00:00:02/20": {
+            "basic": {
+                "locations": ["of:0000000000000001/4"]
+            }
+        },
+        "00:aa:00:00:00:03/30": {
+            "basic": {
+                "locations": ["of:0000000000000002/3"]
+            }
+        },
+        "00:aa:00:00:00:04/40": {
+            "basic": {
+                "locations": ["of:0000000000000002/4"]
+            }
+        }
+    },
+    "devices" : {
+        "of:0000000000000001" : {
+            "segmentrouting" : {
+                "ipv4NodeSid" : 1,
+                "ipv4Loopback" : "192.168.0.1",
+                "routerMac" : "00:00:00:00:00:01",
+                "isEdgeRouter" : true,
+                "adjacencySids" : []
+            },
+            "basic" : {
+                "driver" : "ofdpa-ovs"
+            }
+        },
+        "of:0000000000000002" : {
+            "segmentrouting" : {
+                "ipv4NodeSid" : 2,
+                "ipv4Loopback" : "192.168.0.2",
+                "routerMac" : "00:00:00:00:00:02",
+                "isEdgeRouter" : true,
+                "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"
+            }
+        }
+    }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE64.chart b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE64.chart
new file mode 100644
index 0000000..ba520ce
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE64.chart
@@ -0,0 +1,6 @@
+{
+  "leaf1": {"expect": "False",
+    "hosts":["h1", "h2"]},
+  "leaf2": {"expect": "False",
+    "hosts":["h3", "h4"]}
+}
\ No newline at end of file
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE64.json b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE64.json
new file mode 100644
index 0000000..6614b07
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE64.json
@@ -0,0 +1,176 @@
+{
+    "ports" : {
+        "of:0000000000000001/6" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-tagged": [10]
+                }
+            ]
+        },
+        "of:0000000000000001/7" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-tagged": [20]
+                }
+            ]
+        },
+        "of:0000000000000002/6" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-tagged": [10]
+                }
+            ]
+        },
+        "of:0000000000000002/7" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-tagged": [20]
+                }
+            ]
+        },
+        "of:0000000000000003/6" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.2.254/24" ],
+                    "vlan-tagged": [30]
+                }
+            ]
+        },
+        "of:0000000000000003/7" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.2.254/24" ],
+                    "vlan-tagged": [40]
+                }
+            ]
+        },
+        "of:0000000000000004/6" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.2.254/24" ],
+                    "vlan-tagged": [30]
+                }
+            ]
+        },
+        "of:0000000000000004/7" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.2.254/24" ],
+                    "vlan-tagged": [40]
+                }
+            ]
+        }
+    },
+    "hosts" : {
+        "00:AA:00:00:00:01/10": {
+            "basic": {
+                "ips": ["10.0.2.1"],
+                "locations": ["of:0000000000000001/6","of:0000000000000002/6"]
+            }
+        },
+        "00:AA:00:00:00:02/20": {
+            "basic": {
+                "ips": ["10.0.2.2"],
+                "locations": ["of:0000000000000001/7", "of:0000000000000002/7"]
+            }
+        },
+        "00:AA:00:00:00:03/30": {
+            "basic": {
+                "ips": ["10.0.3.1"],
+                "locations": ["of:0000000000000003/6", "of:0000000000000004/6"]
+            }
+        },
+        "00:AA:00:00:00:04/40": {
+            "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"
+            }
+        }
+    }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE71.chart b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE71.chart
new file mode 100644
index 0000000..ff7036f
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE71.chart
@@ -0,0 +1,4 @@
+{
+  "leaf1": {"expect": "False",
+    "hosts":["h1", "h2"]}
+}
\ No newline at end of file
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE71.json b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE71.json
new file mode 100644
index 0000000..cd3115d
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE71.json
@@ -0,0 +1,41 @@
+{
+    "ports" : {
+        "of:0000000000000001/1" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-untagged": 10
+                }
+            ]
+        },
+        "of:0000000000000001/2" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-tagged": [20]
+                }
+            ]
+        }
+    },
+    "hosts" : {
+        "00:aa:00:00:00:02/20" : {
+            "basic": {
+                "locations": ["of:0000000000000001/2"]
+            }
+        }
+    },
+    "devices" : {
+        "of:0000000000000001" : {
+            "segmentrouting" : {
+                "ipv4NodeSid" : 1,
+                "ipv4Loopback" : "192.168.0.1",
+                "routerMac" : "00:00:00:00:00:01",
+                "isEdgeRouter" : true,
+                "adjacencySids" : []
+            },
+            "basic" : {
+                "driver" : "ofdpa-ovs"
+            }
+        }
+    }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE72.chart b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE72.chart
new file mode 100644
index 0000000..ff7036f
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE72.chart
@@ -0,0 +1,4 @@
+{
+  "leaf1": {"expect": "False",
+    "hosts":["h1", "h2"]}
+}
\ No newline at end of file
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE72.json b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE72.json
new file mode 100644
index 0000000..a9cc134
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE72.json
@@ -0,0 +1,80 @@
+{
+    "ports" : {
+        "of:0000000000000001/2" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-untagged": 10
+                }
+            ]
+        },
+        "of:0000000000000001/3" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-tagged": [20]
+                }
+            ]
+        },
+        "of:0000000000000002/2" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-untagged": 10
+                }
+            ]
+        },
+        "of:0000000000000002/3" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-tagged": [20]
+                }
+            ]
+        }
+    },
+    "hosts" : {
+        "00:AA:00:00:00:01/None": {
+            "basic": {
+                "ips": ["10.0.2.1"],
+                "locations": ["of:0000000000000001/2", "of:0000000000000002/2"]
+            }
+        },
+        "00:AA:00:00:00:02/20" : {
+            "basic": {
+                "ips": ["10.0.2.2"],
+                "locations": ["of:0000000000000001/3", "of:0000000000000002/3"]
+            }
+        }
+    },
+    "devices" : {
+        "of:0000000000000001" : {
+            "segmentrouting" : {
+                "ipv4NodeSid" : 1,
+                "ipv4Loopback" : "192.168.0.1",
+                "routerMac" : "00:00:00:00:00:01",
+                "isEdgeRouter" : true,
+                "pairDeviceId" : "of:0000000000000002",
+                "pairLocalPort" : 1,
+                "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" : 1,
+                "adjacencySids" : []
+            },
+            "basic" : {
+                "driver" : "ofdpa-ovs"
+            }
+        }
+    }
+}
\ No newline at end of file
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE73.chart b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE73.chart
new file mode 100644
index 0000000..ba520ce
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE73.chart
@@ -0,0 +1,6 @@
+{
+  "leaf1": {"expect": "False",
+    "hosts":["h1", "h2"]},
+  "leaf2": {"expect": "False",
+    "hosts":["h3", "h4"]}
+}
\ No newline at end of file
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE73.json b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE73.json
new file mode 100644
index 0000000..b0dfd20
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE73.json
@@ -0,0 +1,98 @@
+{
+    "ports" : {
+        "of:0000000000000001/3" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-untagged": 10
+                }
+            ]
+        },
+        "of:0000000000000001/4" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.1.254/24" ],
+                    "vlan-tagged": [20]
+                }
+            ]
+        },
+        "of:0000000000000002/3" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.2.254/24" ],
+                    "vlan-untagged": 30
+                }
+            ]
+        },
+        "of:0000000000000002/4" : {
+            "interfaces" : [
+                {
+                    "ips" : [ "10.0.2.254/24" ],
+                    "vlan-tagged": [40]
+                }
+            ]
+        }
+    },
+    "hosts" : {
+        "00:aa:00:00:00:02/20" : {
+            "basic": {
+                "locations": ["of:0000000000000001/4"]
+            }
+        },
+        "00:aa:00:00:00:04/40" : {
+            "basic": {
+                "locations": ["of:0000000000000002/4"]
+            }
+        }
+    },
+    "devices" : {
+        "of:0000000000000001" : {
+            "segmentrouting" : {
+                "ipv4NodeSid" : 1,
+                "ipv4Loopback" : "192.168.0.1",
+                "routerMac" : "00:00:00:00:00:01",
+                "isEdgeRouter" : true,
+                "adjacencySids" : []
+            },
+            "basic" : {
+                "driver" : "ofdpa-ovs"
+            }
+        },
+        "of:0000000000000002" : {
+            "segmentrouting" : {
+                "ipv4NodeSid" : 2,
+                "ipv4Loopback" : "192.168.0.2",
+                "routerMac" : "00:00:00:00:00:02",
+                "isEdgeRouter" : true,
+                "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"
+            }
+        }
+    }
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE74.chart b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE74.chart
new file mode 100644
index 0000000..ba520ce
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE74.chart
@@ -0,0 +1,6 @@
+{
+  "leaf1": {"expect": "False",
+    "hosts":["h1", "h2"]},
+  "leaf2": {"expect": "False",
+    "hosts":["h3", "h4"]}
+}
\ No newline at end of file
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE74.json b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE74.json
new file mode 100644
index 0000000..9a3de7c
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/json/CASE74.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-tagged": [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-tagged": [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-tagged": [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-tagged": [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/20" : {
+            "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/40" : {
+            "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"
+            }
+        }
+    }
+}