[ONOS-4163] Provider side changes to support stateful PCE and PCECC

Change-Id: I0a57ed1d1e505a2e94921fd5f5d92426a105ad12
diff --git a/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepLspObjectVer1.java b/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepLspObjectVer1.java
index 0b68845..a2a4d72 100644
--- a/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepLspObjectVer1.java
+++ b/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/protocol/ver1/PcepLspObjectVer1.java
@@ -25,7 +25,7 @@
 import org.onosproject.pcepio.types.PcepErrorDetailInfo;
 import org.onosproject.pcepio.types.PcepObjectHeader;
 import org.onosproject.pcepio.types.PcepValueType;
-import org.onosproject.pcepio.types.StatefulIPv4LspIdentidiersTlv;
+import org.onosproject.pcepio.types.StatefulIPv4LspIdentifiersTlv;
 import org.onosproject.pcepio.types.StatefulLspDbVerTlv;
 import org.onosproject.pcepio.types.StatefulLspErrorCodeTlv;
 import org.onosproject.pcepio.types.StatefulRsvpErrorSpecTlv;
@@ -325,8 +325,8 @@
 
             switch (hType) {
 
-            case StatefulIPv4LspIdentidiersTlv.TYPE:
-                tlv = StatefulIPv4LspIdentidiersTlv.read(cb);
+            case StatefulIPv4LspIdentifiersTlv.TYPE:
+                tlv = StatefulIPv4LspIdentifiersTlv.read(cb);
                 break;
             case StatefulLspErrorCodeTlv.TYPE:
                 iValue = cb.readInt();
diff --git a/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/PathSetupTypeTlv.java b/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/PathSetupTypeTlv.java
index 5fe0777..fd5a47a 100644
--- a/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/PathSetupTypeTlv.java
+++ b/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/PathSetupTypeTlv.java
@@ -45,7 +45,7 @@
      */
     protected static final Logger log = LoggerFactory.getLogger(PathSetupTypeTlv.class);
 
-    public static final short TYPE = 0; //TODO : need to reassign the value as per RFC
+    public static final short TYPE = 28;
     public static final short LENGTH = 4;
 
     private final byte pst;
diff --git a/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/StatefulIPv4LspIdentidiersTlv.java b/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/StatefulIPv4LspIdentifiersTlv.java
similarity index 90%
rename from protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/StatefulIPv4LspIdentidiersTlv.java
rename to protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/StatefulIPv4LspIdentifiersTlv.java
index 3c9e9aa..a063d60 100644
--- a/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/StatefulIPv4LspIdentidiersTlv.java
+++ b/protocols/pcep/pcepio/src/main/java/org/onosproject/pcepio/types/StatefulIPv4LspIdentifiersTlv.java
@@ -28,7 +28,7 @@
 /**
  * Provides StatefulIPv4LspIdentidiersTlv.
  */
-public class StatefulIPv4LspIdentidiersTlv implements PcepValueType {
+public class StatefulIPv4LspIdentifiersTlv implements PcepValueType {
 
     /*             IPV4-LSP-IDENTIFIERS TLV format
      *
@@ -50,7 +50,7 @@
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 
      */
-    protected static final Logger log = LoggerFactory.getLogger(StatefulIPv4LspIdentidiersTlv.class);
+    protected static final Logger log = LoggerFactory.getLogger(StatefulIPv4LspIdentifiersTlv.class);
 
     public static final short TYPE = 18;
     public static final short LENGTH = 16;
@@ -70,7 +70,7 @@
      * @param extendedTunnelId extended tunnel id
      * @param ipv4EgressAddress egress ipv4 address
      */
-    public StatefulIPv4LspIdentidiersTlv(int ipv4IngressAddress, short lspId, short tunnelId, int extendedTunnelId,
+    public StatefulIPv4LspIdentifiersTlv(int ipv4IngressAddress, short lspId, short tunnelId, int extendedTunnelId,
             int ipv4EgressAddress) {
 
         this.ipv4IngressAddress = ipv4IngressAddress;
@@ -90,9 +90,9 @@
      * @param ipv4EgressAddress egress ipv4 address
      * @return object of StatefulIPv4LspIdentidiersTlv
      */
-    public static StatefulIPv4LspIdentidiersTlv of(int ipv4IngressAddress, short lspId, short tunnelId,
+    public static StatefulIPv4LspIdentifiersTlv of(int ipv4IngressAddress, short lspId, short tunnelId,
             int extendedTunnelId, int ipv4EgressAddress) {
-        return new StatefulIPv4LspIdentidiersTlv(ipv4IngressAddress, lspId, tunnelId, extendedTunnelId,
+        return new StatefulIPv4LspIdentifiersTlv(ipv4IngressAddress, lspId, tunnelId, extendedTunnelId,
                 ipv4EgressAddress);
     }
 
@@ -106,6 +106,15 @@
     }
 
     /**
+     * Returns LSP id.
+     *
+     * @return lspId
+     */
+    public short getLspId() {
+        return this.lspId;
+    }
+
+    /**
      * Returns extendedTunnelId.
      *
      * @return extendedTunnelId
@@ -157,8 +166,8 @@
         if (this == obj) {
             return true;
         }
-        if (obj instanceof StatefulIPv4LspIdentidiersTlv) {
-            StatefulIPv4LspIdentidiersTlv other = (StatefulIPv4LspIdentidiersTlv) obj;
+        if (obj instanceof StatefulIPv4LspIdentifiersTlv) {
+            StatefulIPv4LspIdentifiersTlv other = (StatefulIPv4LspIdentifiersTlv) obj;
             return Objects.equals(this.ipv4IngressAddress, other.ipv4IngressAddress)
                     && Objects.equals(this.lspId, other.lspId) && Objects.equals(this.tunnelId, other.tunnelId)
                     && Objects.equals(this.extendedTunnelId, other.extendedTunnelId)
@@ -193,7 +202,7 @@
         short tunnelId = c.readShort();
         int extendedTunnelId = c.readInt();
         int ipv4EgressAddress = c.readInt();
-        return new StatefulIPv4LspIdentidiersTlv(ipv4IngressAddress, lspId, tunnelId, extendedTunnelId,
+        return new StatefulIPv4LspIdentifiersTlv(ipv4IngressAddress, lspId, tunnelId, extendedTunnelId,
                 ipv4EgressAddress);
     }