Committed by
Gerrit Code Review
Rename from TLV to Tlv to make renaming consistent with others
Change-Id: I1bbf91b9ac1ef6c3e64676301a4c178725c09442
Showing
9 changed files
with
68 additions
and
68 deletions
... | @@ -22,13 +22,13 @@ import java.util.ListIterator; | ... | @@ -22,13 +22,13 @@ import java.util.ListIterator; |
22 | import org.jboss.netty.buffer.ChannelBuffer; | 22 | import org.jboss.netty.buffer.ChannelBuffer; |
23 | import org.onosproject.pcepio.exceptions.PcepParseException; | 23 | import org.onosproject.pcepio.exceptions.PcepParseException; |
24 | import org.onosproject.pcepio.protocol.PcepTEObject; | 24 | import org.onosproject.pcepio.protocol.PcepTEObject; |
25 | -import org.onosproject.pcepio.types.LocalTENodeDescriptorsTLV; | 25 | +import org.onosproject.pcepio.types.LocalTENodeDescriptorsTlv; |
26 | import org.onosproject.pcepio.types.PcepObjectHeader; | 26 | import org.onosproject.pcepio.types.PcepObjectHeader; |
27 | import org.onosproject.pcepio.types.PcepValueType; | 27 | import org.onosproject.pcepio.types.PcepValueType; |
28 | -import org.onosproject.pcepio.types.RemoteTENodeDescriptorsTLV; | 28 | +import org.onosproject.pcepio.types.RemoteTENodeDescriptorsTlv; |
29 | -import org.onosproject.pcepio.types.RoutingUniverseTLV; | 29 | +import org.onosproject.pcepio.types.RoutingUniverseTlv; |
30 | import org.onosproject.pcepio.types.TELinkAttributesTlv; | 30 | import org.onosproject.pcepio.types.TELinkAttributesTlv; |
31 | -import org.onosproject.pcepio.types.TELinkDescriptorsTLV; | 31 | +import org.onosproject.pcepio.types.TELinkDescriptorsTlv; |
32 | import org.onosproject.pcepio.types.TENodeAttributesTlv; | 32 | import org.onosproject.pcepio.types.TENodeAttributesTlv; |
33 | import org.slf4j.Logger; | 33 | import org.slf4j.Logger; |
34 | import org.slf4j.LoggerFactory; | 34 | import org.slf4j.LoggerFactory; |
... | @@ -288,18 +288,18 @@ public class PcepTEObjectVer1 implements PcepTEObject { | ... | @@ -288,18 +288,18 @@ public class PcepTEObjectVer1 implements PcepTEObject { |
288 | 288 | ||
289 | switch (hType) { | 289 | switch (hType) { |
290 | 290 | ||
291 | - case RoutingUniverseTLV.TYPE: | 291 | + case RoutingUniverseTlv.TYPE: |
292 | lValue = cb.readLong(); | 292 | lValue = cb.readLong(); |
293 | - tlv = new RoutingUniverseTLV(lValue); | 293 | + tlv = new RoutingUniverseTlv(lValue); |
294 | break; | 294 | break; |
295 | - case LocalTENodeDescriptorsTLV.TYPE: | 295 | + case LocalTENodeDescriptorsTlv.TYPE: |
296 | - tlv = LocalTENodeDescriptorsTLV.read(cb, hLength); | 296 | + tlv = LocalTENodeDescriptorsTlv.read(cb, hLength); |
297 | break; | 297 | break; |
298 | - case RemoteTENodeDescriptorsTLV.TYPE: | 298 | + case RemoteTENodeDescriptorsTlv.TYPE: |
299 | - tlv = RemoteTENodeDescriptorsTLV.read(cb, hLength); | 299 | + tlv = RemoteTENodeDescriptorsTlv.read(cb, hLength); |
300 | break; | 300 | break; |
301 | - case TELinkDescriptorsTLV.TYPE: | 301 | + case TELinkDescriptorsTlv.TYPE: |
302 | - tlv = TELinkDescriptorsTLV.read(cb, hLength); | 302 | + tlv = TELinkDescriptorsTlv.read(cb, hLength); |
303 | break; | 303 | break; |
304 | case TENodeAttributesTlv.TYPE: | 304 | case TENodeAttributesTlv.TYPE: |
305 | tlv = TENodeAttributesTlv.read(cb, hLength); | 305 | tlv = TENodeAttributesTlv.read(cb, hLength); | ... | ... |
... | @@ -31,7 +31,7 @@ import com.google.common.base.MoreObjects; | ... | @@ -31,7 +31,7 @@ import com.google.common.base.MoreObjects; |
31 | /** | 31 | /** |
32 | * Provides Local TE Node Descriptors TLV which contains Node Descriptor Sub-TLVs. | 32 | * Provides Local TE Node Descriptors TLV which contains Node Descriptor Sub-TLVs. |
33 | */ | 33 | */ |
34 | -public class LocalTENodeDescriptorsTLV implements PcepValueType { | 34 | +public class LocalTENodeDescriptorsTlv implements PcepValueType { |
35 | 35 | ||
36 | /* REFERENCE :draft-ietf-idr-ls-distribution-10 | 36 | /* REFERENCE :draft-ietf-idr-ls-distribution-10 |
37 | * 0 1 2 3 | 37 | * 0 1 2 3 |
... | @@ -46,7 +46,7 @@ public class LocalTENodeDescriptorsTLV implements PcepValueType { | ... | @@ -46,7 +46,7 @@ public class LocalTENodeDescriptorsTLV implements PcepValueType { |
46 | Note: Length is including header here. Refer Routing Universe TLV. | 46 | Note: Length is including header here. Refer Routing Universe TLV. |
47 | */ | 47 | */ |
48 | 48 | ||
49 | - protected static final Logger log = LoggerFactory.getLogger(LocalTENodeDescriptorsTLV.class); | 49 | + protected static final Logger log = LoggerFactory.getLogger(LocalTENodeDescriptorsTlv.class); |
50 | 50 | ||
51 | public static final short TYPE = 1637; //TODD:change this TBD8 | 51 | public static final short TYPE = 1637; //TODD:change this TBD8 |
52 | public short hLength; | 52 | public short hLength; |
... | @@ -60,7 +60,7 @@ public class LocalTENodeDescriptorsTLV implements PcepValueType { | ... | @@ -60,7 +60,7 @@ public class LocalTENodeDescriptorsTLV implements PcepValueType { |
60 | * | 60 | * |
61 | * @param llNodeDescriptorSubTLVs LinkedList of PcepValueType | 61 | * @param llNodeDescriptorSubTLVs LinkedList of PcepValueType |
62 | */ | 62 | */ |
63 | - public LocalTENodeDescriptorsTLV(LinkedList<PcepValueType> llNodeDescriptorSubTLVs) { | 63 | + public LocalTENodeDescriptorsTlv(LinkedList<PcepValueType> llNodeDescriptorSubTLVs) { |
64 | this.llNodeDescriptorSubTLVs = llNodeDescriptorSubTLVs; | 64 | this.llNodeDescriptorSubTLVs = llNodeDescriptorSubTLVs; |
65 | } | 65 | } |
66 | 66 | ||
... | @@ -70,8 +70,8 @@ public class LocalTENodeDescriptorsTLV implements PcepValueType { | ... | @@ -70,8 +70,8 @@ public class LocalTENodeDescriptorsTLV implements PcepValueType { |
70 | * @param llNodeDescriptorSubTLVs linked list of Node Descriptor Sub TLVs | 70 | * @param llNodeDescriptorSubTLVs linked list of Node Descriptor Sub TLVs |
71 | * @return object of LocalTENodeDescriptorsTLV | 71 | * @return object of LocalTENodeDescriptorsTLV |
72 | */ | 72 | */ |
73 | - public static LocalTENodeDescriptorsTLV of(final LinkedList<PcepValueType> llNodeDescriptorSubTLVs) { | 73 | + public static LocalTENodeDescriptorsTlv of(final LinkedList<PcepValueType> llNodeDescriptorSubTLVs) { |
74 | - return new LocalTENodeDescriptorsTLV(llNodeDescriptorSubTLVs); | 74 | + return new LocalTENodeDescriptorsTlv(llNodeDescriptorSubTLVs); |
75 | } | 75 | } |
76 | 76 | ||
77 | /** | 77 | /** |
... | @@ -117,14 +117,14 @@ public class LocalTENodeDescriptorsTLV implements PcepValueType { | ... | @@ -117,14 +117,14 @@ public class LocalTENodeDescriptorsTLV implements PcepValueType { |
117 | * the size, if both are same then we should check for the subtlv objects otherwise | 117 | * the size, if both are same then we should check for the subtlv objects otherwise |
118 | * we should return false. | 118 | * we should return false. |
119 | */ | 119 | */ |
120 | - if (obj instanceof LocalTENodeDescriptorsTLV) { | 120 | + if (obj instanceof LocalTENodeDescriptorsTlv) { |
121 | int countObjSubTlv = 0; | 121 | int countObjSubTlv = 0; |
122 | int countOtherSubTlv = 0; | 122 | int countOtherSubTlv = 0; |
123 | boolean isCommonSubTlv = true; | 123 | boolean isCommonSubTlv = true; |
124 | - LocalTENodeDescriptorsTLV other = (LocalTENodeDescriptorsTLV) obj; | 124 | + LocalTENodeDescriptorsTlv other = (LocalTENodeDescriptorsTlv) obj; |
125 | - Iterator<PcepValueType> objListIterator = ((LocalTENodeDescriptorsTLV) obj).llNodeDescriptorSubTLVs | 125 | + Iterator<PcepValueType> objListIterator = ((LocalTENodeDescriptorsTlv) obj).llNodeDescriptorSubTLVs |
126 | .iterator(); | 126 | .iterator(); |
127 | - countObjSubTlv = ((LocalTENodeDescriptorsTLV) obj).llNodeDescriptorSubTLVs.size(); | 127 | + countObjSubTlv = ((LocalTENodeDescriptorsTlv) obj).llNodeDescriptorSubTLVs.size(); |
128 | countOtherSubTlv = other.llNodeDescriptorSubTLVs.size(); | 128 | countOtherSubTlv = other.llNodeDescriptorSubTLVs.size(); |
129 | if (countObjSubTlv != countOtherSubTlv) { | 129 | if (countObjSubTlv != countOtherSubTlv) { |
130 | return false; | 130 | return false; |
... | @@ -232,7 +232,7 @@ public class LocalTENodeDescriptorsTLV implements PcepValueType { | ... | @@ -232,7 +232,7 @@ public class LocalTENodeDescriptorsTLV implements PcepValueType { |
232 | if (0 < tempCb.readableBytes()) { | 232 | if (0 < tempCb.readableBytes()) { |
233 | throw new PcepParseException("Sub Tlv parsing error. Extra bytes received."); | 233 | throw new PcepParseException("Sub Tlv parsing error. Extra bytes received."); |
234 | } | 234 | } |
235 | - return new LocalTENodeDescriptorsTLV(llNodeDescriptorSubTLVs); | 235 | + return new LocalTENodeDescriptorsTlv(llNodeDescriptorSubTLVs); |
236 | } | 236 | } |
237 | 237 | ||
238 | @Override | 238 | @Override | ... | ... |
... | @@ -31,7 +31,7 @@ import com.google.common.base.MoreObjects; | ... | @@ -31,7 +31,7 @@ import com.google.common.base.MoreObjects; |
31 | /** | 31 | /** |
32 | * Provides Remote TE Node Descriptors TLV. | 32 | * Provides Remote TE Node Descriptors TLV. |
33 | */ | 33 | */ |
34 | -public class RemoteTENodeDescriptorsTLV implements PcepValueType { | 34 | +public class RemoteTENodeDescriptorsTlv implements PcepValueType { |
35 | 35 | ||
36 | /* Reference :PCEP Extension for Transporting TE Data | 36 | /* Reference :PCEP Extension for Transporting TE Data |
37 | draft-dhodylee-pce-pcep-te-data-extn-02 | 37 | draft-dhodylee-pce-pcep-te-data-extn-02 |
... | @@ -47,7 +47,7 @@ public class RemoteTENodeDescriptorsTLV implements PcepValueType { | ... | @@ -47,7 +47,7 @@ public class RemoteTENodeDescriptorsTLV implements PcepValueType { |
47 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 47 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |
48 | */ | 48 | */ |
49 | 49 | ||
50 | - protected static final Logger log = LoggerFactory.getLogger(RemoteTENodeDescriptorsTLV.class); | 50 | + protected static final Logger log = LoggerFactory.getLogger(RemoteTENodeDescriptorsTlv.class); |
51 | 51 | ||
52 | public static final short TYPE = 1003; //TODD:change this TBD9 | 52 | public static final short TYPE = 1003; //TODD:change this TBD9 |
53 | public short hLength; | 53 | public short hLength; |
... | @@ -61,7 +61,7 @@ public class RemoteTENodeDescriptorsTLV implements PcepValueType { | ... | @@ -61,7 +61,7 @@ public class RemoteTENodeDescriptorsTLV implements PcepValueType { |
61 | * | 61 | * |
62 | * @param llRemoteTENodeDescriptorSubTLVs LinkedList of PcepValueType | 62 | * @param llRemoteTENodeDescriptorSubTLVs LinkedList of PcepValueType |
63 | */ | 63 | */ |
64 | - public RemoteTENodeDescriptorsTLV(LinkedList<PcepValueType> llRemoteTENodeDescriptorSubTLVs) { | 64 | + public RemoteTENodeDescriptorsTlv(LinkedList<PcepValueType> llRemoteTENodeDescriptorSubTLVs) { |
65 | this.llRemoteTENodeDescriptorSubTLVs = llRemoteTENodeDescriptorSubTLVs; | 65 | this.llRemoteTENodeDescriptorSubTLVs = llRemoteTENodeDescriptorSubTLVs; |
66 | } | 66 | } |
67 | 67 | ||
... | @@ -71,8 +71,8 @@ public class RemoteTENodeDescriptorsTLV implements PcepValueType { | ... | @@ -71,8 +71,8 @@ public class RemoteTENodeDescriptorsTLV implements PcepValueType { |
71 | * @param llRemoteTENodeDescriptorSubTLVs LinkedList of PcepValueType | 71 | * @param llRemoteTENodeDescriptorSubTLVs LinkedList of PcepValueType |
72 | * @return object of RemoteTENodeDescriptorsTLV | 72 | * @return object of RemoteTENodeDescriptorsTLV |
73 | */ | 73 | */ |
74 | - public static RemoteTENodeDescriptorsTLV of(final LinkedList<PcepValueType> llRemoteTENodeDescriptorSubTLVs) { | 74 | + public static RemoteTENodeDescriptorsTlv of(final LinkedList<PcepValueType> llRemoteTENodeDescriptorSubTLVs) { |
75 | - return new RemoteTENodeDescriptorsTLV(llRemoteTENodeDescriptorSubTLVs); | 75 | + return new RemoteTENodeDescriptorsTlv(llRemoteTENodeDescriptorSubTLVs); |
76 | } | 76 | } |
77 | 77 | ||
78 | /** | 78 | /** |
... | @@ -117,14 +117,14 @@ public class RemoteTENodeDescriptorsTLV implements PcepValueType { | ... | @@ -117,14 +117,14 @@ public class RemoteTENodeDescriptorsTLV implements PcepValueType { |
117 | * the size, if both are same then we should check for the subtlv objects otherwise | 117 | * the size, if both are same then we should check for the subtlv objects otherwise |
118 | * we should return false. | 118 | * we should return false. |
119 | */ | 119 | */ |
120 | - if (obj instanceof RemoteTENodeDescriptorsTLV) { | 120 | + if (obj instanceof RemoteTENodeDescriptorsTlv) { |
121 | int countObjSubTlv = 0; | 121 | int countObjSubTlv = 0; |
122 | int countOtherSubTlv = 0; | 122 | int countOtherSubTlv = 0; |
123 | boolean isCommonSubTlv = true; | 123 | boolean isCommonSubTlv = true; |
124 | - RemoteTENodeDescriptorsTLV other = (RemoteTENodeDescriptorsTLV) obj; | 124 | + RemoteTENodeDescriptorsTlv other = (RemoteTENodeDescriptorsTlv) obj; |
125 | - Iterator<PcepValueType> objListIterator = ((RemoteTENodeDescriptorsTLV) obj).llRemoteTENodeDescriptorSubTLVs | 125 | + Iterator<PcepValueType> objListIterator = ((RemoteTENodeDescriptorsTlv) obj).llRemoteTENodeDescriptorSubTLVs |
126 | .iterator(); | 126 | .iterator(); |
127 | - countObjSubTlv = ((RemoteTENodeDescriptorsTLV) obj).llRemoteTENodeDescriptorSubTLVs.size(); | 127 | + countObjSubTlv = ((RemoteTENodeDescriptorsTlv) obj).llRemoteTENodeDescriptorSubTLVs.size(); |
128 | countOtherSubTlv = other.llRemoteTENodeDescriptorSubTLVs.size(); | 128 | countOtherSubTlv = other.llRemoteTENodeDescriptorSubTLVs.size(); |
129 | if (countObjSubTlv != countOtherSubTlv) { | 129 | if (countObjSubTlv != countOtherSubTlv) { |
130 | return false; | 130 | return false; |
... | @@ -235,7 +235,7 @@ public class RemoteTENodeDescriptorsTLV implements PcepValueType { | ... | @@ -235,7 +235,7 @@ public class RemoteTENodeDescriptorsTLV implements PcepValueType { |
235 | 235 | ||
236 | throw new PcepParseException("Sub Tlv parsing error. Extra bytes received."); | 236 | throw new PcepParseException("Sub Tlv parsing error. Extra bytes received."); |
237 | } | 237 | } |
238 | - return new RemoteTENodeDescriptorsTLV(llRemoteTENodeDescriptorSubTLVs); | 238 | + return new RemoteTENodeDescriptorsTlv(llRemoteTENodeDescriptorSubTLVs); |
239 | } | 239 | } |
240 | 240 | ||
241 | @Override | 241 | @Override | ... | ... |
... | @@ -27,7 +27,7 @@ import com.google.common.base.MoreObjects; | ... | @@ -27,7 +27,7 @@ import com.google.common.base.MoreObjects; |
27 | /** | 27 | /** |
28 | * Provides RoutingUniverseTLV identifiers. | 28 | * Provides RoutingUniverseTLV identifiers. |
29 | */ | 29 | */ |
30 | -public class RoutingUniverseTLV implements PcepValueType { | 30 | +public class RoutingUniverseTlv implements PcepValueType { |
31 | 31 | ||
32 | /* | 32 | /* |
33 | * Reference : draft-dhodylee-pce-pcep-te-data-extn-02, section 9.2.1. | 33 | * Reference : draft-dhodylee-pce-pcep-te-data-extn-02, section 9.2.1. |
... | @@ -50,7 +50,7 @@ public class RoutingUniverseTLV implements PcepValueType { | ... | @@ -50,7 +50,7 @@ public class RoutingUniverseTLV implements PcepValueType { |
50 | +------------+---------------------+ | 50 | +------------+---------------------+ |
51 | */ | 51 | */ |
52 | 52 | ||
53 | - protected static final Logger log = LoggerFactory.getLogger(RoutingUniverseTLV.class); | 53 | + protected static final Logger log = LoggerFactory.getLogger(RoutingUniverseTlv.class); |
54 | 54 | ||
55 | public static final short TYPE = 14; // TODO:need to change TBD7 | 55 | public static final short TYPE = 14; // TODO:need to change TBD7 |
56 | public static final short LENGTH = 8; | 56 | public static final short LENGTH = 8; |
... | @@ -62,7 +62,7 @@ public class RoutingUniverseTLV implements PcepValueType { | ... | @@ -62,7 +62,7 @@ public class RoutingUniverseTLV implements PcepValueType { |
62 | * | 62 | * |
63 | * @param rawValue raw value | 63 | * @param rawValue raw value |
64 | */ | 64 | */ |
65 | - public RoutingUniverseTLV(long rawValue) { | 65 | + public RoutingUniverseTlv(long rawValue) { |
66 | this.rawValue = rawValue; | 66 | this.rawValue = rawValue; |
67 | } | 67 | } |
68 | 68 | ||
... | @@ -72,8 +72,8 @@ public class RoutingUniverseTLV implements PcepValueType { | ... | @@ -72,8 +72,8 @@ public class RoutingUniverseTLV implements PcepValueType { |
72 | * @param raw value | 72 | * @param raw value |
73 | * @return object of RoutingUniverseTLV | 73 | * @return object of RoutingUniverseTLV |
74 | */ | 74 | */ |
75 | - public static RoutingUniverseTLV of(final long raw) { | 75 | + public static RoutingUniverseTlv of(final long raw) { |
76 | - return new RoutingUniverseTLV(raw); | 76 | + return new RoutingUniverseTlv(raw); |
77 | } | 77 | } |
78 | 78 | ||
79 | /** | 79 | /** |
... | @@ -110,8 +110,8 @@ public class RoutingUniverseTLV implements PcepValueType { | ... | @@ -110,8 +110,8 @@ public class RoutingUniverseTLV implements PcepValueType { |
110 | if (this == obj) { | 110 | if (this == obj) { |
111 | return true; | 111 | return true; |
112 | } | 112 | } |
113 | - if (obj instanceof RoutingUniverseTLV) { | 113 | + if (obj instanceof RoutingUniverseTlv) { |
114 | - RoutingUniverseTLV other = (RoutingUniverseTLV) obj; | 114 | + RoutingUniverseTlv other = (RoutingUniverseTlv) obj; |
115 | return Objects.equals(this.rawValue, other.rawValue); | 115 | return Objects.equals(this.rawValue, other.rawValue); |
116 | } | 116 | } |
117 | return false; | 117 | return false; |
... | @@ -132,8 +132,8 @@ public class RoutingUniverseTLV implements PcepValueType { | ... | @@ -132,8 +132,8 @@ public class RoutingUniverseTLV implements PcepValueType { |
132 | * @param c input channel buffer | 132 | * @param c input channel buffer |
133 | * @return object of RoutingUniverseTLV | 133 | * @return object of RoutingUniverseTLV |
134 | */ | 134 | */ |
135 | - public static RoutingUniverseTLV read(ChannelBuffer c) { | 135 | + public static RoutingUniverseTlv read(ChannelBuffer c) { |
136 | - return RoutingUniverseTLV.of(c.readLong()); | 136 | + return RoutingUniverseTlv.of(c.readLong()); |
137 | } | 137 | } |
138 | 138 | ||
139 | @Override | 139 | @Override | ... | ... |
... | @@ -31,7 +31,7 @@ import com.google.common.base.MoreObjects; | ... | @@ -31,7 +31,7 @@ import com.google.common.base.MoreObjects; |
31 | /** | 31 | /** |
32 | * Provides TE Link Descriptors TLV. | 32 | * Provides TE Link Descriptors TLV. |
33 | */ | 33 | */ |
34 | -public class TELinkDescriptorsTLV implements PcepValueType { | 34 | +public class TELinkDescriptorsTlv implements PcepValueType { |
35 | 35 | ||
36 | /* | 36 | /* |
37 | * Reference: PCEP Extension for Transporting TE Data draft-dhodylee-pce-pcep-te-data-extn-02 | 37 | * Reference: PCEP Extension for Transporting TE Data draft-dhodylee-pce-pcep-te-data-extn-02 |
... | @@ -47,7 +47,7 @@ public class TELinkDescriptorsTLV implements PcepValueType { | ... | @@ -47,7 +47,7 @@ public class TELinkDescriptorsTLV implements PcepValueType { |
47 | 47 | ||
48 | */ | 48 | */ |
49 | 49 | ||
50 | - protected static final Logger log = LoggerFactory.getLogger(TELinkDescriptorsTLV.class); | 50 | + protected static final Logger log = LoggerFactory.getLogger(TELinkDescriptorsTlv.class); |
51 | 51 | ||
52 | public static final short TYPE = 1070; //TODD:change this TBD14 | 52 | public static final short TYPE = 1070; //TODD:change this TBD14 |
53 | public short hLength; | 53 | public short hLength; |
... | @@ -62,7 +62,7 @@ public class TELinkDescriptorsTLV implements PcepValueType { | ... | @@ -62,7 +62,7 @@ public class TELinkDescriptorsTLV implements PcepValueType { |
62 | * | 62 | * |
63 | * @param llLinkDescriptorsSubTLVs of PcepValueType | 63 | * @param llLinkDescriptorsSubTLVs of PcepValueType |
64 | */ | 64 | */ |
65 | - public TELinkDescriptorsTLV(LinkedList<PcepValueType> llLinkDescriptorsSubTLVs) { | 65 | + public TELinkDescriptorsTlv(LinkedList<PcepValueType> llLinkDescriptorsSubTLVs) { |
66 | this.llLinkDescriptorsSubTLVs = llLinkDescriptorsSubTLVs; | 66 | this.llLinkDescriptorsSubTLVs = llLinkDescriptorsSubTLVs; |
67 | } | 67 | } |
68 | 68 | ||
... | @@ -72,8 +72,8 @@ public class TELinkDescriptorsTLV implements PcepValueType { | ... | @@ -72,8 +72,8 @@ public class TELinkDescriptorsTLV implements PcepValueType { |
72 | * @param llLinkDescriptorsSubTLVs of PcepValueType | 72 | * @param llLinkDescriptorsSubTLVs of PcepValueType |
73 | * @return object of TELinkDescriptorsTLV | 73 | * @return object of TELinkDescriptorsTLV |
74 | */ | 74 | */ |
75 | - public static TELinkDescriptorsTLV of(final LinkedList<PcepValueType> llLinkDescriptorsSubTLVs) { | 75 | + public static TELinkDescriptorsTlv of(final LinkedList<PcepValueType> llLinkDescriptorsSubTLVs) { |
76 | - return new TELinkDescriptorsTLV(llLinkDescriptorsSubTLVs); | 76 | + return new TELinkDescriptorsTlv(llLinkDescriptorsSubTLVs); |
77 | } | 77 | } |
78 | 78 | ||
79 | /** | 79 | /** |
... | @@ -118,13 +118,13 @@ public class TELinkDescriptorsTLV implements PcepValueType { | ... | @@ -118,13 +118,13 @@ public class TELinkDescriptorsTLV implements PcepValueType { |
118 | * the size, if both are same then we should check for the subtlv objects otherwise | 118 | * the size, if both are same then we should check for the subtlv objects otherwise |
119 | * we should return false. | 119 | * we should return false. |
120 | */ | 120 | */ |
121 | - if (obj instanceof TELinkDescriptorsTLV) { | 121 | + if (obj instanceof TELinkDescriptorsTlv) { |
122 | int countObjSubTlv = 0; | 122 | int countObjSubTlv = 0; |
123 | int countOtherSubTlv = 0; | 123 | int countOtherSubTlv = 0; |
124 | boolean isCommonSubTlv = true; | 124 | boolean isCommonSubTlv = true; |
125 | - TELinkDescriptorsTLV other = (TELinkDescriptorsTLV) obj; | 125 | + TELinkDescriptorsTlv other = (TELinkDescriptorsTlv) obj; |
126 | - Iterator<PcepValueType> objListIterator = ((TELinkDescriptorsTLV) obj).llLinkDescriptorsSubTLVs.iterator(); | 126 | + Iterator<PcepValueType> objListIterator = ((TELinkDescriptorsTlv) obj).llLinkDescriptorsSubTLVs.iterator(); |
127 | - countObjSubTlv = ((TELinkDescriptorsTLV) obj).llLinkDescriptorsSubTLVs.size(); | 127 | + countObjSubTlv = ((TELinkDescriptorsTlv) obj).llLinkDescriptorsSubTLVs.size(); |
128 | countOtherSubTlv = other.llLinkDescriptorsSubTLVs.size(); | 128 | countOtherSubTlv = other.llLinkDescriptorsSubTLVs.size(); |
129 | if (countObjSubTlv != countOtherSubTlv) { | 129 | if (countObjSubTlv != countOtherSubTlv) { |
130 | return false; | 130 | return false; |
... | @@ -237,7 +237,7 @@ public class TELinkDescriptorsTLV implements PcepValueType { | ... | @@ -237,7 +237,7 @@ public class TELinkDescriptorsTLV implements PcepValueType { |
237 | 237 | ||
238 | throw new PcepParseException("Sub Tlv parsing error. Extra bytes received."); | 238 | throw new PcepParseException("Sub Tlv parsing error. Extra bytes received."); |
239 | } | 239 | } |
240 | - return new TELinkDescriptorsTLV(llLinkDescriptorsSubTLVs); | 240 | + return new TELinkDescriptorsTlv(llLinkDescriptorsSubTLVs); |
241 | } | 241 | } |
242 | 242 | ||
243 | @Override | 243 | @Override | ... | ... |
1 | -/* * Copyright 2015 Open Networking Laboratory * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */package org.onosproject.pcepio; import com.google.common.testing.EqualsTester; import org.junit.Test; import java.util.LinkedList; import org.onosproject.pcepio.types.LocalTENodeDescriptorsTLV;import org.onosproject.pcepio.types.AutonomousSystemTlv;import org.onosproject.pcepio.types.BGPLSidentifierTlv;import org.onosproject.pcepio.types.PcepValueType; /** * Test of the LocalTENodeDescriptorsTlv. */public class LocalTENodeDescriptorsTlvTest { private final AutonomousSystemTlv baAutoSysTlvRawValue1 = new AutonomousSystemTlv(1); private final BGPLSidentifierTlv baBgplsIdRawValue1 = new BGPLSidentifierTlv(1); private final AutonomousSystemTlv baAutoSysTlvRawValue2 = new AutonomousSystemTlv(2); private final BGPLSidentifierTlv baBgplsIdRawValue2 = new BGPLSidentifierTlv(2); private final LinkedList<PcepValueType> llNodeDescriptorSubTLVs1 = new LinkedList<PcepValueType>(); private final boolean a = llNodeDescriptorSubTLVs1.add(baAutoSysTlvRawValue1); private final boolean b = llNodeDescriptorSubTLVs1.add(baBgplsIdRawValue1); private final LinkedList<PcepValueType> llNodeDescriptorSubTLVs2 = new LinkedList<PcepValueType>(); private final boolean c = llNodeDescriptorSubTLVs2.add(baAutoSysTlvRawValue2); private final boolean d = llNodeDescriptorSubTLVs2.add(baBgplsIdRawValue2); private final LocalTENodeDescriptorsTLV tlv1 = LocalTENodeDescriptorsTLV.of(llNodeDescriptorSubTLVs1); private final LocalTENodeDescriptorsTLV sameAstlv1 = LocalTENodeDescriptorsTLV.of(llNodeDescriptorSubTLVs1); private final LocalTENodeDescriptorsTLV tlv2 = LocalTENodeDescriptorsTLV.of(llNodeDescriptorSubTLVs2); @Test public void basics() { new EqualsTester().addEqualityGroup(tlv1, sameAstlv1).addEqualityGroup(tlv2).testEquals(); }} | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | +/* * Copyright 2015 Open Networking Laboratory * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */package org.onosproject.pcepio; import com.google.common.testing.EqualsTester; import org.junit.Test; import java.util.LinkedList; import org.onosproject.pcepio.types.LocalTENodeDescriptorsTlv;import org.onosproject.pcepio.types.AutonomousSystemTlv;import org.onosproject.pcepio.types.BGPLSidentifierTlv;import org.onosproject.pcepio.types.PcepValueType; /** * Test of the LocalTENodeDescriptorsTlv. */public class LocalTENodeDescriptorsTlvTest { private final AutonomousSystemTlv baAutoSysTlvRawValue1 = new AutonomousSystemTlv(1); private final BGPLSidentifierTlv baBgplsIdRawValue1 = new BGPLSidentifierTlv(1); private final AutonomousSystemTlv baAutoSysTlvRawValue2 = new AutonomousSystemTlv(2); private final BGPLSidentifierTlv baBgplsIdRawValue2 = new BGPLSidentifierTlv(2); private final LinkedList<PcepValueType> llNodeDescriptorSubTLVs1 = new LinkedList<PcepValueType>(); private final boolean a = llNodeDescriptorSubTLVs1.add(baAutoSysTlvRawValue1); private final boolean b = llNodeDescriptorSubTLVs1.add(baBgplsIdRawValue1); private final LinkedList<PcepValueType> llNodeDescriptorSubTLVs2 = new LinkedList<PcepValueType>(); private final boolean c = llNodeDescriptorSubTLVs2.add(baAutoSysTlvRawValue2); private final boolean d = llNodeDescriptorSubTLVs2.add(baBgplsIdRawValue2); private final LocalTENodeDescriptorsTlv tlv1 = LocalTENodeDescriptorsTlv.of(llNodeDescriptorSubTLVs1); private final LocalTENodeDescriptorsTlv sameAstlv1 = LocalTENodeDescriptorsTlv.of(llNodeDescriptorSubTLVs1); private final LocalTENodeDescriptorsTlv tlv2 = LocalTENodeDescriptorsTlv.of(llNodeDescriptorSubTLVs2); @Test public void basics() { new EqualsTester().addEqualityGroup(tlv1, sameAstlv1).addEqualityGroup(tlv2).testEquals(); }} | ||
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
... | @@ -21,14 +21,14 @@ import org.junit.Test; | ... | @@ -21,14 +21,14 @@ import org.junit.Test; |
21 | import org.onosproject.pcepio.types.AutonomousSystemTlv; | 21 | import org.onosproject.pcepio.types.AutonomousSystemTlv; |
22 | import org.onosproject.pcepio.types.BGPLSidentifierTlv; | 22 | import org.onosproject.pcepio.types.BGPLSidentifierTlv; |
23 | import org.onosproject.pcepio.types.PcepValueType; | 23 | import org.onosproject.pcepio.types.PcepValueType; |
24 | -import org.onosproject.pcepio.types.RemoteTENodeDescriptorsTLV; | 24 | +import org.onosproject.pcepio.types.RemoteTENodeDescriptorsTlv; |
25 | 25 | ||
26 | import com.google.common.testing.EqualsTester; | 26 | import com.google.common.testing.EqualsTester; |
27 | 27 | ||
28 | /** | 28 | /** |
29 | * Test case for Remote TE Node Descriptors tlv. | 29 | * Test case for Remote TE Node Descriptors tlv. |
30 | */ | 30 | */ |
31 | -public class RemoteTENodeDescriptorsTLVTest { | 31 | +public class RemoteTENodeDescriptorsTlvTest { |
32 | 32 | ||
33 | private final AutonomousSystemTlv autonomousSystemTlv1 = new AutonomousSystemTlv(10); | 33 | private final AutonomousSystemTlv autonomousSystemTlv1 = new AutonomousSystemTlv(10); |
34 | private final BGPLSidentifierTlv bGPLSidentifierTlv1 = new BGPLSidentifierTlv(20); | 34 | private final BGPLSidentifierTlv bGPLSidentifierTlv1 = new BGPLSidentifierTlv(20); |
... | @@ -44,10 +44,10 @@ public class RemoteTENodeDescriptorsTLVTest { | ... | @@ -44,10 +44,10 @@ public class RemoteTENodeDescriptorsTLVTest { |
44 | private final boolean c = llRemoteTENodeDescriptorSubTLV2.add(autonomousSystemTlv2); | 44 | private final boolean c = llRemoteTENodeDescriptorSubTLV2.add(autonomousSystemTlv2); |
45 | private final boolean d = llRemoteTENodeDescriptorSubTLV2.add(bGPLSidentifierTlv2); | 45 | private final boolean d = llRemoteTENodeDescriptorSubTLV2.add(bGPLSidentifierTlv2); |
46 | 46 | ||
47 | - private final RemoteTENodeDescriptorsTLV tlv1 = RemoteTENodeDescriptorsTLV.of(llRemoteTENodeDescriptorSubTLV1); | 47 | + private final RemoteTENodeDescriptorsTlv tlv1 = RemoteTENodeDescriptorsTlv.of(llRemoteTENodeDescriptorSubTLV1); |
48 | - private final RemoteTENodeDescriptorsTLV sameAsTlv1 = | 48 | + private final RemoteTENodeDescriptorsTlv sameAsTlv1 = |
49 | - RemoteTENodeDescriptorsTLV.of(llRemoteTENodeDescriptorSubTLV1); | 49 | + RemoteTENodeDescriptorsTlv.of(llRemoteTENodeDescriptorSubTLV1); |
50 | - private final RemoteTENodeDescriptorsTLV tlv2 = RemoteTENodeDescriptorsTLV.of(llRemoteTENodeDescriptorSubTLV2); | 50 | + private final RemoteTENodeDescriptorsTlv tlv2 = RemoteTENodeDescriptorsTlv.of(llRemoteTENodeDescriptorSubTLV2); |
51 | 51 | ||
52 | @Test | 52 | @Test |
53 | public void basics() { | 53 | public void basics() { | ... | ... |
... | @@ -17,18 +17,18 @@ | ... | @@ -17,18 +17,18 @@ |
17 | package org.onosproject.pcepio; | 17 | package org.onosproject.pcepio; |
18 | 18 | ||
19 | import org.junit.Test; | 19 | import org.junit.Test; |
20 | -import org.onosproject.pcepio.types.RoutingUniverseTLV; | 20 | +import org.onosproject.pcepio.types.RoutingUniverseTlv; |
21 | 21 | ||
22 | import com.google.common.testing.EqualsTester; | 22 | import com.google.common.testing.EqualsTester; |
23 | 23 | ||
24 | /** | 24 | /** |
25 | * Equality test for RoutingUniverseTlv. | 25 | * Equality test for RoutingUniverseTlv. |
26 | */ | 26 | */ |
27 | -public class RoutingUniverseTLVTest { | 27 | +public class RoutingUniverseTlvTest { |
28 | 28 | ||
29 | - private final RoutingUniverseTLV tlv1 = RoutingUniverseTLV.of(2); | 29 | + private final RoutingUniverseTlv tlv1 = RoutingUniverseTlv.of(2); |
30 | - private final RoutingUniverseTLV tlv2 = RoutingUniverseTLV.of(2); | 30 | + private final RoutingUniverseTlv tlv2 = RoutingUniverseTlv.of(2); |
31 | - private final RoutingUniverseTLV tlv3 = RoutingUniverseTLV.of(3); | 31 | + private final RoutingUniverseTlv tlv3 = RoutingUniverseTlv.of(3); |
32 | 32 | ||
33 | @Test | 33 | @Test |
34 | public void basics() { | 34 | public void basics() { | ... | ... |
... | @@ -21,14 +21,14 @@ import org.junit.Test; | ... | @@ -21,14 +21,14 @@ import org.junit.Test; |
21 | import org.onosproject.pcepio.types.IPv4InterfaceAddressTlv; | 21 | import org.onosproject.pcepio.types.IPv4InterfaceAddressTlv; |
22 | import org.onosproject.pcepio.types.LinkLocalRemoteIdentifiersTlv; | 22 | import org.onosproject.pcepio.types.LinkLocalRemoteIdentifiersTlv; |
23 | import org.onosproject.pcepio.types.PcepValueType; | 23 | import org.onosproject.pcepio.types.PcepValueType; |
24 | -import org.onosproject.pcepio.types.TELinkDescriptorsTLV; | 24 | +import org.onosproject.pcepio.types.TELinkDescriptorsTlv; |
25 | 25 | ||
26 | import com.google.common.testing.EqualsTester; | 26 | import com.google.common.testing.EqualsTester; |
27 | 27 | ||
28 | /** | 28 | /** |
29 | * Test case for TE link descriptors Tlv. | 29 | * Test case for TE link descriptors Tlv. |
30 | */ | 30 | */ |
31 | -public class TELinkDescriptorsTLVTest { | 31 | +public class TELinkDescriptorsTlvTest { |
32 | private final LinkLocalRemoteIdentifiersTlv linkLocalRemoteIdentifiersTlv1 = new | 32 | private final LinkLocalRemoteIdentifiersTlv linkLocalRemoteIdentifiersTlv1 = new |
33 | LinkLocalRemoteIdentifiersTlv(10, 10); | 33 | LinkLocalRemoteIdentifiersTlv(10, 10); |
34 | private final IPv4InterfaceAddressTlv iPv4InterfaceAddressTlv1 = new IPv4InterfaceAddressTlv(0x01010101); | 34 | private final IPv4InterfaceAddressTlv iPv4InterfaceAddressTlv1 = new IPv4InterfaceAddressTlv(0x01010101); |
... | @@ -45,9 +45,9 @@ public class TELinkDescriptorsTLVTest { | ... | @@ -45,9 +45,9 @@ public class TELinkDescriptorsTLVTest { |
45 | private final boolean c = llLinkDescriptorsSubTLVs2.add(linkLocalRemoteIdentifiersTlv2); | 45 | private final boolean c = llLinkDescriptorsSubTLVs2.add(linkLocalRemoteIdentifiersTlv2); |
46 | private final boolean d = llLinkDescriptorsSubTLVs2.add(iPv4InterfaceAddressTlv2); | 46 | private final boolean d = llLinkDescriptorsSubTLVs2.add(iPv4InterfaceAddressTlv2); |
47 | 47 | ||
48 | - private final TELinkDescriptorsTLV tlv1 = TELinkDescriptorsTLV.of(llLinkDescriptorsSubTLVs1); | 48 | + private final TELinkDescriptorsTlv tlv1 = TELinkDescriptorsTlv.of(llLinkDescriptorsSubTLVs1); |
49 | - private final TELinkDescriptorsTLV sameAstlv1 = TELinkDescriptorsTLV.of(llLinkDescriptorsSubTLVs1); | 49 | + private final TELinkDescriptorsTlv sameAstlv1 = TELinkDescriptorsTlv.of(llLinkDescriptorsSubTLVs1); |
50 | - private final TELinkDescriptorsTLV tlv2 = TELinkDescriptorsTLV.of(llLinkDescriptorsSubTLVs2); | 50 | + private final TELinkDescriptorsTlv tlv2 = TELinkDescriptorsTlv.of(llLinkDescriptorsSubTLVs2); |
51 | 51 | ||
52 | @Test | 52 | @Test |
53 | public void basics() { | 53 | public void basics() { | ... | ... |
-
Please register or login to post a comment