Enforce naming convention regarding abbreviations
Change-Id: Ic81038d3869268a55624ccbbf66048545158b0da
diff --git a/protocols/bgp/api/src/main/java/org/onosproject/bgp/controller/BgpController.java b/protocols/bgp/api/src/main/java/org/onosproject/bgp/controller/BgpController.java
index 0930e8e..768e764 100755
--- a/protocols/bgp/api/src/main/java/org/onosproject/bgp/controller/BgpController.java
+++ b/protocols/bgp/api/src/main/java/org/onosproject/bgp/controller/BgpController.java
@@ -16,12 +16,12 @@
package org.onosproject.bgp.controller;
-import java.util.Map;
-import java.util.Set;
-
import org.onosproject.bgpio.exceptions.BgpParseException;
import org.onosproject.bgpio.protocol.BgpMessage;
+import java.util.Map;
+import java.util.Set;
+
/**
* Abstraction of an BGP controller. Serves as a one stop shop for obtaining BGP devices and (un)register listeners on
* bgp events
@@ -72,7 +72,7 @@
* @param msg the message to process.
* @throws BgpParseException on data processing error
*/
- void processBGPPacket(BgpId bgpId, BgpMessage msg) throws BgpParseException;
+ void processBgpPacket(BgpId bgpId, BgpMessage msg) throws BgpParseException;
/**
* Close all connected BGP peers.
diff --git a/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/protocol/IGPRouterID.java b/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/protocol/IgpRouterId.java
similarity index 95%
rename from protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/protocol/IGPRouterID.java
rename to protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/protocol/IgpRouterId.java
index 0e531d6..4308850 100644
--- a/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/protocol/IGPRouterID.java
+++ b/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/protocol/IgpRouterId.java
@@ -19,5 +19,5 @@
/**
* Provides Abstraction of IGP RouterID TLV.
*/
-public interface IGPRouterID {
-}
\ No newline at end of file
+public interface IgpRouterId {
+}
diff --git a/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/protocol/linkstate/BgpPrefixLSIdentifier.java b/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/protocol/linkstate/BgpPrefixLSIdentifier.java
index a9a0766..a4f4f47 100644
--- a/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/protocol/linkstate/BgpPrefixLSIdentifier.java
+++ b/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/protocol/linkstate/BgpPrefixLSIdentifier.java
@@ -27,7 +27,7 @@
import org.onosproject.bgpio.types.BgpErrorType;
import org.onosproject.bgpio.types.BgpValueType;
import org.onosproject.bgpio.types.IPReachabilityInformationTlv;
-import org.onosproject.bgpio.types.OSPFRouteTypeTlv;
+import org.onosproject.bgpio.types.OspfRouteTypeTlv;
import org.onosproject.bgpio.types.attr.BgpAttrNodeMultiTopologyId;
import org.onosproject.bgpio.util.UnSupportedAttribute;
import org.slf4j.Logger;
@@ -139,8 +139,8 @@
}
tempCb = cb.readBytes(length);
switch (type) {
- case OSPFRouteTypeTlv.TYPE:
- tlv = OSPFRouteTypeTlv.read(tempCb);
+ case OspfRouteTypeTlv.TYPE:
+ tlv = OspfRouteTypeTlv.read(tempCb);
break;
case IPReachabilityInformationTlv.TYPE:
tlv = IPReachabilityInformationTlv.read(tempCb, length);
diff --git a/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/protocol/linkstate/NodeDescriptors.java b/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/protocol/linkstate/NodeDescriptors.java
index 7bc4fcb..5abfbb3 100644
--- a/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/protocol/linkstate/NodeDescriptors.java
+++ b/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/protocol/linkstate/NodeDescriptors.java
@@ -31,8 +31,8 @@
import org.onosproject.bgpio.types.BgpValueType;
import org.onosproject.bgpio.types.IsIsNonPseudonode;
import org.onosproject.bgpio.types.IsIsPseudonode;
-import org.onosproject.bgpio.types.OSPFNonPseudonode;
-import org.onosproject.bgpio.types.OSPFPseudonode;
+import org.onosproject.bgpio.types.OspfNonPseudonode;
+import org.onosproject.bgpio.types.OspfPseudonode;
import org.onosproject.bgpio.util.UnSupportedAttribute;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -193,9 +193,9 @@
}
} else if (protocolId == OSPF_V2_PROTOCOL_ID || protocolId == OSPF_V3_PROTOCOL_ID) {
if (length == OSPFNONPSEUDONODE_LEN) {
- tlv = OSPFNonPseudonode.read(tempCb);
+ tlv = OspfNonPseudonode.read(tempCb);
} else if (length == OSPFPSEUDONODE_LEN) {
- tlv = OSPFPseudonode.read(tempCb);
+ tlv = OspfPseudonode.read(tempCb);
}
}
break;
diff --git a/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/protocol/ver4/BgpNotificationMsgVer4.java b/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/protocol/ver4/BgpNotificationMsgVer4.java
index 7243e21..58e51df 100644
--- a/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/protocol/ver4/BgpNotificationMsgVer4.java
+++ b/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/protocol/ver4/BgpNotificationMsgVer4.java
@@ -122,11 +122,11 @@
private BgpHeader bgpHeader;
private boolean isErrorCodeSet = false;
private boolean isErrorSubCodeSet = false;
- private boolean isBGPHeaderSet = false;
+ private boolean isBgpHeaderSet = false;
@Override
public BgpNotificationMsg build() throws BgpParseException {
- BgpHeader bgpHeader = this.isBGPHeaderSet ? this.bgpHeader : DEFAULT_MESSAGE_HEADER;
+ BgpHeader bgpHeader = this.isBgpHeaderSet ? this.bgpHeader : DEFAULT_MESSAGE_HEADER;
if (!this.isErrorCodeSet) {
throw new BgpParseException("Error code must be present");
}
@@ -262,4 +262,4 @@
.add("errorSubCode", errorSubCode)
.toString();
}
-}
\ No newline at end of file
+}
diff --git a/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/As4Path.java b/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/As4Path.java
index 3ceca2c..51779cc 100644
--- a/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/As4Path.java
+++ b/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/As4Path.java
@@ -15,10 +15,7 @@
*/
package org.onosproject.bgpio.types;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Objects;
-
+import com.google.common.base.MoreObjects;
import org.jboss.netty.buffer.ChannelBuffer;
import org.onosproject.bgpio.exceptions.BgpParseException;
import org.onosproject.bgpio.util.Constants;
@@ -26,7 +23,9 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import com.google.common.base.MoreObjects;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
/**
* Provides Implementation of As4Path BGP Path Attribute.
@@ -122,7 +121,7 @@
*
* @return list of ASNum in AS4path Sequence
*/
- public List<Integer> as4PathSEQ() {
+ public List<Integer> as4PathSeq() {
return this.as4pathSeq;
}
@@ -131,7 +130,7 @@
*
* @return list of ASNum in AS4path Set
*/
- public List<Integer> as4PathSET() {
+ public List<Integer> as4PathSet() {
return this.as4pathSet;
}
@@ -172,4 +171,4 @@
// TODO Auto-generated method stub
return 0;
}
-}
\ No newline at end of file
+}
diff --git a/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/AsPath.java b/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/AsPath.java
index 2a050c4..7879bd6 100644
--- a/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/AsPath.java
+++ b/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/AsPath.java
@@ -16,10 +16,7 @@
package org.onosproject.bgpio.types;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Objects;
-
+import com.google.common.base.MoreObjects;
import org.jboss.netty.buffer.ChannelBuffer;
import org.onosproject.bgpio.exceptions.BgpParseException;
import org.onosproject.bgpio.util.Constants;
@@ -27,7 +24,9 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import com.google.common.base.MoreObjects;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
/**
* Provides Implementation of AsPath mandatory BGP Path Attribute.
@@ -36,7 +35,7 @@
/**
* Enum to provide AS types.
*/
- public enum ASTYPE {
+ public enum AsType {
AS_SET(1), AS_SEQUENCE(2), AS_CONFED_SEQUENCE(3), AS_CONFED_SET(4);
int value;
@@ -45,7 +44,7 @@
*
* @param val AS type
*/
- ASTYPE(int val) {
+ AsType(int val) {
value = val;
}
@@ -211,4 +210,4 @@
// TODO Auto-generated method stub
return 0;
}
-}
\ No newline at end of file
+}
diff --git a/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/IsIsNonPseudonode.java b/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/IsIsNonPseudonode.java
index 427aa92..6c5f46e 100644
--- a/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/IsIsNonPseudonode.java
+++ b/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/IsIsNonPseudonode.java
@@ -15,18 +15,17 @@
*/
package org.onosproject.bgpio.types;
+import com.google.common.base.MoreObjects;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.onosproject.bgpio.protocol.IgpRouterId;
+
import java.nio.ByteBuffer;
import java.util.Arrays;
-import org.jboss.netty.buffer.ChannelBuffer;
-import org.onosproject.bgpio.protocol.IGPRouterID;
-
-import com.google.common.base.MoreObjects;
-
/**
* Provides Implementation of IsIsNonPseudonode Tlv.
*/
-public class IsIsNonPseudonode implements IGPRouterID, BgpValueType {
+public class IsIsNonPseudonode implements IgpRouterId, BgpValueType {
public static final short TYPE = 515;
public static final short LENGTH = 6;
@@ -56,7 +55,7 @@
*
* @return ISO NodeID
*/
- public byte[] getISONodeID() {
+ public byte[] getIsoNodeId() {
return isoNodeID;
}
@@ -121,4 +120,4 @@
.add("ISONodeID", isoNodeID)
.toString();
}
-}
\ No newline at end of file
+}
diff --git a/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/IsIsPseudonode.java b/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/IsIsPseudonode.java
index 094c438..bfb13e3 100644
--- a/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/IsIsPseudonode.java
+++ b/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/IsIsPseudonode.java
@@ -15,19 +15,18 @@
*/
package org.onosproject.bgpio.types;
+import com.google.common.base.MoreObjects;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.onosproject.bgpio.protocol.IgpRouterId;
+
import java.nio.ByteBuffer;
import java.util.Arrays;
import java.util.Objects;
-import org.jboss.netty.buffer.ChannelBuffer;
-import org.onosproject.bgpio.protocol.IGPRouterID;
-
-import com.google.common.base.MoreObjects;
-
/**
* Provides implementation of IsIsPseudonode Tlv.
*/
-public class IsIsPseudonode implements IGPRouterID, BgpValueType {
+public class IsIsPseudonode implements IgpRouterId, BgpValueType {
public static final short TYPE = 515;
public static final short LENGTH = 7;
@@ -62,7 +61,7 @@
*
* @return ISO NodeID
*/
- public byte[] getISONodeID() {
+ public byte[] getIsoNodeId() {
return isoNodeID;
}
@@ -71,7 +70,7 @@
*
* @return PSN Identifier
*/
- public byte getPSNIdentifier() {
+ public byte getPsnIdentifier() {
return this.psnIdentifier;
}
@@ -143,4 +142,4 @@
.add("psnIdentifier", psnIdentifier)
.toString();
}
-}
\ No newline at end of file
+}
diff --git a/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/MultiProtocolExtnCapabilityTlv.java b/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/MultiProtocolExtnCapabilityTlv.java
index 7082483..465eb97 100644
--- a/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/MultiProtocolExtnCapabilityTlv.java
+++ b/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/MultiProtocolExtnCapabilityTlv.java
@@ -15,12 +15,12 @@
*/
package org.onosproject.bgpio.types;
-import java.util.Objects;
+import com.google.common.base.MoreObjects;
import org.jboss.netty.buffer.ChannelBuffer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import com.google.common.base.MoreObjects;
+import java.util.Objects;
/**
* Provides MultiProtocolExtnCapabilityTlv.
@@ -74,7 +74,7 @@
* Returns afi Address Family Identifiers value.
* @return afi Address Family Identifiers value
*/
- public short getAFI() {
+ public short getAfi() {
return afi;
}
@@ -90,7 +90,7 @@
* Returns safi Subsequent Address Family Identifier value.
* @return safi Subsequent Address Family Identifier value
*/
- public byte getSAFI() {
+ public byte getSafi() {
return safi;
}
diff --git a/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/Origin.java b/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/Origin.java
index d642d83..3e0e06c 100644
--- a/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/Origin.java
+++ b/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/Origin.java
@@ -15,14 +15,13 @@
*/
package org.onosproject.bgpio.types;
-import java.util.Objects;
-
+import com.google.common.base.MoreObjects;
import org.jboss.netty.buffer.ChannelBuffer;
import org.onosproject.bgpio.exceptions.BgpParseException;
import org.onosproject.bgpio.util.Constants;
import org.onosproject.bgpio.util.Validation;
-import com.google.common.base.MoreObjects;
+import java.util.Objects;
/**
* Provides Implementation of mandatory BGP Origin path attribute.
@@ -32,7 +31,7 @@
/**
* Enum to provide ORIGIN types.
*/
- public enum ORIGINTYPE {
+ public enum OriginType {
IGP(0), EGP(1), INCOMPLETE(2);
int value;
/**
@@ -40,7 +39,7 @@
*
* @param val ORIGIN type
*/
- ORIGINTYPE(int val) {
+ OriginType(int val) {
value = val;
}
@@ -84,13 +83,13 @@
*
* @return type of Origin in Enum values
*/
- public ORIGINTYPE origin() {
+ public OriginType origin() {
if (this.origin == 0) {
- return ORIGINTYPE.IGP;
+ return OriginType.IGP;
} else if (this.origin == 1) {
- return ORIGINTYPE.EGP;
+ return OriginType.EGP;
} else {
- return ORIGINTYPE.INCOMPLETE;
+ return OriginType.INCOMPLETE;
}
}
@@ -118,8 +117,8 @@
byte originValue;
originValue = cb.readByte();
- if ((originValue != ORIGINTYPE.INCOMPLETE.value) && (originValue != ORIGINTYPE.IGP.value) &&
- (originValue != ORIGINTYPE.EGP.value)) {
+ if ((originValue != OriginType.INCOMPLETE.value) && (originValue != OriginType.IGP.value) &&
+ (originValue != OriginType.EGP.value)) {
throw new BgpParseException(BgpErrorType.UPDATE_MESSAGE_ERROR, BgpErrorType.INVALID_ORIGIN_ATTRIBUTE, data);
}
return new Origin(originValue);
@@ -165,4 +164,4 @@
// TODO Auto-generated method stub
return 0;
}
-}
\ No newline at end of file
+}
diff --git a/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/OSPFNonPseudonode.java b/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/OspfNonPseudonode.java
similarity index 83%
rename from protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/OSPFNonPseudonode.java
rename to protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/OspfNonPseudonode.java
index d281a4e..379c758 100644
--- a/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/OSPFNonPseudonode.java
+++ b/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/OspfNonPseudonode.java
@@ -16,17 +16,16 @@
package org.onosproject.bgpio.types;
-import java.util.Objects;
-
-import org.jboss.netty.buffer.ChannelBuffer;
-import org.onosproject.bgpio.protocol.IGPRouterID;
-
import com.google.common.base.MoreObjects;
+import org.jboss.netty.buffer.ChannelBuffer;
+import org.onosproject.bgpio.protocol.IgpRouterId;
+
+import java.util.Objects;
/**
* Provides implementation of OSPFNonPseudonode Tlv.
*/
-public class OSPFNonPseudonode implements IGPRouterID, BgpValueType {
+public class OspfNonPseudonode implements IgpRouterId, BgpValueType {
public static final short TYPE = 515;
public static final short LENGTH = 4;
@@ -37,7 +36,7 @@
*
* @param routerID routerID
*/
- public OSPFNonPseudonode(int routerID) {
+ public OspfNonPseudonode(int routerID) {
this.routerID = routerID;
}
@@ -47,8 +46,8 @@
* @param routerID routerID
* @return object of OSPFNonPseudonode
*/
- public static OSPFNonPseudonode of(final int routerID) {
- return new OSPFNonPseudonode(routerID);
+ public static OspfNonPseudonode of(final int routerID) {
+ return new OspfNonPseudonode(routerID);
}
/**
@@ -71,8 +70,8 @@
return true;
}
- if (obj instanceof OSPFNonPseudonode) {
- OSPFNonPseudonode other = (OSPFNonPseudonode) obj;
+ if (obj instanceof OspfNonPseudonode) {
+ OspfNonPseudonode other = (OspfNonPseudonode) obj;
return Objects.equals(routerID, other.routerID);
}
return false;
@@ -93,8 +92,8 @@
* @param cb ChannelBuffer
* @return object of OSPFNonPseudonode
*/
- public static OSPFNonPseudonode read(ChannelBuffer cb) {
- return OSPFNonPseudonode.of(cb.readInt());
+ public static OspfNonPseudonode read(ChannelBuffer cb) {
+ return OspfNonPseudonode.of(cb.readInt());
}
@Override
@@ -107,7 +106,7 @@
if (this.equals(o)) {
return 0;
}
- return ((Integer) (this.routerID)).compareTo((Integer) (((OSPFNonPseudonode) o).routerID));
+ return ((Integer) (this.routerID)).compareTo((Integer) (((OspfNonPseudonode) o).routerID));
}
@Override
@@ -118,4 +117,4 @@
.add("RouterID", routerID)
.toString();
}
-}
\ No newline at end of file
+}
diff --git a/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/OSPFPseudonode.java b/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/OspfPseudonode.java
similarity index 83%
rename from protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/OSPFPseudonode.java
rename to protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/OspfPseudonode.java
index 0d17651..75d1562 100644
--- a/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/OSPFPseudonode.java
+++ b/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/OspfPseudonode.java
@@ -15,18 +15,17 @@
*/
package org.onosproject.bgpio.types;
-import java.util.Objects;
-
+import com.google.common.base.MoreObjects;
import org.jboss.netty.buffer.ChannelBuffer;
import org.onlab.packet.Ip4Address;
-import org.onosproject.bgpio.protocol.IGPRouterID;
+import org.onosproject.bgpio.protocol.IgpRouterId;
-import com.google.common.base.MoreObjects;
+import java.util.Objects;
/**
* Provides implementation of OSPFPseudonode Tlv.
*/
-public class OSPFPseudonode implements IGPRouterID, BgpValueType {
+public class OspfPseudonode implements IgpRouterId, BgpValueType {
public static final short TYPE = 515;
public static final short LENGTH = 8;
@@ -39,7 +38,7 @@
* @param routerID routerID
* @param drInterface IPv4 address of the DR's interface
*/
- public OSPFPseudonode(int routerID, Ip4Address drInterface) {
+ public OspfPseudonode(int routerID, Ip4Address drInterface) {
this.routerID = routerID;
this.drInterface = drInterface;
}
@@ -51,8 +50,8 @@
* @param drInterface IPv4 address of the DR's interface
* @return object of OSPFPseudonode
*/
- public static OSPFPseudonode of(final int routerID, final Ip4Address drInterface) {
- return new OSPFPseudonode(routerID, drInterface);
+ public static OspfPseudonode of(final int routerID, final Ip4Address drInterface) {
+ return new OspfPseudonode(routerID, drInterface);
}
/**
@@ -74,8 +73,8 @@
if (this == obj) {
return true;
}
- if (obj instanceof OSPFPseudonode) {
- OSPFPseudonode other = (OSPFPseudonode) obj;
+ if (obj instanceof OspfPseudonode) {
+ OspfPseudonode other = (OspfPseudonode) obj;
return Objects.equals(routerID, other.routerID) && Objects.equals(drInterface, other.drInterface);
}
return false;
@@ -97,10 +96,10 @@
* @param cb ChannelBuffer
* @return object of OSPFPseudonode
*/
- public static OSPFPseudonode read(ChannelBuffer cb) {
+ public static OspfPseudonode read(ChannelBuffer cb) {
int routerID = cb.readInt();
Ip4Address drInterface = Ip4Address.valueOf(cb.readInt());
- return OSPFPseudonode.of(routerID, drInterface);
+ return OspfPseudonode.of(routerID, drInterface);
}
@Override
@@ -113,9 +112,9 @@
if (this.equals(o)) {
return 0;
}
- int result = ((Integer) (this.routerID)).compareTo((Integer) (((OSPFPseudonode) o).routerID));
+ int result = ((Integer) (this.routerID)).compareTo((Integer) (((OspfPseudonode) o).routerID));
if (result != 0) {
- return this.drInterface.compareTo(((OSPFPseudonode) o).drInterface);
+ return this.drInterface.compareTo(((OspfPseudonode) o).drInterface);
}
return result;
}
@@ -129,4 +128,4 @@
.add("DRInterface", drInterface)
.toString();
}
-}
\ No newline at end of file
+}
diff --git a/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/OSPFRouteTypeTlv.java b/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/OspfRouteTypeTlv.java
similarity index 89%
rename from protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/OSPFRouteTypeTlv.java
rename to protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/OspfRouteTypeTlv.java
index be321c9..72355f8 100644
--- a/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/OSPFRouteTypeTlv.java
+++ b/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/OspfRouteTypeTlv.java
@@ -25,7 +25,7 @@
/**
* Provides OSPF Route Type Tlv which contains route type.
*/
-public class OSPFRouteTypeTlv implements BgpValueType {
+public class OspfRouteTypeTlv implements BgpValueType {
/* Reference :draft-ietf-idr-ls-distribution-11
0 1 2 3
@@ -69,7 +69,7 @@
*
* @param routeType Route type
*/
- public OSPFRouteTypeTlv(byte routeType) {
+ public OspfRouteTypeTlv(byte routeType) {
this.routeType = routeType;
}
@@ -79,8 +79,8 @@
* @param routeType Route type
* @return object of OSPFRouteTypeTlv
*/
- public static OSPFRouteTypeTlv of(final byte routeType) {
- return new OSPFRouteTypeTlv(routeType);
+ public static OspfRouteTypeTlv of(final byte routeType) {
+ return new OspfRouteTypeTlv(routeType);
}
/**
@@ -118,8 +118,8 @@
if (this == obj) {
return true;
}
- if (obj instanceof OSPFRouteTypeTlv) {
- OSPFRouteTypeTlv other = (OSPFRouteTypeTlv) obj;
+ if (obj instanceof OspfRouteTypeTlv) {
+ OspfRouteTypeTlv other = (OspfRouteTypeTlv) obj;
return Objects.equals(routeType, other.routeType);
}
return false;
@@ -140,8 +140,8 @@
* @param cb channelBuffer
* @return object of OSPFRouteTypeTlv
*/
- public static OSPFRouteTypeTlv read(ChannelBuffer cb) {
- return OSPFRouteTypeTlv.of(cb.readByte());
+ public static OspfRouteTypeTlv read(ChannelBuffer cb) {
+ return OspfRouteTypeTlv.of(cb.readByte());
}
@Override
@@ -154,7 +154,7 @@
if (this.equals(o)) {
return 0;
}
- return ((Byte) (this.routeType)).compareTo((Byte) (((OSPFRouteTypeTlv) o).routeType));
+ return ((Byte) (this.routeType)).compareTo((Byte) (((OspfRouteTypeTlv) o).routeType));
}
@Override
@@ -165,4 +165,4 @@
.add("Value", routeType)
.toString();
}
-}
\ No newline at end of file
+}
diff --git a/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/attr/BgpPrefixAttrIgpFlags.java b/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/attr/BgpPrefixAttrIgpFlags.java
index 7f6f63f..04c2cfc 100644
--- a/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/attr/BgpPrefixAttrIgpFlags.java
+++ b/protocols/bgp/bgpio/src/main/java/org/onosproject/bgpio/types/attr/BgpPrefixAttrIgpFlags.java
@@ -15,8 +15,7 @@
*/
package org.onosproject.bgpio.types.attr;
-import java.util.Objects;
-
+import com.google.common.base.MoreObjects;
import org.jboss.netty.buffer.ChannelBuffer;
import org.onosproject.bgpio.exceptions.BgpParseException;
import org.onosproject.bgpio.types.BgpErrorType;
@@ -25,7 +24,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import com.google.common.base.MoreObjects;
+import java.util.Objects;
/**
* Implements BGP prefix IGP Flag attribute.
@@ -55,15 +54,15 @@
* @param bisisUpDownBit IS-IS Up/Down Bit
* @param bOspfNoUnicastBit OSPF no unicast Bit
* @param bOspfLclAddrBit OSPF local address Bit
- * @param bOspfNSSABit OSPF propagate NSSA Bit
+ * @param bOspfNssaBit OSPF propagate NSSA Bit
*/
public BgpPrefixAttrIgpFlags(boolean bisisUpDownBit,
boolean bOspfNoUnicastBit,
- boolean bOspfLclAddrBit, boolean bOspfNSSABit) {
+ boolean bOspfLclAddrBit, boolean bOspfNssaBit) {
this.bisisUpDownBit = bisisUpDownBit;
this.bOspfNoUnicastBit = bOspfNoUnicastBit;
this.bOspfLclAddrBit = bOspfLclAddrBit;
- this.bOspfNSSABit = bOspfNSSABit;
+ this.bOspfNSSABit = bOspfNssaBit;
}
/**
@@ -72,15 +71,15 @@
* @param bisisUpDownBit IS-IS Up/Down Bit
* @param bOspfNoUnicastBit OSPF no unicast Bit
* @param bOspfLclAddrBit OSPF local address Bit
- * @param bOspfNSSABit OSPF propagate NSSA Bit
+ * @param bOspfNssaBit OSPF propagate NSSA Bit
* @return object of BgpPrefixAttrIGPFlags
*/
public static BgpPrefixAttrIgpFlags of(final boolean bisisUpDownBit,
final boolean bOspfNoUnicastBit,
final boolean bOspfLclAddrBit,
- final boolean bOspfNSSABit) {
+ final boolean bOspfNssaBit) {
return new BgpPrefixAttrIgpFlags(bisisUpDownBit, bOspfNoUnicastBit,
- bOspfLclAddrBit, bOspfNSSABit);
+ bOspfLclAddrBit, bOspfNssaBit);
}
/**
@@ -95,7 +94,7 @@
boolean bisisUpDownBit = false;
boolean bOspfNoUnicastBit = false;
boolean bOspfLclAddrBit = false;
- boolean bOspfNSSABit = false;
+ boolean bOspfNssaBit = false;
short lsAttrLength = cb.readShort();
@@ -111,10 +110,10 @@
bisisUpDownBit = ((nodeFlagBits & FIRST_BIT) == FIRST_BIT);
bOspfNoUnicastBit = ((nodeFlagBits & SECOND_BIT) == SECOND_BIT);
bOspfLclAddrBit = ((nodeFlagBits & THIRD_BIT) == THIRD_BIT);
- bOspfNSSABit = ((nodeFlagBits & FOURTH_BIT) == FOURTH_BIT);
+ bOspfNssaBit = ((nodeFlagBits & FOURTH_BIT) == FOURTH_BIT);
return BgpPrefixAttrIgpFlags.of(bisisUpDownBit, bOspfNoUnicastBit,
- bOspfLclAddrBit, bOspfNSSABit);
+ bOspfLclAddrBit, bOspfNssaBit);
}
/**
@@ -149,7 +148,7 @@
*
* @return OSPF propagate NSSA Bit set or not
*/
- public boolean ospfNSSABit() {
+ public boolean ospfNssaBit() {
return bOspfNSSABit;
}
diff --git a/protocols/bgp/bgpio/src/test/java/org/onosproject/bgpio/protocol/BgpUpdateLinkStateAttrTest.java b/protocols/bgp/bgpio/src/test/java/org/onosproject/bgpio/protocol/BgpUpdateLinkStateAttrTest.java
index eda343f..3195d21 100644
--- a/protocols/bgp/bgpio/src/test/java/org/onosproject/bgpio/protocol/BgpUpdateLinkStateAttrTest.java
+++ b/protocols/bgp/bgpio/src/test/java/org/onosproject/bgpio/protocol/BgpUpdateLinkStateAttrTest.java
@@ -35,7 +35,7 @@
import org.onosproject.bgpio.types.Med;
import org.onosproject.bgpio.types.MpReachNlri;
import org.onosproject.bgpio.types.Origin;
-import org.onosproject.bgpio.types.Origin.ORIGINTYPE;
+import org.onosproject.bgpio.types.Origin.OriginType;
import org.onosproject.bgpio.types.attr.BgpAttrNodeFlagBitTlv;
import org.onosproject.bgpio.types.attr.BgpAttrNodeIsIsAreaId;
import org.onosproject.bgpio.types.attr.BgpAttrNodeMultiTopologyId;
@@ -132,7 +132,7 @@
BgpPathAttributes pathAttribute = other.bgpPathAttributes();
pathAttributeList = pathAttribute.pathAttributes();
ListIterator<BgpValueType> listIterator = pathAttributeList.listIterator();
- ORIGINTYPE originValue = org.onosproject.bgpio.types.Origin.ORIGINTYPE.IGP;
+ OriginType originValue = OriginType.IGP;
//compare Origin
testPathAttribute = listIterator.next();
@@ -250,7 +250,7 @@
BgpPathAttributes pathAttribute = other.bgpPathAttributes();
pathAttributeList = pathAttribute.pathAttributes();
ListIterator<BgpValueType> listIterator = pathAttributeList.listIterator();
- ORIGINTYPE originValue = org.onosproject.bgpio.types.Origin.ORIGINTYPE.IGP;
+ OriginType originValue = OriginType.IGP;
testPathAttribute = listIterator.next();
origin = (Origin) testPathAttribute;
@@ -363,7 +363,7 @@
BgpPathAttributes pathAttribute = other.bgpPathAttributes();
pathAttributeList = pathAttribute.pathAttributes();
ListIterator<BgpValueType> listIterator = pathAttributeList.listIterator();
- ORIGINTYPE originValue = org.onosproject.bgpio.types.Origin.ORIGINTYPE.IGP;
+ OriginType originValue = OriginType.IGP;
testPathAttribute = listIterator.next();
origin = (Origin) testPathAttribute;
@@ -477,7 +477,7 @@
BgpPathAttributes pathAttribute = other.bgpPathAttributes();
pathAttributeList = pathAttribute.pathAttributes();
ListIterator<BgpValueType> listIterator = pathAttributeList.listIterator();
- ORIGINTYPE originValue = org.onosproject.bgpio.types.Origin.ORIGINTYPE.IGP;
+ OriginType originValue = OriginType.IGP;
testPathAttribute = listIterator.next();
origin = (Origin) testPathAttribute;
@@ -594,7 +594,7 @@
BgpPathAttributes pathAttribute = other.bgpPathAttributes();
pathAttributeList = pathAttribute.pathAttributes();
ListIterator<BgpValueType> listIterator = pathAttributeList.listIterator();
- ORIGINTYPE originValue = org.onosproject.bgpio.types.Origin.ORIGINTYPE.IGP;
+ OriginType originValue = OriginType.IGP;
testPathAttribute = listIterator.next();
origin = (Origin) testPathAttribute;
@@ -713,7 +713,7 @@
pathAttributeList = pathAttribute.pathAttributes();
ListIterator<BgpValueType> listIterator = pathAttributeList.listIterator();
- ORIGINTYPE originValue = org.onosproject.bgpio.types.Origin.ORIGINTYPE.IGP;
+ OriginType originValue = OriginType.IGP;
testPathAttribute = listIterator.next();
origin = (Origin) testPathAttribute;
@@ -827,7 +827,7 @@
BgpPathAttributes pathAttribute = other.bgpPathAttributes();
pathAttributeList = pathAttribute.pathAttributes();
ListIterator<BgpValueType> listIterator = pathAttributeList.listIterator();
- ORIGINTYPE originValue = org.onosproject.bgpio.types.Origin.ORIGINTYPE.IGP;
+ OriginType originValue = OriginType.IGP;
testPathAttribute = listIterator.next();
origin = (Origin) testPathAttribute;
@@ -945,7 +945,7 @@
BgpPathAttributes pathAttribute = other.bgpPathAttributes();
pathAttributeList = pathAttribute.pathAttributes();
ListIterator<BgpValueType> listIterator = pathAttributeList.listIterator();
- ORIGINTYPE originValue = org.onosproject.bgpio.types.Origin.ORIGINTYPE.IGP;
+ OriginType originValue = OriginType.IGP;
testPathAttribute = listIterator.next();
origin = (Origin) testPathAttribute;
@@ -1063,7 +1063,7 @@
BgpPathAttributes pathAttribute = other.bgpPathAttributes();
pathAttributeList = pathAttribute.pathAttributes();
ListIterator<BgpValueType> listIterator = pathAttributeList.listIterator();
- ORIGINTYPE originValue = org.onosproject.bgpio.types.Origin.ORIGINTYPE.IGP;
+ OriginType originValue = OriginType.IGP;
testPathAttribute = listIterator.next();
origin = (Origin) testPathAttribute;
@@ -1175,7 +1175,7 @@
BgpPathAttributes pathAttribute = other.bgpPathAttributes();
pathAttributeList = pathAttribute.pathAttributes();
ListIterator<BgpValueType> listIterator = pathAttributeList.listIterator();
- ORIGINTYPE originValue = org.onosproject.bgpio.types.Origin.ORIGINTYPE.IGP;
+ OriginType originValue = OriginType.IGP;
testPathAttribute = listIterator.next();
origin = (Origin) testPathAttribute;
@@ -1288,7 +1288,7 @@
BgpPathAttributes pathAttribute = other.bgpPathAttributes();
pathAttributeList = pathAttribute.pathAttributes();
ListIterator<BgpValueType> listIterator = pathAttributeList.listIterator();
- ORIGINTYPE originValue = org.onosproject.bgpio.types.Origin.ORIGINTYPE.IGP;
+ OriginType originValue = OriginType.IGP;
testPathAttribute = listIterator.next();
origin = (Origin) testPathAttribute;
@@ -1400,7 +1400,7 @@
BgpPathAttributes pathAttribute = other.bgpPathAttributes();
pathAttributeList = pathAttribute.pathAttributes();
ListIterator<BgpValueType> listIterator = pathAttributeList.listIterator();
- ORIGINTYPE originValue = org.onosproject.bgpio.types.Origin.ORIGINTYPE.IGP;
+ OriginType originValue = OriginType.IGP;
testPathAttribute = listIterator.next();
origin = (Origin) testPathAttribute;
@@ -1513,7 +1513,7 @@
BgpPathAttributes pathAttribute = other.bgpPathAttributes();
pathAttributeList = pathAttribute.pathAttributes();
ListIterator<BgpValueType> listIterator = pathAttributeList.listIterator();
- ORIGINTYPE originValue = org.onosproject.bgpio.types.Origin.ORIGINTYPE.IGP;
+ OriginType originValue = OriginType.IGP;
testPathAttribute = listIterator.next();
origin = (Origin) testPathAttribute;
@@ -1626,7 +1626,7 @@
BgpPathAttributes pathAttribute = other.bgpPathAttributes();
pathAttributeList = pathAttribute.pathAttributes();
ListIterator<BgpValueType> listIterator = pathAttributeList.listIterator();
- ORIGINTYPE originValue = org.onosproject.bgpio.types.Origin.ORIGINTYPE.IGP;
+ OriginType originValue = OriginType.IGP;
testPathAttribute = listIterator.next();
origin = (Origin) testPathAttribute;
@@ -1739,7 +1739,7 @@
BgpPathAttributes pathAttribute = other.bgpPathAttributes();
pathAttributeList = pathAttribute.pathAttributes();
ListIterator<BgpValueType> listIterator = pathAttributeList.listIterator();
- ORIGINTYPE originValue = org.onosproject.bgpio.types.Origin.ORIGINTYPE.IGP;
+ OriginType originValue = OriginType.IGP;
testPathAttribute = listIterator.next();
origin = (Origin) testPathAttribute;
@@ -1840,7 +1840,7 @@
BgpPathAttributes pathAttribute = other.bgpPathAttributes();
pathAttributeList = pathAttribute.pathAttributes();
ListIterator<BgpValueType> listIterator = pathAttributeList.listIterator();
- ORIGINTYPE originValue = org.onosproject.bgpio.types.Origin.ORIGINTYPE.IGP;
+ OriginType originValue = OriginType.IGP;
testPathAttribute = listIterator.next();
origin = (Origin) testPathAttribute;
@@ -1935,7 +1935,7 @@
BgpPathAttributes pathAttribute = other.bgpPathAttributes();
pathAttributeList = pathAttribute.pathAttributes();
ListIterator<BgpValueType> listIterator = pathAttributeList.listIterator();
- ORIGINTYPE originValue = org.onosproject.bgpio.types.Origin.ORIGINTYPE.IGP;
+ OriginType originValue = OriginType.IGP;
testPathAttribute = listIterator.next();
origin = (Origin) testPathAttribute;
diff --git a/protocols/bgp/bgpio/src/test/java/org/onosproject/bgpio/protocol/BgpUpdateMsgTest.java b/protocols/bgp/bgpio/src/test/java/org/onosproject/bgpio/protocol/BgpUpdateMsgTest.java
index bc9fef2..7170947 100644
--- a/protocols/bgp/bgpio/src/test/java/org/onosproject/bgpio/protocol/BgpUpdateMsgTest.java
+++ b/protocols/bgp/bgpio/src/test/java/org/onosproject/bgpio/protocol/BgpUpdateMsgTest.java
@@ -16,10 +16,6 @@
package org.onosproject.bgpio.protocol;
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.Matchers.instanceOf;
-import static org.hamcrest.core.Is.is;
-
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBuffers;
import org.junit.Test;
@@ -43,13 +39,13 @@
import org.onosproject.bgpio.types.IsIsNonPseudonode;
import org.onosproject.bgpio.types.IsIsPseudonode;
import org.onosproject.bgpio.types.LinkStateAttributes;
+import org.onosproject.bgpio.types.LocalPref;
import org.onosproject.bgpio.types.Med;
import org.onosproject.bgpio.types.MpReachNlri;
import org.onosproject.bgpio.types.MpUnReachNlri;
-import org.onosproject.bgpio.types.Origin;
import org.onosproject.bgpio.types.NextHop;
-import org.onosproject.bgpio.types.LocalPref;
-import org.onosproject.bgpio.types.Origin.ORIGINTYPE;
+import org.onosproject.bgpio.types.Origin;
+import org.onosproject.bgpio.types.Origin.OriginType;
import org.onosproject.bgpio.types.attr.BgpAttrRouterIdV4;
import org.onosproject.bgpio.types.attr.BgpLinkAttrName;
import org.onosproject.bgpio.types.attr.BgpPrefixAttrExtRouteTag;
@@ -61,6 +57,10 @@
import java.util.List;
import java.util.ListIterator;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.instanceOf;
+import static org.hamcrest.core.Is.is;
+
/**
* Test cases for BGP update Message.
*/
@@ -255,7 +255,7 @@
BgpPathAttributes actualpathAttribute = other.bgpPathAttributes();
pathAttributes = actualpathAttribute.pathAttributes();
ListIterator<BgpValueType> listIterator = pathAttributes.listIterator();
- ORIGINTYPE originValue = org.onosproject.bgpio.types.Origin.ORIGINTYPE.IGP;
+ OriginType originValue = OriginType.IGP;
testPathAttribute = listIterator.next();
origin = (Origin) testPathAttribute;
@@ -639,7 +639,7 @@
BgpPathAttributes actualpathAttribute = other.bgpPathAttributes();
pathAttributes = actualpathAttribute.pathAttributes();
ListIterator<BgpValueType> listIterator = pathAttributes.listIterator();
- ORIGINTYPE originValue = org.onosproject.bgpio.types.Origin.ORIGINTYPE.IGP;
+ OriginType originValue = OriginType.IGP;
testPathAttribute = listIterator.next();
origin = (Origin) testPathAttribute;
@@ -684,13 +684,13 @@
assertThat(testAutonomousSystemTlv.getAsNum(), is(2222));
assertThat(testAutonomousSystemTlv.getType(), is((short) 512));
- BgpLSIdentifierTlv testBGPLSIdentifierTlv = (BgpLSIdentifierTlv) subtlvlist1.next();
- assertThat(testBGPLSIdentifierTlv.getBgpLsIdentifier(), is(33686018));
- assertThat(testBGPLSIdentifierTlv.getType(), is((short) 513));
+ BgpLSIdentifierTlv testBgpLsIdentifierTlv = (BgpLSIdentifierTlv) subtlvlist1.next();
+ assertThat(testBgpLsIdentifierTlv.getBgpLsIdentifier(), is(33686018));
+ assertThat(testBgpLsIdentifierTlv.getType(), is((short) 513));
IsIsNonPseudonode testIsIsNonPseudonode = (IsIsNonPseudonode) subtlvlist1.next();
- byte[] expISONodeID = new byte[] {0x19, 0x00, (byte) 0x95, 0x01, (byte) 0x90, 0x58};
- assertThat(testIsIsNonPseudonode.getISONodeID(), is(expISONodeID));
+ byte[] expIsoNodeId = new byte[] {0x19, 0x00, (byte) 0x95, 0x01, (byte) 0x90, 0x58};
+ assertThat(testIsIsNonPseudonode.getIsoNodeId(), is(expIsoNodeId));
assertThat(testIsIsNonPseudonode.getType(), is((short) 515));
}
@@ -763,7 +763,7 @@
BgpPathAttributes actualpathAttribute = other.bgpPathAttributes();
pathAttributes = actualpathAttribute.pathAttributes();
ListIterator<BgpValueType> listIterator = pathAttributes.listIterator();
- ORIGINTYPE originValue = org.onosproject.bgpio.types.Origin.ORIGINTYPE.IGP;
+ OriginType originValue = OriginType.IGP;
testPathAttribute = listIterator.next();
origin = (Origin) testPathAttribute;
@@ -807,13 +807,13 @@
assertThat(testAutonomousSystemTlv.getAsNum(), is(2222));
assertThat(testAutonomousSystemTlv.getType(), is((short) 512));
- BgpLSIdentifierTlv testBGPLSIdentifierTlv = (BgpLSIdentifierTlv) subtlvlist1.next();
- assertThat(testBGPLSIdentifierTlv.getBgpLsIdentifier(), is(33686018));
- assertThat(testBGPLSIdentifierTlv.getType(), is((short) 513));
+ BgpLSIdentifierTlv testBgpLsIdentifierTlv = (BgpLSIdentifierTlv) subtlvlist1.next();
+ assertThat(testBgpLsIdentifierTlv.getBgpLsIdentifier(), is(33686018));
+ assertThat(testBgpLsIdentifierTlv.getType(), is((short) 513));
IsIsNonPseudonode testIsIsNonPseudonode = (IsIsNonPseudonode) subtlvlist1.next();
- byte[] expISONodeID = new byte[] {0x19, 0x21, 0x68, 0x07, 0x70, 0x01};
- assertThat(testIsIsNonPseudonode.getISONodeID(), is(expISONodeID));
+ byte[] expIsoNodeId = new byte[] {0x19, 0x21, 0x68, 0x07, 0x70, 0x01};
+ assertThat(testIsIsNonPseudonode.getIsoNodeId(), is(expIsoNodeId));
assertThat(testIsIsNonPseudonode.getType(), is((short) 515));
List<BgpValueType> testPrefixDescriptors = new LinkedList<>();
@@ -885,7 +885,7 @@
BgpPathAttributes actualpathAttribute = other.bgpPathAttributes();
pathAttributes = actualpathAttribute.pathAttributes();
ListIterator<BgpValueType> listIterator = pathAttributes.listIterator();
- ORIGINTYPE originValue = org.onosproject.bgpio.types.Origin.ORIGINTYPE.IGP;
+ OriginType originValue = OriginType.IGP;
testPathAttribute = listIterator.next();
origin = (Origin) testPathAttribute;
@@ -930,12 +930,12 @@
assertThat(testAutonomousSystemTlv.getAsNum(), is(2222));
assertThat(testAutonomousSystemTlv.getType(), is((short) 512));
- BgpLSIdentifierTlv testBGPLSIdentifierTlv = (BgpLSIdentifierTlv) subtlvlist1.next();
- assertThat(testBGPLSIdentifierTlv.getBgpLsIdentifier(), is(33686018));
- assertThat(testBGPLSIdentifierTlv.getType(), is((short) 513));
+ BgpLSIdentifierTlv testBgpLsIdentifierTlv = (BgpLSIdentifierTlv) subtlvlist1.next();
+ assertThat(testBgpLsIdentifierTlv.getBgpLsIdentifier(), is(33686018));
+ assertThat(testBgpLsIdentifierTlv.getType(), is((short) 513));
IsIsPseudonode testIsIsPseudonode = (IsIsPseudonode) subtlvlist1.next();
- assertThat(testIsIsPseudonode.getPSNIdentifier(), is((byte) 3));
+ assertThat(testIsIsPseudonode.getPsnIdentifier(), is((byte) 3));
assertThat(testIsIsPseudonode.getType(), is((short) 515));
NodeDescriptors testRemoteNodeDescriptors = testlinknlri.remoteNodeDescriptors();
@@ -947,13 +947,13 @@
assertThat(testAutonomousSystemTlv.getAsNum(), is(2222));
assertThat(testAutonomousSystemTlv.getType(), is((short) 512));
- testBGPLSIdentifierTlv = (BgpLSIdentifierTlv) subtlvlist2.next();
- assertThat(testBGPLSIdentifierTlv.getBgpLsIdentifier(), is(33686018));
- assertThat(testBGPLSIdentifierTlv.getType(), is((short) 513));
+ testBgpLsIdentifierTlv = (BgpLSIdentifierTlv) subtlvlist2.next();
+ assertThat(testBgpLsIdentifierTlv.getBgpLsIdentifier(), is(33686018));
+ assertThat(testBgpLsIdentifierTlv.getType(), is((short) 513));
IsIsNonPseudonode testIsIsNonPseudonode = (IsIsNonPseudonode) subtlvlist2.next();
- byte[] expISONodeID = new byte[] {0x19, 0x00, (byte) 0x95, 0x02, 0x50, 0x21};
- assertThat(testIsIsNonPseudonode.getISONodeID(), is(expISONodeID));
+ byte[] expIsoNodeId = new byte[] {0x19, 0x00, (byte) 0x95, 0x02, 0x50, 0x21};
+ assertThat(testIsIsNonPseudonode.getIsoNodeId(), is(expIsoNodeId));
assertThat(testIsIsNonPseudonode.getType(), is((short) 515));
}
@@ -1231,7 +1231,7 @@
BgpPathAttributes actualpathAttribute = other.bgpPathAttributes();
pathAttributes = actualpathAttribute.pathAttributes();
ListIterator<BgpValueType> listIterator = pathAttributes.listIterator();
- ORIGINTYPE originValue = org.onosproject.bgpio.types.Origin.ORIGINTYPE.IGP;
+ OriginType originValue = OriginType.IGP;
testPathAttribute = listIterator.next();
origin = (Origin) testPathAttribute;
@@ -1239,7 +1239,7 @@
testPathAttribute = listIterator.next();
as4Path = (As4Path) testPathAttribute;
- ListIterator<Integer> listIterator2 = as4Path.as4PathSEQ().listIterator();
+ ListIterator<Integer> listIterator2 = as4Path.as4PathSeq().listIterator();
assertThat(listIterator2.next(), is(655361));
testPathAttribute = listIterator.next();
@@ -1309,7 +1309,7 @@
BgpPathAttributes actualpathAttribute = other.bgpPathAttributes();
pathAttributes = actualpathAttribute.pathAttributes();
ListIterator<BgpValueType> listIterator = pathAttributes.listIterator();
- ORIGINTYPE originValue = org.onosproject.bgpio.types.Origin.ORIGINTYPE.IGP;
+ OriginType originValue = OriginType.IGP;
testPathAttribute = listIterator.next();
origin = (Origin) testPathAttribute;
@@ -1355,13 +1355,13 @@
assertThat(testAutonomousSystemTlv.getAsNum(), is(2222));
assertThat(testAutonomousSystemTlv.getType(), is((short) 512));
- BgpLSIdentifierTlv testBGPLSIdentifierTlv = (BgpLSIdentifierTlv) subtlvlist1.next();
- assertThat(testBGPLSIdentifierTlv.getBgpLsIdentifier(), is(33686018));
- assertThat(testBGPLSIdentifierTlv.getType(), is((short) 513));
+ BgpLSIdentifierTlv testBgpLsIdentifierTlv = (BgpLSIdentifierTlv) subtlvlist1.next();
+ assertThat(testBgpLsIdentifierTlv.getBgpLsIdentifier(), is(33686018));
+ assertThat(testBgpLsIdentifierTlv.getType(), is((short) 513));
IsIsNonPseudonode testIsIsNonPseudonode = (IsIsNonPseudonode) subtlvlist1.next();
- byte[] expISONodeID = new byte[] {0x19, 0x00, (byte) 0x95, 0x01, (byte) 0x90, 0x58};
- assertThat(testIsIsNonPseudonode.getISONodeID(), is(expISONodeID));
+ byte[] expIsoNodeId = new byte[] {0x19, 0x00, (byte) 0x95, 0x01, (byte) 0x90, 0x58};
+ assertThat(testIsIsNonPseudonode.getIsoNodeId(), is(expIsoNodeId));
assertThat(testIsIsNonPseudonode.getType(), is((short) 515));
}
@@ -1753,7 +1753,7 @@
BgpPathAttributes pathAttribute = other.bgpPathAttributes();
pathAttributeList = pathAttribute.pathAttributes();
ListIterator<BgpValueType> listIterator = pathAttributeList.listIterator();
- ORIGINTYPE originValue = org.onosproject.bgpio.types.Origin.ORIGINTYPE.IGP;
+ OriginType originValue = OriginType.IGP;
testPathAttribute = listIterator.next();
origin = (Origin) testPathAttribute;
@@ -1857,7 +1857,7 @@
BgpPathAttributes pathAttribute = other.bgpPathAttributes();
pathAttributeList = pathAttribute.pathAttributes();
ListIterator<BgpValueType> listIterator = pathAttributeList.listIterator();
- ORIGINTYPE originValue = org.onosproject.bgpio.types.Origin.ORIGINTYPE.IGP;
+ OriginType originValue = OriginType.IGP;
testPathAttribute = listIterator.next();
origin = (Origin) testPathAttribute;
@@ -1954,7 +1954,7 @@
BgpPathAttributes pathAttribute = other.bgpPathAttributes();
pathAttributeList = pathAttribute.pathAttributes();
ListIterator<BgpValueType> listIterator = pathAttributeList.listIterator();
- ORIGINTYPE originValue = org.onosproject.bgpio.types.Origin.ORIGINTYPE.IGP;
+ OriginType originValue = OriginType.IGP;
testPathAttribute = listIterator.next();
origin = (Origin) testPathAttribute;
diff --git a/protocols/bgp/bgpio/src/test/java/org/onosproject/bgpio/types/OspfPseudonodeTest.java b/protocols/bgp/bgpio/src/test/java/org/onosproject/bgpio/types/OspfPseudonodeTest.java
index a800231..042447c 100644
--- a/protocols/bgp/bgpio/src/test/java/org/onosproject/bgpio/types/OspfPseudonodeTest.java
+++ b/protocols/bgp/bgpio/src/test/java/org/onosproject/bgpio/types/OspfPseudonodeTest.java
@@ -28,9 +28,9 @@
private final int value2 = 0xc3223406;
private final Ip4Address drInterface1 = Ip4Address.valueOf(0xaf91e01);
private final Ip4Address drInterface2 = Ip4Address.valueOf(0xaf91e02);
- private final OSPFPseudonode tlv1 = OSPFPseudonode.of(value1, drInterface1);
- private final OSPFPseudonode sameAsTlv1 = OSPFPseudonode.of(value1, drInterface1);
- private final OSPFPseudonode tlv2 = OSPFPseudonode.of(value2, drInterface2);
+ private final OspfPseudonode tlv1 = OspfPseudonode.of(value1, drInterface1);
+ private final OspfPseudonode sameAsTlv1 = OspfPseudonode.of(value1, drInterface1);
+ private final OspfPseudonode tlv2 = OspfPseudonode.of(value2, drInterface2);
@Test
public void testEquality() {
diff --git a/protocols/bgp/bgpio/src/test/java/org/onosproject/bgpio/types/OspfRouteTypeTest.java b/protocols/bgp/bgpio/src/test/java/org/onosproject/bgpio/types/OspfRouteTypeTest.java
index 859bdbe..6ea31ea 100644
--- a/protocols/bgp/bgpio/src/test/java/org/onosproject/bgpio/types/OspfRouteTypeTest.java
+++ b/protocols/bgp/bgpio/src/test/java/org/onosproject/bgpio/types/OspfRouteTypeTest.java
@@ -25,9 +25,9 @@
public class OspfRouteTypeTest {
private final byte value1 = 5;
private final byte value2 = 4;
- private final OSPFRouteTypeTlv tlv1 = OSPFRouteTypeTlv.of(value1);
- private final OSPFRouteTypeTlv sameAsTlv1 = OSPFRouteTypeTlv.of(value1);
- private final OSPFRouteTypeTlv tlv2 = OSPFRouteTypeTlv.of(value2);
+ private final OspfRouteTypeTlv tlv1 = OspfRouteTypeTlv.of(value1);
+ private final OspfRouteTypeTlv sameAsTlv1 = OspfRouteTypeTlv.of(value1);
+ private final OspfRouteTypeTlv tlv2 = OspfRouteTypeTlv.of(value2);
@Test
public void testEquality() {
diff --git a/protocols/bgp/ctl/src/main/java/org/onosproject/bgp/controller/impl/BgpChannelHandler.java b/protocols/bgp/ctl/src/main/java/org/onosproject/bgp/controller/impl/BgpChannelHandler.java
index 73c9511..8ffbaa7 100755
--- a/protocols/bgp/ctl/src/main/java/org/onosproject/bgp/controller/impl/BgpChannelHandler.java
+++ b/protocols/bgp/ctl/src/main/java/org/onosproject/bgp/controller/impl/BgpChannelHandler.java
@@ -16,18 +16,6 @@
package org.onosproject.bgp.controller.impl;
-import java.io.IOException;
-import java.net.InetAddress;
-import java.net.InetSocketAddress;
-import java.net.SocketAddress;
-import java.net.UnknownHostException;
-import java.nio.channels.ClosedChannelException;
-import java.util.Collections;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.ListIterator;
-import java.util.concurrent.RejectedExecutionException;
-
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBuffers;
import org.jboss.netty.channel.Channel;
@@ -59,6 +47,18 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.io.IOException;
+import java.net.InetAddress;
+import java.net.InetSocketAddress;
+import java.net.SocketAddress;
+import java.net.UnknownHostException;
+import java.nio.channels.ClosedChannelException;
+import java.util.Collections;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.ListIterator;
+import java.util.concurrent.RejectedExecutionException;
+
/**
* Channel handler deals with the bgp peer connection and dispatches messages from peer to the appropriate locations.
*/
@@ -95,7 +95,7 @@
// proceeds to cleaup peer state - we need to ensure that it does not
// cleanup
// peer state for the older (still connected) peer
- private volatile Boolean duplicateBGPIdFound;
+ private volatile Boolean duplicateBgpIdFound;
// Indicates the bgp version used by this bgp peer
protected BgpVersion bgpVersion;
private BgpController bgpController;
@@ -119,7 +119,7 @@
this.peerManager = (BgpPeerManagerImpl) bgpController.peerManager();
this.state = ChannelState.IDLE;
this.factory4 = Controller.getBgpMessageFactory4();
- this.duplicateBGPIdFound = Boolean.FALSE;
+ this.duplicateBgpIdFound = Boolean.FALSE;
this.bgpPacketStats = new BgpPacketStatsImpl();
this.bgpconfig = bgpController.getConfig();
}
@@ -344,7 +344,7 @@
protected void disconnectDuplicate(BgpChannelHandler h) {
log.error("Duplicated BGP IP or incompleted cleanup - " + "" + "disconnecting channel {}",
h.getPeerInfoString());
- h.duplicateBGPIdFound = Boolean.TRUE;
+ h.duplicateBgpIdFound = Boolean.TRUE;
h.channel.disconnect();
}
@@ -438,7 +438,7 @@
peerAddr = IpAddress.valueOf(inetAddress.getAddress()).toString();
if (thisbgpId != null) {
- if (!duplicateBGPIdFound) {
+ if (!duplicateBgpIdFound) {
// if the disconnected peer (on this ChannelHandler)
// was not one with a duplicate, it is safe to remove all
// state for it at the controller. Notice that if the disconnected
@@ -449,7 +449,7 @@
if (bgpPeer != null) {
BgpPeerImpl peer = (BgpPeerImpl) bgpPeer;
peerManager.removeConnectedPeer(thisbgpId);
- peer.updateLocalRIBOnPeerDisconnect();
+ peer.updateLocalRibOnPeerDisconnect();
}
// Retry connection if connection is lost to bgp speaker/peer
@@ -475,7 +475,7 @@
// this is the same peer reconnecting, but the original state was
// not cleaned up - XXX check liveness of original ChannelHandler
log.debug("{}:duplicate found", getPeerInfoString());
- duplicateBGPIdFound = Boolean.FALSE;
+ duplicateBgpIdFound = Boolean.FALSE;
}
stopKeepAliveTimer();
@@ -610,7 +610,7 @@
*/
private void dispatchMessage(BgpMessage m) throws BgpParseException {
bgpPacketStats.addInPacket();
- bgpController.processBGPPacket(thisbgpId, m);
+ bgpController.processBgpPacket(thisbgpId, m);
}
/**
diff --git a/protocols/bgp/ctl/src/main/java/org/onosproject/bgp/controller/impl/BgpControllerImpl.java b/protocols/bgp/ctl/src/main/java/org/onosproject/bgp/controller/impl/BgpControllerImpl.java
index 51ab68b..f2ae36e 100755
--- a/protocols/bgp/ctl/src/main/java/org/onosproject/bgp/controller/impl/BgpControllerImpl.java
+++ b/protocols/bgp/ctl/src/main/java/org/onosproject/bgp/controller/impl/BgpControllerImpl.java
@@ -16,14 +16,6 @@
package org.onosproject.bgp.controller.impl;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.CopyOnWriteArraySet;
-import java.util.concurrent.locks.Lock;
-import java.util.concurrent.locks.ReentrantLock;
-
import org.apache.felix.scr.annotations.Activate;
import org.apache.felix.scr.annotations.Component;
import org.apache.felix.scr.annotations.Deactivate;
@@ -32,8 +24,8 @@
import org.onosproject.bgp.controller.BgpController;
import org.onosproject.bgp.controller.BgpId;
import org.onosproject.bgp.controller.BgpLocalRib;
-import org.onosproject.bgp.controller.BgpPeer;
import org.onosproject.bgp.controller.BgpNodeListener;
+import org.onosproject.bgp.controller.BgpPeer;
import org.onosproject.bgp.controller.BgpPeerManager;
import org.onosproject.bgpio.exceptions.BgpParseException;
import org.onosproject.bgpio.protocol.BgpMessage;
@@ -44,6 +36,14 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.CopyOnWriteArraySet;
+import java.util.concurrent.locks.Lock;
+import java.util.concurrent.locks.ReentrantLock;
+
@Component(immediate = true)
@Service
public class BgpControllerImpl implements BgpController {
@@ -54,8 +54,8 @@
protected BgpPeerManagerImpl peerManager = new BgpPeerManagerImpl();
- private BgpLocalRib bgplocalRIB = new BgpLocalRibImpl(this);
- private BgpLocalRib bgplocalRIBVpn = new BgpLocalRibImpl(this);
+ private BgpLocalRib bgplocalRib = new BgpLocalRibImpl(this);
+ private BgpLocalRib bgplocalRibVpn = new BgpLocalRibImpl(this);
protected Set<BgpNodeListener> bgpNodeListener = new CopyOnWriteArraySet<>();
@@ -108,7 +108,7 @@
}
@Override
- public void processBGPPacket(BgpId bgpId, BgpMessage msg) throws BgpParseException {
+ public void processBgpPacket(BgpId bgpId, BgpMessage msg) throws BgpParseException {
BgpPeer peer = getPeer(bgpId);
@@ -251,7 +251,7 @@
*/
@Override
public BgpLocalRib bgpLocalRib() {
- return bgplocalRIB;
+ return bgplocalRib;
}
/**
@@ -261,6 +261,6 @@
*/
@Override
public BgpLocalRib bgpLocalRibVpn() {
- return bgplocalRIBVpn;
+ return bgplocalRibVpn;
}
}
diff --git a/protocols/bgp/ctl/src/main/java/org/onosproject/bgp/controller/impl/BgpLocalRibImpl.java b/protocols/bgp/ctl/src/main/java/org/onosproject/bgp/controller/impl/BgpLocalRibImpl.java
index 44b1905..c4773ff 100755
--- a/protocols/bgp/ctl/src/main/java/org/onosproject/bgp/controller/impl/BgpLocalRibImpl.java
+++ b/protocols/bgp/ctl/src/main/java/org/onosproject/bgp/controller/impl/BgpLocalRibImpl.java
@@ -13,10 +13,7 @@
package org.onosproject.bgp.controller.impl;
-import java.util.Map;
-import java.util.Set;
-import java.util.TreeMap;
-
+import com.google.common.base.MoreObjects;
import org.onosproject.bgp.controller.BgpController;
import org.onosproject.bgp.controller.BgpId;
import org.onosproject.bgp.controller.BgpLocalRib;
@@ -35,8 +32,11 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.util.Map;
+import java.util.Set;
+import java.util.TreeMap;
+
import static com.google.common.base.Preconditions.checkNotNull;
-import com.google.common.base.MoreObjects;
/**
* Implementation of local RIB.
@@ -447,7 +447,7 @@
*
* @param o adjacency-in/VPN adjacency-in
*/
- public void localRIBUpdateNode(Object o) {
+ public void localRibUpdateNode(Object o) {
if (o instanceof AdjRibIn) {
AdjRibIn adjRib = (AdjRibIn) o;
@@ -488,7 +488,7 @@
*
* @param o adjacency-in/VPN adjacency-in
*/
- public void localRIBUpdateLink(Object o) {
+ public void localRibUpdateLink(Object o) {
if (o instanceof AdjRibIn) {
AdjRibIn adjRib = (AdjRibIn) o;
@@ -529,7 +529,7 @@
*
* @param o instance of adjacency-in/VPN adjacency-in
*/
- public void localRIBUpdatePrefix(Object o) {
+ public void localRibUpdatePrefix(Object o) {
if (o instanceof AdjRibIn) {
AdjRibIn adjRib = (AdjRibIn) o;
@@ -573,12 +573,12 @@
*
* @param adjRibIn adjacency RIB-in
*/
- public void localRIBUpdate(AdjRibIn adjRibIn) {
+ public void localRibUpdate(AdjRibIn adjRibIn) {
log.debug("Update local RIB.");
- localRIBUpdateNode(adjRibIn);
- localRIBUpdateLink(adjRibIn);
- localRIBUpdatePrefix(adjRibIn);
+ localRibUpdateNode(adjRibIn);
+ localRibUpdateLink(adjRibIn);
+ localRibUpdatePrefix(adjRibIn);
}
/**
@@ -586,12 +586,12 @@
*
* @param vpnAdjRibIn VPN adjacency RIB-in
*/
- public void localRIBUpdate(VpnAdjRibIn vpnAdjRibIn) {
+ public void localRibUpdate(VpnAdjRibIn vpnAdjRibIn) {
log.debug("Update VPN local RIB.");
- localRIBUpdateNode(vpnAdjRibIn);
- localRIBUpdateLink(vpnAdjRibIn);
- localRIBUpdatePrefix(vpnAdjRibIn);
+ localRibUpdateNode(vpnAdjRibIn);
+ localRibUpdateLink(vpnAdjRibIn);
+ localRibUpdatePrefix(vpnAdjRibIn);
}
@Override
diff --git a/protocols/bgp/ctl/src/main/java/org/onosproject/bgp/controller/impl/BgpPeerImpl.java b/protocols/bgp/ctl/src/main/java/org/onosproject/bgp/controller/impl/BgpPeerImpl.java
index e3f09f3..8e42208 100644
--- a/protocols/bgp/ctl/src/main/java/org/onosproject/bgp/controller/impl/BgpPeerImpl.java
+++ b/protocols/bgp/ctl/src/main/java/org/onosproject/bgp/controller/impl/BgpPeerImpl.java
@@ -16,27 +16,21 @@
package org.onosproject.bgp.controller.impl;
-import java.net.InetSocketAddress;
-import java.net.SocketAddress;
-import java.util.Collections;
-import java.util.List;
-import java.util.ListIterator;
-import java.util.concurrent.RejectedExecutionException;
-
+import com.google.common.base.MoreObjects;
import org.jboss.netty.channel.Channel;
import org.onlab.packet.IpAddress;
import org.onosproject.bgp.controller.BgpController;
+import org.onosproject.bgp.controller.BgpLocalRib;
import org.onosproject.bgp.controller.BgpPeer;
import org.onosproject.bgp.controller.BgpSessionInfo;
-import org.onosproject.bgp.controller.BgpLocalRib;
import org.onosproject.bgpio.exceptions.BgpParseException;
import org.onosproject.bgpio.protocol.BgpFactories;
import org.onosproject.bgpio.protocol.BgpFactory;
import org.onosproject.bgpio.protocol.BgpLSNlri;
import org.onosproject.bgpio.protocol.BgpMessage;
+import org.onosproject.bgpio.protocol.linkstate.BgpLinkLsNlriVer4;
import org.onosproject.bgpio.protocol.linkstate.BgpNodeLSNlriVer4;
import org.onosproject.bgpio.protocol.linkstate.BgpPrefixIPv4LSNlriVer4;
-import org.onosproject.bgpio.protocol.linkstate.BgpLinkLsNlriVer4;
import org.onosproject.bgpio.protocol.linkstate.PathAttrNlriDetails;
import org.onosproject.bgpio.types.BgpValueType;
import org.onosproject.bgpio.types.MpReachNlri;
@@ -44,7 +38,12 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import com.google.common.base.MoreObjects;
+import java.net.InetSocketAddress;
+import java.net.SocketAddress;
+import java.util.Collections;
+import java.util.List;
+import java.util.ListIterator;
+import java.util.concurrent.RejectedExecutionException;
/**
* BGPPeerImpl implements BGPPeer, maintains peer information and store updates in RIB .
@@ -62,8 +61,8 @@
protected boolean isHandShakeComplete = false;
private BgpSessionInfo sessionInfo;
private BgpPacketStatsImpl pktStats;
- private BgpLocalRib bgplocalRIB;
- private BgpLocalRib bgplocalRIBVpn;
+ private BgpLocalRib bgplocalRib;
+ private BgpLocalRib bgplocalRibVpn;
private AdjRibIn adjRib;
private VpnAdjRibIn vpnAdjRib;
@@ -101,8 +100,8 @@
this.bgpController = bgpController;
this.sessionInfo = sessionInfo;
this.pktStats = pktStats;
- this.bgplocalRIB = bgpController.bgpLocalRib();
- this.bgplocalRIBVpn = bgpController.bgpLocalRibVpn();
+ this.bgplocalRib = bgpController.bgpLocalRib();
+ this.bgplocalRibVpn = bgpController.bgpLocalRibVpn();
this.adjRib = new AdjRibIn();
this.vpnAdjRib = new VpnAdjRibIn();
}
@@ -141,30 +140,30 @@
PathAttrNlriDetails details = setPathAttrDetails(nlriInfo, pathAttr);
if (!((BgpNodeLSNlriVer4) nlriInfo).isVpnPresent()) {
adjRib.add(nlriInfo, details);
- bgplocalRIB.add(sessionInfo(), nlriInfo, details);
+ bgplocalRib.add(sessionInfo(), nlriInfo, details);
} else {
vpnAdjRib.addVpn(nlriInfo, details, ((BgpNodeLSNlriVer4) nlriInfo).getRouteDistinguisher());
- bgplocalRIBVpn.add(sessionInfo(), nlriInfo, details,
+ bgplocalRibVpn.add(sessionInfo(), nlriInfo, details,
((BgpNodeLSNlriVer4) nlriInfo).getRouteDistinguisher());
}
} else if (nlriInfo instanceof BgpLinkLsNlriVer4) {
PathAttrNlriDetails details = setPathAttrDetails(nlriInfo, pathAttr);
if (!((BgpLinkLsNlriVer4) nlriInfo).isVpnPresent()) {
adjRib.add(nlriInfo, details);
- bgplocalRIB.add(sessionInfo(), nlriInfo, details);
+ bgplocalRib.add(sessionInfo(), nlriInfo, details);
} else {
vpnAdjRib.addVpn(nlriInfo, details, ((BgpLinkLsNlriVer4) nlriInfo).getRouteDistinguisher());
- bgplocalRIBVpn.add(sessionInfo(), nlriInfo, details,
+ bgplocalRibVpn.add(sessionInfo(), nlriInfo, details,
((BgpLinkLsNlriVer4) nlriInfo).getRouteDistinguisher());
}
} else if (nlriInfo instanceof BgpPrefixIPv4LSNlriVer4) {
PathAttrNlriDetails details = setPathAttrDetails(nlriInfo, pathAttr);
if (!((BgpPrefixIPv4LSNlriVer4) nlriInfo).isVpnPresent()) {
adjRib.add(nlriInfo, details);
- bgplocalRIB.add(sessionInfo(), nlriInfo, details);
+ bgplocalRib.add(sessionInfo(), nlriInfo, details);
} else {
vpnAdjRib.addVpn(nlriInfo, details, ((BgpPrefixIPv4LSNlriVer4) nlriInfo).getRouteDistinguisher());
- bgplocalRIBVpn.add(sessionInfo(), nlriInfo, details,
+ bgplocalRibVpn.add(sessionInfo(), nlriInfo, details,
((BgpPrefixIPv4LSNlriVer4) nlriInfo).getRouteDistinguisher());
}
}
@@ -201,26 +200,26 @@
if (nlriInfo instanceof BgpNodeLSNlriVer4) {
if (!((BgpNodeLSNlriVer4) nlriInfo).isVpnPresent()) {
adjRib.remove(nlriInfo);
- bgplocalRIB.delete(nlriInfo);
+ bgplocalRib.delete(nlriInfo);
} else {
vpnAdjRib.removeVpn(nlriInfo, ((BgpNodeLSNlriVer4) nlriInfo).getRouteDistinguisher());
- bgplocalRIBVpn.delete(nlriInfo, ((BgpNodeLSNlriVer4) nlriInfo).getRouteDistinguisher());
+ bgplocalRibVpn.delete(nlriInfo, ((BgpNodeLSNlriVer4) nlriInfo).getRouteDistinguisher());
}
} else if (nlriInfo instanceof BgpLinkLsNlriVer4) {
if (!((BgpLinkLsNlriVer4) nlriInfo).isVpnPresent()) {
adjRib.remove(nlriInfo);
- bgplocalRIB.delete(nlriInfo);
+ bgplocalRib.delete(nlriInfo);
} else {
vpnAdjRib.removeVpn(nlriInfo, ((BgpLinkLsNlriVer4) nlriInfo).getRouteDistinguisher());
- bgplocalRIBVpn.delete(nlriInfo, ((BgpLinkLsNlriVer4) nlriInfo).getRouteDistinguisher());
+ bgplocalRibVpn.delete(nlriInfo, ((BgpLinkLsNlriVer4) nlriInfo).getRouteDistinguisher());
}
} else if (nlriInfo instanceof BgpPrefixIPv4LSNlriVer4) {
if (!((BgpPrefixIPv4LSNlriVer4) nlriInfo).isVpnPresent()) {
adjRib.remove(nlriInfo);
- bgplocalRIB.delete(nlriInfo);
+ bgplocalRib.delete(nlriInfo);
} else {
vpnAdjRib.removeVpn(nlriInfo, ((BgpPrefixIPv4LSNlriVer4) nlriInfo).getRouteDistinguisher());
- bgplocalRIBVpn.delete(nlriInfo, ((BgpPrefixIPv4LSNlriVer4) nlriInfo).getRouteDistinguisher());
+ bgplocalRibVpn.delete(nlriInfo, ((BgpPrefixIPv4LSNlriVer4) nlriInfo).getRouteDistinguisher());
}
}
}
@@ -248,12 +247,12 @@
* Update localRIB on peer disconnect.
*
*/
- public void updateLocalRIBOnPeerDisconnect() {
- BgpLocalRibImpl localRib = (BgpLocalRibImpl) bgplocalRIB;
- BgpLocalRibImpl localRibVpn = (BgpLocalRibImpl) bgplocalRIBVpn;
+ public void updateLocalRibOnPeerDisconnect() {
+ BgpLocalRibImpl localRib = (BgpLocalRibImpl) bgplocalRib;
+ BgpLocalRibImpl localRibVpn = (BgpLocalRibImpl) bgplocalRibVpn;
- localRib.localRIBUpdate(adjacencyRib());
- localRibVpn.localRIBUpdate(vpnAdjacencyRib());
+ localRib.localRibUpdate(adjacencyRib());
+ localRibVpn.localRibUpdate(vpnAdjacencyRib());
}
// ************************
diff --git a/protocols/bgp/ctl/src/main/java/org/onosproject/bgp/controller/impl/BgpSelectionAlgo.java b/protocols/bgp/ctl/src/main/java/org/onosproject/bgp/controller/impl/BgpSelectionAlgo.java
index d8f6751..6e82344 100644
--- a/protocols/bgp/ctl/src/main/java/org/onosproject/bgp/controller/impl/BgpSelectionAlgo.java
+++ b/protocols/bgp/ctl/src/main/java/org/onosproject/bgp/controller/impl/BgpSelectionAlgo.java
@@ -15,20 +15,20 @@
*/
package org.onosproject.bgp.controller.impl;
-import java.util.Comparator;
-import java.util.List;
-import java.util.ListIterator;
-
import org.onosproject.bgpio.protocol.linkstate.PathAttrNlriDetailsLocalRib;
import org.onosproject.bgpio.types.AsPath;
import org.onosproject.bgpio.types.BgpValueType;
import org.onosproject.bgpio.types.LocalPref;
import org.onosproject.bgpio.types.Med;
import org.onosproject.bgpio.types.Origin;
-import org.onosproject.bgpio.types.Origin.ORIGINTYPE;
+import org.onosproject.bgpio.types.Origin.OriginType;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.util.Comparator;
+import java.util.List;
+import java.util.ListIterator;
+
/**
* Implementation of BGP best path Selection process.
*/
@@ -122,13 +122,13 @@
* @return object with lowest origin value
*/
int compareOrigin(Origin obj1Origin, Origin obj2Origin) {
- if (obj1Origin.origin() == ORIGINTYPE.IGP) {
+ if (obj1Origin.origin() == OriginType.IGP) {
return 1;
}
- if (obj2Origin.origin() == ORIGINTYPE.IGP) {
+ if (obj2Origin.origin() == OriginType.IGP) {
return -1;
}
- if (obj1Origin.origin() == ORIGINTYPE.EGP) {
+ if (obj1Origin.origin() == OriginType.EGP) {
return 1;
} else {
return -1;
@@ -239,4 +239,4 @@
}
}
}
-}
\ No newline at end of file
+}
diff --git a/protocols/bgp/ctl/src/test/java/org/onosproject/controller/impl/BgpSelectionAlgoTest.java b/protocols/bgp/ctl/src/test/java/org/onosproject/controller/impl/BgpSelectionAlgoTest.java
index 7c0fa41..0c82bee 100644
--- a/protocols/bgp/ctl/src/test/java/org/onosproject/controller/impl/BgpSelectionAlgoTest.java
+++ b/protocols/bgp/ctl/src/test/java/org/onosproject/controller/impl/BgpSelectionAlgoTest.java
@@ -15,16 +15,12 @@
*/
package org.onosproject.controller.impl;
-import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.core.Is.is;
-
-import java.util.LinkedList;
-
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBuffers;
import org.junit.Test;
import org.onlab.packet.IpAddress;
import org.onlab.packet.IpAddress.Version;
+import org.onosproject.bgp.controller.impl.BgpSelectionAlgo;
import org.onosproject.bgpio.exceptions.BgpParseException;
import org.onosproject.bgpio.protocol.linkstate.BgpNodeLSNlriVer4.ProtocolType;
import org.onosproject.bgpio.protocol.linkstate.PathAttrNlriDetails;
@@ -34,7 +30,11 @@
import org.onosproject.bgpio.types.LocalPref;
import org.onosproject.bgpio.types.Med;
import org.onosproject.bgpio.types.Origin;
-import org.onosproject.bgp.controller.impl.BgpSelectionAlgo;
+
+import java.util.LinkedList;
+
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.core.Is.is;
/**
* Test cases for BGP Selection Algorithm.
@@ -65,14 +65,14 @@
IpAddress ipAddress = IpAddress.valueOf(Version.INET, peerIp);
int bgpId = 168427777;
- short locRIBASNum = 100;
+ short locRibAsNum = 100;
boolean isIbgp = false;
PathAttrNlriDetails attrList1 = new PathAttrNlriDetails();
attrList1.setIdentifier(0);
attrList1.setPathAttribute(pathAttributes1);
attrList1.setProtocolID(ProtocolType.ISIS_LEVEL_ONE);
PathAttrNlriDetailsLocalRib list1 = new PathAttrNlriDetailsLocalRib(
- ipAddress, bgpId, locRIBASNum, isIbgp, attrList1);
+ ipAddress, bgpId, locRibAsNum, isIbgp, attrList1);
peerIp = new byte[] {0x0b, 0x0b, 0x0b, 0x0b };
LinkedList<BgpValueType> pathAttributes2 = new LinkedList<>();
@@ -92,14 +92,14 @@
ipAddress = IpAddress.valueOf(Version.INET, peerIp);
bgpId = 536936448;
- locRIBASNum = 200;
+ locRibAsNum = 200;
isIbgp = true;
PathAttrNlriDetails attrList2 = new PathAttrNlriDetails();
attrList2.setIdentifier(0);
attrList2.setPathAttribute(pathAttributes2);
attrList2.setProtocolID(ProtocolType.OSPF_V2);
PathAttrNlriDetailsLocalRib list2 = new PathAttrNlriDetailsLocalRib(
- ipAddress, bgpId, locRIBASNum, isIbgp, attrList2);
+ ipAddress, bgpId, locRibAsNum, isIbgp, attrList2);
BgpSelectionAlgo algo = new BgpSelectionAlgo();
int result = algo.compare(list1, list2);
assertThat(result, is(1));
@@ -128,14 +128,14 @@
IpAddress ipAddress = IpAddress.valueOf(Version.INET, peerIp);
int bgpId = 168427777;
- short locRIBASNum = 100;
+ short locRibAsNum = 100;
boolean isIbgp = false;
PathAttrNlriDetails attrList1 = new PathAttrNlriDetails();
attrList1.setIdentifier(0);
attrList1.setPathAttribute(pathAttributes1);
attrList1.setProtocolID(ProtocolType.ISIS_LEVEL_ONE);
PathAttrNlriDetailsLocalRib list1 = new PathAttrNlriDetailsLocalRib(
- ipAddress, bgpId, locRIBASNum, isIbgp, attrList1);
+ ipAddress, bgpId, locRibAsNum, isIbgp, attrList1);
peerIp = new byte[] {0x0b, 0x0b, 0x0b, 0x0b };
LinkedList<BgpValueType> pathAttributes2 = new LinkedList<>();
@@ -153,14 +153,14 @@
ipAddress = IpAddress.valueOf(Version.INET, peerIp);
bgpId = 536936448;
- locRIBASNum = 200;
+ locRibAsNum = 200;
isIbgp = true;
PathAttrNlriDetails attrList2 = new PathAttrNlriDetails();
attrList2.setIdentifier(0);
attrList2.setPathAttribute(pathAttributes2);
attrList2.setProtocolID(ProtocolType.OSPF_V2);
PathAttrNlriDetailsLocalRib list2 = new PathAttrNlriDetailsLocalRib(
- ipAddress, bgpId, locRIBASNum, isIbgp, attrList2);
+ ipAddress, bgpId, locRibAsNum, isIbgp, attrList2);
BgpSelectionAlgo algo = new BgpSelectionAlgo();
int result = algo.compare(list1, list2);
assertThat(result, is(-1));
@@ -189,14 +189,14 @@
IpAddress ipAddress = IpAddress.valueOf(Version.INET, peerIp);
int bgpId = 168427777;
- short locRIBASNum = 100;
+ short locRibAsNum = 100;
boolean isIbgp = false;
PathAttrNlriDetails attrList1 = new PathAttrNlriDetails();
attrList1.setIdentifier(0);
attrList1.setPathAttribute(pathAttributes1);
attrList1.setProtocolID(ProtocolType.ISIS_LEVEL_ONE);
PathAttrNlriDetailsLocalRib list1 = new PathAttrNlriDetailsLocalRib(
- ipAddress, bgpId, locRIBASNum, isIbgp, attrList1);
+ ipAddress, bgpId, locRibAsNum, isIbgp, attrList1);
peerIp = new byte[] {0x0b, 0x0b, 0x0b, 0x0b };
LinkedList<BgpValueType> pathAttributes2 = new LinkedList<>();
@@ -214,14 +214,14 @@
ipAddress = IpAddress.valueOf(Version.INET, peerIp);
bgpId = 536936448;
- locRIBASNum = 200;
+ locRibAsNum = 200;
isIbgp = true;
PathAttrNlriDetails attrList2 = new PathAttrNlriDetails();
attrList2.setIdentifier(0);
attrList2.setPathAttribute(pathAttributes2);
attrList2.setProtocolID(ProtocolType.OSPF_V2);
PathAttrNlriDetailsLocalRib list2 = new PathAttrNlriDetailsLocalRib(
- ipAddress, bgpId, locRIBASNum, isIbgp, attrList2);
+ ipAddress, bgpId, locRibAsNum, isIbgp, attrList2);
BgpSelectionAlgo algo = new BgpSelectionAlgo();
int result = algo.compare(list1, list2);
assertThat(result, is(1));
@@ -254,14 +254,14 @@
IpAddress ipAddress = IpAddress.valueOf(Version.INET, peerIp);
int bgpId = 168427777;
- short locRIBASNum = 100;
+ short locRibAsNum = 100;
boolean isIbgp = false;
PathAttrNlriDetails attrList1 = new PathAttrNlriDetails();
attrList1.setIdentifier(0);
attrList1.setPathAttribute(pathAttributes1);
attrList1.setProtocolID(ProtocolType.ISIS_LEVEL_ONE);
PathAttrNlriDetailsLocalRib list1 = new PathAttrNlriDetailsLocalRib(
- ipAddress, bgpId, locRIBASNum, isIbgp, attrList1);
+ ipAddress, bgpId, locRibAsNum, isIbgp, attrList1);
peerIp = new byte[] {0x0b, 0x0b, 0x0b, 0x0b };
LinkedList<BgpValueType> pathAttributes2 = new LinkedList<>();
@@ -283,14 +283,14 @@
ipAddress = IpAddress.valueOf(Version.INET, peerIp);
bgpId = 536936448;
- locRIBASNum = 200;
+ locRibAsNum = 200;
isIbgp = true;
PathAttrNlriDetails attrList2 = new PathAttrNlriDetails();
attrList2.setIdentifier(0);
attrList2.setPathAttribute(pathAttributes2);
attrList2.setProtocolID(ProtocolType.OSPF_V2);
PathAttrNlriDetailsLocalRib list2 = new PathAttrNlriDetailsLocalRib(
- ipAddress, bgpId, locRIBASNum, isIbgp, attrList2);
+ ipAddress, bgpId, locRibAsNum, isIbgp, attrList2);
BgpSelectionAlgo algo = new BgpSelectionAlgo();
int result = algo.compare(list1, list2);
assertThat(result, is(1));
@@ -314,14 +314,14 @@
IpAddress ipAddress = IpAddress.valueOf(Version.INET, peerIp);
int bgpId = 168427777;
- short locRIBASNum = 100;
+ short locRibAsNum = 100;
boolean isIbgp = false;
PathAttrNlriDetails attrList1 = new PathAttrNlriDetails();
attrList1.setIdentifier(0);
attrList1.setPathAttribute(pathAttributes1);
attrList1.setProtocolID(ProtocolType.ISIS_LEVEL_ONE);
PathAttrNlriDetailsLocalRib list1 = new PathAttrNlriDetailsLocalRib(
- ipAddress, bgpId, locRIBASNum, isIbgp, attrList1);
+ ipAddress, bgpId, locRibAsNum, isIbgp, attrList1);
peerIp = new byte[] {0x0b, 0x0b, 0x0b, 0x0b };
LinkedList<BgpValueType> pathAttributes2 = new LinkedList<>();
@@ -334,14 +334,14 @@
ipAddress = IpAddress.valueOf(Version.INET, peerIp);
bgpId = 536936448;
- locRIBASNum = 200;
+ locRibAsNum = 200;
isIbgp = true;
PathAttrNlriDetails attrList2 = new PathAttrNlriDetails();
attrList2.setIdentifier(0);
attrList2.setPathAttribute(pathAttributes2);
attrList2.setProtocolID(ProtocolType.OSPF_V2);
PathAttrNlriDetailsLocalRib list2 = new PathAttrNlriDetailsLocalRib(
- ipAddress, bgpId, locRIBASNum, isIbgp, attrList2);
+ ipAddress, bgpId, locRibAsNum, isIbgp, attrList2);
BgpSelectionAlgo algo = new BgpSelectionAlgo();
int result = algo.compare(list1, list2);
assertThat(result, is(-1));
@@ -369,14 +369,14 @@
IpAddress ipAddress = IpAddress.valueOf(Version.INET, peerIp);
int bgpId = 168427777;
- short locRIBASNum = 100;
+ short locRibAsNum = 100;
boolean isIbgp = true;
PathAttrNlriDetails attrList1 = new PathAttrNlriDetails();
attrList1.setIdentifier(0);
attrList1.setPathAttribute(pathAttributes1);
attrList1.setProtocolID(ProtocolType.ISIS_LEVEL_ONE);
PathAttrNlriDetailsLocalRib list1 = new PathAttrNlriDetailsLocalRib(
- ipAddress, bgpId, locRIBASNum, isIbgp, attrList1);
+ ipAddress, bgpId, locRibAsNum, isIbgp, attrList1);
peerIp = new byte[] {0x0b, 0x0b, 0x0b, 0x0b };
LinkedList<BgpValueType> pathAttributes2 = new LinkedList<>();
@@ -394,14 +394,14 @@
ipAddress = IpAddress.valueOf(Version.INET, peerIp);
bgpId = 536936448;
- locRIBASNum = 200;
+ locRibAsNum = 200;
isIbgp = false;
PathAttrNlriDetails attrList2 = new PathAttrNlriDetails();
attrList2.setIdentifier(0);
attrList2.setPathAttribute(pathAttributes2);
attrList2.setProtocolID(ProtocolType.OSPF_V2);
PathAttrNlriDetailsLocalRib list2 = new PathAttrNlriDetailsLocalRib(
- ipAddress, bgpId, locRIBASNum, false, attrList2);
+ ipAddress, bgpId, locRibAsNum, false, attrList2);
BgpSelectionAlgo algo = new BgpSelectionAlgo();
int result = algo.compare(list1, list2);
assertThat(result, is(-1));
@@ -430,14 +430,14 @@
IpAddress ipAddress = IpAddress.valueOf(Version.INET, peerIp);
//A0A0A00
Integer bgpId = 168430080;
- short locRIBASNum = 100;
+ short locRibAsNum = 100;
boolean isIbgp = false;
PathAttrNlriDetails attrList1 = new PathAttrNlriDetails();
attrList1.setIdentifier(0);
attrList1.setPathAttribute(pathAttributes1);
attrList1.setProtocolID(ProtocolType.ISIS_LEVEL_ONE);
PathAttrNlriDetailsLocalRib list1 = new PathAttrNlriDetailsLocalRib(
- ipAddress, bgpId, locRIBASNum, isIbgp, attrList1);
+ ipAddress, bgpId, locRibAsNum, isIbgp, attrList1);
peerIp = new byte[] {0x0b, 0x0b, 0x0b, 0x0b };
LinkedList<BgpValueType> pathAttributes2 = new LinkedList<>();
@@ -456,14 +456,14 @@
ipAddress = IpAddress.valueOf(Version.INET, peerIp);
//B0A0A00
bgpId = 185207296;
- locRIBASNum = 200;
+ locRibAsNum = 200;
isIbgp = false;
PathAttrNlriDetails attrList2 = new PathAttrNlriDetails();
attrList2.setIdentifier(0);
attrList2.setPathAttribute(pathAttributes2);
attrList2.setProtocolID(ProtocolType.OSPF_V2);
PathAttrNlriDetailsLocalRib list2 = new PathAttrNlriDetailsLocalRib(
- ipAddress, bgpId, locRIBASNum, isIbgp, attrList2);
+ ipAddress, bgpId, locRibAsNum, isIbgp, attrList2);
BgpSelectionAlgo algo = new BgpSelectionAlgo();
int result = algo.compare(list1, list2);
assertThat(result, is(1));
@@ -492,14 +492,14 @@
IpAddress ipAddress = IpAddress.valueOf(Version.INET, peerIp);
//A0A0A00
Integer bgpId = 168430080;
- short locRIBASNum = 100;
+ short locRibAsNum = 100;
boolean isIbgp = false;
PathAttrNlriDetails attrList1 = new PathAttrNlriDetails();
attrList1.setIdentifier(0);
attrList1.setPathAttribute(pathAttributes1);
attrList1.setProtocolID(ProtocolType.ISIS_LEVEL_ONE);
PathAttrNlriDetailsLocalRib list1 = new PathAttrNlriDetailsLocalRib(
- ipAddress, bgpId, locRIBASNum, isIbgp, attrList1);
+ ipAddress, bgpId, locRibAsNum, isIbgp, attrList1);
peerIp = new byte[] {0x0a, 0x0a, 0x0a, 0x0a };
LinkedList<BgpValueType> pathAttributes2 = new LinkedList<>();
@@ -518,14 +518,14 @@
ipAddress = IpAddress.valueOf(Version.INET, peerIp);
//A0A0A00
bgpId = 168430080;
- locRIBASNum = 200;
+ locRibAsNum = 200;
isIbgp = false;
PathAttrNlriDetails attrList2 = new PathAttrNlriDetails();
attrList2.setIdentifier(0);
attrList2.setPathAttribute(pathAttributes2);
attrList2.setProtocolID(ProtocolType.OSPF_V2);
PathAttrNlriDetailsLocalRib list2 = new PathAttrNlriDetailsLocalRib(
- ipAddress, bgpId, locRIBASNum, isIbgp, attrList2);
+ ipAddress, bgpId, locRibAsNum, isIbgp, attrList2);
BgpSelectionAlgo algo = new BgpSelectionAlgo();
int result = algo.compare(list1, list2);
assertThat(result, is(-1));
@@ -554,14 +554,14 @@
IpAddress ipAddress = IpAddress.valueOf(Version.INET, peerIp);
//A0A0A00
Integer bgpId = 168430080;
- short locRIBASNum = 100;
+ short locRibAsNum = 100;
boolean isIbgp = false;
PathAttrNlriDetails attrList1 = new PathAttrNlriDetails();
attrList1.setIdentifier(0);
attrList1.setPathAttribute(pathAttributes1);
attrList1.setProtocolID(ProtocolType.ISIS_LEVEL_ONE);
PathAttrNlriDetailsLocalRib list1 = new PathAttrNlriDetailsLocalRib(
- ipAddress, bgpId, locRIBASNum, isIbgp, attrList1);
+ ipAddress, bgpId, locRibAsNum, isIbgp, attrList1);
peerIp = new byte[] {0x0a, 0x0a, 0x0a, 0x0a };
LinkedList<BgpValueType> pathAttributes2 = new LinkedList<>();
@@ -580,14 +580,14 @@
ipAddress = IpAddress.valueOf(Version.INET, peerIp);
//A0A0A00
bgpId = 168430080;
- locRIBASNum = 200;
+ locRibAsNum = 200;
isIbgp = false;
PathAttrNlriDetails attrList2 = new PathAttrNlriDetails();
attrList2.setIdentifier(0);
attrList2.setPathAttribute(pathAttributes2);
attrList2.setProtocolID(ProtocolType.OSPF_V2);
PathAttrNlriDetailsLocalRib list2 = new PathAttrNlriDetailsLocalRib(
- ipAddress, bgpId, locRIBASNum, isIbgp, attrList2);
+ ipAddress, bgpId, locRibAsNum, isIbgp, attrList2);
BgpSelectionAlgo algo = new BgpSelectionAlgo();
int result = algo.compare(list1, list2);
assertThat(result, is(0));
diff --git a/protocols/ovsdb/api/src/main/java/org/onosproject/ovsdb/controller/OvsdbClientService.java b/protocols/ovsdb/api/src/main/java/org/onosproject/ovsdb/controller/OvsdbClientService.java
index a35fa6c..e04d0ee 100644
--- a/protocols/ovsdb/api/src/main/java/org/onosproject/ovsdb/controller/OvsdbClientService.java
+++ b/protocols/ovsdb/api/src/main/java/org/onosproject/ovsdb/controller/OvsdbClientService.java
@@ -20,11 +20,11 @@
import org.onlab.packet.IpAddress;
import org.onosproject.net.DeviceId;
import org.onosproject.net.behaviour.ControllerInfo;
-import org.onosproject.ovsdb.rfc.jsonrpc.OvsdbRPC;
+import org.onosproject.ovsdb.rfc.jsonrpc.OvsdbRpc;
import org.onosproject.ovsdb.rfc.message.OperationResult;
import org.onosproject.ovsdb.rfc.message.TableUpdates;
import org.onosproject.ovsdb.rfc.notation.Row;
-import org.onosproject.ovsdb.rfc.notation.UUID;
+import org.onosproject.ovsdb.rfc.notation.Uuid;
import org.onosproject.ovsdb.rfc.operations.Operation;
import org.onosproject.ovsdb.rfc.schema.DatabaseSchema;
@@ -35,7 +35,7 @@
/**
* Represents to provider facing side of a node.
*/
-public interface OvsdbClientService extends OvsdbRPC {
+public interface OvsdbClientService extends OvsdbRpc {
/**
* Gets the node identifier.
*
@@ -136,7 +136,7 @@
* @param bridgeUuid bridge uuid
* @param controllers list of controllers
*/
- void setControllersWithUUID(UUID bridgeUuid, List<ControllerInfo> controllers);
+ void setControllersWithUuid(Uuid bridgeUuid, List<ControllerInfo> controllers);
/**
* Sets the Controllers for the specified device.
diff --git a/protocols/ovsdb/api/src/main/java/org/onosproject/ovsdb/controller/driver/DefaultOvsdbClient.java b/protocols/ovsdb/api/src/main/java/org/onosproject/ovsdb/controller/driver/DefaultOvsdbClient.java
index 16d9673..9b6043d 100644
--- a/protocols/ovsdb/api/src/main/java/org/onosproject/ovsdb/controller/driver/DefaultOvsdbClient.java
+++ b/protocols/ovsdb/api/src/main/java/org/onosproject/ovsdb/controller/driver/DefaultOvsdbClient.java
@@ -52,7 +52,7 @@
import org.onosproject.ovsdb.rfc.notation.OvsdbMap;
import org.onosproject.ovsdb.rfc.notation.OvsdbSet;
import org.onosproject.ovsdb.rfc.notation.Row;
-import org.onosproject.ovsdb.rfc.notation.UUID;
+import org.onosproject.ovsdb.rfc.notation.Uuid;
import org.onosproject.ovsdb.rfc.operations.Delete;
import org.onosproject.ovsdb.rfc.operations.Insert;
import org.onosproject.ovsdb.rfc.operations.Mutate;
@@ -255,13 +255,13 @@
if (bridge != null) {
OvsdbSet setPorts = (OvsdbSet) bridge.getPortsColumn().data();
@SuppressWarnings("unchecked")
- Set<UUID> ports = setPorts.set();
+ Set<Uuid> ports = setPorts.set();
if (ports == null || ports.size() == 0) {
log.warn("The port uuid is null");
return null;
}
- for (UUID uuid : ports) {
+ for (Uuid uuid : ports) {
Row portRow = getRow(OvsdbConstant.DATABASENAME,
OvsdbConstant.PORT, uuid.value());
Port port = (Port) TableGenerator.getTable(dbSchema, portRow,
@@ -287,14 +287,14 @@
if (port != null) {
OvsdbSet setInterfaces = (OvsdbSet) port.getInterfacesColumn().data();
@SuppressWarnings("unchecked")
- Set<UUID> interfaces = setInterfaces.set();
+ Set<Uuid> interfaces = setInterfaces.set();
if (interfaces == null || interfaces.size() == 0) {
log.warn("The interface uuid is null");
return null;
}
- for (UUID uuid : interfaces) {
+ for (Uuid uuid : interfaces) {
Row intfRow = getRow(OvsdbConstant.DATABASENAME,
OvsdbConstant.INTERFACE, uuid.value());
Interface intf = (Interface) TableGenerator
@@ -606,7 +606,7 @@
return false;
}
- setControllersWithUUID(UUID.uuid(bridgeUuid), controllers);
+ setControllersWithUuid(Uuid.uuid(bridgeUuid), controllers);
return true;
}
@@ -623,11 +623,11 @@
ControllerInfo controllerInfo = new ControllerInfo(ipAddress, OvsdbConstant.OFPORT, "tcp");
log.debug("Automatically setting controller for bridge {} to {}",
bridgeUuid, controllerInfo.target());
- setControllersWithUUID(UUID.uuid(bridgeUuid), ImmutableList.of(controllerInfo));
+ setControllersWithUuid(Uuid.uuid(bridgeUuid), ImmutableList.of(controllerInfo));
}
@Override
- public void setControllersWithUUID(UUID bridgeUuid, List<ControllerInfo> controllers) {
+ public void setControllersWithUuid(Uuid bridgeUuid, List<ControllerInfo> controllers) {
DatabaseSchema dbSchema = schema.get(OvsdbConstant.DATABASENAME);
if (dbSchema == null) {
@@ -640,7 +640,7 @@
return;
}
- Set<UUID> newControllerUuids = new HashSet<>();
+ Set<Uuid> newControllerUuids = new HashSet<>();
Set<ControllerInfo> newControllers = new HashSet<>(controllers);
List<Controller> removeControllers = new ArrayList<>();
@@ -672,7 +672,7 @@
String uuid = insertConfig(OvsdbConstant.CONTROLLER, "_uuid",
OvsdbConstant.BRIDGE, "controller", bridgeUuid.value(),
c.getRow());
- newControllerUuids.add(UUID.uuid(uuid));
+ newControllerUuids.add(Uuid.uuid(uuid));
});
@@ -691,17 +691,17 @@
@Override
public void setControllersWithDeviceId(DeviceId deviceId, List<ControllerInfo> controllers) {
- setControllersWithUUID(getBridgeUUID(deviceId), controllers);
+ setControllersWithUuid(getBridgeUuid(deviceId), controllers);
}
@Override
public void dropBridge(String bridgeName) {
- String bridgeUUID = getBridgeUuid(bridgeName);
- if (bridgeUUID == null) {
+ String bridgeUuid = getBridgeUuid(bridgeName);
+ if (bridgeUuid == null) {
log.warn("Could not find bridge in node", nodeId.getIpAddress());
return;
}
- deleteConfig(OvsdbConstant.BRIDGE, "_uuid", bridgeUUID,
+ deleteConfig(OvsdbConstant.BRIDGE, "_uuid", bridgeUuid,
OvsdbConstant.DATABASENAME, "bridges");
}
@@ -798,12 +798,12 @@
Port port = (Port) TableGenerator.createTable(dbSchema, OvsdbTable.PORT);
port.setName(portName);
Insert portInsert = new Insert(dbSchema.getTableSchema("Port"), "Port", port.getRow());
- portInsert.getRow().put("interfaces", UUID.uuid("Interface"));
+ portInsert.getRow().put("interfaces", Uuid.uuid("Interface"));
operations.add(portInsert);
// update the bridge table
- Condition condition = ConditionUtil.isEqual("_uuid", UUID.uuid(bridgeUuid));
- Mutation mutation = MutationUtil.insert("ports", UUID.uuid("Port"));
+ Condition condition = ConditionUtil.isEqual("_uuid", Uuid.uuid(bridgeUuid));
+ Mutation mutation = MutationUtil.insert("ports", Uuid.uuid("Port"));
List<Condition> conditions = new ArrayList<>(Arrays.asList(condition));
List<Mutation> mutations = new ArrayList<>(Arrays.asList(mutation));
operations.add(new Mutate(dbSchema.getTableSchema("Bridge"), conditions, mutations));
@@ -831,10 +831,10 @@
return;
}
- String portUUID = getPortUuid(portName, bridgeUuid);
- if (portUUID != null) {
+ String portUuid = getPortUuid(portName, bridgeUuid);
+ if (portUuid != null) {
log.info("Delete tunnel");
- deleteConfig(OvsdbConstant.PORT, "_uuid", portUUID,
+ deleteConfig(OvsdbConstant.PORT, "_uuid", portUuid,
OvsdbConstant.BRIDGE, "ports");
}
@@ -864,18 +864,18 @@
.getColumnSchema(parentColumnName);
List<Mutation> mutations = Lists.newArrayList();
Mutation mutation = MutationUtil.delete(parentColumnSchema.name(),
- UUID.uuid(childUuid));
+ Uuid.uuid(childUuid));
mutations.add(mutation);
List<Condition> conditions = Lists.newArrayList();
Condition condition = ConditionUtil.includes(parentColumnName,
- UUID.uuid(childUuid));
+ Uuid.uuid(childUuid));
conditions.add(condition);
Mutate op = new Mutate(parentTableSchema, conditions, mutations);
operations.add(op);
}
List<Condition> conditions = Lists.newArrayList();
- Condition condition = ConditionUtil.isEqual(childColumnName, UUID.uuid(childUuid));
+ Condition condition = ConditionUtil.isEqual(childColumnName, Uuid.uuid(childUuid));
conditions.add(condition);
Delete del = new Delete(childTableSchema, conditions);
operations.add(del);
@@ -898,7 +898,7 @@
TableSchema tableSchema = dbSchema.getTableSchema(tableName);
List<Condition> conditions = Lists.newArrayList();
- Condition condition = ConditionUtil.isEqual(columnName, UUID.uuid(uuid));
+ Condition condition = ConditionUtil.isEqual(columnName, Uuid.uuid(uuid));
conditions.add(condition);
Update update = new Update(tableSchema, row, conditions);
@@ -940,12 +940,12 @@
List<Mutation> mutations = Lists.newArrayList();
Mutation mutation = MutationUtil.insert(parentColumnSchema.name(),
- UUID.uuid(namedUuid));
+ Uuid.uuid(namedUuid));
mutations.add(mutation);
List<Condition> conditions = Lists.newArrayList();
Condition condition = ConditionUtil.isEqual("_uuid",
- UUID.uuid(parentUuid));
+ Uuid.uuid(parentUuid));
conditions.add(condition);
Mutate op = new Mutate(parentTableSchema, conditions, mutations);
@@ -962,7 +962,7 @@
Insert ins = (Insert) operations.get(0);
ins.getRow().put("interfaces",
- UUID.uuid(OvsdbConstant.INTERFACE));
+ Uuid.uuid(OvsdbConstant.INTERFACE));
}
List<OperationResult> results;
@@ -1250,7 +1250,7 @@
@Override
public Set<ControllerInfo> getControllers(DeviceId openflowDeviceId) {
- UUID bridgeUuid = getBridgeUUID(openflowDeviceId);
+ Uuid bridgeUuid = getBridgeUuid(openflowDeviceId);
if (bridgeUuid == null) {
log.warn("bad bridge Uuid");
return null;
@@ -1266,7 +1266,7 @@
.data())).collect(Collectors.toSet());
}
- private List<Controller> getControllers(UUID bridgeUuid) {
+ private List<Controller> getControllers(Uuid bridgeUuid) {
DatabaseSchema dbSchema = schema.get(OvsdbConstant.DATABASENAME);
if (dbSchema == null) {
return null;
@@ -1285,7 +1285,7 @@
//FIXME remove log
log.warn("type of controller column", bridge.getControllerColumn()
.data().getClass());
- Set<UUID> controllerUuids = (Set<UUID>) ((OvsdbSet) bridge
+ Set<Uuid> controllerUuids = (Set<Uuid>) ((OvsdbSet) bridge
.getControllerColumn().data()).set();
// Set<String> controllerUuidStrings = (Set<String>) bridge.getControllerColumn().data();
@@ -1299,7 +1299,7 @@
List<Controller> ovsdbControllers = new ArrayList<>();
ConcurrentMap<String, Row> controllerTableRows = controllerRowStore.getRowStore();
controllerTableRows.forEach((key, row) -> {
- if (!controllerUuids.contains(UUID.uuid(key))) {
+ if (!controllerUuids.contains(Uuid.uuid(key))) {
return;
}
Controller controller = (Controller) TableGenerator
@@ -1310,7 +1310,7 @@
}
- private UUID getBridgeUUID(DeviceId openflowDeviceId) {
+ private Uuid getBridgeUuid(DeviceId openflowDeviceId) {
DatabaseSchema dbSchema = schema.get(OvsdbConstant.DATABASENAME);
if (dbSchema == null) {
return null;
@@ -1323,13 +1323,13 @@
}
ConcurrentMap<String, Row> bridgeTableRows = rowStore.getRowStore();
- final AtomicReference<UUID> uuid = new AtomicReference<>();
+ final AtomicReference<Uuid> uuid = new AtomicReference<>();
for (Map.Entry<String, Row> entry : bridgeTableRows.entrySet()) {
Bridge b = (Bridge) TableGenerator.getTable(dbSchema,
entry.getValue(),
OvsdbTable.BRIDGE);
if (matchesDpid(b, openflowDeviceId)) {
- uuid.set(UUID.uuid(entry.getKey()));
+ uuid.set(Uuid.uuid(entry.getKey()));
break;
}
}
diff --git a/protocols/ovsdb/api/src/test/java/org/onosproject/ovsdb/controller/driver/OvsdbClientServiceAdapter.java b/protocols/ovsdb/api/src/test/java/org/onosproject/ovsdb/controller/driver/OvsdbClientServiceAdapter.java
index 5d80a7b..563dcca 100644
--- a/protocols/ovsdb/api/src/test/java/org/onosproject/ovsdb/controller/driver/OvsdbClientServiceAdapter.java
+++ b/protocols/ovsdb/api/src/test/java/org/onosproject/ovsdb/controller/driver/OvsdbClientServiceAdapter.java
@@ -30,7 +30,7 @@
import org.onosproject.ovsdb.rfc.message.OperationResult;
import org.onosproject.ovsdb.rfc.message.TableUpdates;
import org.onosproject.ovsdb.rfc.notation.Row;
-import org.onosproject.ovsdb.rfc.notation.UUID;
+import org.onosproject.ovsdb.rfc.notation.Uuid;
import org.onosproject.ovsdb.rfc.operations.Operation;
import org.onosproject.ovsdb.rfc.schema.DatabaseSchema;
@@ -94,7 +94,7 @@
}
@Override
- public void setControllersWithUUID(UUID bridgeUuid, List<ControllerInfo> controllers) {
+ public void setControllersWithUuid(Uuid bridgeUuid, List<ControllerInfo> controllers) {
}
diff --git a/protocols/ovsdb/ctl/src/main/java/org/onosproject/ovsdb/controller/impl/OvsdbControllerImpl.java b/protocols/ovsdb/ctl/src/main/java/org/onosproject/ovsdb/controller/impl/OvsdbControllerImpl.java
index c2cbbf8..68e2e4c 100644
--- a/protocols/ovsdb/ctl/src/main/java/org/onosproject/ovsdb/controller/impl/OvsdbControllerImpl.java
+++ b/protocols/ovsdb/ctl/src/main/java/org/onosproject/ovsdb/controller/impl/OvsdbControllerImpl.java
@@ -47,7 +47,7 @@
import org.onosproject.ovsdb.rfc.notation.OvsdbMap;
import org.onosproject.ovsdb.rfc.notation.OvsdbSet;
import org.onosproject.ovsdb.rfc.notation.Row;
-import org.onosproject.ovsdb.rfc.notation.UUID;
+import org.onosproject.ovsdb.rfc.notation.Uuid;
import org.onosproject.ovsdb.rfc.schema.DatabaseSchema;
import org.onosproject.ovsdb.rfc.table.Bridge;
import org.onosproject.ovsdb.rfc.table.Interface;
@@ -221,7 +221,7 @@
for (String tableName : updates.result().keySet()) {
TableUpdate update = updates.result().get(tableName);
- for (UUID uuid : (Set<UUID>) update.rows().keySet()) {
+ for (Uuid uuid : (Set<Uuid>) update.rows().keySet()) {
log.debug("Begin to process table updates uuid: {}, databaseName: {}, tableName: {}",
uuid.value(), dbName, tableName);
diff --git a/protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/jsonrpc/OvsdbRPC.java b/protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/jsonrpc/OvsdbRpc.java
similarity index 98%
rename from protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/jsonrpc/OvsdbRPC.java
rename to protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/jsonrpc/OvsdbRpc.java
index 5d08b14..c487e76 100644
--- a/protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/jsonrpc/OvsdbRPC.java
+++ b/protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/jsonrpc/OvsdbRpc.java
@@ -15,18 +15,17 @@
*/
package org.onosproject.ovsdb.rfc.jsonrpc;
-import java.util.List;
-
+import com.fasterxml.jackson.databind.JsonNode;
+import com.google.common.util.concurrent.ListenableFuture;
import org.onosproject.ovsdb.rfc.operations.Operation;
import org.onosproject.ovsdb.rfc.schema.DatabaseSchema;
-import com.fasterxml.jackson.databind.JsonNode;
-import com.google.common.util.concurrent.ListenableFuture;
+import java.util.List;
/**
* The following interface describe the RPC7047's methods that are supported.
*/
-public interface OvsdbRPC {
+public interface OvsdbRpc {
/**
* This operation retrieves a database-schema that describes hosted database
diff --git a/protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/message/OperationResult.java b/protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/message/OperationResult.java
index 9980735..acc44cc 100644
--- a/protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/message/OperationResult.java
+++ b/protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/message/OperationResult.java
@@ -20,7 +20,7 @@
import java.util.List;
import org.onosproject.ovsdb.rfc.notation.Row;
-import org.onosproject.ovsdb.rfc.notation.UUID;
+import org.onosproject.ovsdb.rfc.notation.Uuid;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
@@ -30,7 +30,7 @@
@JsonIgnoreProperties(ignoreUnknown = true)
public final class OperationResult {
private int count;
- private UUID uuid;
+ private Uuid uuid;
private List<Row> rows;
private String error;
private String details;
@@ -59,7 +59,7 @@
* @param error error message
* @param details details of error message
*/
- public OperationResult(int count, UUID uuid, List<Row> rows, String error,
+ public OperationResult(int count, Uuid uuid, List<Row> rows, String error,
String details) {
checkNotNull(uuid, "uuid cannot be null");
checkNotNull(rows, "rows cannot be null");
@@ -92,7 +92,7 @@
* Return uuid.
* @return uuid
*/
- public UUID getUuid() {
+ public Uuid getUuid() {
return uuid;
}
@@ -100,7 +100,7 @@
* Set uuid value.
* @param uuid the Operation message of uuid
*/
- public void setUuid(UUID uuid) {
+ public void setUuid(Uuid uuid) {
checkNotNull(uuid, "uuid cannot be null");
this.uuid = uuid;
}
diff --git a/protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/message/RowUpdate.java b/protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/message/RowUpdate.java
index 221206e..9c49466 100644
--- a/protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/message/RowUpdate.java
+++ b/protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/message/RowUpdate.java
@@ -21,7 +21,7 @@
import java.util.Objects;
import org.onosproject.ovsdb.rfc.notation.Row;
-import org.onosproject.ovsdb.rfc.notation.UUID;
+import org.onosproject.ovsdb.rfc.notation.Uuid;
/**
* A TableUpdate is an object that maps from the row's UUID to a RowUpdate object.
@@ -29,7 +29,7 @@
* Refer to RFC 7047 Section 4.1.6.
*/
public final class RowUpdate {
- private final UUID uuid;
+ private final Uuid uuid;
private final Row oldRow;
private final Row newRow;
@@ -39,7 +39,7 @@
* @param oldRow present for "delete" and "modify" updates
* @param newRow present for "initial", "insert", and "modify" updates
*/
- public RowUpdate(UUID uuid, Row oldRow, Row newRow) {
+ public RowUpdate(Uuid uuid, Row oldRow, Row newRow) {
checkNotNull(uuid, "uuid cannot be null");
this.uuid = uuid;
this.oldRow = oldRow;
@@ -50,7 +50,7 @@
* Return uuid.
* @return uuid
*/
- public UUID uuid() {
+ public Uuid uuid() {
return this.uuid;
}
diff --git a/protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/message/TableUpdate.java b/protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/message/TableUpdate.java
index 0673b79..ee006ef 100644
--- a/protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/message/TableUpdate.java
+++ b/protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/message/TableUpdate.java
@@ -22,20 +22,20 @@
import java.util.Objects;
import org.onosproject.ovsdb.rfc.notation.Row;
-import org.onosproject.ovsdb.rfc.notation.UUID;
+import org.onosproject.ovsdb.rfc.notation.Uuid;
/**
* TableUpdate is an object that maps from the row's UUID to a RowUpdate object.
*/
public final class TableUpdate {
- private final Map<UUID, RowUpdate> rows;
+ private final Map<Uuid, RowUpdate> rows;
/**
* Constructs a TableUpdate object.
* @param rows the parameter of TableUpdate entity
*/
- private TableUpdate(Map<UUID, RowUpdate> rows) {
+ private TableUpdate(Map<Uuid, RowUpdate> rows) {
this.rows = rows;
}
@@ -44,7 +44,7 @@
* @param rows the parameter of TableUpdate entity
* @return TableUpdate entity
*/
- public static TableUpdate tableUpdate(Map<UUID, RowUpdate> rows) {
+ public static TableUpdate tableUpdate(Map<Uuid, RowUpdate> rows) {
checkNotNull(rows, "rows cannot be null");
return new TableUpdate(rows);
}
@@ -54,7 +54,7 @@
* @param uuid the key of rows
* @return Row old row
*/
- public Row getOld(UUID uuid) {
+ public Row getOld(Uuid uuid) {
RowUpdate rowUpdate = rows.get(uuid);
if (rowUpdate == null) {
return null;
@@ -67,7 +67,7 @@
* @param uuid the key of rows
* @return Row new row
*/
- public Row getNew(UUID uuid) {
+ public Row getNew(Uuid uuid) {
RowUpdate rowUpdate = rows.get(uuid);
if (rowUpdate == null) {
return null;
@@ -79,7 +79,7 @@
* Return rows.
* @return rows
*/
- public Map<UUID, RowUpdate> rows() {
+ public Map<Uuid, RowUpdate> rows() {
return rows;
}
diff --git a/protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/notation/Row.java b/protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/notation/Row.java
index 0908876..eee0ee8 100644
--- a/protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/notation/Row.java
+++ b/protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/notation/Row.java
@@ -29,7 +29,7 @@
*/
public final class Row {
private String tableName;
- private UUID uuid;
+ private Uuid uuid;
private Map<String, Column> columns;
/**
@@ -59,7 +59,7 @@
* @param columns Map of Column entity
* @param uuid UUID of the row
*/
- public Row(String tableName, UUID uuid, Map<String, Column> columns) {
+ public Row(String tableName, Uuid uuid, Map<String, Column> columns) {
checkNotNull(tableName, "table name cannot be null");
checkNotNull(uuid, "uuid cannot be null");
checkNotNull(columns, "columns cannot be null");
@@ -91,7 +91,7 @@
*
* @return uuid
*/
- public UUID uuid() {
+ public Uuid uuid() {
return uuid;
}
@@ -100,7 +100,7 @@
*
* @param uuid new uuid
*/
- public void setUuid(UUID uuid) {
+ public void setUuid(Uuid uuid) {
this.uuid = uuid;
}
diff --git a/protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/notation/UUID.java b/protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/notation/Uuid.java
similarity index 80%
rename from protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/notation/UUID.java
rename to protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/notation/Uuid.java
index 0177eea..8040081 100644
--- a/protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/notation/UUID.java
+++ b/protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/notation/Uuid.java
@@ -20,8 +20,8 @@
import java.util.Objects;
-import org.onosproject.ovsdb.rfc.notation.json.UUIDConverter;
-import org.onosproject.ovsdb.rfc.notation.json.UUIDSerializer;
+import org.onosproject.ovsdb.rfc.notation.json.UuidConverter;
+import org.onosproject.ovsdb.rfc.notation.json.UuidSerializer;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
@@ -29,16 +29,16 @@
/**
* Handles both uuid and named-uuid.
*/
-@JsonSerialize(using = UUIDSerializer.class)
-@JsonDeserialize(converter = UUIDConverter.class)
-public final class UUID {
+@JsonSerialize(using = UuidSerializer.class)
+@JsonDeserialize(converter = UuidConverter.class)
+public final class Uuid {
private final String value;
/**
* UUID constructor.
* @param value UUID value
*/
- private UUID(String value) {
+ private Uuid(String value) {
checkNotNull(value, "value cannot be null");
this.value = value;
}
@@ -48,8 +48,8 @@
* @param value UUID value
* @return UUID
*/
- public static UUID uuid(String value) {
- return new UUID(value);
+ public static Uuid uuid(String value) {
+ return new Uuid(value);
}
/**
@@ -70,8 +70,8 @@
if (this == obj) {
return true;
}
- if (obj instanceof UUID) {
- final UUID other = (UUID) obj;
+ if (obj instanceof Uuid) {
+ final Uuid other = (Uuid) obj;
return Objects.equals(this.value, other.value);
}
return false;
diff --git a/protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/notation/json/UUIDConverter.java b/protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/notation/json/UuidConverter.java
similarity index 80%
rename from protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/notation/json/UUIDConverter.java
rename to protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/notation/json/UuidConverter.java
index 66a8663..cd4449e 100644
--- a/protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/notation/json/UUIDConverter.java
+++ b/protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/notation/json/UuidConverter.java
@@ -15,7 +15,7 @@
*/
package org.onosproject.ovsdb.rfc.notation.json;
-import org.onosproject.ovsdb.rfc.notation.UUID;
+import org.onosproject.ovsdb.rfc.notation.Uuid;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.util.StdConverter;
@@ -23,10 +23,10 @@
/**
* UUIDConverter Converter.
*/
-public class UUIDConverter extends StdConverter<JsonNode, UUID> {
+public class UuidConverter extends StdConverter<JsonNode, Uuid> {
@Override
- public UUID convert(JsonNode json) {
- return UUID.uuid(json.get(1).asText());
+ public Uuid convert(JsonNode json) {
+ return Uuid.uuid(json.get(1).asText());
}
}
diff --git a/protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/notation/json/UUIDSerializer.java b/protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/notation/json/UuidSerializer.java
similarity index 88%
rename from protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/notation/json/UUIDSerializer.java
rename to protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/notation/json/UuidSerializer.java
index 8fb5c49..4201bd1 100644
--- a/protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/notation/json/UUIDSerializer.java
+++ b/protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/notation/json/UuidSerializer.java
@@ -15,20 +15,19 @@
*/
package org.onosproject.ovsdb.rfc.notation.json;
-import java.io.IOException;
-
-import org.onosproject.ovsdb.rfc.notation.UUID;
-
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
+import org.onosproject.ovsdb.rfc.notation.Uuid;
+
+import java.io.IOException;
/**
* UUID Serializer.
*/
-public class UUIDSerializer extends JsonSerializer<UUID> {
+public class UuidSerializer extends JsonSerializer<Uuid> {
@Override
- public void serialize(UUID value, JsonGenerator generator,
+ public void serialize(Uuid value, JsonGenerator generator,
SerializerProvider provider) throws IOException {
generator.writeStartArray();
String reg = "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$";
diff --git a/protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/table/Bridge.java b/protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/table/Bridge.java
index 0b5ffef..e1a00ba 100644
--- a/protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/table/Bridge.java
+++ b/protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/table/Bridge.java
@@ -18,7 +18,7 @@
import org.onosproject.ovsdb.rfc.notation.Column;
import org.onosproject.ovsdb.rfc.notation.OvsdbSet;
import org.onosproject.ovsdb.rfc.notation.Row;
-import org.onosproject.ovsdb.rfc.notation.UUID;
+import org.onosproject.ovsdb.rfc.notation.Uuid;
import org.onosproject.ovsdb.rfc.schema.DatabaseSchema;
import org.onosproject.ovsdb.rfc.tableservice.AbstractOvsdbTableService;
import org.onosproject.ovsdb.rfc.tableservice.ColumnDescription;
@@ -212,7 +212,7 @@
* attributes.
* @param ports the column data which column name is "ports"
*/
- public void setPorts(Set<UUID> ports) {
+ public void setPorts(Set<Uuid> ports) {
ColumnDescription columndesc = new ColumnDescription(
BridgeColumn.PORTS
.columnName(),
@@ -240,7 +240,7 @@
* attributes.
* @param mirrors the column data which column name is "mirrors"
*/
- public void setMirrors(Set<UUID> mirrors) {
+ public void setMirrors(Set<Uuid> mirrors) {
ColumnDescription columndesc = new ColumnDescription(
BridgeColumn.MIRRORS
.columnName(),
@@ -268,7 +268,7 @@
* attributes.
* @param netflow the column data which column name is "netflow"
*/
- public void setNetflow(Set<UUID> netflow) {
+ public void setNetflow(Set<Uuid> netflow) {
ColumnDescription columndesc = new ColumnDescription(
BridgeColumn.NETFLOW
.columnName(),
@@ -296,7 +296,7 @@
* attributes.
* @param sflow the column data which column name is "sflow"
*/
- public void setSflow(Set<UUID> sflow) {
+ public void setSflow(Set<Uuid> sflow) {
ColumnDescription columndesc = new ColumnDescription(
BridgeColumn.SFLOW
.columnName(),
@@ -324,7 +324,7 @@
* attributes.
* @param ipfix the column data which column name is "ipfix"
*/
- public void setIpfix(Set<UUID> ipfix) {
+ public void setIpfix(Set<Uuid> ipfix) {
ColumnDescription columndesc = new ColumnDescription(
BridgeColumn.IPFIX
.columnName(),
@@ -548,7 +548,7 @@
* of attributes.
* @param flowTables the column data which column name is "flow_tables"
*/
- public void setFlowTables(Map<Long, UUID> flowTables) {
+ public void setFlowTables(Map<Long, Uuid> flowTables) {
ColumnDescription columndesc = new ColumnDescription(
BridgeColumn.FLOWTABLES
.columnName(),
diff --git a/protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/table/FlowSampleCollectorSet.java b/protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/table/FlowSampleCollectorSet.java
index 05a0354..7df78ee 100644
--- a/protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/table/FlowSampleCollectorSet.java
+++ b/protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/table/FlowSampleCollectorSet.java
@@ -19,7 +19,7 @@
import org.onosproject.ovsdb.rfc.notation.Column;
import org.onosproject.ovsdb.rfc.notation.Row;
-import org.onosproject.ovsdb.rfc.notation.UUID;
+import org.onosproject.ovsdb.rfc.notation.Uuid;
import org.onosproject.ovsdb.rfc.schema.DatabaseSchema;
import org.onosproject.ovsdb.rfc.tableservice.AbstractOvsdbTableService;
import org.onosproject.ovsdb.rfc.tableservice.ColumnDescription;
@@ -97,7 +97,7 @@
* attributes.
* @param bridge the column data which column name is "bridge"
*/
- public void setBridge(UUID bridge) {
+ public void setBridge(Uuid bridge) {
ColumnDescription columndesc = new ColumnDescription(FlowSampleCollectorSetColumn.BRIDGE.columnName(),
"setBridge", VersionNum.VERSION710);
super.setDataHandler(columndesc, bridge);
@@ -119,7 +119,7 @@
* attributes.
* @param ipfix the column data which column name is "ipfix"
*/
- public void setIpfix(UUID ipfix) {
+ public void setIpfix(Uuid ipfix) {
ColumnDescription columndesc = new ColumnDescription(FlowSampleCollectorSetColumn.IPFIX.columnName(),
"setIpfix", VersionNum.VERSION710);
super.setDataHandler(columndesc, ipfix);
diff --git a/protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/table/Mirror.java b/protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/table/Mirror.java
index ec022fe..093b13f 100644
--- a/protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/table/Mirror.java
+++ b/protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/table/Mirror.java
@@ -20,7 +20,7 @@
import org.onosproject.ovsdb.rfc.notation.Column;
import org.onosproject.ovsdb.rfc.notation.Row;
-import org.onosproject.ovsdb.rfc.notation.UUID;
+import org.onosproject.ovsdb.rfc.notation.Uuid;
import org.onosproject.ovsdb.rfc.schema.DatabaseSchema;
import org.onosproject.ovsdb.rfc.tableservice.AbstractOvsdbTableService;
import org.onosproject.ovsdb.rfc.tableservice.ColumnDescription;
@@ -114,7 +114,7 @@
* @param selectSrcPort the column data which column name is
* "select_src_port"
*/
- public void setSelectSrcPort(Set<UUID> selectSrcPort) {
+ public void setSelectSrcPort(Set<Uuid> selectSrcPort) {
ColumnDescription columndesc = new ColumnDescription(MirrorColumn.SELECTSRCPORT.columnName(),
"setSelectSrcPort", VersionNum.VERSION100);
super.setDataHandler(columndesc, selectSrcPort);
@@ -137,7 +137,7 @@
* @param selectDstPrt the column data which column name is
* "select_dst_port"
*/
- public void setSelectDstPort(Set<UUID> selectDstPrt) {
+ public void setSelectDstPort(Set<Uuid> selectDstPrt) {
ColumnDescription columndesc = new ColumnDescription(MirrorColumn.SELECTDSTPORT.columnName(),
"setSelectDstPort", VersionNum.VERSION100);
super.setDataHandler(columndesc, selectDstPrt);
@@ -181,7 +181,7 @@
* of attributes.
* @param outputPort the column data which column name is "output_port"
*/
- public void setOutputPort(Set<UUID> outputPort) {
+ public void setOutputPort(Set<Uuid> outputPort) {
ColumnDescription columndesc = new ColumnDescription(MirrorColumn.OUTPUTPORT.columnName(),
"setOutputPort", VersionNum.VERSION100);
super.setDataHandler(columndesc, outputPort);
diff --git a/protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/table/OpenVSwitch.java b/protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/table/OpenVSwitch.java
index 9d20b98..782f54d 100644
--- a/protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/table/OpenVSwitch.java
+++ b/protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/table/OpenVSwitch.java
@@ -20,7 +20,7 @@
import org.onosproject.ovsdb.rfc.notation.Column;
import org.onosproject.ovsdb.rfc.notation.Row;
-import org.onosproject.ovsdb.rfc.notation.UUID;
+import org.onosproject.ovsdb.rfc.notation.Uuid;
import org.onosproject.ovsdb.rfc.schema.DatabaseSchema;
import org.onosproject.ovsdb.rfc.tableservice.AbstractOvsdbTableService;
import org.onosproject.ovsdb.rfc.tableservice.ColumnDescription;
@@ -85,7 +85,7 @@
* attributes.
* @param bridges the column data which column name is "bridges"
*/
- public void setBridges(Set<UUID> bridges) {
+ public void setBridges(Set<Uuid> bridges) {
ColumnDescription columndesc = new ColumnDescription(
OpenVSwitchColumn.BRIDGES
.columnName(),
@@ -114,7 +114,7 @@
* attributes.
* @param managers the column data which column name is "managers"
*/
- public void setManagers(Set<UUID> managers) {
+ public void setManagers(Set<Uuid> managers) {
ColumnDescription columndesc = new ColumnDescription(
OpenVSwitchColumn.MANAGERS
.columnName(),
@@ -144,7 +144,7 @@
* @param managerOptions the column data which column name is
* "manager_options"
*/
- public void setManagerOptions(Set<UUID> managerOptions) {
+ public void setManagerOptions(Set<Uuid> managerOptions) {
ColumnDescription columndesc = new ColumnDescription(
OpenVSwitchColumn.MANAGEROPTIONS
.columnName(),
@@ -172,7 +172,7 @@
* attributes.
* @param ssl the column data which column name is "ssl"
*/
- public void setSsl(Set<UUID> ssl) {
+ public void setSsl(Set<Uuid> ssl) {
ColumnDescription columndesc = new ColumnDescription(
OpenVSwitchColumn.SSL
.columnName(),
@@ -313,7 +313,7 @@
* of attributes.
* @param capabilities the column data which column name is "capabilities"
*/
- public void setCapabilities(Map<String, UUID> capabilities) {
+ public void setCapabilities(Map<String, Uuid> capabilities) {
ColumnDescription columndesc = new ColumnDescription(
OpenVSwitchColumn.CAPABILITIES
.columnName(),
diff --git a/protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/table/Port.java b/protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/table/Port.java
index 1e1ab7d..2851166 100644
--- a/protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/table/Port.java
+++ b/protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/table/Port.java
@@ -20,7 +20,7 @@
import org.onosproject.ovsdb.rfc.notation.Column;
import org.onosproject.ovsdb.rfc.notation.Row;
-import org.onosproject.ovsdb.rfc.notation.UUID;
+import org.onosproject.ovsdb.rfc.notation.Uuid;
import org.onosproject.ovsdb.rfc.schema.DatabaseSchema;
import org.onosproject.ovsdb.rfc.tableservice.AbstractOvsdbTableService;
import org.onosproject.ovsdb.rfc.tableservice.ColumnDescription;
@@ -126,7 +126,7 @@
* of attributes.
* @param interfaces the column data which column name is "interfaces"
*/
- public void setInterfaces(Set<UUID> interfaces) {
+ public void setInterfaces(Set<Uuid> interfaces) {
ColumnDescription columndesc = new ColumnDescription(
PortColumn.INTERFACES
.columnName(),
@@ -238,7 +238,7 @@
* attributes.
* @param qos the column data which column name is "qos"
*/
- public void setQos(Set<UUID> qos) {
+ public void setQos(Set<Uuid> qos) {
ColumnDescription columndesc = new ColumnDescription(
PortColumn.QOS
.columnName(),
diff --git a/protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/table/Qos.java b/protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/table/Qos.java
index a40aa30..348a7b5 100644
--- a/protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/table/Qos.java
+++ b/protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/table/Qos.java
@@ -20,7 +20,7 @@
import org.onosproject.ovsdb.rfc.notation.Column;
import org.onosproject.ovsdb.rfc.notation.Row;
-import org.onosproject.ovsdb.rfc.notation.UUID;
+import org.onosproject.ovsdb.rfc.notation.Uuid;
import org.onosproject.ovsdb.rfc.schema.DatabaseSchema;
import org.onosproject.ovsdb.rfc.tableservice.AbstractOvsdbTableService;
import org.onosproject.ovsdb.rfc.tableservice.ColumnDescription;
@@ -75,7 +75,7 @@
* attributes.
* @param queues the column data which column name is "queues"
*/
- public void setQueues(Map<Long, UUID> queues) {
+ public void setQueues(Map<Long, Uuid> queues) {
ColumnDescription columndesc = new ColumnDescription(QosColumn.QUEUES.columnName(), "setQueues",
VersionNum.VERSION100);
super.setDataHandler(columndesc, queues);
diff --git a/protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/tableservice/AbstractOvsdbTableService.java b/protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/tableservice/AbstractOvsdbTableService.java
index af1a01d..8e05174 100644
--- a/protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/tableservice/AbstractOvsdbTableService.java
+++ b/protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/tableservice/AbstractOvsdbTableService.java
@@ -25,7 +25,7 @@
import org.onosproject.ovsdb.rfc.exception.VersionMismatchException;
import org.onosproject.ovsdb.rfc.notation.Column;
import org.onosproject.ovsdb.rfc.notation.Row;
-import org.onosproject.ovsdb.rfc.notation.UUID;
+import org.onosproject.ovsdb.rfc.notation.Uuid;
import org.onosproject.ovsdb.rfc.schema.ColumnSchema;
import org.onosproject.ovsdb.rfc.schema.DatabaseSchema;
import org.onosproject.ovsdb.rfc.schema.TableSchema;
@@ -196,12 +196,12 @@
}
@Override
- public UUID getTableUuid() {
+ public Uuid getTableUuid() {
if (!isValid()) {
return null;
}
ColumnDescription columnDesc = new ColumnDescription("_uuid", "getTableUuid");
- return (UUID) getDataHandler(columnDesc);
+ return (Uuid) getDataHandler(columnDesc);
}
@Override
@@ -214,12 +214,12 @@
}
@Override
- public UUID getTableVersion() {
+ public Uuid getTableVersion() {
if (!isValid()) {
return null;
}
ColumnDescription columnDesc = new ColumnDescription("_version", "getTableVersion");
- return (UUID) getDataHandler(columnDesc);
+ return (Uuid) getDataHandler(columnDesc);
}
@Override
diff --git a/protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/tableservice/OvsdbTableService.java b/protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/tableservice/OvsdbTableService.java
index 58b656e..9e10601 100644
--- a/protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/tableservice/OvsdbTableService.java
+++ b/protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/tableservice/OvsdbTableService.java
@@ -16,7 +16,7 @@
package org.onosproject.ovsdb.rfc.tableservice;
import org.onosproject.ovsdb.rfc.notation.Column;
-import org.onosproject.ovsdb.rfc.notation.UUID;
+import org.onosproject.ovsdb.rfc.notation.Uuid;
/**
* Representation of conversion between Ovsdb table and Row.
@@ -48,7 +48,7 @@
* Returns UUID which column name is _uuid.
* @return UUID
*/
- public UUID getTableUuid();
+ public Uuid getTableUuid();
/**
* Returns UUID Column which column name is _uuid.
@@ -60,7 +60,7 @@
* Returns UUID which column name is _version.
* @return UUID
*/
- public UUID getTableVersion();
+ public Uuid getTableVersion();
/**
* Returns UUID Column which column name is _version.
diff --git a/protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/utils/FromJsonUtil.java b/protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/utils/FromJsonUtil.java
index 1e79860..0cd6553 100644
--- a/protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/utils/FromJsonUtil.java
+++ b/protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/utils/FromJsonUtil.java
@@ -31,7 +31,7 @@
import org.onosproject.ovsdb.rfc.message.UpdateNotification;
import org.onosproject.ovsdb.rfc.notation.Column;
import org.onosproject.ovsdb.rfc.notation.Row;
-import org.onosproject.ovsdb.rfc.notation.UUID;
+import org.onosproject.ovsdb.rfc.notation.Uuid;
import org.onosproject.ovsdb.rfc.operations.Operation;
import org.onosproject.ovsdb.rfc.schema.ColumnSchema;
import org.onosproject.ovsdb.rfc.schema.DatabaseSchema;
@@ -276,12 +276,12 @@
* @return TableUpdate
*/
public static TableUpdate jsonNodeToTableUpdate(TableSchema tableSchema, JsonNode updateJson) {
- Map<UUID, RowUpdate> rows = Maps.newHashMap();
+ Map<Uuid, RowUpdate> rows = Maps.newHashMap();
Iterator<Map.Entry<String, JsonNode>> tableUpdateItr = updateJson.fields();
while (tableUpdateItr.hasNext()) {
Map.Entry<String, JsonNode> oldNewRow = tableUpdateItr.next();
String uuidStr = oldNewRow.getKey();
- UUID uuid = UUID.uuid(uuidStr);
+ Uuid uuid = Uuid.uuid(uuidStr);
JsonNode newR = oldNewRow.getValue().get("new");
JsonNode oldR = oldNewRow.getValue().get("old");
Row newRow = newR != null ? createRow(tableSchema, uuid, newR) : null;
@@ -298,7 +298,7 @@
* @param rowNode JsonNode
* @return Row
*/
- private static Row createRow(TableSchema tableSchema, UUID uuid, JsonNode rowNode) {
+ private static Row createRow(TableSchema tableSchema, Uuid uuid, JsonNode rowNode) {
if (tableSchema == null) {
return null;
}
diff --git a/protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/utils/TransValueUtil.java b/protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/utils/TransValueUtil.java
index 49fbd37..2d5b84d 100644
--- a/protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/utils/TransValueUtil.java
+++ b/protocols/ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/utils/TransValueUtil.java
@@ -21,7 +21,7 @@
import org.onosproject.ovsdb.rfc.notation.OvsdbMap;
import org.onosproject.ovsdb.rfc.notation.OvsdbSet;
import org.onosproject.ovsdb.rfc.notation.RefTableRow;
-import org.onosproject.ovsdb.rfc.notation.UUID;
+import org.onosproject.ovsdb.rfc.notation.Uuid;
import org.onosproject.ovsdb.rfc.schema.type.AtomicColumnType;
import org.onosproject.ovsdb.rfc.schema.type.BaseType;
import org.onosproject.ovsdb.rfc.schema.type.BooleanBaseType;
@@ -160,7 +160,7 @@
if (valueNode.get(0).isTextual()
&& ("uuid".equals(valueNode.get(0).asText()) || "named-uuid"
.equals(valueNode.get(0).asText()))) {
- return UUID.uuid(valueNode.get(1).asText());
+ return Uuid.uuid(valueNode.get(1).asText());
}
}
} else {
diff --git a/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcInitiatedLspRequestVer1.java b/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcInitiatedLspRequestVer1.java
index d61f731..a179b74 100644
--- a/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcInitiatedLspRequestVer1.java
+++ b/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcInitiatedLspRequestVer1.java
@@ -145,10 +145,10 @@
*/
public static class Builder implements PcInitiatedLspRequest.Builder {
- private boolean bIsSRPObjectSet = false;
- private boolean bIsLSPObjectSet = false;
+ private boolean bIsSrpObjectSet = false;
+ private boolean bIsLspObjectSet = false;
private boolean bIsEndPointsObjectSet = false;
- private boolean bIsEROObjectSet = false;
+ private boolean bIsEroObjectSet = false;
private boolean bIsPcepAttributeSet = false;
private boolean bIsbRFlagSet = false;
@@ -178,7 +178,7 @@
PcepAttribute pcepAttribute = null;
boolean bRFlag = false;
- if (!this.bIsSRPObjectSet) {
+ if (!this.bIsSrpObjectSet) {
throw new PcepParseException("Srp object NOT Set while building PcInitiatedLspRequest");
} else {
srpObject = this.srpObject;
@@ -191,7 +191,7 @@
this.bIsbRFlagSet = false;
}
- if (!this.bIsLSPObjectSet) {
+ if (!this.bIsLspObjectSet) {
throw new PcepParseException("LSP Object NOT Set while building PcInitiatedLspRequest");
} else {
lspObject = this.lspObject;
@@ -203,7 +203,7 @@
} else {
endPointsObject = this.endPointsObject;
}
- if (!this.bIsEROObjectSet) {
+ if (!this.bIsEroObjectSet) {
throw new PcepParseException("ERO Object NOT Set while building PcInitiatedLspRequest");
} else {
eroObject = this.eroObject;
@@ -243,7 +243,7 @@
@Override
public Builder setSrpObject(PcepSrpObject srpobj) {
this.srpObject = srpobj;
- this.bIsSRPObjectSet = true;
+ this.bIsSrpObjectSet = true;
return this;
}
@@ -251,7 +251,7 @@
@Override
public Builder setLspObject(PcepLspObject lspObject) {
this.lspObject = lspObject;
- this.bIsLSPObjectSet = true;
+ this.bIsLspObjectSet = true;
return this;
}
@@ -265,7 +265,7 @@
@Override
public Builder setEroObject(PcepEroObject eroObject) {
this.eroObject = eroObject;
- this.bIsEROObjectSet = true;
+ this.bIsEroObjectSet = true;
return this;
}
diff --git a/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepLabelUpdateVer1.java b/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepLabelUpdateVer1.java
index a2293d3..0bc675e 100644
--- a/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepLabelUpdateVer1.java
+++ b/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepLabelUpdateVer1.java
@@ -236,7 +236,7 @@
default:
throw new PcepParseException("Unkown FEC object type " + tempObjHeader.getObjType());
}
- labelMap.setFECObject(fecObject);
+ labelMap.setFecObject(fecObject);
pceLabelUpdate.setLabelMap(labelMap);
} else {
throw new PcepParseException(
@@ -308,7 +308,7 @@
} else {
labelObject.write(cb);
}
- fecObject = labelMap.getFECObject();
+ fecObject = labelMap.getFecObject();
if (fecObject == null) {
throw new PcepParseException("fec Object is mandatory object for Label map.");
} else {
diff --git a/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepMsgPathVer1.java b/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepMsgPathVer1.java
index 49c738f..a7fbc53 100644
--- a/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepMsgPathVer1.java
+++ b/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepMsgPathVer1.java
@@ -121,7 +121,7 @@
*/
public static class Builder implements PcepMsgPath.Builder {
- private boolean bIsEROObjectSet = false;
+ private boolean bIsEroObjectSet = false;
private boolean bIsPcepAttributeSet = false;
//PCEP ERO Object
@@ -137,7 +137,7 @@
//PCEP Attribute list
PcepAttribute pcepAttribute = null;
- if (!this.bIsEROObjectSet) {
+ if (!this.bIsEroObjectSet) {
throw new PcepParseException("ERO Object NOT Set while building PcepMsgPath.");
} else {
eroObject = this.eroObject;
@@ -164,7 +164,7 @@
@Override
public Builder setEroObject(PcepEroObject eroObject) {
this.eroObject = eroObject;
- this.bIsEROObjectSet = true;
+ this.bIsEroObjectSet = true;
return this;
}
diff --git a/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepStateReportVer1.java b/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepStateReportVer1.java
index ce589bc..d67bfd3 100644
--- a/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepStateReportVer1.java
+++ b/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepStateReportVer1.java
@@ -333,8 +333,8 @@
*/
public static class Builder implements PcepStateReport.Builder {
- private boolean bIsSRPObjectSet = false;
- private boolean bIsLSPObjectSet = false;
+ private boolean bIsSrpObjectSet = false;
+ private boolean bIsLspObjectSet = false;
private boolean bIsPcepMsgPathSet = false;
//PCEP SRP Object
@@ -354,11 +354,11 @@
//PCEP Attribute list
PcepStateReport.PcepMsgPath msgPath = null;
- if (this.bIsSRPObjectSet) {
+ if (this.bIsSrpObjectSet) {
srpObject = this.srpObject;
}
- if (!this.bIsLSPObjectSet) {
+ if (!this.bIsLspObjectSet) {
throw new PcepParseException(" LSP Object NOT Set while building PcepStateReport.");
} else {
lspObject = this.lspObject;
@@ -390,14 +390,14 @@
@Override
public Builder setSrpObject(PcepSrpObject srpobj) {
this.srpObject = srpobj;
- this.bIsSRPObjectSet = true;
+ this.bIsSrpObjectSet = true;
return this;
}
@Override
public Builder setLspObject(PcepLspObject lspObject) {
this.lspObject = lspObject;
- this.bIsLSPObjectSet = true;
+ this.bIsLspObjectSet = true;
return this;
}
diff --git a/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepUpdateRequestVer1.java b/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepUpdateRequestVer1.java
index 0bcc290..9fc8d70 100644
--- a/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepUpdateRequestVer1.java
+++ b/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepUpdateRequestVer1.java
@@ -110,8 +110,8 @@
*/
public static class Builder implements PcepUpdateRequest.Builder {
- private boolean bIsSRPObjectSet = false;
- private boolean bIsLSPObjectSet = false;
+ private boolean bIsSrpObjectSet = false;
+ private boolean bIsLspObjectSet = false;
private boolean bIsPcepMsgPathSet = false;
//PCEP SRP Object
@@ -131,12 +131,12 @@
//PCEP Attribute list
PcepMsgPath msgPath = null;
- if (!this.bIsSRPObjectSet) {
+ if (!this.bIsSrpObjectSet) {
throw new PcepParseException(" SRP Object NOT Set while building PcepUpdateRequest.");
} else {
srpObject = this.srpObject;
}
- if (!this.bIsLSPObjectSet) {
+ if (!this.bIsLspObjectSet) {
throw new PcepParseException(" LSP Object NOT Set while building PcepUpdateRequest.");
} else {
lspObject = this.lspObject;
@@ -168,7 +168,7 @@
@Override
public Builder setSrpObject(PcepSrpObject srpobj) {
this.srpObject = srpobj;
- this.bIsSRPObjectSet = true;
+ this.bIsSrpObjectSet = true;
return this;
}
@@ -176,7 +176,7 @@
@Override
public Builder setLspObject(PcepLspObject lspObject) {
this.lspObject = lspObject;
- this.bIsLSPObjectSet = true;
+ this.bIsLspObjectSet = true;
return this;
}
diff --git a/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/BGPLSidentifierTlv.java b/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/BgpLsIdentifierTlv.java
similarity index 88%
rename from protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/BGPLSidentifierTlv.java
rename to protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/BgpLsIdentifierTlv.java
index 4981649..9fd80c4 100644
--- a/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/BGPLSidentifierTlv.java
+++ b/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/BgpLsIdentifierTlv.java
@@ -27,7 +27,7 @@
/**
* Provides BGP LS identifier which contains opaque value (32 Bit ID).
*/
-public class BGPLSidentifierTlv implements PcepValueType {
+public class BgpLsIdentifierTlv implements PcepValueType {
/* Reference :draft-ietf-idr-ls-distribution-10
* 0 1 2 3
@@ -39,7 +39,7 @@
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
*/
- protected static final Logger log = LoggerFactory.getLogger(BGPLSidentifierTlv.class);
+ protected static final Logger log = LoggerFactory.getLogger(BgpLsIdentifierTlv.class);
public static final short TYPE = 17; //TODD:change this TBD11
public static final short LENGTH = 4;
@@ -51,7 +51,7 @@
*
* @param rawValue BGP LS identifier Tlv
*/
- public BGPLSidentifierTlv(int rawValue) {
+ public BgpLsIdentifierTlv(int rawValue) {
this.rawValue = rawValue;
}
@@ -61,8 +61,8 @@
* @param raw value
* @return object of BGPLSidentifierTlv
*/
- public static BGPLSidentifierTlv of(final int raw) {
- return new BGPLSidentifierTlv(raw);
+ public static BgpLsIdentifierTlv of(final int raw) {
+ return new BgpLsIdentifierTlv(raw);
}
/**
@@ -99,8 +99,8 @@
if (this == obj) {
return true;
}
- if (obj instanceof BGPLSidentifierTlv) {
- BGPLSidentifierTlv other = (BGPLSidentifierTlv) obj;
+ if (obj instanceof BgpLsIdentifierTlv) {
+ BgpLsIdentifierTlv other = (BgpLsIdentifierTlv) obj;
return Objects.equals(rawValue, other.rawValue);
}
return false;
@@ -121,8 +121,8 @@
* @param c input channel buffer
* @return object of BGP LS identifier Tlv
*/
- public static BGPLSidentifierTlv read(ChannelBuffer c) {
- return BGPLSidentifierTlv.of(c.readInt());
+ public static BgpLsIdentifierTlv read(ChannelBuffer c) {
+ return BgpLsIdentifierTlv.of(c.readInt());
}
@Override
diff --git a/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/IPv6InterfaceAddressTlv.java b/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/IPv6InterfaceAddressTlv.java
index 62a5588..386de1d 100644
--- a/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/IPv6InterfaceAddressTlv.java
+++ b/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/IPv6InterfaceAddressTlv.java
@@ -15,15 +15,14 @@
*/
package org.onosproject.pcepio.types;
-import java.util.Arrays;
-
+import com.google.common.base.MoreObjects;
+import com.google.common.base.MoreObjects.ToStringHelper;
import org.jboss.netty.buffer.ChannelBuffer;
import org.onosproject.pcepio.protocol.PcepVersion;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import com.google.common.base.MoreObjects;
-import com.google.common.base.MoreObjects.ToStringHelper;
+import java.util.Arrays;
/**
* Provides IPv6 Interface Address. REFERENCE :[RFC6119]/4.2.
@@ -65,15 +64,15 @@
*/
public static IPv6InterfaceAddressTlv of(final byte[] raw) {
//check NONE_VAL
- boolean bFoundNONE = true;
+ boolean bFoundNone = true;
//value starts from 3rd byte.
for (int i = 2; i < 20; ++i) {
if (NONE_VAL[i] != raw[i]) {
- bFoundNONE = false;
+ bFoundNone = false;
}
}
- if (bFoundNONE) {
+ if (bFoundNone) {
return NONE;
}
diff --git a/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/IPv6NeighborAddressTlv.java b/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/IPv6NeighborAddressTlv.java
index fb9b98a..3684af9 100644
--- a/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/IPv6NeighborAddressTlv.java
+++ b/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/IPv6NeighborAddressTlv.java
@@ -15,15 +15,14 @@
*/
package org.onosproject.pcepio.types;
-import java.util.Arrays;
-
+import com.google.common.base.MoreObjects;
+import com.google.common.base.MoreObjects.ToStringHelper;
import org.jboss.netty.buffer.ChannelBuffer;
import org.onosproject.pcepio.protocol.PcepVersion;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import com.google.common.base.MoreObjects;
-import com.google.common.base.MoreObjects.ToStringHelper;
+import java.util.Arrays;
/**
* Provides IPv6 Neighbor Address. Reference :[RFC6119]/4.3.
@@ -63,15 +62,15 @@
*/
public static IPv6NeighborAddressTlv of(final byte[] raw) {
//check NONE_VAL
- boolean bFoundNONE = true;
+ boolean bFoundNone = true;
//value starts from 3rd byte.
for (int i = 2; i < 20; ++i) {
if (NONE_VAL[i] != raw[i]) {
- bFoundNONE = false;
+ bFoundNone = false;
}
}
- if (bFoundNONE) {
+ if (bFoundNone) {
return NONE;
}
diff --git a/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/IPv6SubObject.java b/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/IPv6SubObject.java
index b3164f2..d05240f 100644
--- a/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/IPv6SubObject.java
+++ b/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/IPv6SubObject.java
@@ -16,15 +16,14 @@
package org.onosproject.pcepio.types;
-import java.util.Arrays;
-
+import com.google.common.base.MoreObjects;
+import com.google.common.base.MoreObjects.ToStringHelper;
import org.jboss.netty.buffer.ChannelBuffer;
import org.onosproject.pcepio.protocol.PcepVersion;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import com.google.common.base.MoreObjects;
-import com.google.common.base.MoreObjects.ToStringHelper;
+import java.util.Arrays;
/**
* Provides IPv6 Sub Object.
@@ -115,15 +114,15 @@
*/
public static IPv6SubObject of(final byte[] raw) {
//check NONE_VAL
- boolean bFoundNONE = true;
+ boolean bFoundNone = true;
//value starts from 3rd byte.
for (int i = 2; i < 20; ++i) {
if (NONE_VAL[i] != raw[i]) {
- bFoundNONE = false;
+ bFoundNone = false;
}
}
- if (bFoundNONE) {
+ if (bFoundNone) {
return NONE;
}
diff --git a/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/IPv6TERouterIdofLocalNodeTlv.java b/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/IPv6TERouterIdofLocalNodeTlv.java
index f10d5e3..7330fa0 100644
--- a/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/IPv6TERouterIdofLocalNodeTlv.java
+++ b/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/IPv6TERouterIdofLocalNodeTlv.java
@@ -15,15 +15,14 @@
*/
package org.onosproject.pcepio.types;
-import java.util.Arrays;
-
+import com.google.common.base.MoreObjects;
+import com.google.common.base.MoreObjects.ToStringHelper;
import org.jboss.netty.buffer.ChannelBuffer;
import org.onosproject.pcepio.protocol.PcepVersion;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import com.google.common.base.MoreObjects;
-import com.google.common.base.MoreObjects.ToStringHelper;
+import java.util.Arrays;
/**
* Provides IPv6 TE Router Id of Local Node. Reference :[RFC6119]/4.1.
@@ -63,15 +62,15 @@
*/
public static IPv6TERouterIdofLocalNodeTlv of(final byte[] raw) {
//check NONE_VAL
- boolean bFoundNONE = true;
+ boolean bFoundNone = true;
//value starts from 3rd byte.
for (int i = 2; i < 20; ++i) {
if (NONE_VAL[i] != raw[i]) {
- bFoundNONE = false;
+ bFoundNone = false;
}
}
- if (bFoundNONE) {
+ if (bFoundNone) {
return NONE;
}
diff --git a/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/IPv6TERouterIdofRemoteNodeTlv.java b/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/IPv6TERouterIdofRemoteNodeTlv.java
index bf1d475..dd24788 100644
--- a/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/IPv6TERouterIdofRemoteNodeTlv.java
+++ b/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/IPv6TERouterIdofRemoteNodeTlv.java
@@ -15,15 +15,14 @@
*/
package org.onosproject.pcepio.types;
-import java.util.Arrays;
-
+import com.google.common.base.MoreObjects;
+import com.google.common.base.MoreObjects.ToStringHelper;
import org.jboss.netty.buffer.ChannelBuffer;
import org.onosproject.pcepio.protocol.PcepVersion;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import com.google.common.base.MoreObjects;
-import com.google.common.base.MoreObjects.ToStringHelper;
+import java.util.Arrays;
/**
* Provides IPv6 TE Router Id of Remote Node. Reference :[RFC6119]/4.1.
@@ -64,15 +63,15 @@
*/
public static IPv6TERouterIdofRemoteNodeTlv of(final byte[] raw) {
//check NONE_VAL
- boolean bFoundNONE = true;
+ boolean bFoundNone = true;
//value starts from 3rd byte.
for (int i = 2; i < 20; ++i) {
if (NONE_VAL[i] != raw[i]) {
- bFoundNONE = false;
+ bFoundNone = false;
}
}
- if (bFoundNONE) {
+ if (bFoundNone) {
return NONE;
}
diff --git a/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/IGPMetricTlv.java b/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/IgpMetricTlv.java
similarity index 88%
rename from protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/IGPMetricTlv.java
rename to protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/IgpMetricTlv.java
index 07cfea7..fb8eee3 100644
--- a/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/IGPMetricTlv.java
+++ b/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/IgpMetricTlv.java
@@ -15,20 +15,19 @@
*/
package org.onosproject.pcepio.types;
-import java.util.Arrays;
-
+import com.google.common.base.MoreObjects;
+import com.google.common.base.MoreObjects.ToStringHelper;
import org.jboss.netty.buffer.ChannelBuffer;
import org.onosproject.pcepio.protocol.PcepVersion;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import com.google.common.base.MoreObjects;
-import com.google.common.base.MoreObjects.ToStringHelper;
+import java.util.Arrays;
/**
* Provides IGP Link Metric .
*/
-public class IGPMetricTlv implements PcepValueType {
+public class IgpMetricTlv implements PcepValueType {
/* Reference :[I-D.ietf-idr-ls-distribution] /3.3.2.4
* 0 1 2 3
@@ -40,7 +39,7 @@
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
*/
- protected static final Logger log = LoggerFactory.getLogger(IGPMetricTlv.class);
+ protected static final Logger log = LoggerFactory.getLogger(IgpMetricTlv.class);
public static final short TYPE = 1095; //TODO:NEED TO HANDLE TDB40
private short hLength;
@@ -53,7 +52,7 @@
* @param rawValue IGP Link Metric
* @param hLength length
*/
- public IGPMetricTlv(byte[] rawValue, short hLength) {
+ public IgpMetricTlv(byte[] rawValue, short hLength) {
this.rawValue = rawValue;
this.hLength = hLength;
}
@@ -65,8 +64,8 @@
* @param hLength length
* @return object of IGPMetricTlv
*/
- public static IGPMetricTlv of(final byte[] raw, short hLength) {
- return new IGPMetricTlv(raw, hLength);
+ public static IgpMetricTlv of(final byte[] raw, short hLength) {
+ return new IgpMetricTlv(raw, hLength);
}
/**
@@ -103,8 +102,8 @@
if (this == obj) {
return true;
}
- if (obj instanceof IGPMetricTlv) {
- IGPMetricTlv other = (IGPMetricTlv) obj;
+ if (obj instanceof IgpMetricTlv) {
+ IgpMetricTlv other = (IgpMetricTlv) obj;
return Arrays.equals(rawValue, other.rawValue);
}
return false;
@@ -127,9 +126,9 @@
* @return object of IGPMetricTlv
*/
public static PcepValueType read(ChannelBuffer c, short hLength) {
- byte[] iIGPMetric = new byte[hLength];
- c.readBytes(iIGPMetric, 0, hLength);
- return new IGPMetricTlv(iIGPMetric, hLength);
+ byte[] iIgpMetric = new byte[hLength];
+ c.readBytes(iIgpMetric, 0, hLength);
+ return new IgpMetricTlv(iIgpMetric, hLength);
}
@Override
diff --git a/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/ISISAreaIdentifierTlv.java b/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/IsisAreaIdentifierTlv.java
similarity index 87%
rename from protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/ISISAreaIdentifierTlv.java
rename to protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/IsisAreaIdentifierTlv.java
index f9fb4f8..4382fc5 100644
--- a/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/ISISAreaIdentifierTlv.java
+++ b/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/IsisAreaIdentifierTlv.java
@@ -15,21 +15,20 @@
*/
package org.onosproject.pcepio.types;
-import java.util.Arrays;
-import java.util.Objects;
-
+import com.google.common.base.MoreObjects;
+import com.google.common.base.MoreObjects.ToStringHelper;
import org.jboss.netty.buffer.ChannelBuffer;
import org.onosproject.pcepio.protocol.PcepVersion;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import com.google.common.base.MoreObjects;
-import com.google.common.base.MoreObjects.ToStringHelper;
+import java.util.Arrays;
+import java.util.Objects;
/**
* Provides ISIS Area Identifier.
*/
-public class ISISAreaIdentifierTlv implements PcepValueType {
+public class IsisAreaIdentifierTlv implements PcepValueType {
/* Reference :[I-D.ietf-idr- ls-distribution]/3.3.1.2
* 0 1 2 3
@@ -41,7 +40,7 @@
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
*/
- protected static final Logger log = LoggerFactory.getLogger(ISISAreaIdentifierTlv.class);
+ protected static final Logger log = LoggerFactory.getLogger(IsisAreaIdentifierTlv.class);
public static final short TYPE = 107; //TODO:NEED TO HANDLE TBD24
private short hLength;
@@ -54,7 +53,7 @@
* @param rawValue ISIS-Area-Identifier
* @param hLength length
*/
- public ISISAreaIdentifierTlv(byte[] rawValue, short hLength) {
+ public IsisAreaIdentifierTlv(byte[] rawValue, short hLength) {
log.debug("ISISAreaIdentifierTlv");
this.rawValue = rawValue;
if (0 == hLength) {
@@ -71,8 +70,8 @@
* @param hLength length
* @return object of ISISAreaIdentifierTlv
*/
- public static ISISAreaIdentifierTlv of(final byte[] raw, short hLength) {
- return new ISISAreaIdentifierTlv(raw, hLength);
+ public static IsisAreaIdentifierTlv of(final byte[] raw, short hLength) {
+ return new IsisAreaIdentifierTlv(raw, hLength);
}
/**
@@ -109,8 +108,8 @@
if (this == obj) {
return true;
}
- if (obj instanceof ISISAreaIdentifierTlv) {
- ISISAreaIdentifierTlv other = (ISISAreaIdentifierTlv) obj;
+ if (obj instanceof IsisAreaIdentifierTlv) {
+ IsisAreaIdentifierTlv other = (IsisAreaIdentifierTlv) obj;
return Objects.equals(hLength, other.hLength) && Arrays.equals(rawValue, other.rawValue);
}
return false;
@@ -133,9 +132,9 @@
* @return object of ISISAreaIdentifierTlv
*/
public static PcepValueType read(ChannelBuffer c, short hLength) {
- byte[] iISISAreaIdentifier = new byte[hLength];
- c.readBytes(iISISAreaIdentifier, 0, hLength);
- return new ISISAreaIdentifierTlv(iISISAreaIdentifier, hLength);
+ byte[] iIsisAreaIdentifier = new byte[hLength];
+ c.readBytes(iIsisAreaIdentifier, 0, hLength);
+ return new IsisAreaIdentifierTlv(iIsisAreaIdentifier, hLength);
}
@Override
diff --git a/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/LocalTENodeDescriptorsTlv.java b/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/LocalTENodeDescriptorsTlv.java
index b31dac2..e2f9779 100644
--- a/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/LocalTENodeDescriptorsTlv.java
+++ b/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/LocalTENodeDescriptorsTlv.java
@@ -201,13 +201,13 @@
iValue = tempCb.readInt();
tlv = new AutonomousSystemTlv(iValue);
break;
- case BGPLSidentifierTlv.TYPE:
+ case BgpLsIdentifierTlv.TYPE:
iValue = tempCb.readInt();
- tlv = new BGPLSidentifierTlv(iValue);
+ tlv = new BgpLsIdentifierTlv(iValue);
break;
- case OSPFareaIDsubTlv.TYPE:
+ case OspfAreaIdSubTlv.TYPE:
iValue = tempCb.readInt();
- tlv = new OSPFareaIDsubTlv(iValue);
+ tlv = new OspfAreaIdSubTlv(iValue);
break;
case RouterIDSubTlv.TYPE:
tlv = RouterIDSubTlv.read(tempCb, length);
diff --git a/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/MPLSProtocolMaskTlv.java b/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/MplsProtocolMaskTlv.java
similarity index 91%
rename from protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/MPLSProtocolMaskTlv.java
rename to protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/MplsProtocolMaskTlv.java
index fc0f877..95f8514 100644
--- a/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/MPLSProtocolMaskTlv.java
+++ b/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/MplsProtocolMaskTlv.java
@@ -27,7 +27,7 @@
/**
* Provides MPLS Protocol Mask.
*/
-public class MPLSProtocolMaskTlv implements PcepValueType {
+public class MplsProtocolMaskTlv implements PcepValueType {
/* Reference :[I-D.ietf-idr-ls-distribution]/3.3.2.2
* 0 1 2 3
@@ -38,7 +38,7 @@
|L|R| Reserved |
+-+-+-+-+-+-+-+-+
*/
- protected static final Logger log = LoggerFactory.getLogger(MPLSProtocolMaskTlv.class);
+ protected static final Logger log = LoggerFactory.getLogger(MplsProtocolMaskTlv.class);
public static final short TYPE = 1094; //TDB39
public static final short LENGTH = 1;
@@ -55,7 +55,7 @@
*
* @param rawValue MPLS Protocol Mask Flag Bits
*/
- public MPLSProtocolMaskTlv(byte rawValue) {
+ public MplsProtocolMaskTlv(byte rawValue) {
this.rawValue = rawValue;
this.isRawValueSet = true;
this.bLFlag = (rawValue & LFLAG_SET) == LFLAG_SET;
@@ -68,7 +68,7 @@
* @param bLFlag L-flag
* @param bRFlag R-flag
*/
- public MPLSProtocolMaskTlv(boolean bLFlag, boolean bRFlag) {
+ public MplsProtocolMaskTlv(boolean bLFlag, boolean bRFlag) {
this.bLFlag = bLFlag;
this.bRFlag = bRFlag;
this.rawValue = 0;
@@ -81,8 +81,8 @@
* @param raw MPLS Protocol Mask Tlv
* @return new object of MPLS Protocol Mask Tlv
*/
- public static MPLSProtocolMaskTlv of(final byte raw) {
- return new MPLSProtocolMaskTlv(raw);
+ public static MplsProtocolMaskTlv of(final byte raw) {
+ return new MplsProtocolMaskTlv(raw);
}
/**
@@ -141,8 +141,8 @@
if (this == obj) {
return true;
}
- if (obj instanceof MPLSProtocolMaskTlv) {
- MPLSProtocolMaskTlv other = (MPLSProtocolMaskTlv) obj;
+ if (obj instanceof MplsProtocolMaskTlv) {
+ MplsProtocolMaskTlv other = (MplsProtocolMaskTlv) obj;
if (isRawValueSet) {
return Objects.equals(this.rawValue, other.rawValue);
} else {
@@ -186,7 +186,7 @@
bLFlag = (temp & LFLAG_SET) == LFLAG_SET;
bRFlag = (temp & RFLAG_SET) == RFLAG_SET;
- return new MPLSProtocolMaskTlv(bLFlag, bRFlag);
+ return new MplsProtocolMaskTlv(bLFlag, bRFlag);
}
@Override
diff --git a/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/NexthopIPv6addressTlv.java b/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/NexthopIPv6addressTlv.java
index 45bf7ac..059577f 100644
--- a/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/NexthopIPv6addressTlv.java
+++ b/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/NexthopIPv6addressTlv.java
@@ -16,15 +16,14 @@
package org.onosproject.pcepio.types;
-import java.util.Objects;
-
+import com.google.common.base.MoreObjects;
+import com.google.common.base.MoreObjects.ToStringHelper;
import org.jboss.netty.buffer.ChannelBuffer;
import org.onosproject.pcepio.protocol.PcepVersion;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import com.google.common.base.MoreObjects;
-import com.google.common.base.MoreObjects.ToStringHelper;
+import java.util.Objects;
/**
* NexthopIPv6addressTlv provides Ipv6 address of next hop.
@@ -84,15 +83,15 @@
//logic to be checked
public static NexthopIPv6addressTlv of(final byte[] raw) {
//check NONE_VAL
- boolean bFoundNONE = true;
+ boolean bFoundNone = true;
//value starts from 3rd byte.
for (int i = 5; i < 20; ++i) {
if (NONE_VAL[i] != raw[i]) {
- bFoundNONE = false;
+ bFoundNone = false;
}
}
- if (bFoundNONE) {
+ if (bFoundNone) {
return NONE;
}
diff --git a/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/OSPFareaIDsubTlv.java b/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/OspfAreaIdSubTlv.java
similarity index 88%
rename from protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/OSPFareaIDsubTlv.java
rename to protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/OspfAreaIdSubTlv.java
index 2233ab0..d60eb60 100644
--- a/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/OSPFareaIDsubTlv.java
+++ b/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/OspfAreaIdSubTlv.java
@@ -15,18 +15,18 @@
*/
package org.onosproject.pcepio.types;
-import java.util.Objects;
+import com.google.common.base.MoreObjects;
import org.jboss.netty.buffer.ChannelBuffer;
import org.onosproject.pcepio.protocol.PcepVersion;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import com.google.common.base.MoreObjects;
+import java.util.Objects;
/**
* Provides area ID for OSPF area.
*/
-public class OSPFareaIDsubTlv implements PcepValueType {
+public class OspfAreaIdSubTlv implements PcepValueType {
/* Reference :draft-ietf-idr-ls-distribution-10.
* 0 1 2 3
@@ -38,7 +38,7 @@
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
*/
- protected static final Logger log = LoggerFactory.getLogger(OSPFareaIDsubTlv.class);
+ protected static final Logger log = LoggerFactory.getLogger(OspfAreaIdSubTlv.class);
public static final short TYPE = 600; //TODD:change this TBD12
public static final short LENGTH = 4;
@@ -50,7 +50,7 @@
*
* @param rawValue area ID for OSPF area.
*/
- public OSPFareaIDsubTlv(int rawValue) {
+ public OspfAreaIdSubTlv(int rawValue) {
this.rawValue = rawValue;
}
@@ -60,8 +60,8 @@
* @param raw opaque value of AreaID
* @return new object of OSPF area ID sub TLV
*/
- public static OSPFareaIDsubTlv of(final int raw) {
- return new OSPFareaIDsubTlv(raw);
+ public static OspfAreaIdSubTlv of(final int raw) {
+ return new OspfAreaIdSubTlv(raw);
}
/**
@@ -98,8 +98,8 @@
if (this == obj) {
return true;
}
- if (obj instanceof OSPFareaIDsubTlv) {
- OSPFareaIDsubTlv other = (OSPFareaIDsubTlv) obj;
+ if (obj instanceof OspfAreaIdSubTlv) {
+ OspfAreaIdSubTlv other = (OspfAreaIdSubTlv) obj;
return Objects.equals(this.rawValue, other.rawValue);
}
return false;
@@ -120,8 +120,8 @@
* @param c input channel buffer
* @return object of OSPFAreaIdSubTlv
*/
- public static OSPFareaIDsubTlv read(ChannelBuffer c) {
- return OSPFareaIDsubTlv.of(c.readInt());
+ public static OspfAreaIdSubTlv read(ChannelBuffer c) {
+ return OspfAreaIdSubTlv.of(c.readInt());
}
@Override
diff --git a/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/PcepLabelMap.java b/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/PcepLabelMap.java
index 2d3a953..77273b0 100644
--- a/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/PcepLabelMap.java
+++ b/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/PcepLabelMap.java
@@ -43,7 +43,7 @@
*
* @param fecObject PCEP fec object
*/
- public void setFECObject(PcepFecObject fecObject) {
+ public void setFecObject(PcepFecObject fecObject) {
this.fecObject = fecObject;
}
@@ -52,7 +52,7 @@
*
* @return PCEP fec object
*/
- public PcepFecObject getFECObject() {
+ public PcepFecObject getFecObject() {
return this.fecObject;
}
diff --git a/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/RemoteTENodeDescriptorsTlv.java b/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/RemoteTENodeDescriptorsTlv.java
index 9e8cea3..cabd709 100644
--- a/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/RemoteTENodeDescriptorsTlv.java
+++ b/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/RemoteTENodeDescriptorsTlv.java
@@ -204,13 +204,13 @@
iValue = tempCb.readInt();
tlv = new AutonomousSystemTlv(iValue);
break;
- case BGPLSidentifierTlv.TYPE:
+ case BgpLsIdentifierTlv.TYPE:
iValue = tempCb.readInt();
- tlv = new BGPLSidentifierTlv(iValue);
+ tlv = new BgpLsIdentifierTlv(iValue);
break;
- case OSPFareaIDsubTlv.TYPE:
+ case OspfAreaIdSubTlv.TYPE:
iValue = tempCb.readInt();
- tlv = new OSPFareaIDsubTlv(iValue);
+ tlv = new OspfAreaIdSubTlv(iValue);
break;
case RouterIDSubTlv.TYPE:
tlv = RouterIDSubTlv.read(tempCb, hLength);
diff --git a/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/SrEroSubObject.java b/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/SrEroSubObject.java
index 3cbb82c..e2b4a6b 100644
--- a/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/SrEroSubObject.java
+++ b/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/SrEroSubObject.java
@@ -16,15 +16,14 @@
package org.onosproject.pcepio.types;
-import java.util.Objects;
-
+import com.google.common.base.MoreObjects;
import org.jboss.netty.buffer.ChannelBuffer;
import org.onosproject.pcepio.protocol.PcepNai;
import org.onosproject.pcepio.protocol.PcepVersion;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import com.google.common.base.MoreObjects;
+import java.util.Objects;
/**
* Provides SrEroSubObject.
@@ -185,7 +184,7 @@
* Returns sID.
* @return sID
*/
- public int getSID() {
+ public int getSid() {
return sID;
}
diff --git a/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/TELinkAttributesTlv.java b/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/TELinkAttributesTlv.java
index b3b71ae..10e672e 100644
--- a/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/TELinkAttributesTlv.java
+++ b/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/TELinkAttributesTlv.java
@@ -242,12 +242,12 @@
case LinkProtectionTypeTlv.TYPE:
tlv = LinkProtectionTypeTlv.read(tempCb);
break;
- case MPLSProtocolMaskTlv.TYPE:
+ case MplsProtocolMaskTlv.TYPE:
byte cValue = tempCb.readByte();
- tlv = new MPLSProtocolMaskTlv(cValue);
+ tlv = new MplsProtocolMaskTlv(cValue);
break;
- case IGPMetricTlv.TYPE:
- tlv = IGPMetricTlv.read(tempCb, length);
+ case IgpMetricTlv.TYPE:
+ tlv = IgpMetricTlv.read(tempCb, length);
break;
case SharedRiskLinkGroupTlv.TYPE:
tlv = SharedRiskLinkGroupTlv.read(tempCb, length);
diff --git a/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/TENodeAttributesTlv.java b/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/TENodeAttributesTlv.java
index f18b75b..10f54de 100644
--- a/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/TENodeAttributesTlv.java
+++ b/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/TENodeAttributesTlv.java
@@ -204,8 +204,8 @@
case NodeNameTlv.TYPE:
tlv = NodeNameTlv.read(tempCb, length);
break;
- case ISISAreaIdentifierTlv.TYPE:
- tlv = ISISAreaIdentifierTlv.read(tempCb, length);
+ case IsisAreaIdentifierTlv.TYPE:
+ tlv = IsisAreaIdentifierTlv.read(tempCb, length);
break;
case IPv4TERouterIdOfLocalNodeTlv.TYPE:
iValue = tempCb.readInt();
diff --git a/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/BGPLSidentifierTlvTest.java b/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/BgpLsIdentifierTlvTest.java
similarity index 80%
rename from protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/BGPLSidentifierTlvTest.java
rename to protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/BgpLsIdentifierTlvTest.java
index 7ac6cea..78137a7 100644
--- a/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/BGPLSidentifierTlvTest.java
+++ b/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/BgpLsIdentifierTlvTest.java
@@ -21,10 +21,10 @@
/**
* Test of the BGPLSidentifierTlv.
*/
-public class BGPLSidentifierTlvTest {
- private final BGPLSidentifierTlv tlv1 = BGPLSidentifierTlv.of(1);
- private final BGPLSidentifierTlv sameAsTlv1 = BGPLSidentifierTlv.of(1);
- private final BGPLSidentifierTlv tlv2 = BGPLSidentifierTlv.of(2);
+public class BgpLsIdentifierTlvTest {
+ private final BgpLsIdentifierTlv tlv1 = BgpLsIdentifierTlv.of(1);
+ private final BgpLsIdentifierTlv sameAsTlv1 = BgpLsIdentifierTlv.of(1);
+ private final BgpLsIdentifierTlv tlv2 = BgpLsIdentifierTlv.of(2);
@Test
public void basics() {
diff --git a/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/IGPMetricTlvTest.java b/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/IgpMetricTlvTest.java
similarity index 82%
rename from protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/IGPMetricTlvTest.java
rename to protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/IgpMetricTlvTest.java
index 2715a4d..20c9dc7 100644
--- a/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/IGPMetricTlvTest.java
+++ b/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/IgpMetricTlvTest.java
@@ -21,12 +21,12 @@
/**
* Test of the IGPMetricTlv.
*/
-public class IGPMetricTlvTest {
+public class IgpMetricTlvTest {
private final byte[] b1 = new byte[] {0x01, 0x02};
private final byte[] b2 = new byte[] {0x01, 0x03};
- private final IGPMetricTlv tlv1 = IGPMetricTlv.of(b1, (short) 2);
- private final IGPMetricTlv sameAsTlv1 = IGPMetricTlv.of(b1, (short) 2);
- private final IGPMetricTlv tlv2 = IGPMetricTlv.of(b2, (short) 2);
+ private final IgpMetricTlv tlv1 = IgpMetricTlv.of(b1, (short) 2);
+ private final IgpMetricTlv sameAsTlv1 = IgpMetricTlv.of(b1, (short) 2);
+ private final IgpMetricTlv tlv2 = IgpMetricTlv.of(b2, (short) 2);
@Test
public void basics() {
diff --git a/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/ISISAreaIdentifierTlvTest.java b/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/IsisAreaIdentifierTlvTest.java
similarity index 84%
rename from protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/ISISAreaIdentifierTlvTest.java
rename to protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/IsisAreaIdentifierTlvTest.java
index 17584ac..a5a14c2 100644
--- a/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/ISISAreaIdentifierTlvTest.java
+++ b/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/IsisAreaIdentifierTlvTest.java
@@ -21,14 +21,14 @@
/**
* Test of the ISISAreaIdentifierTlv.
*/
-public class ISISAreaIdentifierTlvTest {
+public class IsisAreaIdentifierTlvTest {
private final byte[] b1 = new byte[] {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
private final byte[] b2 = new byte[] {2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 };
- private final ISISAreaIdentifierTlv tlv1 = ISISAreaIdentifierTlv.of(b1, (short) 20);
- private final ISISAreaIdentifierTlv sameAsTlv1 = ISISAreaIdentifierTlv.of(b1, (short) 20);
- private final ISISAreaIdentifierTlv tlv2 = ISISAreaIdentifierTlv.of(b2, (short) 20);
+ private final IsisAreaIdentifierTlv tlv1 = IsisAreaIdentifierTlv.of(b1, (short) 20);
+ private final IsisAreaIdentifierTlv sameAsTlv1 = IsisAreaIdentifierTlv.of(b1, (short) 20);
+ private final IsisAreaIdentifierTlv tlv2 = IsisAreaIdentifierTlv.of(b2, (short) 20);
@Test
public void basics() {
diff --git a/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/LocalTENodeDescriptorsTlvTest.java b/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/LocalTENodeDescriptorsTlvTest.java
index e8b6abc..17daa75 100644
--- a/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/LocalTENodeDescriptorsTlvTest.java
+++ b/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/LocalTENodeDescriptorsTlvTest.java
@@ -26,10 +26,10 @@
public class LocalTENodeDescriptorsTlvTest {
private final AutonomousSystemTlv baAutoSysTlvRawValue1 = new AutonomousSystemTlv(1);
- private final BGPLSidentifierTlv baBgplsIdRawValue1 = new BGPLSidentifierTlv(1);
+ private final BgpLsIdentifierTlv baBgplsIdRawValue1 = new BgpLsIdentifierTlv(1);
private final AutonomousSystemTlv baAutoSysTlvRawValue2 = new AutonomousSystemTlv(2);
- private final BGPLSidentifierTlv baBgplsIdRawValue2 = new BGPLSidentifierTlv(2);
+ private final BgpLsIdentifierTlv baBgplsIdRawValue2 = new BgpLsIdentifierTlv(2);
private final LinkedList<PcepValueType> llNodeDescriptorSubTLVs1 = new LinkedList<PcepValueType>();
private final boolean a = llNodeDescriptorSubTLVs1.add(baAutoSysTlvRawValue1);
diff --git a/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/MPLSProtocolMaskTlvTest.java b/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/MplsProtocolMaskTlvTest.java
similarity index 82%
rename from protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/MPLSProtocolMaskTlvTest.java
rename to protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/MplsProtocolMaskTlvTest.java
index 5e79e28..ff87b7a 100644
--- a/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/MPLSProtocolMaskTlvTest.java
+++ b/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/MplsProtocolMaskTlvTest.java
@@ -21,13 +21,13 @@
/**
* Test of the MPLSProtocolMaskTlv.
*/
-public class MPLSProtocolMaskTlvTest {
+public class MplsProtocolMaskTlvTest {
private final byte rawValue1 = 0x0A;
private final byte rawValue2 = 0x0B;
- private final MPLSProtocolMaskTlv tlv1 = new MPLSProtocolMaskTlv(rawValue1);
- private final MPLSProtocolMaskTlv sameAsTlv1 = new MPLSProtocolMaskTlv(rawValue1);
- private final MPLSProtocolMaskTlv tlv2 = MPLSProtocolMaskTlv.of(rawValue2);
+ private final MplsProtocolMaskTlv tlv1 = new MplsProtocolMaskTlv(rawValue1);
+ private final MplsProtocolMaskTlv sameAsTlv1 = new MplsProtocolMaskTlv(rawValue1);
+ private final MplsProtocolMaskTlv tlv2 = MplsProtocolMaskTlv.of(rawValue2);
@Test
public void basics() {
diff --git a/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/OSPFareaIDsubTlvTest.java b/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/OspfAreaIdSubTlvTest.java
similarity index 85%
rename from protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/OSPFareaIDsubTlvTest.java
rename to protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/OspfAreaIdSubTlvTest.java
index 3f741ed..2ea3511 100644
--- a/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/OSPFareaIDsubTlvTest.java
+++ b/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/OspfAreaIdSubTlvTest.java
@@ -21,11 +21,11 @@
/**
* Test of the OSPFareaIDsubTlv.
*/
-public class OSPFareaIDsubTlvTest {
+public class OspfAreaIdSubTlvTest {
private final int rawValue1 = 0x0A;
- private final OSPFareaIDsubTlv tlv1 = new OSPFareaIDsubTlv(rawValue1);
- private final OSPFareaIDsubTlv tlv2 = OSPFareaIDsubTlv.of(tlv1.getInt());
+ private final OspfAreaIdSubTlv tlv1 = new OspfAreaIdSubTlv(rawValue1);
+ private final OspfAreaIdSubTlv tlv2 = OspfAreaIdSubTlv.of(tlv1.getInt());
@Test
public void basics() {
diff --git a/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/RemoteTENodeDescriptorsTlvTest.java b/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/RemoteTENodeDescriptorsTlvTest.java
index 112e4a4..8e74921 100644
--- a/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/RemoteTENodeDescriptorsTlvTest.java
+++ b/protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/types/RemoteTENodeDescriptorsTlvTest.java
@@ -26,10 +26,10 @@
public class RemoteTENodeDescriptorsTlvTest {
private final AutonomousSystemTlv autonomousSystemTlv1 = new AutonomousSystemTlv(10);
- private final BGPLSidentifierTlv bGPLSidentifierTlv1 = new BGPLSidentifierTlv(20);
+ private final BgpLsIdentifierTlv bGPLSidentifierTlv1 = new BgpLsIdentifierTlv(20);
private final AutonomousSystemTlv autonomousSystemTlv2 = new AutonomousSystemTlv(20);
- private final BGPLSidentifierTlv bGPLSidentifierTlv2 = new BGPLSidentifierTlv(30);
+ private final BgpLsIdentifierTlv bGPLSidentifierTlv2 = new BgpLsIdentifierTlv(30);
private final LinkedList<PcepValueType> llRemoteTENodeDescriptorSubTLV1 = new LinkedList<>();
private final boolean a = llRemoteTENodeDescriptorSubTLV1.add(autonomousSystemTlv1);