Committed by
Ray Milkey
Test cases renamed and fixed.
Change-Id: I8b8134bbb0300029b83bf0804bdc6d97b7cec43f
Showing
12 changed files
with
60 additions
and
65 deletions
| ... | @@ -296,8 +296,7 @@ public class PcepTEObjectVer1 implements PcepTEObject { | ... | @@ -296,8 +296,7 @@ public class PcepTEObjectVer1 implements PcepTEObject { |
| 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 | - RemoteTENodeDescriptorsTLV.hLength = hLength; | 299 | + tlv = RemoteTENodeDescriptorsTLV.read(cb, hLength); |
| 300 | - tlv = RemoteTENodeDescriptorsTLV.read(cb); | ||
| 301 | break; | 300 | break; |
| 302 | case TELinkDescriptorsTLV.TYPE: | 301 | case TELinkDescriptorsTLV.TYPE: |
| 303 | tlv = TELinkDescriptorsTLV.read(cb, hLength); | 302 | tlv = TELinkDescriptorsTLV.read(cb, hLength); | ... | ... |
| ... | @@ -169,7 +169,7 @@ public class LocalTENodeDescriptorsTLV implements PcepValueType { | ... | @@ -169,7 +169,7 @@ public class LocalTENodeDescriptorsTLV implements PcepValueType { |
| 169 | } | 169 | } |
| 170 | } | 170 | } |
| 171 | hLength = (short) (c.writerIndex() - tlvStartIndex); | 171 | hLength = (short) (c.writerIndex() - tlvStartIndex); |
| 172 | - c.setShort(tlvLenIndex, hLength); | 172 | + c.setShort(tlvLenIndex, (hLength - TLV_HEADER_LENGTH)); |
| 173 | return c.writerIndex() - tlvStartIndex; | 173 | return c.writerIndex() - tlvStartIndex; |
| 174 | } | 174 | } |
| 175 | 175 | ||
| ... | @@ -186,7 +186,7 @@ public class LocalTENodeDescriptorsTLV implements PcepValueType { | ... | @@ -186,7 +186,7 @@ public class LocalTENodeDescriptorsTLV implements PcepValueType { |
| 186 | // Node Descriptor Sub-TLVs (variable) | 186 | // Node Descriptor Sub-TLVs (variable) |
| 187 | LinkedList<PcepValueType> llNodeDescriptorSubTLVs = new LinkedList<PcepValueType>(); | 187 | LinkedList<PcepValueType> llNodeDescriptorSubTLVs = new LinkedList<PcepValueType>(); |
| 188 | 188 | ||
| 189 | - ChannelBuffer tempCb = c.readBytes(hLength - TLV_HEADER_LENGTH); | 189 | + ChannelBuffer tempCb = c.readBytes(hLength); |
| 190 | 190 | ||
| 191 | while (TLV_HEADER_LENGTH <= tempCb.readableBytes()) { | 191 | while (TLV_HEADER_LENGTH <= tempCb.readableBytes()) { |
| 192 | 192 | ... | ... |
| ... | @@ -116,40 +116,38 @@ public class PcepRsvpSpecObjHeader { | ... | @@ -116,40 +116,38 @@ public class PcepRsvpSpecObjHeader { |
| 116 | /** | 116 | /** |
| 117 | * Writes the byte stream of PcepRsvpObjectHeader to channel buffer. | 117 | * Writes the byte stream of PcepRsvpObjectHeader to channel buffer. |
| 118 | * | 118 | * |
| 119 | - * @param bb of type channel buffer | 119 | + * @param cb of type channel buffer |
| 120 | * @return object length index | 120 | * @return object length index |
| 121 | */ | 121 | */ |
| 122 | - public int write(ChannelBuffer bb) { | 122 | + public int write(ChannelBuffer cb) { |
| 123 | - int objLenIndex = bb.writerIndex(); | 123 | + int objLenIndex = cb.writerIndex(); |
| 124 | - bb.writeShort(objLen); | 124 | + objLen = 0; |
| 125 | - bb.writeByte(objClassNum); | 125 | + cb.writeShort(objLen); |
| 126 | - bb.writeByte(objClassType); | 126 | + cb.writeByte(objClassNum); |
| 127 | - return bb.writerIndex() - objLenIndex; | 127 | + cb.writeByte(objClassType); |
| 128 | + return objLenIndex; | ||
| 128 | } | 129 | } |
| 129 | 130 | ||
| 130 | /** | 131 | /** |
| 131 | * Reads the PcepRsvpObjectHeader. | 132 | * Reads the PcepRsvpObjectHeader. |
| 132 | * | 133 | * |
| 133 | - * @param bb of type channel buffer | 134 | + * @param cb of type channel buffer |
| 134 | * @return PcepRsvpObjectHeader | 135 | * @return PcepRsvpObjectHeader |
| 135 | */ | 136 | */ |
| 136 | - public static PcepRsvpSpecObjHeader read(ChannelBuffer bb) { | 137 | + public static PcepRsvpSpecObjHeader read(ChannelBuffer cb) { |
| 137 | byte objClassNum; | 138 | byte objClassNum; |
| 138 | byte objClassType; | 139 | byte objClassType; |
| 139 | short objLen; | 140 | short objLen; |
| 140 | - objLen = bb.readShort(); | 141 | + objLen = cb.readShort(); |
| 141 | - objClassNum = bb.readByte(); | 142 | + objClassNum = cb.readByte(); |
| 142 | - objClassType = bb.readByte(); | 143 | + objClassType = cb.readByte(); |
| 143 | 144 | ||
| 144 | return new PcepRsvpSpecObjHeader(objLen, objClassNum, objClassType); | 145 | return new PcepRsvpSpecObjHeader(objLen, objClassNum, objClassType); |
| 145 | } | 146 | } |
| 146 | 147 | ||
| 147 | @Override | 148 | @Override |
| 148 | public String toString() { | 149 | public String toString() { |
| 149 | - return MoreObjects.toStringHelper(getClass()) | 150 | + return MoreObjects.toStringHelper(getClass()).add("ObjectClassNum: ", objClassNum) |
| 150 | - .add("ObjectClassNum: " , objClassNum) | 151 | + .add("ObjectCType: ", objClassType).add("ObjectLength: ", objLen).toString(); |
| 151 | - .add("ObjectCType: " , objClassType) | ||
| 152 | - .add("ObjectLength: " , objLen) | ||
| 153 | - .toString(); | ||
| 154 | } | 152 | } |
| 155 | } | 153 | } | ... | ... |
| ... | @@ -50,7 +50,7 @@ public class RemoteTENodeDescriptorsTLV implements PcepValueType { | ... | @@ -50,7 +50,7 @@ public class RemoteTENodeDescriptorsTLV implements PcepValueType { |
| 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 static short hLength; | 53 | + public short hLength; |
| 54 | 54 | ||
| 55 | public static final int TLV_HEADER_LENGTH = 4; | 55 | public static final int TLV_HEADER_LENGTH = 4; |
| 56 | // Node Descriptor Sub-TLVs (variable) | 56 | // Node Descriptor Sub-TLVs (variable) |
| ... | @@ -172,7 +172,7 @@ public class RemoteTENodeDescriptorsTLV implements PcepValueType { | ... | @@ -172,7 +172,7 @@ public class RemoteTENodeDescriptorsTLV implements PcepValueType { |
| 172 | } | 172 | } |
| 173 | 173 | ||
| 174 | hLength = (short) (c.writerIndex() - tlvStartIndex); | 174 | hLength = (short) (c.writerIndex() - tlvStartIndex); |
| 175 | - c.setShort(tlvLenIndex, hLength); | 175 | + c.setShort(tlvLenIndex, (hLength - TLV_HEADER_LENGTH)); |
| 176 | 176 | ||
| 177 | return c.writerIndex() - tlvStartIndex; | 177 | return c.writerIndex() - tlvStartIndex; |
| 178 | } | 178 | } |
| ... | @@ -184,12 +184,12 @@ public class RemoteTENodeDescriptorsTLV implements PcepValueType { | ... | @@ -184,12 +184,12 @@ public class RemoteTENodeDescriptorsTLV implements PcepValueType { |
| 184 | * @return object of RemoteTENodeDescriptorsTLV | 184 | * @return object of RemoteTENodeDescriptorsTLV |
| 185 | * @throws PcepParseException if mandatory fields are missing | 185 | * @throws PcepParseException if mandatory fields are missing |
| 186 | */ | 186 | */ |
| 187 | - public static PcepValueType read(ChannelBuffer c) throws PcepParseException { | 187 | + public static PcepValueType read(ChannelBuffer c , short length) throws PcepParseException { |
| 188 | 188 | ||
| 189 | // Node Descriptor Sub-TLVs (variable) | 189 | // Node Descriptor Sub-TLVs (variable) |
| 190 | LinkedList<PcepValueType> llRemoteTENodeDescriptorSubTLVs = new LinkedList<PcepValueType>(); | 190 | LinkedList<PcepValueType> llRemoteTENodeDescriptorSubTLVs = new LinkedList<PcepValueType>(); |
| 191 | 191 | ||
| 192 | - ChannelBuffer tempCb = c.readBytes(hLength - TLV_HEADER_LENGTH); | 192 | + ChannelBuffer tempCb = c.readBytes(length); |
| 193 | 193 | ||
| 194 | while (TLV_HEADER_LENGTH <= tempCb.readableBytes()) { | 194 | while (TLV_HEADER_LENGTH <= tempCb.readableBytes()) { |
| 195 | 195 | ... | ... |
| ... | @@ -104,7 +104,7 @@ public class StatefulRsvpErrorSpecTlv implements PcepValueType { | ... | @@ -104,7 +104,7 @@ public class StatefulRsvpErrorSpecTlv implements PcepValueType { |
| 104 | 104 | ||
| 105 | public static final short TYPE = 21; | 105 | public static final short TYPE = 21; |
| 106 | public static final int OBJECT_HEADER_LENGTH = 4; | 106 | public static final int OBJECT_HEADER_LENGTH = 4; |
| 107 | - private final short hLength; | 107 | + private short hLength; |
| 108 | 108 | ||
| 109 | private final PcepRsvpErrorSpec rsvpErrSpecObj; | 109 | private final PcepRsvpErrorSpec rsvpErrSpecObj; |
| 110 | private final boolean isErrSpceObjSet; | 110 | private final boolean isErrSpceObjSet; |
| ... | @@ -113,12 +113,10 @@ public class StatefulRsvpErrorSpecTlv implements PcepValueType { | ... | @@ -113,12 +113,10 @@ public class StatefulRsvpErrorSpecTlv implements PcepValueType { |
| 113 | * Constructor to initialize errSpecObj. | 113 | * Constructor to initialize errSpecObj. |
| 114 | * | 114 | * |
| 115 | * @param rsvpErrSpecObj Rsvp error spec object | 115 | * @param rsvpErrSpecObj Rsvp error spec object |
| 116 | - * @param hLength length of rsvp error spec object | ||
| 117 | */ | 116 | */ |
| 118 | - public StatefulRsvpErrorSpecTlv(PcepRsvpErrorSpec rsvpErrSpecObj, short hLength) { | 117 | + public StatefulRsvpErrorSpecTlv(PcepRsvpErrorSpec rsvpErrSpecObj) { |
| 119 | this.rsvpErrSpecObj = rsvpErrSpecObj; | 118 | this.rsvpErrSpecObj = rsvpErrSpecObj; |
| 120 | this.isErrSpceObjSet = true; | 119 | this.isErrSpceObjSet = true; |
| 121 | - this.hLength = hLength; | ||
| 122 | } | 120 | } |
| 123 | 121 | ||
| 124 | /** | 122 | /** |
| ... | @@ -171,7 +169,7 @@ public class StatefulRsvpErrorSpecTlv implements PcepValueType { | ... | @@ -171,7 +169,7 @@ public class StatefulRsvpErrorSpecTlv implements PcepValueType { |
| 171 | && PcepRsvpUserErrorSpec.CLASS_TYPE == rsvpErrSpecObjHeader.getObjClassType()) { | 169 | && PcepRsvpUserErrorSpec.CLASS_TYPE == rsvpErrSpecObjHeader.getObjClassType()) { |
| 172 | rsvpErrSpecObj = PcepRsvpUserErrorSpec.read(cb); | 170 | rsvpErrSpecObj = PcepRsvpUserErrorSpec.read(cb); |
| 173 | } | 171 | } |
| 174 | - return rsvpErrSpecObj; | 172 | + return new StatefulRsvpErrorSpecTlv(rsvpErrSpecObj); |
| 175 | } | 173 | } |
| 176 | 174 | ||
| 177 | @Override | 175 | @Override |
| ... | @@ -196,14 +194,15 @@ public class StatefulRsvpErrorSpecTlv implements PcepValueType { | ... | @@ -196,14 +194,15 @@ public class StatefulRsvpErrorSpecTlv implements PcepValueType { |
| 196 | int iStartIndex = c.writerIndex(); | 194 | int iStartIndex = c.writerIndex(); |
| 197 | c.writeShort(TYPE); | 195 | c.writeShort(TYPE); |
| 198 | int tlvLenIndex = c.writerIndex(); | 196 | int tlvLenIndex = c.writerIndex(); |
| 197 | + hLength = 0; | ||
| 199 | c.writeShort(hLength); | 198 | c.writeShort(hLength); |
| 200 | if (isErrSpceObjSet) { | 199 | if (isErrSpceObjSet) { |
| 201 | rsvpErrSpecObj.write(c); | 200 | rsvpErrSpecObj.write(c); |
| 202 | } | 201 | } |
| 203 | - short tlvLen = (short) (c.writerIndex() - iStartIndex + 4); | 202 | + hLength = (short) (c.writerIndex() - iStartIndex); |
| 204 | - c.setShort(tlvLenIndex, tlvLen); | 203 | + c.setShort(tlvLenIndex, (hLength - OBJECT_HEADER_LENGTH)); |
| 205 | 204 | ||
| 206 | - return tlvLen; | 205 | + return c.writerIndex() - iStartIndex; |
| 207 | } | 206 | } |
| 208 | 207 | ||
| 209 | @Override | 208 | @Override | ... | ... |
| ... | @@ -63,7 +63,6 @@ public class TELinkAttributesTlv implements PcepValueType { | ... | @@ -63,7 +63,6 @@ public class TELinkAttributesTlv implements PcepValueType { |
| 63 | */ | 63 | */ |
| 64 | public TELinkAttributesTlv(LinkedList<PcepValueType> llLinkAttributesSubTLVs) { | 64 | public TELinkAttributesTlv(LinkedList<PcepValueType> llLinkAttributesSubTLVs) { |
| 65 | this.llLinkAttributesSubTLVs = llLinkAttributesSubTLVs; | 65 | this.llLinkAttributesSubTLVs = llLinkAttributesSubTLVs; |
| 66 | - | ||
| 67 | } | 66 | } |
| 68 | 67 | ||
| 69 | /** | 68 | /** |
| ... | @@ -171,7 +170,7 @@ public class TELinkAttributesTlv implements PcepValueType { | ... | @@ -171,7 +170,7 @@ public class TELinkAttributesTlv implements PcepValueType { |
| 171 | } | 170 | } |
| 172 | 171 | ||
| 173 | hLength = (short) (c.writerIndex() - tlvStartIndex); | 172 | hLength = (short) (c.writerIndex() - tlvStartIndex); |
| 174 | - c.setShort(tlvLenIndex, hLength); | 173 | + c.setShort(tlvLenIndex, (hLength - TLV_HEADER_LENGTH)); |
| 175 | 174 | ||
| 176 | return c.writerIndex() - tlvStartIndex; | 175 | return c.writerIndex() - tlvStartIndex; |
| 177 | } | 176 | } |
| ... | @@ -189,7 +188,7 @@ public class TELinkAttributesTlv implements PcepValueType { | ... | @@ -189,7 +188,7 @@ public class TELinkAttributesTlv implements PcepValueType { |
| 189 | // Node Descriptor Sub-TLVs (variable) | 188 | // Node Descriptor Sub-TLVs (variable) |
| 190 | LinkedList<PcepValueType> llLinkAttributesSubTLVs = new LinkedList<PcepValueType>(); | 189 | LinkedList<PcepValueType> llLinkAttributesSubTLVs = new LinkedList<PcepValueType>(); |
| 191 | 190 | ||
| 192 | - ChannelBuffer tempCb = c.readBytes(hLength - TLV_HEADER_LENGTH); | 191 | + ChannelBuffer tempCb = c.readBytes(hLength); |
| 193 | 192 | ||
| 194 | while (TLV_HEADER_LENGTH <= tempCb.readableBytes()) { | 193 | while (TLV_HEADER_LENGTH <= tempCb.readableBytes()) { |
| 195 | 194 | ... | ... |
| ... | @@ -167,7 +167,7 @@ public class TELinkDescriptorsTLV implements PcepValueType { | ... | @@ -167,7 +167,7 @@ public class TELinkDescriptorsTLV implements PcepValueType { |
| 167 | } | 167 | } |
| 168 | 168 | ||
| 169 | hLength = (short) (c.writerIndex() - tlvStartIndex); | 169 | hLength = (short) (c.writerIndex() - tlvStartIndex); |
| 170 | - c.setShort(tlvLenIndex, hLength); | 170 | + c.setShort(tlvLenIndex, (hLength - TLV_HEADER_LENGTH)); |
| 171 | 171 | ||
| 172 | return c.writerIndex() - tlvStartIndex; | 172 | return c.writerIndex() - tlvStartIndex; |
| 173 | } | 173 | } |
| ... | @@ -185,7 +185,7 @@ public class TELinkDescriptorsTLV implements PcepValueType { | ... | @@ -185,7 +185,7 @@ public class TELinkDescriptorsTLV implements PcepValueType { |
| 185 | // Node Descriptor Sub-TLVs (variable) | 185 | // Node Descriptor Sub-TLVs (variable) |
| 186 | LinkedList<PcepValueType> llLinkDescriptorsSubTLVs = new LinkedList<PcepValueType>(); | 186 | LinkedList<PcepValueType> llLinkDescriptorsSubTLVs = new LinkedList<PcepValueType>(); |
| 187 | 187 | ||
| 188 | - ChannelBuffer tempCb = c.readBytes(length - TLV_HEADER_LENGTH); | 188 | + ChannelBuffer tempCb = c.readBytes(length); |
| 189 | 189 | ||
| 190 | while (TLV_HEADER_LENGTH <= tempCb.readableBytes()) { | 190 | while (TLV_HEADER_LENGTH <= tempCb.readableBytes()) { |
| 191 | 191 | ... | ... |
| ... | @@ -167,7 +167,7 @@ public class TENodeAttributesTlv implements PcepValueType { | ... | @@ -167,7 +167,7 @@ public class TENodeAttributesTlv implements PcepValueType { |
| 167 | } | 167 | } |
| 168 | 168 | ||
| 169 | hLength = (short) (c.writerIndex() - tlvStartIndex); | 169 | hLength = (short) (c.writerIndex() - tlvStartIndex); |
| 170 | - c.setShort(tlvLenIndex, hLength); | 170 | + c.setShort(tlvLenIndex, (hLength - TLV_HEADER_LENGTH)); |
| 171 | 171 | ||
| 172 | return c.writerIndex() - tlvStartIndex; | 172 | return c.writerIndex() - tlvStartIndex; |
| 173 | } | 173 | } |
| ... | @@ -185,7 +185,7 @@ public class TENodeAttributesTlv implements PcepValueType { | ... | @@ -185,7 +185,7 @@ public class TENodeAttributesTlv implements PcepValueType { |
| 185 | // Node Descriptor Sub-TLVs (variable) | 185 | // Node Descriptor Sub-TLVs (variable) |
| 186 | LinkedList<PcepValueType> llNodeAttributesSubTLVs = new LinkedList<PcepValueType>(); | 186 | LinkedList<PcepValueType> llNodeAttributesSubTLVs = new LinkedList<PcepValueType>(); |
| 187 | 187 | ||
| 188 | - ChannelBuffer tempCb = c.readBytes(hLength - TLV_HEADER_LENGTH); | 188 | + ChannelBuffer tempCb = c.readBytes(hLength); |
| 189 | 189 | ||
| 190 | while (TLV_HEADER_LENGTH <= tempCb.readableBytes()) { | 190 | while (TLV_HEADER_LENGTH <= tempCb.readableBytes()) { |
| 191 | PcepValueType tlv; | 191 | PcepValueType tlv; | ... | ... |
This diff is collapsed. Click to expand it.
| ... | @@ -27,7 +27,7 @@ import org.onosproject.pcepio.protocol.PcepMessage; | ... | @@ -27,7 +27,7 @@ import org.onosproject.pcepio.protocol.PcepMessage; |
| 27 | import org.onosproject.pcepio.protocol.PcepMessageReader; | 27 | import org.onosproject.pcepio.protocol.PcepMessageReader; |
| 28 | import org.onosproject.pcepio.protocol.PcepReportMsg; | 28 | import org.onosproject.pcepio.protocol.PcepReportMsg; |
| 29 | 29 | ||
| 30 | -public class PcepReportMsgTest2 { | 30 | +public class PcepReportMsgExtTest { |
| 31 | 31 | ||
| 32 | /** | 32 | /** |
| 33 | * This test case checks forSRP Object,LSP Object(symbolic path tlv),ERO Object | 33 | * This test case checks forSRP Object,LSP Object(symbolic path tlv),ERO Object |
| ... | @@ -39,17 +39,17 @@ public class PcepReportMsgTest2 { | ... | @@ -39,17 +39,17 @@ public class PcepReportMsgTest2 { |
| 39 | 39 | ||
| 40 | byte[] reportMsg = new byte[] {0x20, 0x0a, 0x00, (byte) 0x98, | 40 | byte[] reportMsg = new byte[] {0x20, 0x0a, 0x00, (byte) 0x98, |
| 41 | 0x21, 0x10, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, //SRP object | 41 | 0x21, 0x10, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, //SRP object |
| 42 | - 0x20, 0x10, 0x00, 0x10, 0x00, 0x00, 0x10, (byte) 0x83, //LSP object | 42 | + 0x20, 0x10, 0x00, 0x10, 0x00, 0x00, 0x10, 0x03, //LSP object |
| 43 | 0x00, 0x11, 0x00, 0x02, 0x54, 0x31, 0x00, 0x00, //symbolic path tlv | 43 | 0x00, 0x11, 0x00, 0x02, 0x54, 0x31, 0x00, 0x00, //symbolic path tlv |
| 44 | 0x07, 0x10, 0x00, 0x14, //ERO Object | 44 | 0x07, 0x10, 0x00, 0x14, //ERO Object |
| 45 | - (byte) 0x81, 0x08, (byte) 0xb6, 0x02, 0x4e, 0x1f, 0x04, 0x00, | 45 | + 0x01, 0x08, (byte) 0xb6, 0x02, 0x4e, 0x1f, 0x04, 0x00, |
| 46 | - (byte) 0x81, 0x08, (byte) 0xb6, 0x02, 0x4e, 0x20, 0x04, 0x00, | 46 | + 0x01, 0x08, (byte) 0xb6, 0x02, 0x4e, 0x20, 0x04, 0x00, |
| 47 | 0x21, 0x10, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, //SRP object | 47 | 0x21, 0x10, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, //SRP object |
| 48 | - 0x20, 0x10, 0x00, 0x10, 0x00, 0x00, 0x10, (byte) 0x83, //LSP object | 48 | + 0x20, 0x10, 0x00, 0x10, 0x00, 0x00, 0x10, 0x03, //LSP object |
| 49 | 0x00, 0x11, 0x00, 0x02, 0x54, 0x31, 0x00, 0x00, //symbolic path tlv | 49 | 0x00, 0x11, 0x00, 0x02, 0x54, 0x31, 0x00, 0x00, //symbolic path tlv |
| 50 | 0x07, 0x10, 0x00, 0x14, //ERO object | 50 | 0x07, 0x10, 0x00, 0x14, //ERO object |
| 51 | - (byte) 0x81, 0x08, (byte) 0xb6, 0x02, 0x4e, 0x1f, 0x04, 0x00, | 51 | + 0x01, 0x08, (byte) 0xb6, 0x02, 0x4e, 0x1f, 0x04, 0x00, |
| 52 | - (byte) 0x81, 0x08, (byte) 0xb6, 0x02, 0x4e, 0x20, 0x04, 0x00, | 52 | + 0x01, 0x08, (byte) 0xb6, 0x02, 0x4e, 0x20, 0x04, 0x00, |
| 53 | 0x08, 0x10, 0x00, 0x34, 0x01, 0x08, 0x11, 0x01, //RRO object | 53 | 0x08, 0x10, 0x00, 0x34, 0x01, 0x08, 0x11, 0x01, //RRO object |
| 54 | 0x01, 0x01, 0x04, 0x00, 0x01, 0x08, 0x11, 0x01, | 54 | 0x01, 0x01, 0x04, 0x00, 0x01, 0x08, 0x11, 0x01, |
| 55 | 0x01, 0x02, 0x04, 0x00, 0x01, 0x08, 0x06, 0x06, | 55 | 0x01, 0x02, 0x04, 0x00, 0x01, 0x08, 0x06, 0x06, |
| ... | @@ -86,17 +86,17 @@ public class PcepReportMsgTest2 { | ... | @@ -86,17 +86,17 @@ public class PcepReportMsgTest2 { |
| 86 | 86 | ||
| 87 | byte[] reportMsg = new byte[] {0x20, 0x0a, 0x00, (byte) 0x64, | 87 | byte[] reportMsg = new byte[] {0x20, 0x0a, 0x00, (byte) 0x64, |
| 88 | 0x21, 0x10, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, //SRP object | 88 | 0x21, 0x10, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, //SRP object |
| 89 | - 0x20, 0x10, 0x00, 0x10, 0x00, 0x00, 0x10, (byte) 0x83, //LSP object | 89 | + 0x20, 0x10, 0x00, 0x10, 0x00, 0x00, 0x10, 0x03, //LSP object |
| 90 | 0x00, 0x11, 0x00, 0x02, 0x54, 0x31, 0x00, 0x00, //symbolic path tlv | 90 | 0x00, 0x11, 0x00, 0x02, 0x54, 0x31, 0x00, 0x00, //symbolic path tlv |
| 91 | 0x07, 0x10, 0x00, 0x14, //ERO object | 91 | 0x07, 0x10, 0x00, 0x14, //ERO object |
| 92 | - (byte) 0x81, 0x08, (byte) 0xb6, 0x02, 0x4e, 0x1f, 0x04, 0x00, | 92 | + 0x01, 0x08, (byte) 0xb6, 0x02, 0x4e, 0x1f, 0x04, 0x00, |
| 93 | - (byte) 0x81, 0x08, (byte) 0xb6, 0x02, 0x4e, 0x20, 0x04, 0x00, | 93 | + 0x01, 0x08, (byte) 0xb6, 0x02, 0x4e, 0x20, 0x04, 0x00, |
| 94 | 0x21, 0x10, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, //SRP object | 94 | 0x21, 0x10, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, //SRP object |
| 95 | - 0x20, 0x10, 0x00, 0x10, 0x00, 0x00, 0x10, (byte) 0x83, //LSP object | 95 | + 0x20, 0x10, 0x00, 0x10, 0x00, 0x00, 0x10, 0x03, //LSP object |
| 96 | 0x00, 0x11, 0x00, 0x02, 0x54, 0x31, 0x00, 0x00, //symbolic path tlv | 96 | 0x00, 0x11, 0x00, 0x02, 0x54, 0x31, 0x00, 0x00, //symbolic path tlv |
| 97 | 0x07, 0x10, 0x00, 0x14, //ERO object | 97 | 0x07, 0x10, 0x00, 0x14, //ERO object |
| 98 | - (byte) 0x81, 0x08, (byte) 0xb6, 0x02, 0x4e, 0x1f, 0x04, 0x00, | 98 | + 0x01, 0x08, (byte) 0xb6, 0x02, 0x4e, 0x1f, 0x04, 0x00, |
| 99 | - (byte) 0x81, 0x08, (byte) 0xb6, 0x02, 0x4e, 0x20, 0x04, 0x00}; | 99 | + 0x01, 0x08, (byte) 0xb6, 0x02, 0x4e, 0x20, 0x04, 0x00}; |
| 100 | 100 | ||
| 101 | byte[] testReportMsg = {0}; | 101 | byte[] testReportMsg = {0}; |
| 102 | ChannelBuffer buffer = ChannelBuffers.dynamicBuffer(); | 102 | ChannelBuffer buffer = ChannelBuffers.dynamicBuffer(); |
| ... | @@ -127,19 +127,19 @@ public class PcepReportMsgTest2 { | ... | @@ -127,19 +127,19 @@ public class PcepReportMsgTest2 { |
| 127 | 127 | ||
| 128 | byte[] reportMsg = new byte[] {0x20, 0x0a, 0x00, (byte) 0x8c, | 128 | byte[] reportMsg = new byte[] {0x20, 0x0a, 0x00, (byte) 0x8c, |
| 129 | 0x21, 0x10, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, //SRP object | 129 | 0x21, 0x10, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, //SRP object |
| 130 | - 0x20, 0x10, 0x00, 0x10, 0x00, 0x00, 0x10, (byte) 0x83, //LSP object | 130 | + 0x20, 0x10, 0x00, 0x10, 0x00, 0x00, 0x10, 0x03, //LSP object |
| 131 | 0x00, 0x11, 0x00, 0x02, 0x54, 0x31, 0x00, 0x00, //symbolic path tlv | 131 | 0x00, 0x11, 0x00, 0x02, 0x54, 0x31, 0x00, 0x00, //symbolic path tlv |
| 132 | 0x07, 0x10, 0x00, 0x14, //ERO object | 132 | 0x07, 0x10, 0x00, 0x14, //ERO object |
| 133 | - (byte) 0x81, 0x08, (byte) 0xb6, 0x02, 0x4e, 0x1f, 0x04, 0x00, | 133 | + 0x01, 0x08, (byte) 0xb6, 0x02, 0x4e, 0x1f, 0x04, 0x00, |
| 134 | - (byte) 0x81, 0x08, (byte) 0xb6, 0x02, 0x4e, 0x20, 0x04, 0x00, | 134 | + 0x01, 0x08, (byte) 0xb6, 0x02, 0x4e, 0x20, 0x04, 0x00, |
| 135 | 0x09, 0x10, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, //LSPA object | 135 | 0x09, 0x10, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, //LSPA object |
| 136 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 136 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 137 | 0x21, 0x10, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, //SRP object | 137 | 0x21, 0x10, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, //SRP object |
| 138 | - 0x20, 0x10, 0x00, 0x10, 0x00, 0x00, 0x10, (byte) 0x83, //LSP object | 138 | + 0x20, 0x10, 0x00, 0x10, 0x00, 0x00, 0x10, 0x03, //LSP object |
| 139 | 0x00, 0x11, 0x00, 0x02, 0x54, 0x31, 0x00, 0x00, //symbolic path tlv | 139 | 0x00, 0x11, 0x00, 0x02, 0x54, 0x31, 0x00, 0x00, //symbolic path tlv |
| 140 | 0x07, 0x10, 0x00, 0x14, //ERO object | 140 | 0x07, 0x10, 0x00, 0x14, //ERO object |
| 141 | - (byte) 0x81, 0x08, (byte) 0xb6, 0x02, 0x4e, 0x1f, 0x04, 0x00, | 141 | + 0x01, 0x08, (byte) 0xb6, 0x02, 0x4e, 0x1f, 0x04, 0x00, |
| 142 | - (byte) 0x81, 0x08, (byte) 0xb6, 0x02, 0x4e, 0x20, 0x04, 0x00, | 142 | + 0x01, 0x08, (byte) 0xb6, 0x02, 0x4e, 0x20, 0x04, 0x00, |
| 143 | 0x09, 0x10, 0x00, 0x14, 0x00, 0x00, 0x00, //LSPA object | 143 | 0x09, 0x10, 0x00, 0x14, 0x00, 0x00, 0x00, //LSPA object |
| 144 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; | 144 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; |
| 145 | 145 | ||
| ... | @@ -173,21 +173,21 @@ public class PcepReportMsgTest2 { | ... | @@ -173,21 +173,21 @@ public class PcepReportMsgTest2 { |
| 173 | 173 | ||
| 174 | byte[] reportMsg = new byte[] {0x20, 0x0a, 0x00, (byte) 0xE8, | 174 | byte[] reportMsg = new byte[] {0x20, 0x0a, 0x00, (byte) 0xE8, |
| 175 | 0x21, 0x10, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, //SRP object | 175 | 0x21, 0x10, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, //SRP object |
| 176 | - 0x20, 0x10, 0x00, 0x10, 0x00, 0x00, 0x10, (byte) 0x83, //LSP object | 176 | + 0x20, 0x10, 0x00, 0x10, 0x00, 0x00, 0x10, 0x03, //LSP object |
| 177 | 0x00, 0x11, 0x00, 0x02, 0x54, 0x31, 0x00, 0x00, //symbolic path tlv | 177 | 0x00, 0x11, 0x00, 0x02, 0x54, 0x31, 0x00, 0x00, //symbolic path tlv |
| 178 | 0x07, 0x10, 0x00, 0x14, //ERO object | 178 | 0x07, 0x10, 0x00, 0x14, //ERO object |
| 179 | - (byte) 0x81, 0x08, (byte) 0xb6, 0x02, 0x4e, 0x1f, 0x04, 0x00, | 179 | + 0x01, 0x08, (byte) 0xb6, 0x02, 0x4e, 0x1f, 0x04, 0x00, |
| 180 | - (byte) 0x81, 0x08, (byte) 0xb6, 0x02, 0x4e, 0x20, 0x04, 0x00, | 180 | + 0x01, 0x08, (byte) 0xb6, 0x02, 0x4e, 0x20, 0x04, 0x00, |
| 181 | 0x09, 0x10, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, //LSPA object | 181 | 0x09, 0x10, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, //LSPA object |
| 182 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 182 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 183 | 0x05, 0x20, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, //Bandwidth object | 183 | 0x05, 0x20, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, //Bandwidth object |
| 184 | 0x06, 0x10, 0x00, 0x0c, 0x00, 0x00, 0x01, 0x03, 0x00, 0x00, 0x00, 0x20, //Metric object | 184 | 0x06, 0x10, 0x00, 0x0c, 0x00, 0x00, 0x01, 0x03, 0x00, 0x00, 0x00, 0x20, //Metric object |
| 185 | 0x21, 0x10, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, //SRP object | 185 | 0x21, 0x10, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, //SRP object |
| 186 | - 0x20, 0x10, 0x00, 0x10, 0x00, 0x00, 0x10, (byte) 0x83, //LSP object | 186 | + 0x20, 0x10, 0x00, 0x10, 0x00, 0x00, 0x10, 0x03, //LSP object |
| 187 | 0x00, 0x11, 0x00, 0x02, 0x54, 0x31, 0x00, 0x00, //symbolic path tlv | 187 | 0x00, 0x11, 0x00, 0x02, 0x54, 0x31, 0x00, 0x00, //symbolic path tlv |
| 188 | 0x07, 0x10, 0x00, 0x14, //ERO object | 188 | 0x07, 0x10, 0x00, 0x14, //ERO object |
| 189 | - (byte) 0x81, 0x08, (byte) 0xb6, 0x02, 0x4e, 0x1f, 0x04, 0x00, | 189 | + 0x01, 0x08, (byte) 0xb6, 0x02, 0x4e, 0x1f, 0x04, 0x00, |
| 190 | - (byte) 0x81, 0x08, (byte) 0xb6, 0x02, 0x4e, 0x20, 0x04, 0x00, | 190 | + 0x01, 0x08, (byte) 0xb6, 0x02, 0x4e, 0x20, 0x04, 0x00, |
| 191 | 0x09, 0x10, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, //LSPA object | 191 | 0x09, 0x10, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, //LSPA object |
| 192 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 192 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 193 | 0x05, 0x20, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, //Bandwidth object | 193 | 0x05, 0x20, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, //Bandwidth object | ... | ... |
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
-
Please register or login to post a comment