BUG-50 : adjusted srp object. 86/2386/1
authorDana Kutenicsova <dkutenic@cisco.com>
Tue, 5 Nov 2013 13:20:57 +0000 (14:20 +0100)
committerDana Kutenicsova <dkutenic@cisco.com>
Tue, 5 Nov 2013 13:21:33 +0000 (14:21 +0100)
Removed unused binary files.

Change-Id: I1bdf8f3bd7d66ab0ae57114c2f9beb79626b7b1a
Signed-off-by: Dana Kutenicsova <dkutenic@cisco.com>
13 files changed:
pcep/api/src/main/yang/pcep-types.yang
pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/Activator.java
pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/message/PCCreateMessageParser.java
pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/message/PCEPUpdateRequestMessageParser.java
pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/message/PCEPUpdateRequestMessageValidator.java [deleted file]
pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPSrpObjectParser.java
pcep/impl/src/test/java/org/opendaylight/protocol/pcep/impl/PCEPObjectParserTest.java
pcep/impl/src/test/resources/PCErr.1.bin [deleted file]
pcep/impl/src/test/resources/PCErr.2.bin [deleted file]
pcep/impl/src/test/resources/PCErr.3b.bin [deleted file]
pcep/impl/src/test/resources/PCErr.4.bin [deleted file]
pcep/impl/src/test/resources/PCErr.invalid.bin [deleted file]
pcep/topology-provider/src/main/java/org/opendaylight/bgpcep/pcep/topology/provider/ServerSessionManager.java

index 8ee8ab7f9ecdc36cfe2f156d42b85274f29c316b..991fcadebc608cb9d61db1a8f6ec42e779b2b30a 100644 (file)
@@ -812,17 +812,19 @@ module pcep-types {
                description "SRP Object";
                reference "https://tools.ietf.org/html/draft-ietf-pce-stateful-pce-05#section-7.2";
 
-               uses object;
-
-               leaf operation-id {
-                       type srp-id-number;
-                       mandatory true;
-               }
-
-               leaf flags {
-                       type bits {
-                               bit lsp-remove {
-                                       position 31;
+               container srp {
+                       uses object;
+       
+                       leaf operation-id {
+                               type srp-id-number;
+                               mandatory true;
+                       }
+       
+                       leaf flags {
+                               type bits {
+                                       bit lsp-remove {
+                                               position 31;
+                                       }
                                }
                        }
                }
@@ -1173,10 +1175,8 @@ module pcep-types {
                                }
 
                                case stateful {
-                                       container srp {
-                                               reference "https://tools.ietf.org/html/draft-ietf-pce-stateful-pce-05#section-6.3";
-                                               uses srp-object;
-                                       }
+                                       reference "https://tools.ietf.org/html/draft-ietf-pce-stateful-pce-05#section-6.3";
+                                       uses srp-object;
                                }
                        }
                }
@@ -1205,9 +1205,7 @@ module pcep-types {
                        uses message-header;
 
                        list updates {
-                               container srp {
-                                       uses srp-object;
-                               }
+                               uses srp-object;
 
                                container lsp {
                                        uses lsp-object;
@@ -1230,9 +1228,7 @@ module pcep-types {
                        uses message-header;
 
                        list reports {
-                               container srp {
-                                       uses srp-object;
-                               }
+                               uses srp-object;
 
                                container lsp {
                                        uses lsp-object;
@@ -1255,9 +1251,7 @@ module pcep-types {
                        uses message-header;
 
                        list requests {
-                               container srp {
-                                       uses srp-object;
-                               }
+                               uses srp-object;
 
                                container lsp {
                                        uses lsp-object;
index 33c85320fee23e8a001c0dcfaadf621fd2ef6dbc..e4b38e2becf4eee3dac987635e13f0da0ad5b649 100644 (file)
@@ -104,7 +104,6 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.typ
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.PcrptMessage;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.PcupdMessage;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.ReportedRouteObject;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.SrpObject;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.SvecObject;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.close.object.CClose;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.explicit.route.object.subobjects.subobject.type.PathKey;
@@ -122,6 +121,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.typ
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.req.missing.tlv.ReqMissing;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.rp.object.Rp;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.rsvp.error.spec.tlv.RsvpErrorSpec;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.srp.object.Srp;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.stateful.capability.tlv.Stateful;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.symbolic.path.name.tlv.SymbolicPathName;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev130820.basic.explicit.route.subobjects.subobject.type.AsNumber;
@@ -295,7 +295,7 @@ public final class Activator implements PCEPExtensionProviderActivator {
                context.registerObjectSerializer(ClasstypeObject.class, new PCEPClassTypeObjectParser(tlvReg));
                context.registerObjectSerializer(GcObject.class, new PCEPGlobalConstraintsObjectParser(tlvReg));
                context.registerObjectSerializer(LspObject.class, new PCEPLspObjectParser(tlvReg));
-               context.registerObjectSerializer(SrpObject.class, new PCEPSrpObjectParser(tlvReg));
+               context.registerObjectSerializer(Srp.class, new PCEPSrpObjectParser(tlvReg));
                context.registerObjectSerializer(ExcludeRouteObject.class, new PCEPExcludeRouteObjectParser(xroSubReg));
 
                context.registerMessageParser(PCEPOpenMessageParser.TYPE, new PCEPOpenMessageParser(objReg));
index 49157897cc830e09f09fb1beeaf593268418dbc6..31d9c282e42d37b715c987b5d8beb00c56c80389 100644 (file)
@@ -9,12 +9,25 @@ package org.opendaylight.protocol.pcep.impl.message;
 
 import io.netty.buffer.ByteBuf;
 
+import java.util.List;
+
 import org.opendaylight.protocol.pcep.PCEPDeserializerException;
+import org.opendaylight.protocol.pcep.PCEPDocumentedException;
+import org.opendaylight.protocol.pcep.PCEPErrors;
+import org.opendaylight.protocol.pcep.UnknownObject;
 import org.opendaylight.protocol.pcep.impl.AbstractMessageParser;
 import org.opendaylight.protocol.pcep.spi.ObjectHandlerRegistry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.BandwidthObject;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.EndpointsObject;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.ExplicitRouteObject;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.LspaObject;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.Message;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.MetricObject;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.Object;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.PcinitiateMessage;
 
+import com.google.common.collect.Lists;
+
 /**
  * Parser for {@link PCCreateMessage}
  */
@@ -32,11 +45,111 @@ public class PCCreateMessageParser extends AbstractMessageParser {
                        throw new IllegalArgumentException("Wrong instance of Message. Passed instance of " + message.getClass()
                                        + ". Needed PcinitiateMessage.");
                }
+               // final PcinitiateMessage init =
        }
 
        @Override
-       public PcinitiateMessage parseMessage(final byte[] buffer) throws PCEPDeserializerException {
+       public Message parseMessage(final byte[] buffer) throws PCEPDeserializerException, PCEPDocumentedException {
+               if (buffer == null || buffer.length == 0) {
+                       throw new PCEPDeserializerException("Initiate message cannot be empty.");
+               }
+               final List<Object> objs = parseObjects(buffer);
+               return validate(objs);
+       }
+
+       public Message validate(final List<Object> objects) throws PCEPDeserializerException {
+               if (objects == null) {
+                       throw new IllegalArgumentException("Passed list can't be null.");
+               }
                return null;
+               // final List<CompositeInstantiationObject> insts = new ArrayList<CompositeInstantiationObject>();
+               //
+               // CompositeInstantiationObject inst;
+               // while (!objects.isEmpty()) {
+               // try {
+               // if ((inst = this.getValidInstantiationObject(objects)) == null) {
+               // break;
+               // }
+               // } catch (final PCEPDocumentedException e) {
+               // return Arrays.asList((Message) new PCEPErrorMessage(new PCEPErrorObject(e.getError())));
+               // }
+               //
+               // insts.add(inst);
+               // }
+               //
+               // if (insts.isEmpty()) {
+               // throw new PCEPDeserializerException("At least one CompositeInstantiationObject is mandatory.");
+               // }
+               //
+               // if (!objects.isEmpty()) {
+               // throw new PCEPDeserializerException("Unprocessed objects: " + objects);
+               // }
+               //
+               // return Arrays.asList((Message) new PCCreateMessage(insts));
+       }
+
+       private void getValidInstantiationObject(final List<Object> objects) throws PCEPDocumentedException {
+               if (objects.get(0) instanceof UnknownObject) {
+                       throw new PCEPDocumentedException("Unknown object", ((UnknownObject) objects.get(0)).getError());
+               }
+               if (!(objects.get(0) instanceof EndpointsObject)) {
+                       return;
+               }
+
+               final EndpointsObject endPoints = ((EndpointsObject) objects.get(0));
+               objects.remove(0);
+
+               if (objects.get(0) instanceof UnknownObject) {
+                       throw new PCEPDocumentedException("Unknown object", ((UnknownObject) objects.get(0)).getError());
+               }
+               if (!(objects.get(0) instanceof LspaObject)) {
+                       throw new PCEPDocumentedException("LSPA Object must be second.", PCEPErrors.LSPA_MISSING);
+               }
+               final LspaObject lspa = (LspaObject) objects.get(0);
+               objects.remove(0);
+
+               ExplicitRouteObject ero = null;
+               BandwidthObject bandwidth = null;
+               final List<MetricObject> metrics = Lists.newArrayList();
+
+               Object obj;
+               int state = 1;
+               while (!objects.isEmpty()) {
+                       obj = objects.get(0);
+                       if (obj instanceof UnknownObject) {
+                               throw new PCEPDocumentedException("Unknown object", ((UnknownObject) obj).getError());
+                       }
+
+                       switch (state) {
+                       case 1:
+                               state = 2;
+                               if (obj instanceof ExplicitRouteObject) {
+                                       ero = (ExplicitRouteObject) obj;
+                                       break;
+                               }
+                       case 2:
+                               state = 3;
+                               if (obj instanceof BandwidthObject) {
+                                       bandwidth = (BandwidthObject) obj;
+                                       break;
+                               }
+                       case 3:
+                               state = 4;
+                               if (obj instanceof MetricObject) {
+                                       metrics.add((MetricObject) obj);
+                                       state = 3;
+                                       break;
+                               }
+                       }
+
+                       if (state == 4) {
+                               break;
+                       }
+
+                       objects.remove(0);
+               }
+
+               // return new CompositeInstantiationObject(endPoints, lspa, ero, bandwidth, metrics);
        }
 
        @Override
index 3892c72f6e874f5ef1815d4bdd760d18c8add50a..ace6fe69f561cfeb160b54270723c3e7cb597069 100644 (file)
@@ -9,6 +9,8 @@ package org.opendaylight.protocol.pcep.impl.message;
 
 import io.netty.buffer.ByteBuf;
 
+import java.util.List;
+
 import org.opendaylight.protocol.pcep.PCEPDeserializerException;
 import org.opendaylight.protocol.pcep.impl.AbstractMessageParser;
 import org.opendaylight.protocol.pcep.spi.ObjectHandlerRegistry;
@@ -41,6 +43,114 @@ public class PCEPUpdateRequestMessageParser extends AbstractMessageParser {
                return null;
        }
 
+       public List<Message> validate(final List<Object> objects) throws PCEPDeserializerException {
+               if (objects == null) {
+                       throw new IllegalArgumentException("Passed list can't be null.");
+               }
+
+               // final List<CompositeUpdateRequestObject> updateRequests = new ArrayList<CompositeUpdateRequestObject>();
+               //
+               // while (!objects.isEmpty()) {
+               // if (objects.get(0) instanceof UnknownObject) {
+               // logger.warn("Unknown object found (should be Lsp) - {}.", objects.get(0));
+               // return Arrays.asList((Message) new PCEPErrorMessage(new PCEPErrorObject(((UnknownObject)
+               // objects.get(0)).getError())));
+               // }
+               // if (!(objects.get(0) instanceof PCEPLspObject)) {
+               // return Arrays.asList((Message) new PCEPErrorMessage(new PCEPErrorObject(PCEPErrors.LSP_MISSING)));
+               // }
+               //
+               // final PCEPLspObject lsp = (PCEPLspObject) objects.get(0);
+               // objects.remove(0);
+               //
+               // final List<CompositeUpdPathObject> paths = new ArrayList<CompositeUpdPathObject>();
+               //
+               // if (!objects.isEmpty()) {
+               // try {
+               // CompositeUpdPathObject path;
+               // path = this.getValidCompositePath(objects);
+               // while (path != null) {
+               // paths.add(path);
+               // if (objects.isEmpty()) {
+               // break;
+               // }
+               // path = this.getValidCompositePath(objects);
+               // }
+               // } catch (final PCEPDocumentedException e) {
+               // logger.warn("Serializing failed: {}.", e);
+               // return Arrays.asList((Message) new PCEPErrorMessage(new PCEPErrorObject(e.getError())));
+               // }
+               // }
+               //
+               // updateRequests.add(new CompositeUpdateRequestObject(lsp, paths));
+               // }
+               //
+               // if (updateRequests.isEmpty()) {
+               // return Arrays.asList((Message) new PCEPErrorMessage(new PCEPErrorObject(PCEPErrors.LSP_MISSING)));
+               // }
+               //
+               // if (!objects.isEmpty()) {
+               // throw new PCEPDeserializerException("Unprocessed Objects: " + objects);
+               // }
+               //
+               // return Arrays.asList((Message) new PCEPUpdateRequestMessage(updateRequests));
+               return null;
+       }
+
+       // private CompositeUpdPathObject getValidCompositePath(final List<Object> objects) throws PCEPDocumentedException {
+       // if (!(objects.get(0) instanceof PCEPExplicitRouteObject)) {
+       // return null;
+       // }
+       //
+       // if (objects.get(0) instanceof UnknownObject) {
+       // }
+       // final PCEPExplicitRouteObject explicitRoute = (PCEPExplicitRouteObject) objects.get(0);
+       // objects.remove(0);
+       //
+       // PCEPLspaObject pathLspa = null;
+       // PCEPRequestedPathBandwidthObject pathBandwidth = null;
+       // final List<PCEPMetricObject> pathMetrics = new ArrayList<PCEPMetricObject>();
+       //
+       // Object obj;
+       // int state = 1;
+       // while (!objects.isEmpty()) {
+       // obj = objects.get(0);
+       // if (obj instanceof UnknownObject) {
+       // throw new PCEPDocumentedException("Unknown object", ((UnknownObject) obj).getError());
+       // }
+       //
+       // switch (state) {
+       // case 1:
+       // state = 2;
+       // if (obj instanceof PCEPLspaObject) {
+       // pathLspa = (PCEPLspaObject) obj;
+       // break;
+       // }
+       // case 2:
+       // state = 3;
+       // if (obj instanceof PCEPRequestedPathBandwidthObject) {
+       // pathBandwidth = (PCEPRequestedPathBandwidthObject) obj;
+       // break;
+       // }
+       // case 3:
+       // state = 4;
+       // if (obj instanceof PCEPMetricObject) {
+       // pathMetrics.add((PCEPMetricObject) obj);
+       // state = 3;
+       // break;
+       // }
+       // }
+       //
+       // if (state == 4) {
+       // break;
+       // }
+       //
+       // objects.remove(0);
+       // }
+       //
+       // return new CompositeUpdPathObject(explicitRoute, pathLspa, pathBandwidth, pathMetrics);
+       // }
+
        @Override
        public int getMessageType() {
                return TYPE;
diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/message/PCEPUpdateRequestMessageValidator.java b/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/message/PCEPUpdateRequestMessageValidator.java
deleted file mode 100644 (file)
index 12e4982..0000000
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.protocol.pcep.impl.message;
-
-import java.util.List;
-
-import org.opendaylight.protocol.pcep.PCEPDeserializerException;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.Message;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * PCEPUpdateRequestMessage validator. Validates message integrity.
- */
-// FIXME: merge with parser
-class PCEPUpdateRequestMessageValidator {
-
-       private static final Logger logger = LoggerFactory.getLogger(PCEPUpdateRequestMessageValidator.class);
-
-       public List<Message> validate(final List<Object> objects) throws PCEPDeserializerException {
-               if (objects == null)
-                       throw new IllegalArgumentException("Passed list can't be null.");
-
-               // final List<CompositeUpdateRequestObject> updateRequests = new ArrayList<CompositeUpdateRequestObject>();
-               //
-               // while (!objects.isEmpty()) {
-               // if (objects.get(0) instanceof UnknownObject) {
-               // logger.warn("Unknown object found (should be Lsp) - {}.", objects.get(0));
-               // return Arrays.asList((Message) new PCEPErrorMessage(new PCEPErrorObject(((UnknownObject)
-               // objects.get(0)).getError())));
-               // }
-               // if (!(objects.get(0) instanceof PCEPLspObject))
-               // return Arrays.asList((Message) new PCEPErrorMessage(new PCEPErrorObject(PCEPErrors.LSP_MISSING)));
-               //
-               // final PCEPLspObject lsp = (PCEPLspObject) objects.get(0);
-               // objects.remove(0);
-               //
-               // final List<CompositeUpdPathObject> paths = new ArrayList<CompositeUpdPathObject>();
-               //
-               // if (!objects.isEmpty()) {
-               // try {
-               // CompositeUpdPathObject path;
-               // path = this.getValidCompositePath(objects);
-               // while (path != null) {
-               // paths.add(path);
-               // if (objects.isEmpty())
-               // break;
-               // path = this.getValidCompositePath(objects);
-               // }
-               // } catch (final PCEPDocumentedException e) {
-               // logger.warn("Serializing failed: {}.", e);
-               // return Arrays.asList((Message) new PCEPErrorMessage(new PCEPErrorObject(e.getError())));
-               // }
-               // }
-               //
-               // updateRequests.add(new CompositeUpdateRequestObject(lsp, paths));
-               // }
-               //
-               // if (updateRequests.isEmpty())
-               // return Arrays.asList((Message) new PCEPErrorMessage(new PCEPErrorObject(PCEPErrors.LSP_MISSING)));
-               //
-               // if (!objects.isEmpty())
-               // throw new PCEPDeserializerException("Unprocessed Objects: " + objects);
-               //
-               // return Arrays.asList((Message) new PCEPUpdateRequestMessage(updateRequests));
-               return null;
-       }
-
-       // private CompositeUpdPathObject getValidCompositePath(final List<Object> objects) throws PCEPDocumentedException {
-       // if (!(objects.get(0) instanceof PCEPExplicitRouteObject))
-       // return null;
-       //
-       // if (objects.get(0) instanceof UnknownObject)
-       // throw new PCEPDocumentedException("Unknown object", ((UnknownObject) objects.get(0)).getError());
-       // final PCEPExplicitRouteObject explicitRoute = (PCEPExplicitRouteObject) objects.get(0);
-       // objects.remove(0);
-       //
-       // PCEPLspaObject pathLspa = null;
-       // PCEPRequestedPathBandwidthObject pathBandwidth = null;
-       // final List<PCEPMetricObject> pathMetrics = new ArrayList<PCEPMetricObject>();
-       //
-       // Object obj;
-       // int state = 1;
-       // while (!objects.isEmpty()) {
-       // obj = objects.get(0);
-       // if (obj instanceof UnknownObject) {
-       // throw new PCEPDocumentedException("Unknown object", ((UnknownObject) obj).getError());
-       // }
-       //
-       // switch (state) {
-       // case 1:
-       // state = 2;
-       // if (obj instanceof PCEPLspaObject) {
-       // pathLspa = (PCEPLspaObject) obj;
-       // break;
-       // }
-       // case 2:
-       // state = 3;
-       // if (obj instanceof PCEPRequestedPathBandwidthObject) {
-       // pathBandwidth = (PCEPRequestedPathBandwidthObject) obj;
-       // break;
-       // }
-       // case 3:
-       // state = 4;
-       // if (obj instanceof PCEPMetricObject) {
-       // pathMetrics.add((PCEPMetricObject) obj);
-       // state = 3;
-       // break;
-       // }
-       // }
-       //
-       // if (state == 4)
-       // break;
-       //
-       // objects.remove(0);
-       // }
-       //
-       // return new CompositeUpdPathObject(explicitRoute, pathLspa, pathBandwidth, pathMetrics);
-       // }
-
-}
index b6bc734a418297830748efcd80daa6f63a9bde89..b5699ad5f8c15425acda67209a826149e3302032 100644 (file)
@@ -16,12 +16,12 @@ import org.opendaylight.protocol.util.ByteArray;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.Object;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.ObjectHeader;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.SrpIdNumber;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.SrpObject;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.Tlv;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.pcinitiate.message.pcinitiate.message.requests.SrpBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.srp.object.Srp;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.srp.object.SrpBuilder;
 
 /**
- * Parser for {@link SrpObject}
+ * Parser for {@link Srp}
  */
 public final class PCEPSrpObjectParser extends AbstractObjectWithTlvsParser<SrpBuilder> {
 
@@ -40,7 +40,7 @@ public final class PCEPSrpObjectParser extends AbstractObjectWithTlvsParser<SrpB
        }
 
        @Override
-       public SrpObject parseObject(final ObjectHeader header, final byte[] bytes) throws PCEPDeserializerException, PCEPDocumentedException {
+       public Srp parseObject(final ObjectHeader header, final byte[] bytes) throws PCEPDeserializerException, PCEPDocumentedException {
                if (bytes == null || bytes.length == 0) {
                        throw new IllegalArgumentException("Array of bytes is mandatory. Can't be null or empty.");
                }
@@ -69,10 +69,10 @@ public final class PCEPSrpObjectParser extends AbstractObjectWithTlvsParser<SrpB
 
        @Override
        public byte[] serializeObject(final Object object) {
-               if (!(object instanceof SrpObject)) {
+               if (!(object instanceof Srp)) {
                        throw new IllegalArgumentException("Wrong instance of PCEPObject. Passed " + object.getClass() + ". Needed SrpObject.");
                }
-               final SrpObject srp = (SrpObject) object;
+               final Srp srp = (Srp) object;
                final Long id = srp.getOperationId().getValue();
                if (id == 0 || id == 0xFFFFFFFFL) {
                        throw new IllegalArgumentException("Min/Max values for SRP ID are reserved.");
index 96f538ab43e5df70f0ace4431e9945da1343b2ee..d56b55627c38f58a41fcae94197ca20c11a6b190 100644 (file)
@@ -83,7 +83,6 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.typ
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.pcep.error.object.error.object.TlvsBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.pcinitiate.message.pcinitiate.message.requests.EndpointsBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.pcinitiate.message.pcinitiate.message.requests.LspBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.pcinitiate.message.pcinitiate.message.requests.SrpBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.pcrep.message.pcrep.message.replies.result.failure.NoPathBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.pcrep.message.pcrep.message.replies.result.failure.no.path.tlvs.NoPathVectorBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.pcreq.message.pcreq.message.SvecBuilder;
@@ -98,6 +97,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.typ
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.predundancy.group.id.tlv.PredundancyGroupIdBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.req.missing.tlv.ReqMissingBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.rp.object.RpBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.srp.object.SrpBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.stateful.capability.tlv.Stateful;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.stateful.capability.tlv.Stateful.Flags;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.stateful.capability.tlv.StatefulBuilder;
diff --git a/pcep/impl/src/test/resources/PCErr.1.bin b/pcep/impl/src/test/resources/PCErr.1.bin
deleted file mode 100644 (file)
index 505be5e..0000000
Binary files a/pcep/impl/src/test/resources/PCErr.1.bin and /dev/null differ
diff --git a/pcep/impl/src/test/resources/PCErr.2.bin b/pcep/impl/src/test/resources/PCErr.2.bin
deleted file mode 100644 (file)
index 334bf77..0000000
Binary files a/pcep/impl/src/test/resources/PCErr.2.bin and /dev/null differ
diff --git a/pcep/impl/src/test/resources/PCErr.3b.bin b/pcep/impl/src/test/resources/PCErr.3b.bin
deleted file mode 100644 (file)
index dfa3434..0000000
Binary files a/pcep/impl/src/test/resources/PCErr.3b.bin and /dev/null differ
diff --git a/pcep/impl/src/test/resources/PCErr.4.bin b/pcep/impl/src/test/resources/PCErr.4.bin
deleted file mode 100644 (file)
index 3558002..0000000
Binary files a/pcep/impl/src/test/resources/PCErr.4.bin and /dev/null differ
diff --git a/pcep/impl/src/test/resources/PCErr.invalid.bin b/pcep/impl/src/test/resources/PCErr.invalid.bin
deleted file mode 100644 (file)
index 64177c0..0000000
Binary files a/pcep/impl/src/test/resources/PCErr.invalid.bin and /dev/null differ
index 1001fc429c536a6e7720896cad9043c6578be80b..899ba641ce0713ca0d9f3402fd7e23d6362003f9 100644 (file)
@@ -43,20 +43,20 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.typ
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.PlspId;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.ProtocolVersion;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.SrpIdNumber;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.SrpObject.Flags;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.lsp.object.TlvsBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.open.object.open.Tlvs;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.pcerr.message.PcerrMessageBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.pcinitiate.message.PcinitiateMessageBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.pcinitiate.message.pcinitiate.message.RequestsBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.pcinitiate.message.pcinitiate.message.requests.LspBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.pcinitiate.message.pcinitiate.message.requests.SrpBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.pcrpt.message.pcrpt.message.Reports;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.pcrpt.message.pcrpt.message.reports.Lsp;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.pcrpt.message.pcrpt.message.reports.Srp;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.pcupd.message.PcupdMessageBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.pcupd.message.pcupd.message.UpdatesBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.pcupd.message.pcupd.message.updates.PathBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.srp.object.Srp;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.srp.object.Srp.Flags;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.srp.object.SrpBuilder;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.stateful.capability.tlv.Stateful;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.symbolic.path.name.tlv.SymbolicPathName;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.symbolic.path.name.tlv.SymbolicPathNameBuilder;
@@ -119,7 +119,7 @@ final class ServerSessionManager implements SessionListenerFactory<PCEPSessionLi
 
                final Node topologyNode(final DataModificationTransaction trans, final InetAddress address) {
                        final String pccId = createNodeId(address);
-                       final Topology topo = (Topology)trans.readOperationalData(topology);
+                       final Topology topo = (Topology) trans.readOperationalData(ServerSessionManager.this.topology);
 
                        for (final Node n : topo.getNode()) {
                                LOG.debug("Matching topology node {} to id {}", n, pccId);
@@ -169,9 +169,9 @@ final class ServerSessionManager implements SessionListenerFactory<PCEPSessionLi
                                this.pccBuilder.setStateSync(PccSyncState.InitialResync);
                        }
 
-                       topologyAugmentBuilder = new Node1Builder().setPathComputationClient(pccBuilder.build());
-                       topologyAugment = InstanceIdentifier.builder(topologyNode).node(Node1.class).toInstance();
-                       trans.putRuntimeData(topologyAugment, topologyAugmentBuilder.build());
+                       this.topologyAugmentBuilder = new Node1Builder().setPathComputationClient(this.pccBuilder.build());
+                       this.topologyAugment = InstanceIdentifier.builder(this.topologyNode).node(Node1.class).toInstance();
+                       trans.putRuntimeData(this.topologyAugment, this.topologyAugmentBuilder.build());
 
                        // All set, commit the modifications
                        final Future<RpcResult<TransactionStatus>> s = trans.commit();
@@ -188,7 +188,7 @@ final class ServerSessionManager implements SessionListenerFactory<PCEPSessionLi
                                return;
                        }
 
-                       nodes.put(nodeId, this);
+                       ServerSessionManager.this.nodes.put(this.nodeId, this);
                        this.session = session;
                        LOG.info("Session with {} attached to topology node {}", session.getRemoteAddress(), topoNode.getNodeId());
                }
@@ -196,14 +196,14 @@ final class ServerSessionManager implements SessionListenerFactory<PCEPSessionLi
                @GuardedBy("this")
                private void tearDown(final PCEPSession session) {
                        this.session = null;
-                       nodes.remove(nodeId);
+                       ServerSessionManager.this.nodes.remove(this.nodeId);
 
                        final DataModificationTransaction trans = ServerSessionManager.this.dataProvider.beginTransaction();
 
                        // The session went down. Undo all the Topology changes we have done.
-                       trans.removeRuntimeData(topologyAugment);
-                       if (ownsTopology) {
-                               trans.removeRuntimeData(topologyNode);
+                       trans.removeRuntimeData(this.topologyAugment);
+                       if (this.ownsTopology) {
+                               trans.removeRuntimeData(this.topologyNode);
                        }
 
                        /*
@@ -218,18 +218,18 @@ final class ServerSessionManager implements SessionListenerFactory<PCEPSessionLi
                        }
 
                        // Clear all requests which have not been sent to the peer: they result in cancellation
-                       for (Entry<SrpIdNumber, Promise<ExecutionResult<Details>>> e : sendingRequests.entrySet()) {
+                       for (final Entry<SrpIdNumber, Promise<ExecutionResult<Details>>> e : this.sendingRequests.entrySet()) {
                                LOG.debug("Request {} was not sent when session went down, cancelling the instruction", e.getKey());
                                e.getValue().setSuccess(new ExecutionResult<Details>(InstructionStatus.Cancelled, null));
                        }
-                       sendingRequests.clear();
+                       this.sendingRequests.clear();
 
                        // CLear all requests which have not been acked by the peer: they result in failure
-                       for (Entry<SrpIdNumber, Promise<ExecutionResult<Details>>> e : waitingRequests.entrySet()) {
+                       for (final Entry<SrpIdNumber, Promise<ExecutionResult<Details>>> e : this.waitingRequests.entrySet()) {
                                LOG.info("Request {} was incomplete when session went down, failing the instruction", e.getKey());
                                e.getValue().setSuccess(new ExecutionResult<Details>(InstructionStatus.Failed, null));
                        }
-                       waitingRequests.clear();
+                       this.waitingRequests.clear();
                }
 
                @Override
@@ -245,8 +245,7 @@ final class ServerSessionManager implements SessionListenerFactory<PCEPSessionLi
                }
 
                private InstanceIdentifier<ReportedLsps> lspIdentifier(final SymbolicPathName name) {
-                       return InstanceIdentifier.builder(topologyAugment).
-                                       node(ReportedLsps.class, new ReportedLspsKey(name.getPathName())).toInstance();
+                       return InstanceIdentifier.builder(this.topologyAugment).node(ReportedLsps.class, new ReportedLspsKey(name.getPathName())).toInstance();
                }
 
                @Override
@@ -265,9 +264,9 @@ final class ServerSessionManager implements SessionListenerFactory<PCEPSessionLi
 
                                if (lsp.isSync() && !this.synced) {
                                        // Update synchronization flag
-                                       synced = true;
-                                       topologyAugmentBuilder.setPathComputationClient(pccBuilder.setStateSync(PccSyncState.Synchronized).build());
-                                       trans.putRuntimeData(topologyAugment, topologyAugmentBuilder.build());
+                                       this.synced = true;
+                                       this.topologyAugmentBuilder.setPathComputationClient(this.pccBuilder.setStateSync(PccSyncState.Synchronized).build());
+                                       trans.putRuntimeData(this.topologyAugment, this.topologyAugmentBuilder.build());
                                        LOG.debug("Session {} achieved synchronized state", session);
                                }
 
@@ -279,7 +278,7 @@ final class ServerSessionManager implements SessionListenerFactory<PCEPSessionLi
                                                case Active:
                                                case Down:
                                                case Up:
-                                                       final Promise<ExecutionResult<Details>> p = waitingRequests.remove(id);
+                                                       final Promise<ExecutionResult<Details>> p = this.waitingRequests.remove(id);
                                                        if (p != null) {
                                                                LOG.debug("Request {} resulted in LSP operational state {}", id, lsp.getOperational());
                                                                p.setSuccess(new ExecutionResult<Details>(InstructionStatus.Successful, null));
@@ -337,25 +336,26 @@ final class ServerSessionManager implements SessionListenerFactory<PCEPSessionLi
                }
 
                private synchronized SrpIdNumber nextRequest() {
-                       return new SrpIdNumber(requestId++);
+                       return new SrpIdNumber(this.requestId++);
                }
 
                private synchronized void messageSendingComplete(final SrpIdNumber requestId, final io.netty.util.concurrent.Future<Void> future) {
-                       final Promise<ExecutionResult<Details>> promise = sendingRequests.remove(requestId);
+                       final Promise<ExecutionResult<Details>> promise = this.sendingRequests.remove(requestId);
 
                        if (future.isSuccess()) {
-                               waitingRequests.put(requestId, promise);
+                               this.waitingRequests.put(requestId, promise);
                        } else {
                                LOG.info("Failed to send request {}, instruction cancelled", requestId, future.cause());
                                promise.setSuccess(new ExecutionResult<Details>(InstructionStatus.Cancelled, null));
                        }
                }
 
-               private synchronized io.netty.util.concurrent.Future<ExecutionResult<Details>> sendMessage(final Message message, final SrpIdNumber requestId) {
-                       final io.netty.util.concurrent.Future<Void> f = session.sendMessage(message);
+               private synchronized io.netty.util.concurrent.Future<ExecutionResult<Details>> sendMessage(final Message message,
+                               final SrpIdNumber requestId) {
+                       final io.netty.util.concurrent.Future<Void> f = this.session.sendMessage(message);
                        final Promise<ExecutionResult<Details>> ret = exec.newPromise();
 
-                       sendingRequests.put(requestId, ret);
+                       this.sendingRequests.put(requestId, ret);
 
                        f.addListener(new FutureListener<Void>() {
                                @Override
@@ -372,7 +372,7 @@ final class ServerSessionManager implements SessionListenerFactory<PCEPSessionLi
        private static final Pcerr unhandledMessageError = new PcerrBuilder().setPcerrMessage(
                        new PcerrMessageBuilder().setErrorType(null).build()).build();
        private static final MessageHeader messageHeader = new MessageHeader() {
-               private final ProtocolVersion version = new ProtocolVersion((short)1);
+               private final ProtocolVersion version = new ProtocolVersion((short) 1);
 
                @Override
                public Class<? extends DataContainer> getImplementedInterface() {
@@ -381,7 +381,7 @@ final class ServerSessionManager implements SessionListenerFactory<PCEPSessionLi
 
                @Override
                public ProtocolVersion getVersion() {
-                       return version;
+                       return this.version;
                }
        };
        private static final EventExecutor exec = GlobalEventExecutor.INSTANCE;
@@ -404,24 +404,23 @@ final class ServerSessionManager implements SessionListenerFactory<PCEPSessionLi
 
        private synchronized io.netty.util.concurrent.Future<ExecutionResult<Details>> realAddLsp(final AddLspInput input) {
                // Get the listener corresponding to the node
-               final SessionListener l = nodes.get(input.getNode());
+               final SessionListener l = this.nodes.get(input.getNode());
                if (l == null) {
                        LOG.debug("Session for node {} not found", input.getNode());
                        return exec.newSucceededFuture(new ExecutionResult<Details>(InstructionStatus.Cancelled, null));
                }
 
-               final InstanceIdentifier<ReportedLsps> lsp = InstanceIdentifier.builder(l.topologyAugment).node(ReportedLsps.class, new ReportedLspsKey(input.getName())).toInstance();
-               if (dataProvider.readOperationalData(lsp) != null) {
+               final InstanceIdentifier<ReportedLsps> lsp = InstanceIdentifier.builder(l.topologyAugment).node(ReportedLsps.class,
+                               new ReportedLspsKey(input.getName())).toInstance();
+               if (this.dataProvider.readOperationalData(lsp) != null) {
                        LOG.debug("Node {} already contains lsp {} at {}", input.getNode(), input.getName(), lsp);
                        return exec.newSucceededFuture(new ExecutionResult<Details>(InstructionStatus.Cancelled, null));
                }
 
                final RequestsBuilder rb = new RequestsBuilder(input.getArguments());
                rb.setSrp(new SrpBuilder().setOperationId(l.nextRequest()).setProcessingRule(Boolean.TRUE).build());
-               rb.setLsp(
-                               new LspBuilder().setAdministrative(input.getArguments().isAdministrative()).setTlvs(
-                                               new TlvsBuilder().setSymbolicPathName(
-                                                               new SymbolicPathNameBuilder().setPathName(input.getName()).build()).build()).build());
+               rb.setLsp(new LspBuilder().setAdministrative(input.getArguments().isAdministrative()).setTlvs(
+                               new TlvsBuilder().setSymbolicPathName(new SymbolicPathNameBuilder().setPathName(input.getName()).build()).build()).build());
 
                final PcinitiateMessageBuilder ib = new PcinitiateMessageBuilder(messageHeader);
                ib.setRequests(ImmutableList.of(rb.build()));
@@ -431,14 +430,15 @@ final class ServerSessionManager implements SessionListenerFactory<PCEPSessionLi
 
        private synchronized io.netty.util.concurrent.Future<ExecutionResult<Details>> realRemoveLsp(final RemoveLspInput input) {
                // Get the listener corresponding to the node
-               final SessionListener l = nodes.get(input.getNode());
+               final SessionListener l = this.nodes.get(input.getNode());
                if (l == null) {
                        LOG.debug("Session for node {} not found", input.getNode());
                        return exec.newSucceededFuture(new ExecutionResult<Details>(InstructionStatus.Cancelled, null));
                }
 
-               final InstanceIdentifier<ReportedLsps> lsp = InstanceIdentifier.builder(l.topologyAugment).node(ReportedLsps.class, new ReportedLspsKey(input.getName())).toInstance();
-               final ReportedLsps rep = (ReportedLsps) dataProvider.readOperationalData(lsp);
+               final InstanceIdentifier<ReportedLsps> lsp = InstanceIdentifier.builder(l.topologyAugment).node(ReportedLsps.class,
+                               new ReportedLspsKey(input.getName())).toInstance();
+               final ReportedLsps rep = (ReportedLsps) this.dataProvider.readOperationalData(lsp);
                if (rep == null) {
                        LOG.debug("Node {} does not contain LSP {}", input.getNode(), input.getName());
                        return exec.newSucceededFuture(new ExecutionResult<Details>(InstructionStatus.Cancelled, null));
@@ -455,23 +455,24 @@ final class ServerSessionManager implements SessionListenerFactory<PCEPSessionLi
 
        private synchronized io.netty.util.concurrent.Future<ExecutionResult<Details>> realUpdateLsp(final UpdateLspInput input) {
                // Get the listener corresponding to the node
-               final SessionListener l = nodes.get(input.getNode());
+               final SessionListener l = this.nodes.get(input.getNode());
                if (l == null) {
                        LOG.debug("Session for node {} not found", input.getNode());
                        return exec.newSucceededFuture(new ExecutionResult<Details>(InstructionStatus.Cancelled, null));
                }
 
-               final InstanceIdentifier<ReportedLsps> lsp = InstanceIdentifier.builder(l.topologyAugment).node(ReportedLsps.class, new ReportedLspsKey(input.getName())).toInstance();
-               final ReportedLsps rep = (ReportedLsps) dataProvider.readOperationalData(lsp);
+               final InstanceIdentifier<ReportedLsps> lsp = InstanceIdentifier.builder(l.topologyAugment).node(ReportedLsps.class,
+                               new ReportedLspsKey(input.getName())).toInstance();
+               final ReportedLsps rep = (ReportedLsps) this.dataProvider.readOperationalData(lsp);
                if (rep == null) {
                        LOG.debug("Node {} does not contain LSP {}", input.getNode(), input.getName());
                        return exec.newSucceededFuture(new ExecutionResult<Details>(InstructionStatus.Cancelled, null));
                }
 
                final UpdatesBuilder rb = new UpdatesBuilder();
-               rb.setSrp(new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.pcupd.message.pcupd.message.updates.SrpBuilder().setOperationId(l.nextRequest()).setProcessingRule(Boolean.TRUE).build());
-               rb.setLsp(new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.pcupd.message.pcupd.message.updates.LspBuilder().
-                               setPlspId(rep.getLsp().getPlspId()).setDelegate(Boolean.TRUE).build());
+               rb.setSrp(new SrpBuilder().setOperationId(l.nextRequest()).setProcessingRule(Boolean.TRUE).build());
+               rb.setLsp(new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.pcupd.message.pcupd.message.updates.LspBuilder().setPlspId(
+                               rep.getLsp().getPlspId()).setDelegate(Boolean.TRUE).build());
                rb.setPath(new PathBuilder(input.getArguments()).build());
 
                final PcupdMessageBuilder ub = new PcupdMessageBuilder(messageHeader);