Change "type" constant name
Change-Id: Ia8a070d5d1937b68c0e77be3741c5d8f47748e4c
diff --git a/src/main/java/net/onrc/onos/core/topology/DeviceImpl.java b/src/main/java/net/onrc/onos/core/topology/DeviceImpl.java
index f331b49..3c46656 100644
--- a/src/main/java/net/onrc/onos/core/topology/DeviceImpl.java
+++ b/src/main/java/net/onrc/onos/core/topology/DeviceImpl.java
@@ -133,6 +133,6 @@
@Override
public String getType() {
// FIXME assuming device is always in packet layer for now.
- return TopologyElement.TYPE_PACKET;
+ return TopologyElement.TYPE_PACKET_LAYER;
}
}
diff --git a/src/main/java/net/onrc/onos/core/topology/LinkImpl.java b/src/main/java/net/onrc/onos/core/topology/LinkImpl.java
index a573540..fce965a 100644
--- a/src/main/java/net/onrc/onos/core/topology/LinkImpl.java
+++ b/src/main/java/net/onrc/onos/core/topology/LinkImpl.java
@@ -174,6 +174,6 @@
*/
@Override
public String getType() {
- return getStringAttribute(TopologyElement.TYPE, TopologyElement.TYPE_PACKET);
+ return getStringAttribute(TopologyElement.TYPE, TopologyElement.TYPE_PACKET_LAYER);
}
}
diff --git a/src/main/java/net/onrc/onos/core/topology/PortImpl.java b/src/main/java/net/onrc/onos/core/topology/PortImpl.java
index f022438..c1bb75c 100644
--- a/src/main/java/net/onrc/onos/core/topology/PortImpl.java
+++ b/src/main/java/net/onrc/onos/core/topology/PortImpl.java
@@ -246,6 +246,6 @@
*/
@Override
public String getType() {
- return getStringAttribute(TopologyElement.TYPE, TopologyElement.TYPE_PACKET);
+ return getStringAttribute(TopologyElement.TYPE, TopologyElement.TYPE_PACKET_LAYER);
}
}
diff --git a/src/main/java/net/onrc/onos/core/topology/SwitchImpl.java b/src/main/java/net/onrc/onos/core/topology/SwitchImpl.java
index f434e33..3e2b9aa 100644
--- a/src/main/java/net/onrc/onos/core/topology/SwitchImpl.java
+++ b/src/main/java/net/onrc/onos/core/topology/SwitchImpl.java
@@ -199,6 +199,6 @@
*/
@Override
public String getType() {
- return getStringAttribute(TopologyElement.TYPE, TopologyElement.TYPE_PACKET);
+ return getStringAttribute(TopologyElement.TYPE, TopologyElement.TYPE_PACKET_LAYER);
}
}
diff --git a/src/main/java/net/onrc/onos/core/topology/TopologyElement.java b/src/main/java/net/onrc/onos/core/topology/TopologyElement.java
index fc94c0a..685bc98 100644
--- a/src/main/java/net/onrc/onos/core/topology/TopologyElement.java
+++ b/src/main/java/net/onrc/onos/core/topology/TopologyElement.java
@@ -28,11 +28,11 @@
/**
* Attribute "type" value representing that the object belongs to Packet layer.
*/
- public static final String TYPE_PACKET = "packet";
+ public static final String TYPE_PACKET_LAYER = "packet";
/**
* Attribute "type" value representing that the object belongs to Optical layer.
*/
- public static final String TYPE_OPTICAL = "optical";
+ public static final String TYPE_OPTICAL_LAYER = "optical";
private boolean isFrozen = false;
@@ -169,6 +169,6 @@
@Override
public String getType() {
- return getStringAttribute(TYPE, TYPE_PACKET);
+ return getStringAttribute(TYPE, TYPE_PACKET_LAYER);
}
}
diff --git a/src/main/java/net/onrc/onos/core/topology/TopologyImpl.java b/src/main/java/net/onrc/onos/core/topology/TopologyImpl.java
index e6e6763..81f3041 100644
--- a/src/main/java/net/onrc/onos/core/topology/TopologyImpl.java
+++ b/src/main/java/net/onrc/onos/core/topology/TopologyImpl.java
@@ -157,7 +157,7 @@
return null;
}
- Link link = links.get(TopologyElement.TYPE_PACKET);
+ Link link = links.get(TopologyElement.TYPE_PACKET_LAYER);
if (link != null) {
// return packet link
return link;
diff --git a/src/main/java/net/onrc/onos/core/topology/TopologyPublisher.java b/src/main/java/net/onrc/onos/core/topology/TopologyPublisher.java
index b82c86f..5e2b192 100644
--- a/src/main/java/net/onrc/onos/core/topology/TopologyPublisher.java
+++ b/src/main/java/net/onrc/onos/core/topology/TopologyPublisher.java
@@ -142,7 +142,7 @@
// TODO define attr name as constant somewhere.
// TODO populate appropriate attributes.
linkEvent.createStringAttribute(TopologyElement.TYPE,
- TopologyElement.TYPE_PACKET);
+ TopologyElement.TYPE_PACKET_LAYER);
linkEvent.freeze();
@@ -166,7 +166,7 @@
// TODO define attr name as constant somewhere.
// TODO populate appropriate attributes.
linkEvent.createStringAttribute(TopologyElement.TYPE,
- TopologyElement.TYPE_PACKET);
+ TopologyElement.TYPE_PACKET_LAYER);
linkEvent.freeze();
if (!registryService.hasControl(link.getDst())) {
@@ -187,7 +187,7 @@
// TODO define attr name as constant somewhere.
// TODO populate appropriate attributes.
portEvent.createStringAttribute(TopologyElement.TYPE,
- TopologyElement.TYPE_PACKET);
+ TopologyElement.TYPE_PACKET_LAYER);
portEvent.createStringAttribute("name", port.getName());
portEvent.freeze();
@@ -210,7 +210,7 @@
// TODO define attr name as constant somewhere.
// TODO populate appropriate attributes.
portEvent.createStringAttribute(TopologyElement.TYPE,
- TopologyElement.TYPE_PACKET);
+ TopologyElement.TYPE_PACKET_LAYER);
portEvent.createStringAttribute("name", port.getName());
portEvent.freeze();
@@ -231,7 +231,7 @@
// TODO define attr name as constant somewhere.
// TODO populate appropriate attributes.
switchEvent.createStringAttribute(TopologyElement.TYPE,
- TopologyElement.TYPE_PACKET);
+ TopologyElement.TYPE_PACKET_LAYER);
switchEvent.createStringAttribute("ConnectedSince",
sw.getConnectedSince().toString());
@@ -252,7 +252,7 @@
// TODO populate appropriate attributes.
portEvent.createStringAttribute("name", port.getName());
portEvent.createStringAttribute(TopologyElement.TYPE,
- TopologyElement.TYPE_PACKET);
+ TopologyElement.TYPE_PACKET_LAYER);
portEvent.freeze();
portEvents.add(portEvent);