Enforce naming convention regarding abbreviations
Change-Id: Ic81038d3869268a55624ccbbf66048545158b0da
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() {