Revert "Fixed omission of new path setup type for segment routing" 40/17640/1
authorDana Kutenicsova <dkutenic@cisco.com>
Thu, 2 Apr 2015 14:07:50 +0000 (14:07 +0000)
committerDana Kutenicsova <dkutenic@cisco.com>
Thu, 2 Apr 2015 14:07:50 +0000 (14:07 +0000)
This reverts commit 021dc91874f0e3753dcb934d0ebf3183134bb3e8.

Change-Id: I8d6647d7eda36388018252db2f977974d733d7fc
Signed-off-by: Dana Kutenicsova <dkutenic@cisco.com>
pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/tlv/PathSetupTypeTlvParser.java
pcep/impl/src/test/java/org/opendaylight/protocol/pcep/impl/PCEPTlvParserTest.java

index 004077bc94792087d2b6284517c05c946eb6eaff..8f87502a7f9c80fa57737810b01bf4fb31791940 100644 (file)
@@ -31,14 +31,12 @@ public class PathSetupTypeTlvParser implements TlvParser, TlvSerializer {
     private static final int PST_LENGTH = 1;
     private static final int OFFSET = CONTENT_LENGTH - PST_LENGTH;
     private static final short RSVP_TE_PST = 0;
-    private static final short SR_PST = 1;
     private static final String UNSUPPORTED_PST = "Unsupported path setup type.";
 
     protected static final Set<Short> PSTS = Sets.newHashSet();
 
     public PathSetupTypeTlvParser() {
         PSTS.add(RSVP_TE_PST);
-        PSTS.add(SR_PST);
     }
 
     @Override
index 19effd5ba7f101f1feee6e62095cfcc1707a9b5e..cbd21943c81695ec5d096df95737b5a512c98787 100644 (file)
@@ -68,7 +68,7 @@ public class PCEPTlvParserTest {
 
     private static final byte[] PST_TLV_BYTES = { 0x0, 0x1C, 0x0, 0x4, 0x0, 0x0, 0x0, 0x0 };
 
-    private static final byte[] PST_TLV_BYTES_UNSUPPORTED = { 0x0, 0x1C, 0x0, 0x4, 0x0, 0x0, 0x0, 0x2 };
+    private static final byte[] PST_TLV_BYTES_UNSUPPORTED = { 0x0, 0x1C, 0x0, 0x4, 0x0, 0x0, 0x0, 0x1 };
 
     private final AbstractVendorSpecificTlvParser vsParser = new AbstractVendorSpecificTlvParser() {
 
@@ -200,7 +200,7 @@ public class PCEPTlvParserTest {
     @Test(expected=IllegalArgumentException.class)
     public void testUnsupportedPSTSerializer() {
         final PathSetupTypeTlvParser parser = new PathSetupTypeTlvParser();
-        final PathSetupType pstTlv = new PathSetupTypeBuilder().setPst((short) 2).build();
+        final PathSetupType pstTlv = new PathSetupTypeBuilder().setPst((short) 1).build();
         final ByteBuf buff = Unpooled.buffer();
         parser.serializeTlv(pstTlv, buff);
     }