Merge branch 'master' of https://github.com/OPENNETWORKINGLAB/ONOS
diff --git a/src/main/java/net/onrc/onos/ofcontroller/routing/TopoRouteService.java b/src/main/java/net/onrc/onos/ofcontroller/routing/TopoRouteService.java
index 59e76ca..a784d7d 100644
--- a/src/main/java/net/onrc/onos/ofcontroller/routing/TopoRouteService.java
+++ b/src/main/java/net/onrc/onos/ofcontroller/routing/TopoRouteService.java
@@ -202,6 +202,10 @@
// The local Port info
//
for (Vertex myPortVertex : nodeVertex.getVertices(Direction.OUT, "on")) {
+ // Ignore inactive ports
+ if (! myPortVertex.getProperty("state").toString().equals("ACTIVE"))
+ continue;
+
short myPort = 0;
Object obj = myPortVertex.getProperty("number");
if (obj instanceof Short) {
@@ -215,6 +219,10 @@
// The neighbor Port info
//
for (Vertex neighborPortVertex : myPortVertex.getVertices(Direction.OUT, "link")) {
+ // Ignore inactive ports
+ if (! neighborPortVertex.getProperty("state").toString().equals("ACTIVE"))
+ continue;
+
short neighborPort = 0;
obj = neighborPortVertex.getProperty("number");
if (obj instanceof Short) {
@@ -448,7 +456,15 @@
break;
}
for (Vertex parentPort : nextVertex.getVertices(Direction.OUT, "on")) {
+ // Ignore inactive ports
+ if (! parentPort.getProperty("state").toString().equals("ACTIVE"))
+ continue;
+
for (Vertex childPort : parentPort.getVertices(Direction.OUT, "link")) {
+ // Ignore inactive ports
+ if (! childPort.getProperty("state").toString().equals("ACTIVE"))
+ continue;
+
for (Vertex child : childPort.getVertices(Direction.IN, "on")) {
// Ignore inactive switches
String state = child.getProperty("state").toString();
diff --git a/titan/schema/test-network.xml b/titan/schema/test-network.xml
index 630c5da..2c3b993 100644
--- a/titan/schema/test-network.xml
+++ b/titan/schema/test-network.xml
@@ -55,106 +55,126 @@
<node id="100">
<data key="type">port</data>
<data key="number">1</data>
+ <data key="state">ACTIVE</data>
<data key="desc">port 1 at SEA Switch</data>
</node>
<node id="101">
<data key="type">port</data>
<data key="number">2</data>
+ <data key="state">ACTIVE</data>
<data key="desc">port 2 at SEA Switch</data>
</node>
<node id="102">
<data key="type">port</data>
<data key="number">3</data>
+ <data key="state">ACTIVE</data>
<data key="desc">port 3 at SEA Switch</data>
</node>
<node id="103">
<data key="type">port</data>
<data key="number">4</data>
+ <data key="state">ACTIVE</data>
<data key="desc">port 4 at SEA Switch</data>
</node>
<node id="104">
<data key="type">port</data>
<data key="number">1</data>
+ <data key="state">ACTIVE</data>
<data key="desc">port 1 at LAX Switch</data>
</node>
<node id="105">
<data key="type">port</data>
<data key="number">2</data>
+ <data key="state">ACTIVE</data>
<data key="desc">port 2 at LAX Switch</data>
</node>
<node id="106">
<data key="type">port</data>
<data key="number">3</data>
+ <data key="state">ACTIVE</data>
<data key="desc">port 3 at LAX Switch</data>
</node>
<node id="107">
<data key="type">port</data>
<data key="number">1</data>
+ <data key="state">ACTIVE</data>
<data key="desc">port 1 at CHI Switch</data>
</node>
<node id="108">
<data key="type">port</data>
<data key="number">2</data>
+ <data key="state">ACTIVE</data>
<data key="desc">port 2 at CHI Switch</data>
</node>
<node id="109">
<data key="type">port</data>
<data key="number">3</data>
+ <data key="state">ACTIVE</data>
<data key="desc">port 3 at CHI Switch</data>
</node>
<node id="110">
<data key="type">port</data>
<data key="number">4</data>
+ <data key="state">ACTIVE</data>
<data key="desc">port 4 at CHI Switch</data>
</node>
<node id="111">
<data key="type">port</data>
<data key="number">1</data>
+ <data key="state">ACTIVE</data>
<data key="desc">port 1 at IAH Switch</data>
</node>
<node id="112">
<data key="type">port</data>
<data key="number">2</data>
+ <data key="state">ACTIVE</data>
<data key="desc">port 2 at IAH Switch</data>
</node>
<node id="113">
<data key="type">port</data>
<data key="number">3</data>
+ <data key="state">ACTIVE</data>
<data key="desc">port 3 at IAH Switch</data>
</node>
<node id="114">
<data key="type">port</data>
<data key="number">1</data>
+ <data key="state">ACTIVE</data>
<data key="desc">port 1 at NYC Switch</data>
</node>
<node id="115">
<data key="type">port</data>
<data key="number">2</data>
+ <data key="state">ACTIVE</data>
<data key="desc">port 2 at NYC Switch</data>
</node>
<node id="116">
<data key="type">port</data>
<data key="number">3</data>
+ <data key="state">ACTIVE</data>
<data key="desc">port 3 at NYC Switch</data>
</node>
<node id="117">
<data key="type">port</data>
<data key="number">1</data>
+ <data key="state">ACTIVE</data>
<data key="desc">port 1 at ATL Switch</data>
</node>
<node id="118">
<data key="type">port</data>
<data key="number">2</data>
+ <data key="state">ACTIVE</data>
<data key="desc">port 2 at ATL Switch</data>
</node>
<node id="119">
<data key="type">port</data>
<data key="number">3</data>
+ <data key="state">ACTIVE</data>
<data key="desc">port 3 at ATL Switch</data>
</node>