<type>test-jar</type>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>pcep-base-parser</artifactId>
+ <version>${project.version}</version>
+ </dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>pcep-ietf-stateful07</artifactId>
<groupId>${project.groupId}</groupId>
<artifactId>pcep-impl</artifactId>
</dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>pcep-base-parser</artifactId>
+ </dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>pcep-segment-routing</artifactId>
<feature name='odl-bgpcep-pcep-impl' version='${project.version}'>
<feature version='${project.version}'>odl-bgpcep-pcep-dependencies</feature>
<feature version='${project.version}'>odl-bgpcep-pcep-api</feature>
+ <bundle>mvn:org.opendaylight.bgpcep/pcep-base-parser/{{VERSION}}</bundle>
<bundle>mvn:org.opendaylight.bgpcep/pcep-impl/{{VERSION}}</bundle>
</feature>
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
-
import com.google.common.collect.Lists;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import org.junit.Before;
import org.junit.Test;
import org.opendaylight.protocol.pcep.ietf.stateful07.StatefulActivator;
-import org.opendaylight.protocol.pcep.impl.Activator;
+import org.opendaylight.protocol.pcep.parser.BaseParserExtensionActivator;
import org.opendaylight.protocol.pcep.spi.PCEPDeserializerException;
import org.opendaylight.protocol.pcep.spi.pojo.SimplePCEPExtensionProviderContext;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv4Address;
public class PcRptMessageCodecTest {
private SimplePCEPExtensionProviderContext ctx;
- private Activator act;
+ private BaseParserExtensionActivator act;
private StatefulActivator statefulAct;
private org.opendaylight.protocol.pcep.auto.bandwidth.extension.Activator autoBwActivator;
@Before
public void setUp() {
this.ctx = new SimplePCEPExtensionProviderContext();
- this.act = new Activator();
+ this.act = new BaseParserExtensionActivator();
this.act.start(this.ctx);
this.statefulAct = new StatefulActivator();
this.statefulAct.start(this.ctx);
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- vi: set et smarttab sw=4 tabstop=4: -->
+<!--
+ 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
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+ <scm>
+ <connection>scm:git:ssh://git.opendaylight.org:29418/bgpcep.git</connection>
+ <developerConnection>scm:git:ssh://git.opendaylight.org:29418/bgpcep.git</developerConnection>
+ <url>https://wiki.opendaylight.org/view/BGP_LS_PCEP:Main</url>
+ <tag>HEAD</tag>
+ </scm>
+ <parent>
+ <groupId>org.opendaylight.bgpcep</groupId>
+ <artifactId>pcep-parent</artifactId>
+ <version>0.6.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>pcep-base-parser</artifactId>
+ <description>PCE Protocol base parser extension provider</description>
+ <packaging>bundle</packaging>
+ <name>${project.artifactId}</name>
+ <prerequisites>
+ <maven>3.0.4</maven>
+ </prerequisites>
+
+ <dependencies>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>pcep-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>pcep-spi</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.mdsal.model</groupId>
+ <artifactId>ietf-inet-types-2013-07-15</artifactId>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <extensions>true</extensions>
+ <configuration>
+ <instructions>
+ <Bundle-Name>${project.groupId}.${project.artifactId}</Bundle-Name>
+ </instructions>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <!--
+ Maven Site Configuration
+
+ The following configuration is necessary for maven-site-plugin to
+ correctly identify the correct deployment path for OpenDaylight Maven
+ sites.
+ -->
+ <url>${odl.site.url}/${project.groupId}/${stream}/${project.artifactId}/</url>
+
+ <distributionManagement>
+ <site>
+ <id>opendaylight-site</id>
+ <url>${nexus.site.url}/${project.artifactId}/</url>
+ </site>
+ </distributionManagement>
+</project>
* 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;
+package org.opendaylight.protocol.pcep.parser;
import java.util.ArrayList;
import java.util.List;
-import org.opendaylight.protocol.pcep.impl.message.PCEPCloseMessageParser;
-import org.opendaylight.protocol.pcep.impl.message.PCEPErrorMessageParser;
-import org.opendaylight.protocol.pcep.impl.message.PCEPKeepAliveMessageParser;
-import org.opendaylight.protocol.pcep.impl.message.PCEPMonitoringReplyMessageParser;
-import org.opendaylight.protocol.pcep.impl.message.PCEPMonitoringRequestMessageParser;
-import org.opendaylight.protocol.pcep.impl.message.PCEPNotificationMessageParser;
-import org.opendaylight.protocol.pcep.impl.message.PCEPOpenMessageParser;
-import org.opendaylight.protocol.pcep.impl.message.PCEPReplyMessageParser;
-import org.opendaylight.protocol.pcep.impl.message.PCEPRequestMessageParser;
-import org.opendaylight.protocol.pcep.impl.message.PCEPStartTLSMessageParser;
-import org.opendaylight.protocol.pcep.impl.object.PCEPBandwidthObjectParser;
-import org.opendaylight.protocol.pcep.impl.object.PCEPClassTypeObjectParser;
-import org.opendaylight.protocol.pcep.impl.object.PCEPCloseObjectParser;
-import org.opendaylight.protocol.pcep.impl.object.PCEPEndPointsIpv4ObjectParser;
-import org.opendaylight.protocol.pcep.impl.object.PCEPEndPointsIpv6ObjectParser;
-import org.opendaylight.protocol.pcep.impl.object.PCEPErrorObjectParser;
-import org.opendaylight.protocol.pcep.impl.object.PCEPExcludeRouteObjectParser;
-import org.opendaylight.protocol.pcep.impl.object.PCEPExistingBandwidthObjectParser;
-import org.opendaylight.protocol.pcep.impl.object.PCEPExplicitRouteObjectParser;
-import org.opendaylight.protocol.pcep.impl.object.PCEPGlobalConstraintsObjectParser;
-import org.opendaylight.protocol.pcep.impl.object.PCEPIncludeRouteObjectParser;
-import org.opendaylight.protocol.pcep.impl.object.PCEPLoadBalancingObjectParser;
-import org.opendaylight.protocol.pcep.impl.object.PCEPLspaObjectParser;
-import org.opendaylight.protocol.pcep.impl.object.PCEPMetricObjectParser;
-import org.opendaylight.protocol.pcep.impl.object.PCEPMonitoringObjectParser;
-import org.opendaylight.protocol.pcep.impl.object.PCEPNoPathObjectParser;
-import org.opendaylight.protocol.pcep.impl.object.PCEPNotificationObjectParser;
-import org.opendaylight.protocol.pcep.impl.object.PCEPObjectiveFunctionObjectParser;
-import org.opendaylight.protocol.pcep.impl.object.PCEPOpenObjectParser;
-import org.opendaylight.protocol.pcep.impl.object.PCEPOverloadObjectParser;
-import org.opendaylight.protocol.pcep.impl.object.PCEPPathKeyObjectParser;
-import org.opendaylight.protocol.pcep.impl.object.PCEPPccIdReqIPv4ObjectParser;
-import org.opendaylight.protocol.pcep.impl.object.PCEPPccIdReqIPv6ObjectParser;
-import org.opendaylight.protocol.pcep.impl.object.PCEPPceIdIPv4ObjectParser;
-import org.opendaylight.protocol.pcep.impl.object.PCEPPceIdIPv6ObjectParser;
-import org.opendaylight.protocol.pcep.impl.object.PCEPProcTimeObjectParser;
-import org.opendaylight.protocol.pcep.impl.object.PCEPReportedRouteObjectParser;
-import org.opendaylight.protocol.pcep.impl.object.PCEPRequestParameterObjectParser;
-import org.opendaylight.protocol.pcep.impl.object.PCEPSvecObjectParser;
-import org.opendaylight.protocol.pcep.impl.subobject.EROAsNumberSubobjectParser;
-import org.opendaylight.protocol.pcep.impl.subobject.EROIpv4PrefixSubobjectParser;
-import org.opendaylight.protocol.pcep.impl.subobject.EROIpv6PrefixSubobjectParser;
-import org.opendaylight.protocol.pcep.impl.subobject.EROLabelSubobjectParser;
-import org.opendaylight.protocol.pcep.impl.subobject.EROPathKey128SubobjectParser;
-import org.opendaylight.protocol.pcep.impl.subobject.EROPathKey32SubobjectParser;
-import org.opendaylight.protocol.pcep.impl.subobject.EROUnnumberedInterfaceSubobjectParser;
-import org.opendaylight.protocol.pcep.impl.subobject.GeneralizedLabelParser;
-import org.opendaylight.protocol.pcep.impl.subobject.RROIpv4PrefixSubobjectParser;
-import org.opendaylight.protocol.pcep.impl.subobject.RROIpv6PrefixSubobjectParser;
-import org.opendaylight.protocol.pcep.impl.subobject.RROLabelSubobjectParser;
-import org.opendaylight.protocol.pcep.impl.subobject.RROPathKey128SubobjectParser;
-import org.opendaylight.protocol.pcep.impl.subobject.RROPathKey32SubobjectParser;
-import org.opendaylight.protocol.pcep.impl.subobject.RROUnnumberedInterfaceSubobjectParser;
-import org.opendaylight.protocol.pcep.impl.subobject.Type1LabelParser;
-import org.opendaylight.protocol.pcep.impl.subobject.WavebandSwitchingLabelParser;
-import org.opendaylight.protocol.pcep.impl.subobject.XROAsNumberSubobjectParser;
-import org.opendaylight.protocol.pcep.impl.subobject.XROIpv4PrefixSubobjectParser;
-import org.opendaylight.protocol.pcep.impl.subobject.XROIpv6PrefixSubobjectParser;
-import org.opendaylight.protocol.pcep.impl.subobject.XROPathKey128SubobjectParser;
-import org.opendaylight.protocol.pcep.impl.subobject.XROPathKey32SubobjectParser;
-import org.opendaylight.protocol.pcep.impl.subobject.XROSRLGSubobjectParser;
-import org.opendaylight.protocol.pcep.impl.subobject.XROUnnumberedInterfaceSubobjectParser;
-import org.opendaylight.protocol.pcep.impl.tlv.NoPathVectorTlvParser;
-import org.opendaylight.protocol.pcep.impl.tlv.OFListTlvParser;
-import org.opendaylight.protocol.pcep.impl.tlv.OrderTlvParser;
-import org.opendaylight.protocol.pcep.impl.tlv.OverloadedDurationTlvParser;
-import org.opendaylight.protocol.pcep.impl.tlv.PathSetupTypeTlvParser;
-import org.opendaylight.protocol.pcep.impl.tlv.ReqMissingTlvParser;
+import org.opendaylight.protocol.pcep.parser.message.PCEPCloseMessageParser;
+import org.opendaylight.protocol.pcep.parser.message.PCEPErrorMessageParser;
+import org.opendaylight.protocol.pcep.parser.message.PCEPKeepAliveMessageParser;
+import org.opendaylight.protocol.pcep.parser.message.PCEPMonitoringReplyMessageParser;
+import org.opendaylight.protocol.pcep.parser.message.PCEPMonitoringRequestMessageParser;
+import org.opendaylight.protocol.pcep.parser.message.PCEPNotificationMessageParser;
+import org.opendaylight.protocol.pcep.parser.message.PCEPOpenMessageParser;
+import org.opendaylight.protocol.pcep.parser.message.PCEPReplyMessageParser;
+import org.opendaylight.protocol.pcep.parser.message.PCEPRequestMessageParser;
+import org.opendaylight.protocol.pcep.parser.message.PCEPStartTLSMessageParser;
+import org.opendaylight.protocol.pcep.parser.object.PCEPBandwidthObjectParser;
+import org.opendaylight.protocol.pcep.parser.object.PCEPClassTypeObjectParser;
+import org.opendaylight.protocol.pcep.parser.object.PCEPCloseObjectParser;
+import org.opendaylight.protocol.pcep.parser.object.PCEPEndPointsIpv4ObjectParser;
+import org.opendaylight.protocol.pcep.parser.object.PCEPEndPointsIpv6ObjectParser;
+import org.opendaylight.protocol.pcep.parser.object.PCEPErrorObjectParser;
+import org.opendaylight.protocol.pcep.parser.object.PCEPExcludeRouteObjectParser;
+import org.opendaylight.protocol.pcep.parser.object.PCEPExistingBandwidthObjectParser;
+import org.opendaylight.protocol.pcep.parser.object.PCEPExplicitRouteObjectParser;
+import org.opendaylight.protocol.pcep.parser.object.PCEPGlobalConstraintsObjectParser;
+import org.opendaylight.protocol.pcep.parser.object.PCEPIncludeRouteObjectParser;
+import org.opendaylight.protocol.pcep.parser.object.PCEPLoadBalancingObjectParser;
+import org.opendaylight.protocol.pcep.parser.object.PCEPLspaObjectParser;
+import org.opendaylight.protocol.pcep.parser.object.PCEPMetricObjectParser;
+import org.opendaylight.protocol.pcep.parser.object.PCEPMonitoringObjectParser;
+import org.opendaylight.protocol.pcep.parser.object.PCEPNoPathObjectParser;
+import org.opendaylight.protocol.pcep.parser.object.PCEPNotificationObjectParser;
+import org.opendaylight.protocol.pcep.parser.object.PCEPObjectiveFunctionObjectParser;
+import org.opendaylight.protocol.pcep.parser.object.PCEPOpenObjectParser;
+import org.opendaylight.protocol.pcep.parser.object.PCEPOverloadObjectParser;
+import org.opendaylight.protocol.pcep.parser.object.PCEPPathKeyObjectParser;
+import org.opendaylight.protocol.pcep.parser.object.PCEPPccIdReqIPv4ObjectParser;
+import org.opendaylight.protocol.pcep.parser.object.PCEPPccIdReqIPv6ObjectParser;
+import org.opendaylight.protocol.pcep.parser.object.PCEPPceIdIPv4ObjectParser;
+import org.opendaylight.protocol.pcep.parser.object.PCEPPceIdIPv6ObjectParser;
+import org.opendaylight.protocol.pcep.parser.object.PCEPProcTimeObjectParser;
+import org.opendaylight.protocol.pcep.parser.object.PCEPReportedRouteObjectParser;
+import org.opendaylight.protocol.pcep.parser.object.PCEPRequestParameterObjectParser;
+import org.opendaylight.protocol.pcep.parser.object.PCEPSvecObjectParser;
+import org.opendaylight.protocol.pcep.parser.subobject.EROAsNumberSubobjectParser;
+import org.opendaylight.protocol.pcep.parser.subobject.EROIpv4PrefixSubobjectParser;
+import org.opendaylight.protocol.pcep.parser.subobject.EROIpv6PrefixSubobjectParser;
+import org.opendaylight.protocol.pcep.parser.subobject.EROLabelSubobjectParser;
+import org.opendaylight.protocol.pcep.parser.subobject.EROPathKey128SubobjectParser;
+import org.opendaylight.protocol.pcep.parser.subobject.EROPathKey32SubobjectParser;
+import org.opendaylight.protocol.pcep.parser.subobject.EROUnnumberedInterfaceSubobjectParser;
+import org.opendaylight.protocol.pcep.parser.subobject.GeneralizedLabelParser;
+import org.opendaylight.protocol.pcep.parser.subobject.RROIpv4PrefixSubobjectParser;
+import org.opendaylight.protocol.pcep.parser.subobject.RROIpv6PrefixSubobjectParser;
+import org.opendaylight.protocol.pcep.parser.subobject.RROLabelSubobjectParser;
+import org.opendaylight.protocol.pcep.parser.subobject.RROPathKey128SubobjectParser;
+import org.opendaylight.protocol.pcep.parser.subobject.RROPathKey32SubobjectParser;
+import org.opendaylight.protocol.pcep.parser.subobject.RROUnnumberedInterfaceSubobjectParser;
+import org.opendaylight.protocol.pcep.parser.subobject.Type1LabelParser;
+import org.opendaylight.protocol.pcep.parser.subobject.WavebandSwitchingLabelParser;
+import org.opendaylight.protocol.pcep.parser.subobject.XROAsNumberSubobjectParser;
+import org.opendaylight.protocol.pcep.parser.subobject.XROIpv4PrefixSubobjectParser;
+import org.opendaylight.protocol.pcep.parser.subobject.XROIpv6PrefixSubobjectParser;
+import org.opendaylight.protocol.pcep.parser.subobject.XROPathKey128SubobjectParser;
+import org.opendaylight.protocol.pcep.parser.subobject.XROPathKey32SubobjectParser;
+import org.opendaylight.protocol.pcep.parser.subobject.XROSRLGSubobjectParser;
+import org.opendaylight.protocol.pcep.parser.subobject.XROUnnumberedInterfaceSubobjectParser;
+import org.opendaylight.protocol.pcep.parser.tlv.NoPathVectorTlvParser;
+import org.opendaylight.protocol.pcep.parser.tlv.OFListTlvParser;
+import org.opendaylight.protocol.pcep.parser.tlv.OrderTlvParser;
+import org.opendaylight.protocol.pcep.parser.tlv.OverloadedDurationTlvParser;
+import org.opendaylight.protocol.pcep.parser.tlv.PathSetupTypeTlvParser;
+import org.opendaylight.protocol.pcep.parser.tlv.ReqMissingTlvParser;
import org.opendaylight.protocol.pcep.spi.EROSubobjectRegistry;
import org.opendaylight.protocol.pcep.spi.LabelRegistry;
import org.opendaylight.protocol.pcep.spi.ObjectRegistry;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.label.subobject.label.type.Type1LabelCase;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.label.subobject.label.type.WavebandSwitchingLabelCase;
-public final class Activator extends AbstractPCEPExtensionProviderActivator {
+public final class BaseParserExtensionActivator extends AbstractPCEPExtensionProviderActivator {
@Override
protected List<AutoCloseable> startImpl(final PCEPExtensionProviderContext context) {
final List<AutoCloseable> regs = new ArrayList<>();
* 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;
+package org.opendaylight.protocol.pcep.parser.message;
import com.google.common.base.Preconditions;
import io.netty.buffer.ByteBuf;
* 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;
+package org.opendaylight.protocol.pcep.parser.message;
import com.google.common.base.Optional;
import com.google.common.base.Preconditions;
* 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;
+package org.opendaylight.protocol.pcep.parser.message;
import com.google.common.base.Preconditions;
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.protocol.pcep.impl.message;
+package org.opendaylight.protocol.pcep.parser.message;
import com.google.common.base.Optional;
import com.google.common.base.Preconditions;
import io.netty.buffer.Unpooled;
import java.util.ArrayList;
import java.util.List;
-import org.opendaylight.protocol.pcep.impl.spi.Util;
+import org.opendaylight.protocol.pcep.parser.util.Util;
import org.opendaylight.protocol.pcep.spi.AbstractMessageParser;
import org.opendaylight.protocol.pcep.spi.MessageUtil;
import org.opendaylight.protocol.pcep.spi.ObjectRegistry;
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.protocol.pcep.impl.message;
+package org.opendaylight.protocol.pcep.parser.message;
import com.google.common.base.Optional;
import com.google.common.base.Preconditions;
* 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;
+package org.opendaylight.protocol.pcep.parser.message;
import com.google.common.base.Optional;
import com.google.common.base.Preconditions;
* 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;
+package org.opendaylight.protocol.pcep.parser.message;
import com.google.common.base.Preconditions;
import io.netty.buffer.ByteBuf;
* 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;
+package org.opendaylight.protocol.pcep.parser.message;
import com.google.common.base.Optional;
import com.google.common.base.Preconditions;
import io.netty.buffer.Unpooled;
import java.util.ArrayList;
import java.util.List;
-import org.opendaylight.protocol.pcep.impl.spi.Util;
+import org.opendaylight.protocol.pcep.parser.util.Util;
import org.opendaylight.protocol.pcep.spi.AbstractMessageParser;
import org.opendaylight.protocol.pcep.spi.MessageUtil;
import org.opendaylight.protocol.pcep.spi.ObjectRegistry;
* 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;
+package org.opendaylight.protocol.pcep.parser.message;
import com.google.common.base.Optional;
import com.google.common.base.Preconditions;
* 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;
+package org.opendaylight.protocol.pcep.parser.message;
import com.google.common.base.Preconditions;
import io.netty.buffer.ByteBuf;
* 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.object;
+package org.opendaylight.protocol.pcep.parser.object;
import com.google.common.base.Preconditions;
import io.netty.buffer.ByteBuf;
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.protocol.pcep.impl.object;
+package org.opendaylight.protocol.pcep.parser.object;
import com.google.common.base.Preconditions;
import io.netty.buffer.ByteBuf;
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.protocol.pcep.impl.object;
+package org.opendaylight.protocol.pcep.parser.object;
import com.google.common.base.Preconditions;
import io.netty.buffer.ByteBuf;
* 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.object;
+package org.opendaylight.protocol.pcep.parser.object;
import com.google.common.base.Preconditions;
import io.netty.buffer.ByteBuf;
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.protocol.pcep.impl.object;
+package org.opendaylight.protocol.pcep.parser.object;
import static org.opendaylight.protocol.pcep.spi.VendorInformationUtil.VENDOR_INFORMATION_OBJECT_CLASS;
import static org.opendaylight.protocol.pcep.spi.VendorInformationUtil.VENDOR_INFORMATION_OBJECT_TYPE;
* 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.object;
+package org.opendaylight.protocol.pcep.parser.object;
import com.google.common.base.Preconditions;
import com.google.common.primitives.UnsignedBytes;
* 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.object;
+package org.opendaylight.protocol.pcep.parser.object;
import static org.opendaylight.protocol.util.ByteBufWriteUtil.writeFloat32;
* 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.object;
+package org.opendaylight.protocol.pcep.parser.object;
import static org.opendaylight.protocol.util.ByteBufWriteUtil.writeUnsignedByte;
* 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.object;
+package org.opendaylight.protocol.pcep.parser.object;
import static org.opendaylight.protocol.util.ByteBufWriteUtil.writeUnsignedByte;
* 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.object;
+package org.opendaylight.protocol.pcep.parser.object;
import static org.opendaylight.protocol.util.ByteBufWriteUtil.writeIpv4Address;
* 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.object;
+package org.opendaylight.protocol.pcep.parser.object;
import static org.opendaylight.protocol.util.ByteBufWriteUtil.writeIpv6Address;
* 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.object;
+package org.opendaylight.protocol.pcep.parser.object;
import static org.opendaylight.protocol.util.ByteBufWriteUtil.writeUnsignedByte;
* 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.object;
+package org.opendaylight.protocol.pcep.parser.object;
import static org.opendaylight.protocol.util.ByteBufWriteUtil.writeBoolean;
* 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.object;
+package org.opendaylight.protocol.pcep.parser.object;
import static org.opendaylight.protocol.util.ByteBufWriteUtil.writeFloat32;
* 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.object;
+package org.opendaylight.protocol.pcep.parser.object;
import com.google.common.base.Preconditions;
* 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.object;
+package org.opendaylight.protocol.pcep.parser.object;
import static org.opendaylight.protocol.util.ByteBufWriteUtil.writeUnsignedByte;
* 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.object;
+package org.opendaylight.protocol.pcep.parser.object;
import com.google.common.base.Preconditions;
* 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.object;
+package org.opendaylight.protocol.pcep.parser.object;
import static org.opendaylight.protocol.util.ByteBufWriteUtil.writeFloat32;
import static org.opendaylight.protocol.util.ByteBufWriteUtil.writeUnsignedByte;
* 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.object;
+package org.opendaylight.protocol.pcep.parser.object;
import static org.opendaylight.protocol.util.ByteBufWriteUtil.writeUnsignedByte;
import static org.opendaylight.protocol.util.ByteBufWriteUtil.writeUnsignedInt;
* 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.object;
+package org.opendaylight.protocol.pcep.parser.object;
import static org.opendaylight.protocol.util.ByteBufWriteUtil.writeFloat32;
import static org.opendaylight.protocol.util.ByteBufWriteUtil.writeUnsignedByte;
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.protocol.pcep.impl.object;
+package org.opendaylight.protocol.pcep.parser.object;
import com.google.common.base.Preconditions;
import io.netty.buffer.ByteBuf;
* 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.object;
+package org.opendaylight.protocol.pcep.parser.object;
import static org.opendaylight.protocol.util.ByteBufWriteUtil.writeUnsignedByte;
* 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.object;
+package org.opendaylight.protocol.pcep.parser.object;
import static org.opendaylight.protocol.util.ByteBufWriteUtil.writeUnsignedByte;
* 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.object;
+package org.opendaylight.protocol.pcep.parser.object;
import static org.opendaylight.protocol.util.ByteBufWriteUtil.writeUnsignedShort;
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.protocol.pcep.impl.object;
+package org.opendaylight.protocol.pcep.parser.object;
import static org.opendaylight.protocol.util.ByteBufWriteUtil.writeUnsignedByte;
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.protocol.pcep.impl.object;
+package org.opendaylight.protocol.pcep.parser.object;
import com.google.common.base.Preconditions;
import io.netty.buffer.ByteBuf;
* 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.object;
+package org.opendaylight.protocol.pcep.parser.object;
import com.google.common.base.Preconditions;
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.protocol.pcep.impl.object;
+package org.opendaylight.protocol.pcep.parser.object;
import com.google.common.base.Preconditions;
import io.netty.buffer.ByteBuf;
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.protocol.pcep.impl.object;
+package org.opendaylight.protocol.pcep.parser.object;
import com.google.common.base.Preconditions;
import io.netty.buffer.ByteBuf;
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.protocol.pcep.impl.object;
+package org.opendaylight.protocol.pcep.parser.object;
import com.google.common.base.Preconditions;
import io.netty.buffer.ByteBuf;
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.protocol.pcep.impl.object;
+package org.opendaylight.protocol.pcep.parser.object;
import com.google.common.base.Preconditions;
import io.netty.buffer.ByteBuf;
* 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.object;
+package org.opendaylight.protocol.pcep.parser.object;
import static org.opendaylight.protocol.util.ByteBufWriteUtil.INT_BYTES_LENGTH;
* 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.object;
+package org.opendaylight.protocol.pcep.parser.object;
import com.google.common.base.Preconditions;
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.protocol.pcep.impl.object;
+package org.opendaylight.protocol.pcep.parser.object;
import static org.opendaylight.protocol.util.ByteBufWriteUtil.writeUnsignedInt;
* 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.object;
+package org.opendaylight.protocol.pcep.parser.object;
import static org.opendaylight.protocol.util.ByteBufWriteUtil.writeUnsignedInt;
* 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.subobject;
+package org.opendaylight.protocol.pcep.parser.subobject;
import static org.opendaylight.protocol.util.ByteBufWriteUtil.writeShort;
-
import com.google.common.base.Preconditions;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
* 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.subobject;
+package org.opendaylight.protocol.pcep.parser.subobject;
import com.google.common.base.Preconditions;
import io.netty.buffer.ByteBuf;
* 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.subobject;
+package org.opendaylight.protocol.pcep.parser.subobject;
import com.google.common.base.Preconditions;
import com.google.common.collect.Lists;
* 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.subobject;
+package org.opendaylight.protocol.pcep.parser.subobject;
import static org.opendaylight.protocol.util.ByteBufWriteUtil.writeIpv4Prefix;
-
import com.google.common.base.Preconditions;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
* 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.subobject;
+package org.opendaylight.protocol.pcep.parser.subobject;
import static org.opendaylight.protocol.util.ByteBufWriteUtil.writeIpv6Prefix;
-
import com.google.common.base.Preconditions;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
* 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.subobject;
+package org.opendaylight.protocol.pcep.parser.subobject;
import com.google.common.base.Preconditions;
import io.netty.buffer.ByteBuf;
* 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.subobject;
+package org.opendaylight.protocol.pcep.parser.subobject;
import io.netty.buffer.ByteBuf;
import org.opendaylight.protocol.pcep.spi.AbstractEROPathKeySubobjectParser;
* 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.subobject;
+package org.opendaylight.protocol.pcep.parser.subobject;
import io.netty.buffer.ByteBuf;
import org.opendaylight.protocol.pcep.spi.AbstractEROPathKeySubobjectParser;
* 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.subobject;
+package org.opendaylight.protocol.pcep.parser.subobject;
import static org.opendaylight.protocol.util.ByteBufWriteUtil.writeUnsignedInt;
* 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.subobject;
+package org.opendaylight.protocol.pcep.parser.subobject;
import com.google.common.base.Preconditions;
import io.netty.buffer.ByteBuf;
* 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.subobject;
+package org.opendaylight.protocol.pcep.parser.subobject;
import static org.opendaylight.protocol.util.ByteBufWriteUtil.writeIpv4Prefix;
-
import com.google.common.base.Preconditions;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
* 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.subobject;
+package org.opendaylight.protocol.pcep.parser.subobject;
import static org.opendaylight.protocol.util.ByteBufWriteUtil.writeIpv6Prefix;
-
import com.google.common.base.Preconditions;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
* 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.subobject;
+package org.opendaylight.protocol.pcep.parser.subobject;
import com.google.common.base.Preconditions;
import io.netty.buffer.ByteBuf;
* 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.subobject;
+package org.opendaylight.protocol.pcep.parser.subobject;
import static org.opendaylight.protocol.util.ByteBufWriteUtil.writeUnsignedShort;
* 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.subobject;
+package org.opendaylight.protocol.pcep.parser.subobject;
import static org.opendaylight.protocol.util.ByteBufWriteUtil.writeUnsignedShort;
* 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.subobject;
+package org.opendaylight.protocol.pcep.parser.subobject;
import static org.opendaylight.protocol.util.ByteBufWriteUtil.writeUnsignedInt;
* 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.subobject;
+package org.opendaylight.protocol.pcep.parser.subobject;
import static org.opendaylight.protocol.util.ByteBufWriteUtil.writeUnsignedInt;
* 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.subobject;
+package org.opendaylight.protocol.pcep.parser.subobject;
import static org.opendaylight.protocol.util.ByteBufWriteUtil.writeUnsignedInt;
* 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.subobject;
+package org.opendaylight.protocol.pcep.parser.subobject;
import com.google.common.base.Preconditions;
import io.netty.buffer.ByteBuf;
* 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.subobject;
+package org.opendaylight.protocol.pcep.parser.subobject;
import static org.opendaylight.protocol.util.ByteBufWriteUtil.writeIpv4Prefix;
import static org.opendaylight.protocol.util.ByteBufWriteUtil.writeUnsignedByte;
-
import com.google.common.base.Preconditions;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
* 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.subobject;
+package org.opendaylight.protocol.pcep.parser.subobject;
import static org.opendaylight.protocol.util.ByteBufWriteUtil.writeIpv6Prefix;
import static org.opendaylight.protocol.util.ByteBufWriteUtil.writeUnsignedByte;
-
import com.google.common.base.Preconditions;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
* 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.subobject;
+package org.opendaylight.protocol.pcep.parser.subobject;
import static org.opendaylight.protocol.util.ByteBufWriteUtil.writeUnsignedShort;
* 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.subobject;
+package org.opendaylight.protocol.pcep.parser.subobject;
import static org.opendaylight.protocol.util.ByteBufWriteUtil.writeUnsignedShort;
* 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.subobject;
+package org.opendaylight.protocol.pcep.parser.subobject;
import static org.opendaylight.protocol.util.ByteBufWriteUtil.writeUnsignedByte;
import static org.opendaylight.protocol.util.ByteBufWriteUtil.writeUnsignedInt;
* 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.subobject;
+package org.opendaylight.protocol.pcep.parser.subobject;
import static org.opendaylight.protocol.util.ByteBufWriteUtil.writeUnsignedByte;
import static org.opendaylight.protocol.util.ByteBufWriteUtil.writeUnsignedInt;
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.protocol.pcep.impl.tlv;
+package org.opendaylight.protocol.pcep.parser.tlv;
import static org.opendaylight.protocol.pcep.spi.VendorInformationUtil.VENDOR_INFORMATION_TLV_TYPE;
import static org.opendaylight.protocol.util.ByteBufWriteUtil.writeUnsignedInt;
* 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.tlv;
+package org.opendaylight.protocol.pcep.parser.tlv;
import static org.opendaylight.protocol.util.ByteBufWriteUtil.writeUnsignedInt;
* 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.tlv;
+package org.opendaylight.protocol.pcep.parser.tlv;
import com.google.common.base.Preconditions;
import io.netty.buffer.ByteBuf;
* 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.tlv;
+package org.opendaylight.protocol.pcep.parser.tlv;
import static org.opendaylight.protocol.util.ByteBufWriteUtil.writeUnsignedShort;
* 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.tlv;
+package org.opendaylight.protocol.pcep.parser.tlv;
import static org.opendaylight.protocol.util.ByteBufWriteUtil.writeUnsignedInt;
* 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.tlv;
+package org.opendaylight.protocol.pcep.parser.tlv;
import static org.opendaylight.protocol.util.ByteBufWriteUtil.writeUnsignedInt;
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.protocol.pcep.impl.tlv;
+package org.opendaylight.protocol.pcep.parser.tlv;
import static org.opendaylight.protocol.util.ByteBufWriteUtil.writeUnsignedByte;
* 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.tlv;
+package org.opendaylight.protocol.pcep.parser.tlv;
import static org.opendaylight.protocol.util.ByteBufWriteUtil.writeUnsignedInt;
--- /dev/null
+/*
+ * 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.parser.util;
+
+import java.util.List;
+import org.opendaylight.protocol.pcep.spi.PCEPDeserializerException;
+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.monitoring.metrics.MetricPce;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.monitoring.metrics.MetricPceBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.overload.object.Overload;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.pce.id.object.PceId;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.proc.time.object.ProcTime;
+
+/**
+ * Utilities used in pcep-base-parser
+ */
+public final class Util {
+
+ private Util() {
+ throw new UnsupportedOperationException();
+ }
+
+ private static State insertObject(final MetricPceBuilder metricPceBuilder, final State state, final Object obj) {
+ switch(state) {
+ case START :
+ if (obj instanceof ProcTime) {
+ metricPceBuilder.setProcTime((ProcTime) obj);
+ return State.PROC_TIME;
+ }
+ case PROC_TIME :
+ if (obj instanceof Overload) {
+ metricPceBuilder.setOverload((Overload) obj);
+ return State.OVERLOAD;
+ }
+ case OVERLOAD :
+ case END :
+ return State.END;
+ default:
+ return state;
+ }
+ }
+
+ public static MetricPce validateMonitoringMetrics(final List<Object> objects) throws PCEPDeserializerException {
+ final MetricPceBuilder metricPceBuilder = new MetricPceBuilder();
+ if (!(objects.get(0) instanceof PceId)) {
+ throw new PCEPDeserializerException("metric-pce-list must start with PCE-ID object.");
+ }
+ metricPceBuilder.setPceId((PceId) (objects.get(0)));
+ objects.remove(0);
+ State state = State.START;
+ while (!objects.isEmpty() && !state.equals(State.END)) {
+ final Object obj = objects.get(0);
+ state = insertObject(metricPceBuilder, state, obj);
+ if (!state.equals(State.END)) {
+ objects.remove(0);
+ }
+ }
+ return metricPceBuilder.build();
+ }
+
+ private enum State {
+ START, PROC_TIME, OVERLOAD, END;
+ }
+}
# Copyright (c)2013 Cisco Systems, Inc. All rights reserved.
-#
+#
# This program and the accompanying materials are made available
-# under the terms of the Eclipse Public License v1.0 which
+# 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
-org.opendaylight.protocol.pcep.impl.Activator
+org.opendaylight.protocol.pcep.parser.BaseParserExtensionActivator
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
- <artifactId>pcep-impl</artifactId>
+ <artifactId>pcep-base-parser</artifactId>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
import io.netty.buffer.ByteBuf;
import java.util.ArrayList;
import java.util.List;
-import org.opendaylight.protocol.pcep.impl.message.PCEPErrorMessageParser;
+import org.opendaylight.protocol.pcep.parser.message.PCEPErrorMessageParser;
import org.opendaylight.protocol.pcep.spi.ObjectRegistry;
import org.opendaylight.protocol.pcep.spi.PCEPDeserializerException;
import org.opendaylight.protocol.pcep.spi.PCEPErrors;
package org.opendaylight.protocol.pcep.ietf.stateful07;
import io.netty.buffer.ByteBuf;
-import org.opendaylight.protocol.pcep.impl.object.PCEPLspaObjectParser;
+import org.opendaylight.protocol.pcep.parser.object.PCEPLspaObjectParser;
import org.opendaylight.protocol.pcep.spi.TlvRegistry;
import org.opendaylight.protocol.pcep.spi.VendorInformationTlvRegistry;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev131222.Tlvs2;
package org.opendaylight.protocol.pcep.ietf.stateful07;
import io.netty.buffer.ByteBuf;
-import org.opendaylight.protocol.pcep.impl.object.PCEPOpenObjectParser;
+import org.opendaylight.protocol.pcep.parser.object.PCEPOpenObjectParser;
import org.opendaylight.protocol.pcep.spi.TlvRegistry;
import org.opendaylight.protocol.pcep.spi.VendorInformationTlvRegistry;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev131222.Tlvs1;
import org.opendaylight.protocol.pcep.ietf.stateful07.Stateful07LspObjectParser;
import org.opendaylight.protocol.pcep.ietf.stateful07.Stateful07LspaObjectParser;
import org.opendaylight.protocol.pcep.ietf.stateful07.StatefulActivator;
-import org.opendaylight.protocol.pcep.impl.Activator;
+import org.opendaylight.protocol.pcep.parser.BaseParserExtensionActivator;
import org.opendaylight.protocol.pcep.spi.ObjectHeaderImpl;
import org.opendaylight.protocol.pcep.spi.PCEPDeserializerException;
import org.opendaylight.protocol.pcep.spi.TlvRegistry;
public class PCEPObjectParserTest {
private SimplePCEPExtensionProviderContext ctx;
- private Activator act;
+ private BaseParserExtensionActivator act;
private TlvRegistry tlvRegistry;
private VendorInformationTlvRegistry viTlvRegistry;
@Before
public void setUp() throws Exception {
this.ctx = new SimplePCEPExtensionProviderContext();
- this.act = new Activator();
+ this.act = new BaseParserExtensionActivator();
this.act.start(this.ctx);
this.tlvRegistry = ServiceLoaderPCEPExtensionProviderContext.create().getTlvHandlerRegistry();
this.viTlvRegistry = ServiceLoaderPCEPExtensionProviderContext.getSingletonInstance().getVendorInformationTlvRegistry();
import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
-
import com.google.common.collect.Lists;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import org.opendaylight.protocol.pcep.ietf.stateful07.Stateful07PCReportMessageParser;
import org.opendaylight.protocol.pcep.ietf.stateful07.Stateful07PCUpdateRequestMessageParser;
import org.opendaylight.protocol.pcep.ietf.stateful07.StatefulActivator;
-import org.opendaylight.protocol.pcep.impl.Activator;
-import org.opendaylight.protocol.pcep.impl.message.PCEPOpenMessageParser;
+import org.opendaylight.protocol.pcep.parser.BaseParserExtensionActivator;
+import org.opendaylight.protocol.pcep.parser.message.PCEPOpenMessageParser;
import org.opendaylight.protocol.pcep.spi.PCEPDeserializerException;
import org.opendaylight.protocol.pcep.spi.pojo.SimplePCEPExtensionProviderContext;
import org.opendaylight.protocol.pcep.sync.optimizations.SyncOptimizationsActivator;
private UnnumberedCase rroUnnumberedSub;
private SimplePCEPExtensionProviderContext ctx;
- private Activator act;
+ private BaseParserExtensionActivator act;
private static final byte[] PCRT1 = {
(byte) 0x20, (byte) 0x0A, (byte) 0x00, (byte) 0x20,
@Before
public void setUp() throws Exception {
this.ctx = new SimplePCEPExtensionProviderContext();
- this.act = new Activator();
+ this.act = new BaseParserExtensionActivator();
this.act.start(this.ctx);
final LspaBuilder lspaBuilder = new LspaBuilder();
<groupId>${project.groupId}</groupId>
<artifactId>pcep-spi</artifactId>
</dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>pcep-base-parser</artifactId>
+ </dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>rsvp-api</artifactId>
*/
package org.opendaylight.controller.config.yang.pcep.impl;
-import org.opendaylight.protocol.pcep.impl.Activator;
+import org.opendaylight.protocol.pcep.parser.BaseParserExtensionActivator;
/**
*
@Override
public java.lang.AutoCloseable createInstance() {
- return new Activator();
+ return new BaseParserExtensionActivator();
}
}
package org.opendaylight.protocol.pcep.impl.spi;
import java.util.Arrays;
-import java.util.List;
-import org.opendaylight.protocol.pcep.spi.PCEPDeserializerException;
import org.opendaylight.protocol.pcep.spi.PCEPErrors;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.message.rev131007.PcerrBuilder;
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.Object;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.monitoring.metrics.MetricPce;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.monitoring.metrics.MetricPceBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.open.object.Open;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.overload.object.Overload;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.pce.id.object.PceId;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.pcep.error.object.ErrorObject;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.pcep.error.object.ErrorObjectBuilder;
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.pcerr.message.pcerr.message.ErrorsBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.pcerr.message.pcerr.message.error.type.SessionCaseBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.pcerr.message.pcerr.message.error.type.session._case.SessionBuilder;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.proc.time.object.ProcTime;
/**
* Utilities used in pcep-impl
new PcerrMessageBuilder().setErrors(Arrays.asList(new ErrorsBuilder().setErrorObject(err).build())).setErrorType(type).build()).build();
}
}
-
- private static State insertObject(final MetricPceBuilder metricPceBuilder, final State state, final Object obj) {
- switch(state) {
- case START :
- if (obj instanceof ProcTime) {
- metricPceBuilder.setProcTime((ProcTime) obj);
- return State.PROC_TIME;
- }
- case PROC_TIME :
- if (obj instanceof Overload) {
- metricPceBuilder.setOverload((Overload) obj);
- return State.OVERLOAD;
- }
- case OVERLOAD :
- case END :
- return State.END;
- default:
- return state;
- }
- }
-
- public static MetricPce validateMonitoringMetrics(final List<Object> objects) throws PCEPDeserializerException {
- final MetricPceBuilder metricPceBuilder = new MetricPceBuilder();
- if (!(objects.get(0) instanceof PceId)) {
- throw new PCEPDeserializerException("metric-pce-list must start with PCE-ID object.");
- }
- metricPceBuilder.setPceId((PceId) (objects.get(0)));
- objects.remove(0);
- State state = State.START;
- while (!objects.isEmpty() && !state.equals(State.END)) {
- final Object obj = objects.get(0);
- state = insertObject(metricPceBuilder, state, obj);
- if (!state.equals(State.END)) {
- objects.remove(0);
- }
- }
- return metricPceBuilder.build();
- }
-
- private enum State {
- START, PROC_TIME, OVERLOAD, END;
- }
}
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import org.junit.Test;
-import org.opendaylight.protocol.pcep.impl.subobject.GeneralizedLabelParser;
-import org.opendaylight.protocol.pcep.impl.subobject.Type1LabelParser;
-import org.opendaylight.protocol.pcep.impl.subobject.WavebandSwitchingLabelParser;
+import org.opendaylight.protocol.pcep.parser.subobject.GeneralizedLabelParser;
+import org.opendaylight.protocol.pcep.parser.subobject.Type1LabelParser;
+import org.opendaylight.protocol.pcep.parser.subobject.WavebandSwitchingLabelParser;
import org.opendaylight.protocol.pcep.spi.PCEPDeserializerException;
import org.opendaylight.protocol.util.ByteArray;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.label.subobject.label.type.GeneralizedLabelCaseBuilder;
import java.util.List;
import org.junit.Before;
import org.junit.Test;
-import org.opendaylight.protocol.pcep.impl.subobject.EROAsNumberSubobjectParser;
-import org.opendaylight.protocol.pcep.impl.subobject.EROExplicitExclusionRouteSubobjectParser;
-import org.opendaylight.protocol.pcep.impl.subobject.EROIpv4PrefixSubobjectParser;
-import org.opendaylight.protocol.pcep.impl.subobject.EROIpv6PrefixSubobjectParser;
-import org.opendaylight.protocol.pcep.impl.subobject.EROLabelSubobjectParser;
-import org.opendaylight.protocol.pcep.impl.subobject.EROPathKey128SubobjectParser;
-import org.opendaylight.protocol.pcep.impl.subobject.EROPathKey32SubobjectParser;
-import org.opendaylight.protocol.pcep.impl.subobject.EROUnnumberedInterfaceSubobjectParser;
+import org.opendaylight.protocol.pcep.parser.BaseParserExtensionActivator;
+import org.opendaylight.protocol.pcep.parser.subobject.EROAsNumberSubobjectParser;
+import org.opendaylight.protocol.pcep.parser.subobject.EROExplicitExclusionRouteSubobjectParser;
+import org.opendaylight.protocol.pcep.parser.subobject.EROIpv4PrefixSubobjectParser;
+import org.opendaylight.protocol.pcep.parser.subobject.EROIpv6PrefixSubobjectParser;
+import org.opendaylight.protocol.pcep.parser.subobject.EROLabelSubobjectParser;
+import org.opendaylight.protocol.pcep.parser.subobject.EROPathKey128SubobjectParser;
+import org.opendaylight.protocol.pcep.parser.subobject.EROPathKey32SubobjectParser;
+import org.opendaylight.protocol.pcep.parser.subobject.EROUnnumberedInterfaceSubobjectParser;
import org.opendaylight.protocol.pcep.spi.PCEPDeserializerException;
import org.opendaylight.protocol.pcep.spi.pojo.SimplePCEPExtensionProviderContext;
import org.opendaylight.protocol.util.ByteArray;
private static final byte[] exrsBytes = { (byte) 0xa1, (byte) 0x06, (byte) 0xa0, (byte) 0x04, (byte) 0x00, (byte) 0x64 };
private SimplePCEPExtensionProviderContext ctx;
- private Activator act;
+ private BaseParserExtensionActivator act;
@Before
public void setUp() {
this.ctx = new SimplePCEPExtensionProviderContext();
- this.act = new Activator();
+ this.act = new BaseParserExtensionActivator();
this.act.start(this.ctx);
}
import org.junit.Before;
import org.junit.Test;
import org.opendaylight.protocol.pcep.impl.TestVendorInformationTlvParser.TestEnterpriseSpecificInformation;
-import org.opendaylight.protocol.pcep.impl.object.PCEPBandwidthObjectParser;
-import org.opendaylight.protocol.pcep.impl.object.PCEPClassTypeObjectParser;
-import org.opendaylight.protocol.pcep.impl.object.PCEPCloseObjectParser;
-import org.opendaylight.protocol.pcep.impl.object.PCEPEndPointsIpv4ObjectParser;
-import org.opendaylight.protocol.pcep.impl.object.PCEPEndPointsIpv6ObjectParser;
-import org.opendaylight.protocol.pcep.impl.object.PCEPErrorObjectParser;
-import org.opendaylight.protocol.pcep.impl.object.PCEPExcludeRouteObjectParser;
-import org.opendaylight.protocol.pcep.impl.object.PCEPExistingBandwidthObjectParser;
-import org.opendaylight.protocol.pcep.impl.object.PCEPExplicitRouteObjectParser;
-import org.opendaylight.protocol.pcep.impl.object.PCEPGlobalConstraintsObjectParser;
-import org.opendaylight.protocol.pcep.impl.object.PCEPIncludeRouteObjectParser;
-import org.opendaylight.protocol.pcep.impl.object.PCEPLoadBalancingObjectParser;
-import org.opendaylight.protocol.pcep.impl.object.PCEPLspaObjectParser;
-import org.opendaylight.protocol.pcep.impl.object.PCEPMetricObjectParser;
-import org.opendaylight.protocol.pcep.impl.object.PCEPMonitoringObjectParser;
-import org.opendaylight.protocol.pcep.impl.object.PCEPNoPathObjectParser;
-import org.opendaylight.protocol.pcep.impl.object.PCEPNotificationObjectParser;
-import org.opendaylight.protocol.pcep.impl.object.PCEPObjectiveFunctionObjectParser;
-import org.opendaylight.protocol.pcep.impl.object.PCEPOpenObjectParser;
-import org.opendaylight.protocol.pcep.impl.object.PCEPOverloadObjectParser;
-import org.opendaylight.protocol.pcep.impl.object.PCEPPathKeyObjectParser;
-import org.opendaylight.protocol.pcep.impl.object.PCEPPccIdReqIPv4ObjectParser;
-import org.opendaylight.protocol.pcep.impl.object.PCEPPccIdReqIPv6ObjectParser;
-import org.opendaylight.protocol.pcep.impl.object.PCEPPceIdIPv4ObjectParser;
-import org.opendaylight.protocol.pcep.impl.object.PCEPPceIdIPv6ObjectParser;
-import org.opendaylight.protocol.pcep.impl.object.PCEPProcTimeObjectParser;
-import org.opendaylight.protocol.pcep.impl.object.PCEPReportedRouteObjectParser;
-import org.opendaylight.protocol.pcep.impl.object.PCEPRequestParameterObjectParser;
-import org.opendaylight.protocol.pcep.impl.object.PCEPSvecObjectParser;
+import org.opendaylight.protocol.pcep.parser.BaseParserExtensionActivator;
+import org.opendaylight.protocol.pcep.parser.object.PCEPBandwidthObjectParser;
+import org.opendaylight.protocol.pcep.parser.object.PCEPClassTypeObjectParser;
+import org.opendaylight.protocol.pcep.parser.object.PCEPCloseObjectParser;
+import org.opendaylight.protocol.pcep.parser.object.PCEPEndPointsIpv4ObjectParser;
+import org.opendaylight.protocol.pcep.parser.object.PCEPEndPointsIpv6ObjectParser;
+import org.opendaylight.protocol.pcep.parser.object.PCEPErrorObjectParser;
+import org.opendaylight.protocol.pcep.parser.object.PCEPExcludeRouteObjectParser;
+import org.opendaylight.protocol.pcep.parser.object.PCEPExistingBandwidthObjectParser;
+import org.opendaylight.protocol.pcep.parser.object.PCEPExplicitRouteObjectParser;
+import org.opendaylight.protocol.pcep.parser.object.PCEPGlobalConstraintsObjectParser;
+import org.opendaylight.protocol.pcep.parser.object.PCEPIncludeRouteObjectParser;
+import org.opendaylight.protocol.pcep.parser.object.PCEPLoadBalancingObjectParser;
+import org.opendaylight.protocol.pcep.parser.object.PCEPLspaObjectParser;
+import org.opendaylight.protocol.pcep.parser.object.PCEPMetricObjectParser;
+import org.opendaylight.protocol.pcep.parser.object.PCEPMonitoringObjectParser;
+import org.opendaylight.protocol.pcep.parser.object.PCEPNoPathObjectParser;
+import org.opendaylight.protocol.pcep.parser.object.PCEPNotificationObjectParser;
+import org.opendaylight.protocol.pcep.parser.object.PCEPObjectiveFunctionObjectParser;
+import org.opendaylight.protocol.pcep.parser.object.PCEPOpenObjectParser;
+import org.opendaylight.protocol.pcep.parser.object.PCEPOverloadObjectParser;
+import org.opendaylight.protocol.pcep.parser.object.PCEPPathKeyObjectParser;
+import org.opendaylight.protocol.pcep.parser.object.PCEPPccIdReqIPv4ObjectParser;
+import org.opendaylight.protocol.pcep.parser.object.PCEPPccIdReqIPv6ObjectParser;
+import org.opendaylight.protocol.pcep.parser.object.PCEPPceIdIPv4ObjectParser;
+import org.opendaylight.protocol.pcep.parser.object.PCEPPceIdIPv6ObjectParser;
+import org.opendaylight.protocol.pcep.parser.object.PCEPProcTimeObjectParser;
+import org.opendaylight.protocol.pcep.parser.object.PCEPReportedRouteObjectParser;
+import org.opendaylight.protocol.pcep.parser.object.PCEPRequestParameterObjectParser;
+import org.opendaylight.protocol.pcep.parser.object.PCEPSvecObjectParser;
import org.opendaylight.protocol.pcep.spi.ObjectHeaderImpl;
import org.opendaylight.protocol.pcep.spi.PCEPDeserializerException;
import org.opendaylight.protocol.pcep.spi.PCEPErrors;
private VendorInformationTlvRegistry viTlvRegistry;
private SimplePCEPExtensionProviderContext ctx;
- private Activator act;
+ private BaseParserExtensionActivator act;
private TestVendorInformationActivator viAct;
@Before
public void setUp() {
this.ctx = new SimplePCEPExtensionProviderContext();
- this.act = new Activator();
+ this.act = new BaseParserExtensionActivator();
this.viAct = new TestVendorInformationActivator();
this.act.start(this.ctx);
this.viAct.start(this.ctx);
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import org.junit.Test;
-import org.opendaylight.protocol.pcep.impl.subobject.RROIpv4PrefixSubobjectParser;
-import org.opendaylight.protocol.pcep.impl.subobject.RROIpv6PrefixSubobjectParser;
-import org.opendaylight.protocol.pcep.impl.subobject.RROLabelSubobjectParser;
-import org.opendaylight.protocol.pcep.impl.subobject.RROPathKey128SubobjectParser;
-import org.opendaylight.protocol.pcep.impl.subobject.RROPathKey32SubobjectParser;
-import org.opendaylight.protocol.pcep.impl.subobject.RROUnnumberedInterfaceSubobjectParser;
+import org.opendaylight.protocol.pcep.parser.BaseParserExtensionActivator;
+import org.opendaylight.protocol.pcep.parser.subobject.RROIpv4PrefixSubobjectParser;
+import org.opendaylight.protocol.pcep.parser.subobject.RROIpv6PrefixSubobjectParser;
+import org.opendaylight.protocol.pcep.parser.subobject.RROLabelSubobjectParser;
+import org.opendaylight.protocol.pcep.parser.subobject.RROPathKey128SubobjectParser;
+import org.opendaylight.protocol.pcep.parser.subobject.RROPathKey32SubobjectParser;
+import org.opendaylight.protocol.pcep.parser.subobject.RROUnnumberedInterfaceSubobjectParser;
import org.opendaylight.protocol.pcep.spi.PCEPDeserializerException;
import org.opendaylight.protocol.pcep.spi.pojo.SimplePCEPExtensionProviderContext;
import org.opendaylight.protocol.util.ByteArray;
@Test
public void testRROLabelSubobject() throws Exception {
final SimplePCEPExtensionProviderContext ctx = new SimplePCEPExtensionProviderContext();
- try (Activator a = new Activator()) {
+ try (BaseParserExtensionActivator a = new BaseParserExtensionActivator()) {
a.start(ctx);
final RROLabelSubobjectParser parser = new RROLabelSubobjectParser(ctx.getLabelHandlerRegistry());
final SubobjectBuilder subs = new SubobjectBuilder();
import java.util.List;
import org.junit.Test;
import org.opendaylight.protocol.pcep.impl.TestVendorInformationTlvParser.TestEnterpriseSpecificInformation;
-import org.opendaylight.protocol.pcep.impl.tlv.AbstractVendorSpecificTlvParser;
-import org.opendaylight.protocol.pcep.impl.tlv.NoPathVectorTlvParser;
-import org.opendaylight.protocol.pcep.impl.tlv.OFListTlvParser;
-import org.opendaylight.protocol.pcep.impl.tlv.OrderTlvParser;
-import org.opendaylight.protocol.pcep.impl.tlv.OverloadedDurationTlvParser;
-import org.opendaylight.protocol.pcep.impl.tlv.PathSetupTypeTlvParser;
-import org.opendaylight.protocol.pcep.impl.tlv.ReqMissingTlvParser;
+import org.opendaylight.protocol.pcep.parser.tlv.AbstractVendorSpecificTlvParser;
+import org.opendaylight.protocol.pcep.parser.tlv.NoPathVectorTlvParser;
+import org.opendaylight.protocol.pcep.parser.tlv.OFListTlvParser;
+import org.opendaylight.protocol.pcep.parser.tlv.OrderTlvParser;
+import org.opendaylight.protocol.pcep.parser.tlv.OverloadedDurationTlvParser;
+import org.opendaylight.protocol.pcep.parser.tlv.PathSetupTypeTlvParser;
+import org.opendaylight.protocol.pcep.parser.tlv.ReqMissingTlvParser;
import org.opendaylight.protocol.pcep.spi.PCEPDeserializerException;
import org.opendaylight.protocol.util.ByteArray;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.iana.rev130816.EnterpriseNumber;
import org.junit.Before;
import org.junit.Test;
import org.opendaylight.protocol.pcep.impl.TestVendorInformationTlvParser.TestEnterpriseSpecificInformation;
-import org.opendaylight.protocol.pcep.impl.message.PCEPCloseMessageParser;
-import org.opendaylight.protocol.pcep.impl.message.PCEPErrorMessageParser;
-import org.opendaylight.protocol.pcep.impl.message.PCEPKeepAliveMessageParser;
-import org.opendaylight.protocol.pcep.impl.message.PCEPMonitoringReplyMessageParser;
-import org.opendaylight.protocol.pcep.impl.message.PCEPMonitoringRequestMessageParser;
-import org.opendaylight.protocol.pcep.impl.message.PCEPNotificationMessageParser;
-import org.opendaylight.protocol.pcep.impl.message.PCEPOpenMessageParser;
-import org.opendaylight.protocol.pcep.impl.message.PCEPReplyMessageParser;
-import org.opendaylight.protocol.pcep.impl.message.PCEPRequestMessageParser;
-import org.opendaylight.protocol.pcep.impl.message.PCEPStartTLSMessageParser;
+import org.opendaylight.protocol.pcep.parser.BaseParserExtensionActivator;
+import org.opendaylight.protocol.pcep.parser.message.PCEPCloseMessageParser;
+import org.opendaylight.protocol.pcep.parser.message.PCEPErrorMessageParser;
+import org.opendaylight.protocol.pcep.parser.message.PCEPKeepAliveMessageParser;
+import org.opendaylight.protocol.pcep.parser.message.PCEPMonitoringReplyMessageParser;
+import org.opendaylight.protocol.pcep.parser.message.PCEPMonitoringRequestMessageParser;
+import org.opendaylight.protocol.pcep.parser.message.PCEPNotificationMessageParser;
+import org.opendaylight.protocol.pcep.parser.message.PCEPOpenMessageParser;
+import org.opendaylight.protocol.pcep.parser.message.PCEPReplyMessageParser;
+import org.opendaylight.protocol.pcep.parser.message.PCEPRequestMessageParser;
+import org.opendaylight.protocol.pcep.parser.message.PCEPStartTLSMessageParser;
import org.opendaylight.protocol.pcep.spi.ObjectRegistry;
import org.opendaylight.protocol.pcep.spi.PCEPDeserializerException;
import org.opendaylight.protocol.pcep.spi.VendorInformationObjectRegistry;
private AsNumberCase eroASSubobject;
private SimplePCEPExtensionProviderContext ctx;
- private Activator act;
+ private BaseParserExtensionActivator act;
private TestVendorInformationActivator viObjAct;
@Before
public void setUp() throws Exception {
this.ctx = new SimplePCEPExtensionProviderContext();
- this.act = new Activator();
+ this.act = new BaseParserExtensionActivator();
this.viObjAct = new TestVendorInformationActivator();
this.act.start(this.ctx);
this.viObjAct.start(this.ctx);
import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import org.junit.Test;
-import org.opendaylight.protocol.pcep.impl.subobject.XROAsNumberSubobjectParser;
-import org.opendaylight.protocol.pcep.impl.subobject.XROIpv4PrefixSubobjectParser;
-import org.opendaylight.protocol.pcep.impl.subobject.XROIpv6PrefixSubobjectParser;
-import org.opendaylight.protocol.pcep.impl.subobject.XROPathKey128SubobjectParser;
-import org.opendaylight.protocol.pcep.impl.subobject.XROPathKey32SubobjectParser;
-import org.opendaylight.protocol.pcep.impl.subobject.XROSRLGSubobjectParser;
-import org.opendaylight.protocol.pcep.impl.subobject.XROUnnumberedInterfaceSubobjectParser;
+import org.opendaylight.protocol.pcep.parser.subobject.XROAsNumberSubobjectParser;
+import org.opendaylight.protocol.pcep.parser.subobject.XROIpv4PrefixSubobjectParser;
+import org.opendaylight.protocol.pcep.parser.subobject.XROIpv6PrefixSubobjectParser;
+import org.opendaylight.protocol.pcep.parser.subobject.XROPathKey128SubobjectParser;
+import org.opendaylight.protocol.pcep.parser.subobject.XROPathKey32SubobjectParser;
+import org.opendaylight.protocol.pcep.parser.subobject.XROSRLGSubobjectParser;
+import org.opendaylight.protocol.pcep.parser.subobject.XROUnnumberedInterfaceSubobjectParser;
import org.opendaylight.protocol.pcep.spi.PCEPDeserializerException;
import org.opendaylight.protocol.util.ByteArray;
import org.opendaylight.protocol.util.Ipv6Util;
import io.netty.buffer.ByteBuf;
import org.opendaylight.protocol.pcep.impl.TestVendorInformationTlvParser.TestEnterpriseSpecificInformation;
-import org.opendaylight.protocol.pcep.impl.object.AbstractVendorInformationObjectParser;
+import org.opendaylight.protocol.pcep.parser.object.AbstractVendorInformationObjectParser;
import org.opendaylight.protocol.pcep.spi.PCEPDeserializerException;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.iana.rev130816.EnterpriseNumber;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.vendor.information.EnterpriseSpecificInformation;
package org.opendaylight.protocol.pcep.impl;
import io.netty.buffer.ByteBuf;
-
-import org.opendaylight.protocol.pcep.impl.tlv.AbstractVendorInformationTlvParser;
+import org.opendaylight.protocol.pcep.parser.tlv.AbstractVendorInformationTlvParser;
import org.opendaylight.protocol.pcep.spi.PCEPDeserializerException;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.iana.rev130816.EnterpriseNumber;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.vendor.information.EnterpriseSpecificInformation;
import com.google.common.base.Preconditions;
import io.netty.buffer.ByteBuf;
-import org.opendaylight.protocol.pcep.impl.object.PCEPEndPointsIpv4ObjectParser;
+import org.opendaylight.protocol.pcep.parser.object.PCEPEndPointsIpv4ObjectParser;
import org.opendaylight.protocol.pcep.spi.PCEPDeserializerException;
import org.opendaylight.protocol.util.Ipv4Util;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.Object;
<module>api</module>
<module>impl</module>
<module>spi</module>
+ <module>base-parser</module>
<module>ietf-stateful07</module>
<module>testtool</module>
<module>topology-api</module>
*/
package org.opendaylight.protocol.pcep.segment.routing;
-import org.opendaylight.protocol.pcep.impl.tlv.PathSetupTypeTlvParser;
+import org.opendaylight.protocol.pcep.parser.tlv.PathSetupTypeTlvParser;
public class SrPathSetupTypeTlvParser extends PathSetupTypeTlvParser {
import java.util.List;
import org.junit.Before;
import org.junit.Test;
-import org.opendaylight.protocol.pcep.impl.object.PCEPExplicitRouteObjectParser;
+import org.opendaylight.protocol.pcep.parser.object.PCEPExplicitRouteObjectParser;
import org.opendaylight.protocol.pcep.spi.ObjectHeaderImpl;
import org.opendaylight.protocol.pcep.spi.PCEPDeserializerException;
import org.opendaylight.protocol.pcep.spi.TlvRegistry;