From f879f1dd8f909014bac0a1bd33f82435d38b5dfb Mon Sep 17 00:00:00 2001 From: Tom Pantelis Date: Thu, 7 Jul 2016 01:30:20 -0400 Subject: [PATCH] Move pcep base parser Activator to its own bundle The pcep base parser Activator was moved (and renamed to BaseParserExtensionActivator) from the impl bundle to a new bundle, pcep-base-parser, to avoid circular OSGi service dependencies between the impl and spi bundles when the PCEPDispatcherImpl wiring is cobverted to blueprint. In addition all the related message et al classes were also moved to pcep-base-parser. Change-Id: I9f79bc111743c21e64c6c9444d926c347d392a08 Signed-off-by: Tom Pantelis --- artifacts/pom.xml | 5 + features/pcep/pom.xml | 4 + features/pcep/src/main/features/features.xml | 1 + .../extension/PcRptMessageCodecTest.java | 7 +- pcep/base-parser/pom.xml | 79 ++++++++++ .../parser/BaseParserExtensionActivator.java} | 140 +++++++++--------- .../message/PCEPCloseMessageParser.java | 2 +- .../message/PCEPErrorMessageParser.java | 2 +- .../message/PCEPKeepAliveMessageParser.java | 2 +- .../PCEPMonitoringReplyMessageParser.java | 4 +- .../PCEPMonitoringRequestMessageParser.java | 2 +- .../PCEPNotificationMessageParser.java | 2 +- .../message/PCEPOpenMessageParser.java | 2 +- .../message/PCEPReplyMessageParser.java | 4 +- .../message/PCEPRequestMessageParser.java | 2 +- .../message/PCEPStartTLSMessageParser.java | 2 +- .../AbstractEROWithSubobjectsParser.java | 2 +- .../object/AbstractPccIdReqObjectParser.java | 2 +- .../object/AbstractPceIdObjectParser.java | 2 +- .../AbstractRROWithSubobjectsParser.java | 2 +- ...AbstractVendorInformationObjectParser.java | 2 +- .../AbstractXROWithSubobjectsParser.java | 2 +- .../object/PCEPBandwidthObjectParser.java | 2 +- .../object/PCEPClassTypeObjectParser.java | 2 +- .../parser}/object/PCEPCloseObjectParser.java | 2 +- .../object/PCEPEndPointsIpv4ObjectParser.java | 2 +- .../object/PCEPEndPointsIpv6ObjectParser.java | 2 +- .../parser}/object/PCEPErrorObjectParser.java | 2 +- .../object/PCEPExcludeRouteObjectParser.java | 2 +- .../PCEPExistingBandwidthObjectParser.java | 2 +- .../object/PCEPExplicitRouteObjectParser.java | 2 +- .../PCEPGlobalConstraintsObjectParser.java | 2 +- .../object/PCEPIncludeRouteObjectParser.java | 2 +- .../object/PCEPLoadBalancingObjectParser.java | 2 +- .../parser}/object/PCEPLspaObjectParser.java | 2 +- .../object/PCEPMetricObjectParser.java | 2 +- .../object/PCEPMonitoringObjectParser.java | 2 +- .../object/PCEPNoPathObjectParser.java | 2 +- .../object/PCEPNotificationObjectParser.java | 2 +- .../PCEPObjectiveFunctionObjectParser.java | 2 +- .../parser}/object/PCEPOpenObjectParser.java | 2 +- .../object/PCEPOverloadObjectParser.java | 2 +- .../object/PCEPPathKeyObjectParser.java | 2 +- .../object/PCEPPccIdReqIPv4ObjectParser.java | 2 +- .../object/PCEPPccIdReqIPv6ObjectParser.java | 2 +- .../object/PCEPPceIdIPv4ObjectParser.java | 2 +- .../object/PCEPPceIdIPv6ObjectParser.java | 2 +- .../object/PCEPProcTimeObjectParser.java | 2 +- .../object/PCEPReportedRouteObjectParser.java | 2 +- .../PCEPRequestParameterObjectParser.java | 2 +- .../parser}/object/PCEPSvecObjectParser.java | 2 +- .../parser}/subobject/AsNumberCaseParser.java | 3 +- .../subobject/EROAsNumberSubobjectParser.java | 2 +- ...ExplicitExclusionRouteSubobjectParser.java | 2 +- .../EROIpv4PrefixSubobjectParser.java | 3 +- .../EROIpv6PrefixSubobjectParser.java | 3 +- .../subobject/EROLabelSubobjectParser.java | 2 +- .../EROPathKey128SubobjectParser.java | 2 +- .../EROPathKey32SubobjectParser.java | 2 +- ...EROUnnumberedInterfaceSubobjectParser.java | 2 +- .../subobject/GeneralizedLabelParser.java | 2 +- .../RROIpv4PrefixSubobjectParser.java | 3 +- .../RROIpv6PrefixSubobjectParser.java | 3 +- .../subobject/RROLabelSubobjectParser.java | 2 +- .../RROPathKey128SubobjectParser.java | 2 +- .../RROPathKey32SubobjectParser.java | 2 +- ...RROUnnumberedInterfaceSubobjectParser.java | 2 +- .../parser}/subobject/Type1LabelParser.java | 2 +- .../WavebandSwitchingLabelParser.java | 2 +- .../subobject/XROAsNumberSubobjectParser.java | 2 +- .../XROIpv4PrefixSubobjectParser.java | 3 +- .../XROIpv6PrefixSubobjectParser.java | 3 +- .../XROPathKey128SubobjectParser.java | 2 +- .../XROPathKey32SubobjectParser.java | 2 +- .../subobject/XROSRLGSubobjectParser.java | 2 +- ...XROUnnumberedInterfaceSubobjectParser.java | 2 +- .../AbstractVendorInformationTlvParser.java | 2 +- .../tlv/AbstractVendorSpecificTlvParser.java | 2 +- .../parser}/tlv/NoPathVectorTlvParser.java | 2 +- .../pcep/parser}/tlv/OFListTlvParser.java | 2 +- .../pcep/parser}/tlv/OrderTlvParser.java | 2 +- .../tlv/OverloadedDurationTlvParser.java | 2 +- .../parser}/tlv/PathSetupTypeTlvParser.java | 2 +- .../pcep/parser}/tlv/ReqMissingTlvParser.java | 2 +- .../protocol/pcep/parser/util/Util.java | 69 +++++++++ ...ol.pcep.spi.PCEPExtensionProviderActivator | 6 +- pcep/ietf-stateful07/pom.xml | 2 +- .../Stateful07ErrorMessageParser.java | 2 +- .../Stateful07LspaObjectParser.java | 2 +- .../Stateful07OpenObjectParser.java | 2 +- .../pcep/ietf/PCEPObjectParserTest.java | 6 +- .../protocol/pcep/ietf/PCEPValidatorTest.java | 9 +- pcep/impl/pom.xml | 4 + .../yang/pcep/impl/BasePCEPParserModule.java | 4 +- .../protocol/pcep/impl/spi/Util.java | 50 ------- .../pcep/impl/LabelSubobjectParserTest.java | 6 +- .../pcep/impl/PCEPEROSubobjectParserTest.java | 21 +-- .../pcep/impl/PCEPObjectParserTest.java | 63 ++++---- .../pcep/impl/PCEPRROSubobjectParserTest.java | 15 +- .../protocol/pcep/impl/PCEPTlvParserTest.java | 14 +- .../protocol/pcep/impl/PCEPValidatorTest.java | 25 ++-- .../pcep/impl/PCEPXROSubobjectParserTest.java | 14 +- .../TestVendorInformationObjectParser.java | 2 +- .../impl/TestVendorInformationTlvParser.java | 3 +- .../pcc/mock/PCCEndPointIpv4ObjectParser.java | 2 +- pcep/pom.xml | 1 + .../routing/SrPathSetupTypeTlvParser.java | 2 +- .../segment/routing/SrObjectParserTest.java | 2 +- 108 files changed, 418 insertions(+), 311 deletions(-) create mode 100644 pcep/base-parser/pom.xml rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl/Activator.java => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/BaseParserExtensionActivator.java} (84%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/message/PCEPCloseMessageParser.java (98%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/message/PCEPErrorMessageParser.java (99%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/message/PCEPKeepAliveMessageParser.java (97%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/message/PCEPMonitoringReplyMessageParser.java (98%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/message/PCEPMonitoringRequestMessageParser.java (98%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/message/PCEPNotificationMessageParser.java (99%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/message/PCEPOpenMessageParser.java (98%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/message/PCEPReplyMessageParser.java (99%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/message/PCEPRequestMessageParser.java (99%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/message/PCEPStartTLSMessageParser.java (97%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/object/AbstractEROWithSubobjectsParser.java (98%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/object/AbstractPccIdReqObjectParser.java (97%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/object/AbstractPceIdObjectParser.java (97%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/object/AbstractRROWithSubobjectsParser.java (98%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/object/AbstractVendorInformationObjectParser.java (98%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/object/AbstractXROWithSubobjectsParser.java (98%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/object/PCEPBandwidthObjectParser.java (98%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/object/PCEPClassTypeObjectParser.java (98%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/object/PCEPCloseObjectParser.java (98%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/object/PCEPEndPointsIpv4ObjectParser.java (98%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/object/PCEPEndPointsIpv6ObjectParser.java (98%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/object/PCEPErrorObjectParser.java (98%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/object/PCEPExcludeRouteObjectParser.java (98%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/object/PCEPExistingBandwidthObjectParser.java (98%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/object/PCEPExplicitRouteObjectParser.java (97%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/object/PCEPGlobalConstraintsObjectParser.java (98%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/object/PCEPIncludeRouteObjectParser.java (98%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/object/PCEPLoadBalancingObjectParser.java (98%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/object/PCEPLspaObjectParser.java (98%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/object/PCEPMetricObjectParser.java (98%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/object/PCEPMonitoringObjectParser.java (98%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/object/PCEPNoPathObjectParser.java (98%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/object/PCEPNotificationObjectParser.java (98%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/object/PCEPObjectiveFunctionObjectParser.java (98%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/object/PCEPOpenObjectParser.java (99%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/object/PCEPOverloadObjectParser.java (97%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/object/PCEPPathKeyObjectParser.java (98%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/object/PCEPPccIdReqIPv4ObjectParser.java (96%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/object/PCEPPccIdReqIPv6ObjectParser.java (96%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/object/PCEPPceIdIPv4ObjectParser.java (96%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/object/PCEPPceIdIPv6ObjectParser.java (96%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/object/PCEPProcTimeObjectParser.java (98%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/object/PCEPReportedRouteObjectParser.java (97%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/object/PCEPRequestParameterObjectParser.java (99%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/object/PCEPSvecObjectParser.java (98%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/subobject/AsNumberCaseParser.java (97%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/subobject/EROAsNumberSubobjectParser.java (97%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/subobject/EROExplicitExclusionRouteSubobjectParser.java (99%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/subobject/EROIpv4PrefixSubobjectParser.java (98%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/subobject/EROIpv6PrefixSubobjectParser.java (98%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/subobject/EROLabelSubobjectParser.java (98%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/subobject/EROPathKey128SubobjectParser.java (95%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/subobject/EROPathKey32SubobjectParser.java (95%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/subobject/EROUnnumberedInterfaceSubobjectParser.java (98%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/subobject/GeneralizedLabelParser.java (97%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/subobject/RROIpv4PrefixSubobjectParser.java (98%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/subobject/RROIpv6PrefixSubobjectParser.java (98%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/subobject/RROLabelSubobjectParser.java (98%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/subobject/RROPathKey128SubobjectParser.java (98%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/subobject/RROPathKey32SubobjectParser.java (98%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/subobject/RROUnnumberedInterfaceSubobjectParser.java (98%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/subobject/Type1LabelParser.java (98%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/subobject/WavebandSwitchingLabelParser.java (98%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/subobject/XROAsNumberSubobjectParser.java (97%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/subobject/XROIpv4PrefixSubobjectParser.java (98%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/subobject/XROIpv6PrefixSubobjectParser.java (98%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/subobject/XROPathKey128SubobjectParser.java (98%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/subobject/XROPathKey32SubobjectParser.java (98%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/subobject/XROSRLGSubobjectParser.java (98%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/subobject/XROUnnumberedInterfaceSubobjectParser.java (98%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/tlv/AbstractVendorInformationTlvParser.java (98%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/tlv/AbstractVendorSpecificTlvParser.java (98%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/tlv/NoPathVectorTlvParser.java (98%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/tlv/OFListTlvParser.java (97%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/tlv/OrderTlvParser.java (97%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/tlv/OverloadedDurationTlvParser.java (97%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/tlv/PathSetupTypeTlvParser.java (98%) rename pcep/{impl/src/main/java/org/opendaylight/protocol/pcep/impl => base-parser/src/main/java/org/opendaylight/protocol/pcep/parser}/tlv/ReqMissingTlvParser.java (97%) create mode 100644 pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/util/Util.java rename pcep/{impl => base-parser}/src/main/resources/META-INF/services/org.opendaylight.protocol.pcep.spi.PCEPExtensionProviderActivator (63%) diff --git a/artifacts/pom.xml b/artifacts/pom.xml index e7d55a6ed3..33c256d594 100644 --- a/artifacts/pom.xml +++ b/artifacts/pom.xml @@ -240,6 +240,11 @@ test-jar test + + ${project.groupId} + pcep-base-parser + ${project.version} + ${project.groupId} pcep-ietf-stateful07 diff --git a/features/pcep/pom.xml b/features/pcep/pom.xml index 0470a6cf6f..d96342342d 100644 --- a/features/pcep/pom.xml +++ b/features/pcep/pom.xml @@ -182,6 +182,10 @@ ${project.groupId} pcep-impl + + ${project.groupId} + pcep-base-parser + ${project.groupId} pcep-segment-routing diff --git a/features/pcep/src/main/features/features.xml b/features/pcep/src/main/features/features.xml index ba5a77ed25..a7fb6c16ca 100644 --- a/features/pcep/src/main/features/features.xml +++ b/features/pcep/src/main/features/features.xml @@ -60,6 +60,7 @@ odl-bgpcep-pcep-dependencies odl-bgpcep-pcep-api + mvn:org.opendaylight.bgpcep/pcep-base-parser/{{VERSION}} mvn:org.opendaylight.bgpcep/pcep-impl/{{VERSION}} diff --git a/pcep/auto-bandwidth-extension/src/test/java/org/opendaylight/protocol/pcep/auto/bandwidth/extension/PcRptMessageCodecTest.java b/pcep/auto-bandwidth-extension/src/test/java/org/opendaylight/protocol/pcep/auto/bandwidth/extension/PcRptMessageCodecTest.java index fab0809309..cc56bf1ad7 100644 --- a/pcep/auto-bandwidth-extension/src/test/java/org/opendaylight/protocol/pcep/auto/bandwidth/extension/PcRptMessageCodecTest.java +++ b/pcep/auto-bandwidth-extension/src/test/java/org/opendaylight/protocol/pcep/auto/bandwidth/extension/PcRptMessageCodecTest.java @@ -11,7 +11,6 @@ package org.opendaylight.protocol.pcep.auto.bandwidth.extension; 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; @@ -24,7 +23,7 @@ import org.junit.Assert; 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; @@ -56,14 +55,14 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev 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); diff --git a/pcep/base-parser/pom.xml b/pcep/base-parser/pom.xml new file mode 100644 index 0000000000..0c57599353 --- /dev/null +++ b/pcep/base-parser/pom.xml @@ -0,0 +1,79 @@ + + + + + + + 4.0.0 + + scm:git:ssh://git.opendaylight.org:29418/bgpcep.git + scm:git:ssh://git.opendaylight.org:29418/bgpcep.git + https://wiki.opendaylight.org/view/BGP_LS_PCEP:Main + HEAD + + + org.opendaylight.bgpcep + pcep-parent + 0.6.0-SNAPSHOT + + + pcep-base-parser + PCE Protocol base parser extension provider + bundle + ${project.artifactId} + + 3.0.4 + + + + + ${project.groupId} + pcep-api + + + ${project.groupId} + pcep-spi + + + org.opendaylight.mdsal.model + ietf-inet-types-2013-07-15 + + + + + + + org.apache.felix + maven-bundle-plugin + true + + + ${project.groupId}.${project.artifactId} + + + + + + + + ${odl.site.url}/${project.groupId}/${stream}/${project.artifactId}/ + + + + opendaylight-site + ${nexus.site.url}/${project.artifactId}/ + + + diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/Activator.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/BaseParserExtensionActivator.java similarity index 84% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/Activator.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/BaseParserExtensionActivator.java index 6b71285b9f..957944b2a8 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/Activator.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/BaseParserExtensionActivator.java @@ -5,78 +5,78 @@ * 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; @@ -134,7 +134,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev 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 startImpl(final PCEPExtensionProviderContext context) { final List regs = new ArrayList<>(); diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/message/PCEPCloseMessageParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/message/PCEPCloseMessageParser.java similarity index 98% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/message/PCEPCloseMessageParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/message/PCEPCloseMessageParser.java index ee72b87064..abc1a6f4d8 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/message/PCEPCloseMessageParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/message/PCEPCloseMessageParser.java @@ -5,7 +5,7 @@ * 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/message/PCEPErrorMessageParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/message/PCEPErrorMessageParser.java similarity index 99% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/message/PCEPErrorMessageParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/message/PCEPErrorMessageParser.java index 2f3ee849c6..69e400a901 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/message/PCEPErrorMessageParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/message/PCEPErrorMessageParser.java @@ -5,7 +5,7 @@ * 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/message/PCEPKeepAliveMessageParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/message/PCEPKeepAliveMessageParser.java similarity index 97% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/message/PCEPKeepAliveMessageParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/message/PCEPKeepAliveMessageParser.java index c259060899..a4f5c403e6 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/message/PCEPKeepAliveMessageParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/message/PCEPKeepAliveMessageParser.java @@ -5,7 +5,7 @@ * 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/message/PCEPMonitoringReplyMessageParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/message/PCEPMonitoringReplyMessageParser.java similarity index 98% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/message/PCEPMonitoringReplyMessageParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/message/PCEPMonitoringReplyMessageParser.java index dd65446a51..4fafc27ca3 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/message/PCEPMonitoringReplyMessageParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/message/PCEPMonitoringReplyMessageParser.java @@ -6,7 +6,7 @@ * 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; @@ -14,7 +14,7 @@ import io.netty.buffer.ByteBuf; 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/message/PCEPMonitoringRequestMessageParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/message/PCEPMonitoringRequestMessageParser.java similarity index 98% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/message/PCEPMonitoringRequestMessageParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/message/PCEPMonitoringRequestMessageParser.java index efabe43e74..c9bc7ea4b1 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/message/PCEPMonitoringRequestMessageParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/message/PCEPMonitoringRequestMessageParser.java @@ -6,7 +6,7 @@ * 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/message/PCEPNotificationMessageParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/message/PCEPNotificationMessageParser.java similarity index 99% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/message/PCEPNotificationMessageParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/message/PCEPNotificationMessageParser.java index 307a62c7c0..fc084e53d9 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/message/PCEPNotificationMessageParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/message/PCEPNotificationMessageParser.java @@ -5,7 +5,7 @@ * 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/message/PCEPOpenMessageParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/message/PCEPOpenMessageParser.java similarity index 98% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/message/PCEPOpenMessageParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/message/PCEPOpenMessageParser.java index 73c70aa958..b2416e2f0a 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/message/PCEPOpenMessageParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/message/PCEPOpenMessageParser.java @@ -5,7 +5,7 @@ * 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/message/PCEPReplyMessageParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/message/PCEPReplyMessageParser.java similarity index 99% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/message/PCEPReplyMessageParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/message/PCEPReplyMessageParser.java index baec04d8e5..968c500cdb 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/message/PCEPReplyMessageParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/message/PCEPReplyMessageParser.java @@ -5,7 +5,7 @@ * 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; @@ -13,7 +13,7 @@ import io.netty.buffer.ByteBuf; 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/message/PCEPRequestMessageParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/message/PCEPRequestMessageParser.java similarity index 99% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/message/PCEPRequestMessageParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/message/PCEPRequestMessageParser.java index 8c25628fb9..9033fafc36 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/message/PCEPRequestMessageParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/message/PCEPRequestMessageParser.java @@ -5,7 +5,7 @@ * 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/message/PCEPStartTLSMessageParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/message/PCEPStartTLSMessageParser.java similarity index 97% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/message/PCEPStartTLSMessageParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/message/PCEPStartTLSMessageParser.java index 08ddf6031e..f78ecb5d31 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/message/PCEPStartTLSMessageParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/message/PCEPStartTLSMessageParser.java @@ -5,7 +5,7 @@ * 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/AbstractEROWithSubobjectsParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/AbstractEROWithSubobjectsParser.java similarity index 98% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/AbstractEROWithSubobjectsParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/AbstractEROWithSubobjectsParser.java index b45303df7f..8fabbda136 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/AbstractEROWithSubobjectsParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/AbstractEROWithSubobjectsParser.java @@ -5,7 +5,7 @@ * 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/AbstractPccIdReqObjectParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/AbstractPccIdReqObjectParser.java similarity index 97% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/AbstractPccIdReqObjectParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/AbstractPccIdReqObjectParser.java index a23673447a..a33b6d3058 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/AbstractPccIdReqObjectParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/AbstractPccIdReqObjectParser.java @@ -6,7 +6,7 @@ * 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/AbstractPceIdObjectParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/AbstractPceIdObjectParser.java similarity index 97% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/AbstractPceIdObjectParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/AbstractPceIdObjectParser.java index a53296e3f2..8fb91dd33a 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/AbstractPceIdObjectParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/AbstractPceIdObjectParser.java @@ -6,7 +6,7 @@ * 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/AbstractRROWithSubobjectsParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/AbstractRROWithSubobjectsParser.java similarity index 98% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/AbstractRROWithSubobjectsParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/AbstractRROWithSubobjectsParser.java index 5abe048750..4e54d7f2fd 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/AbstractRROWithSubobjectsParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/AbstractRROWithSubobjectsParser.java @@ -5,7 +5,7 @@ * 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/AbstractVendorInformationObjectParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/AbstractVendorInformationObjectParser.java similarity index 98% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/AbstractVendorInformationObjectParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/AbstractVendorInformationObjectParser.java index e1781ede93..6300261835 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/AbstractVendorInformationObjectParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/AbstractVendorInformationObjectParser.java @@ -6,7 +6,7 @@ * 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/AbstractXROWithSubobjectsParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/AbstractXROWithSubobjectsParser.java similarity index 98% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/AbstractXROWithSubobjectsParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/AbstractXROWithSubobjectsParser.java index 82d859f754..ef9ee45b2c 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/AbstractXROWithSubobjectsParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/AbstractXROWithSubobjectsParser.java @@ -5,7 +5,7 @@ * 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPBandwidthObjectParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPBandwidthObjectParser.java similarity index 98% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPBandwidthObjectParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPBandwidthObjectParser.java index 722f8a78d4..4ec074aad9 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPBandwidthObjectParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPBandwidthObjectParser.java @@ -5,7 +5,7 @@ * 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPClassTypeObjectParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPClassTypeObjectParser.java similarity index 98% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPClassTypeObjectParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPClassTypeObjectParser.java index 42195ea41b..5958efd756 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPClassTypeObjectParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPClassTypeObjectParser.java @@ -5,7 +5,7 @@ * 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPCloseObjectParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPCloseObjectParser.java similarity index 98% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPCloseObjectParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPCloseObjectParser.java index e449fd5623..eb77a09a22 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPCloseObjectParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPCloseObjectParser.java @@ -5,7 +5,7 @@ * 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPEndPointsIpv4ObjectParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPEndPointsIpv4ObjectParser.java similarity index 98% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPEndPointsIpv4ObjectParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPEndPointsIpv4ObjectParser.java index 2fb2b034c4..c1af45016e 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPEndPointsIpv4ObjectParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPEndPointsIpv4ObjectParser.java @@ -5,7 +5,7 @@ * 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPEndPointsIpv6ObjectParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPEndPointsIpv6ObjectParser.java similarity index 98% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPEndPointsIpv6ObjectParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPEndPointsIpv6ObjectParser.java index 3a33358441..64c480784c 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPEndPointsIpv6ObjectParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPEndPointsIpv6ObjectParser.java @@ -5,7 +5,7 @@ * 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPErrorObjectParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPErrorObjectParser.java similarity index 98% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPErrorObjectParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPErrorObjectParser.java index c960edf7d9..7e61b1cd86 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPErrorObjectParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPErrorObjectParser.java @@ -5,7 +5,7 @@ * 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPExcludeRouteObjectParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPExcludeRouteObjectParser.java similarity index 98% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPExcludeRouteObjectParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPExcludeRouteObjectParser.java index 2e409f3860..9fa88deb5e 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPExcludeRouteObjectParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPExcludeRouteObjectParser.java @@ -5,7 +5,7 @@ * 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPExistingBandwidthObjectParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPExistingBandwidthObjectParser.java similarity index 98% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPExistingBandwidthObjectParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPExistingBandwidthObjectParser.java index 6b6d320e1e..12daa6c496 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPExistingBandwidthObjectParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPExistingBandwidthObjectParser.java @@ -5,7 +5,7 @@ * 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPExplicitRouteObjectParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPExplicitRouteObjectParser.java similarity index 97% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPExplicitRouteObjectParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPExplicitRouteObjectParser.java index e0bc5ad254..0c65d57454 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPExplicitRouteObjectParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPExplicitRouteObjectParser.java @@ -5,7 +5,7 @@ * 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPGlobalConstraintsObjectParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPGlobalConstraintsObjectParser.java similarity index 98% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPGlobalConstraintsObjectParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPGlobalConstraintsObjectParser.java index d6c5787f95..fd3d90dad4 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPGlobalConstraintsObjectParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPGlobalConstraintsObjectParser.java @@ -5,7 +5,7 @@ * 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPIncludeRouteObjectParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPIncludeRouteObjectParser.java similarity index 98% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPIncludeRouteObjectParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPIncludeRouteObjectParser.java index 5d141a1750..c48b373f74 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPIncludeRouteObjectParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPIncludeRouteObjectParser.java @@ -5,7 +5,7 @@ * 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPLoadBalancingObjectParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPLoadBalancingObjectParser.java similarity index 98% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPLoadBalancingObjectParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPLoadBalancingObjectParser.java index c035a56156..dfe2db0453 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPLoadBalancingObjectParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPLoadBalancingObjectParser.java @@ -5,7 +5,7 @@ * 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPLspaObjectParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPLspaObjectParser.java similarity index 98% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPLspaObjectParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPLspaObjectParser.java index 628485a8d4..7ff06c6acd 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPLspaObjectParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPLspaObjectParser.java @@ -5,7 +5,7 @@ * 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPMetricObjectParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPMetricObjectParser.java similarity index 98% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPMetricObjectParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPMetricObjectParser.java index 33bd86b612..58db1b40ad 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPMetricObjectParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPMetricObjectParser.java @@ -5,7 +5,7 @@ * 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPMonitoringObjectParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPMonitoringObjectParser.java similarity index 98% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPMonitoringObjectParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPMonitoringObjectParser.java index d1bf390ea3..ab51e4dd55 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPMonitoringObjectParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPMonitoringObjectParser.java @@ -6,7 +6,7 @@ * 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPNoPathObjectParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPNoPathObjectParser.java similarity index 98% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPNoPathObjectParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPNoPathObjectParser.java index 8df98be321..d85b22da44 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPNoPathObjectParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPNoPathObjectParser.java @@ -5,7 +5,7 @@ * 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPNotificationObjectParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPNotificationObjectParser.java similarity index 98% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPNotificationObjectParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPNotificationObjectParser.java index bf095a438e..b4351b4093 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPNotificationObjectParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPNotificationObjectParser.java @@ -5,7 +5,7 @@ * 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPObjectiveFunctionObjectParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPObjectiveFunctionObjectParser.java similarity index 98% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPObjectiveFunctionObjectParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPObjectiveFunctionObjectParser.java index b0f50abcdf..7a2a863906 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPObjectiveFunctionObjectParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPObjectiveFunctionObjectParser.java @@ -5,7 +5,7 @@ * 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPOpenObjectParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPOpenObjectParser.java similarity index 99% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPOpenObjectParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPOpenObjectParser.java index 19cc81f387..fad65d74c6 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPOpenObjectParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPOpenObjectParser.java @@ -6,7 +6,7 @@ * 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPOverloadObjectParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPOverloadObjectParser.java similarity index 97% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPOverloadObjectParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPOverloadObjectParser.java index 7878ffa785..02deb0802d 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPOverloadObjectParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPOverloadObjectParser.java @@ -6,7 +6,7 @@ * 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPPathKeyObjectParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPPathKeyObjectParser.java similarity index 98% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPPathKeyObjectParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPPathKeyObjectParser.java index 0df1eac2f8..7689450409 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPPathKeyObjectParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPPathKeyObjectParser.java @@ -5,7 +5,7 @@ * 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPPccIdReqIPv4ObjectParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPPccIdReqIPv4ObjectParser.java similarity index 96% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPPccIdReqIPv4ObjectParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPPccIdReqIPv4ObjectParser.java index dde09db185..3fea1fd826 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPPccIdReqIPv4ObjectParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPPccIdReqIPv4ObjectParser.java @@ -6,7 +6,7 @@ * 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPPccIdReqIPv6ObjectParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPPccIdReqIPv6ObjectParser.java similarity index 96% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPPccIdReqIPv6ObjectParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPPccIdReqIPv6ObjectParser.java index 3d9588d232..21cb18799b 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPPccIdReqIPv6ObjectParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPPccIdReqIPv6ObjectParser.java @@ -6,7 +6,7 @@ * 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPPceIdIPv4ObjectParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPPceIdIPv4ObjectParser.java similarity index 96% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPPceIdIPv4ObjectParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPPceIdIPv4ObjectParser.java index 8ffa532c59..10a293782f 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPPceIdIPv4ObjectParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPPceIdIPv4ObjectParser.java @@ -6,7 +6,7 @@ * 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPPceIdIPv6ObjectParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPPceIdIPv6ObjectParser.java similarity index 96% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPPceIdIPv6ObjectParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPPceIdIPv6ObjectParser.java index f25cc7121e..c4f08c732c 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPPceIdIPv6ObjectParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPPceIdIPv6ObjectParser.java @@ -6,7 +6,7 @@ * 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPProcTimeObjectParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPProcTimeObjectParser.java similarity index 98% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPProcTimeObjectParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPProcTimeObjectParser.java index 601db89a8c..290de595a1 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPProcTimeObjectParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPProcTimeObjectParser.java @@ -5,7 +5,7 @@ * 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPReportedRouteObjectParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPReportedRouteObjectParser.java similarity index 97% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPReportedRouteObjectParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPReportedRouteObjectParser.java index 190c179fce..f89323160c 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPReportedRouteObjectParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPReportedRouteObjectParser.java @@ -5,7 +5,7 @@ * 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPRequestParameterObjectParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPRequestParameterObjectParser.java similarity index 99% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPRequestParameterObjectParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPRequestParameterObjectParser.java index 83ff724298..9ca0242005 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPRequestParameterObjectParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPRequestParameterObjectParser.java @@ -6,7 +6,7 @@ * 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPSvecObjectParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPSvecObjectParser.java similarity index 98% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPSvecObjectParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPSvecObjectParser.java index 2512d00c57..0f088643ef 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/object/PCEPSvecObjectParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/object/PCEPSvecObjectParser.java @@ -5,7 +5,7 @@ * 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/subobject/AsNumberCaseParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/AsNumberCaseParser.java similarity index 97% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/subobject/AsNumberCaseParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/AsNumberCaseParser.java index 97a5998ba7..48944fdc55 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/subobject/AsNumberCaseParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/AsNumberCaseParser.java @@ -5,10 +5,9 @@ * 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/subobject/EROAsNumberSubobjectParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/EROAsNumberSubobjectParser.java similarity index 97% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/subobject/EROAsNumberSubobjectParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/EROAsNumberSubobjectParser.java index 8981aff14b..a681b5f187 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/subobject/EROAsNumberSubobjectParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/EROAsNumberSubobjectParser.java @@ -5,7 +5,7 @@ * 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/subobject/EROExplicitExclusionRouteSubobjectParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/EROExplicitExclusionRouteSubobjectParser.java similarity index 99% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/subobject/EROExplicitExclusionRouteSubobjectParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/EROExplicitExclusionRouteSubobjectParser.java index 4eafb629d4..d66256416f 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/subobject/EROExplicitExclusionRouteSubobjectParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/EROExplicitExclusionRouteSubobjectParser.java @@ -5,7 +5,7 @@ * 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/subobject/EROIpv4PrefixSubobjectParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/EROIpv4PrefixSubobjectParser.java similarity index 98% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/subobject/EROIpv4PrefixSubobjectParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/EROIpv4PrefixSubobjectParser.java index 8bf9c43f47..335ba9f166 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/subobject/EROIpv4PrefixSubobjectParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/EROIpv4PrefixSubobjectParser.java @@ -5,10 +5,9 @@ * 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/subobject/EROIpv6PrefixSubobjectParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/EROIpv6PrefixSubobjectParser.java similarity index 98% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/subobject/EROIpv6PrefixSubobjectParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/EROIpv6PrefixSubobjectParser.java index 0b17791a5a..03d9817ed4 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/subobject/EROIpv6PrefixSubobjectParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/EROIpv6PrefixSubobjectParser.java @@ -5,10 +5,9 @@ * 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/subobject/EROLabelSubobjectParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/EROLabelSubobjectParser.java similarity index 98% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/subobject/EROLabelSubobjectParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/EROLabelSubobjectParser.java index 7aa775f6b4..0b42f31691 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/subobject/EROLabelSubobjectParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/EROLabelSubobjectParser.java @@ -5,7 +5,7 @@ * 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/subobject/EROPathKey128SubobjectParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/EROPathKey128SubobjectParser.java similarity index 95% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/subobject/EROPathKey128SubobjectParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/EROPathKey128SubobjectParser.java index 00a40be545..0a3978812a 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/subobject/EROPathKey128SubobjectParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/EROPathKey128SubobjectParser.java @@ -5,7 +5,7 @@ * 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/subobject/EROPathKey32SubobjectParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/EROPathKey32SubobjectParser.java similarity index 95% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/subobject/EROPathKey32SubobjectParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/EROPathKey32SubobjectParser.java index 4a1550e6a8..dc22e53667 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/subobject/EROPathKey32SubobjectParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/EROPathKey32SubobjectParser.java @@ -5,7 +5,7 @@ * 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/subobject/EROUnnumberedInterfaceSubobjectParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/EROUnnumberedInterfaceSubobjectParser.java similarity index 98% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/subobject/EROUnnumberedInterfaceSubobjectParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/EROUnnumberedInterfaceSubobjectParser.java index 8de20a3fa9..4ebefa0070 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/subobject/EROUnnumberedInterfaceSubobjectParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/EROUnnumberedInterfaceSubobjectParser.java @@ -5,7 +5,7 @@ * 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/subobject/GeneralizedLabelParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/GeneralizedLabelParser.java similarity index 97% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/subobject/GeneralizedLabelParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/GeneralizedLabelParser.java index 6bf1a3db49..c79aaf50c0 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/subobject/GeneralizedLabelParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/GeneralizedLabelParser.java @@ -5,7 +5,7 @@ * 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/subobject/RROIpv4PrefixSubobjectParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/RROIpv4PrefixSubobjectParser.java similarity index 98% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/subobject/RROIpv4PrefixSubobjectParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/RROIpv4PrefixSubobjectParser.java index b4d245cba4..41bbf87131 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/subobject/RROIpv4PrefixSubobjectParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/RROIpv4PrefixSubobjectParser.java @@ -5,10 +5,9 @@ * 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/subobject/RROIpv6PrefixSubobjectParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/RROIpv6PrefixSubobjectParser.java similarity index 98% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/subobject/RROIpv6PrefixSubobjectParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/RROIpv6PrefixSubobjectParser.java index f73845e82c..b10ecb9352 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/subobject/RROIpv6PrefixSubobjectParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/RROIpv6PrefixSubobjectParser.java @@ -5,10 +5,9 @@ * 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/subobject/RROLabelSubobjectParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/RROLabelSubobjectParser.java similarity index 98% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/subobject/RROLabelSubobjectParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/RROLabelSubobjectParser.java index 33a000f450..ca1e361e6c 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/subobject/RROLabelSubobjectParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/RROLabelSubobjectParser.java @@ -5,7 +5,7 @@ * 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/subobject/RROPathKey128SubobjectParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/RROPathKey128SubobjectParser.java similarity index 98% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/subobject/RROPathKey128SubobjectParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/RROPathKey128SubobjectParser.java index 7e382ca5ef..23c816a24c 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/subobject/RROPathKey128SubobjectParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/RROPathKey128SubobjectParser.java @@ -5,7 +5,7 @@ * 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/subobject/RROPathKey32SubobjectParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/RROPathKey32SubobjectParser.java similarity index 98% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/subobject/RROPathKey32SubobjectParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/RROPathKey32SubobjectParser.java index 36ef6697cc..9ffb993391 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/subobject/RROPathKey32SubobjectParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/RROPathKey32SubobjectParser.java @@ -5,7 +5,7 @@ * 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/subobject/RROUnnumberedInterfaceSubobjectParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/RROUnnumberedInterfaceSubobjectParser.java similarity index 98% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/subobject/RROUnnumberedInterfaceSubobjectParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/RROUnnumberedInterfaceSubobjectParser.java index 36af305c8f..b6d356a22d 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/subobject/RROUnnumberedInterfaceSubobjectParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/RROUnnumberedInterfaceSubobjectParser.java @@ -5,7 +5,7 @@ * 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/subobject/Type1LabelParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/Type1LabelParser.java similarity index 98% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/subobject/Type1LabelParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/Type1LabelParser.java index 71e9441c0b..e7a9053bc0 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/subobject/Type1LabelParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/Type1LabelParser.java @@ -5,7 +5,7 @@ * 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/subobject/WavebandSwitchingLabelParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/WavebandSwitchingLabelParser.java similarity index 98% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/subobject/WavebandSwitchingLabelParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/WavebandSwitchingLabelParser.java index a7ada0bd6c..7bcb77b38d 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/subobject/WavebandSwitchingLabelParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/WavebandSwitchingLabelParser.java @@ -5,7 +5,7 @@ * 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/subobject/XROAsNumberSubobjectParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/XROAsNumberSubobjectParser.java similarity index 97% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/subobject/XROAsNumberSubobjectParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/XROAsNumberSubobjectParser.java index c6097933a5..10e1aa2f97 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/subobject/XROAsNumberSubobjectParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/XROAsNumberSubobjectParser.java @@ -5,7 +5,7 @@ * 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/subobject/XROIpv4PrefixSubobjectParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/XROIpv4PrefixSubobjectParser.java similarity index 98% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/subobject/XROIpv4PrefixSubobjectParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/XROIpv4PrefixSubobjectParser.java index 41edcd9dcd..dbd96440c3 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/subobject/XROIpv4PrefixSubobjectParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/XROIpv4PrefixSubobjectParser.java @@ -5,11 +5,10 @@ * 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/subobject/XROIpv6PrefixSubobjectParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/XROIpv6PrefixSubobjectParser.java similarity index 98% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/subobject/XROIpv6PrefixSubobjectParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/XROIpv6PrefixSubobjectParser.java index bda94b222f..881824b860 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/subobject/XROIpv6PrefixSubobjectParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/XROIpv6PrefixSubobjectParser.java @@ -5,11 +5,10 @@ * 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/subobject/XROPathKey128SubobjectParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/XROPathKey128SubobjectParser.java similarity index 98% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/subobject/XROPathKey128SubobjectParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/XROPathKey128SubobjectParser.java index 296220f857..ac71617e74 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/subobject/XROPathKey128SubobjectParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/XROPathKey128SubobjectParser.java @@ -5,7 +5,7 @@ * 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/subobject/XROPathKey32SubobjectParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/XROPathKey32SubobjectParser.java similarity index 98% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/subobject/XROPathKey32SubobjectParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/XROPathKey32SubobjectParser.java index 29e417b898..e002027ac9 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/subobject/XROPathKey32SubobjectParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/XROPathKey32SubobjectParser.java @@ -5,7 +5,7 @@ * 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/subobject/XROSRLGSubobjectParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/XROSRLGSubobjectParser.java similarity index 98% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/subobject/XROSRLGSubobjectParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/XROSRLGSubobjectParser.java index 281c3ab09a..0f9a4ce75c 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/subobject/XROSRLGSubobjectParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/XROSRLGSubobjectParser.java @@ -5,7 +5,7 @@ * 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/subobject/XROUnnumberedInterfaceSubobjectParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/XROUnnumberedInterfaceSubobjectParser.java similarity index 98% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/subobject/XROUnnumberedInterfaceSubobjectParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/XROUnnumberedInterfaceSubobjectParser.java index 3075bb908f..01f290f97b 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/subobject/XROUnnumberedInterfaceSubobjectParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/subobject/XROUnnumberedInterfaceSubobjectParser.java @@ -5,7 +5,7 @@ * 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/tlv/AbstractVendorInformationTlvParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/tlv/AbstractVendorInformationTlvParser.java similarity index 98% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/tlv/AbstractVendorInformationTlvParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/tlv/AbstractVendorInformationTlvParser.java index b006b7558b..7e6a630227 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/tlv/AbstractVendorInformationTlvParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/tlv/AbstractVendorInformationTlvParser.java @@ -6,7 +6,7 @@ * 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/tlv/AbstractVendorSpecificTlvParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/tlv/AbstractVendorSpecificTlvParser.java similarity index 98% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/tlv/AbstractVendorSpecificTlvParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/tlv/AbstractVendorSpecificTlvParser.java index cd4eaad435..2ca7739113 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/tlv/AbstractVendorSpecificTlvParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/tlv/AbstractVendorSpecificTlvParser.java @@ -5,7 +5,7 @@ * 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/tlv/NoPathVectorTlvParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/tlv/NoPathVectorTlvParser.java similarity index 98% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/tlv/NoPathVectorTlvParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/tlv/NoPathVectorTlvParser.java index f8822f8efb..c8200bfdff 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/tlv/NoPathVectorTlvParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/tlv/NoPathVectorTlvParser.java @@ -5,7 +5,7 @@ * 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/tlv/OFListTlvParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/tlv/OFListTlvParser.java similarity index 97% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/tlv/OFListTlvParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/tlv/OFListTlvParser.java index 7e5031c930..ec6c31a8ae 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/tlv/OFListTlvParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/tlv/OFListTlvParser.java @@ -5,7 +5,7 @@ * 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/tlv/OrderTlvParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/tlv/OrderTlvParser.java similarity index 97% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/tlv/OrderTlvParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/tlv/OrderTlvParser.java index 694aef576e..d9d9f75733 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/tlv/OrderTlvParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/tlv/OrderTlvParser.java @@ -5,7 +5,7 @@ * 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/tlv/OverloadedDurationTlvParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/tlv/OverloadedDurationTlvParser.java similarity index 97% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/tlv/OverloadedDurationTlvParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/tlv/OverloadedDurationTlvParser.java index 1075895e09..ef34897d02 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/tlv/OverloadedDurationTlvParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/tlv/OverloadedDurationTlvParser.java @@ -5,7 +5,7 @@ * 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/tlv/PathSetupTypeTlvParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/tlv/PathSetupTypeTlvParser.java similarity index 98% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/tlv/PathSetupTypeTlvParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/tlv/PathSetupTypeTlvParser.java index 8f87502a7f..c1e85463a6 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/tlv/PathSetupTypeTlvParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/tlv/PathSetupTypeTlvParser.java @@ -6,7 +6,7 @@ * 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; diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/tlv/ReqMissingTlvParser.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/tlv/ReqMissingTlvParser.java similarity index 97% rename from pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/tlv/ReqMissingTlvParser.java rename to pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/tlv/ReqMissingTlvParser.java index 91fddc1472..5321e2c5b4 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/tlv/ReqMissingTlvParser.java +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/tlv/ReqMissingTlvParser.java @@ -5,7 +5,7 @@ * 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; diff --git a/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/util/Util.java b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/util/Util.java new file mode 100644 index 0000000000..41d7c164aa --- /dev/null +++ b/pcep/base-parser/src/main/java/org/opendaylight/protocol/pcep/parser/util/Util.java @@ -0,0 +1,69 @@ +/* + * 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 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; + } +} diff --git a/pcep/impl/src/main/resources/META-INF/services/org.opendaylight.protocol.pcep.spi.PCEPExtensionProviderActivator b/pcep/base-parser/src/main/resources/META-INF/services/org.opendaylight.protocol.pcep.spi.PCEPExtensionProviderActivator similarity index 63% rename from pcep/impl/src/main/resources/META-INF/services/org.opendaylight.protocol.pcep.spi.PCEPExtensionProviderActivator rename to pcep/base-parser/src/main/resources/META-INF/services/org.opendaylight.protocol.pcep.spi.PCEPExtensionProviderActivator index 944e02007c..c43b2592d2 100644 --- a/pcep/impl/src/main/resources/META-INF/services/org.opendaylight.protocol.pcep.spi.PCEPExtensionProviderActivator +++ b/pcep/base-parser/src/main/resources/META-INF/services/org.opendaylight.protocol.pcep.spi.PCEPExtensionProviderActivator @@ -1,7 +1,7 @@ # 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 diff --git a/pcep/ietf-stateful07/pom.xml b/pcep/ietf-stateful07/pom.xml index e63f80a4c8..524a546108 100644 --- a/pcep/ietf-stateful07/pom.xml +++ b/pcep/ietf-stateful07/pom.xml @@ -70,7 +70,7 @@ ${project.groupId} - pcep-impl + pcep-base-parser ${project.groupId} diff --git a/pcep/ietf-stateful07/src/main/java/org/opendaylight/protocol/pcep/ietf/stateful07/Stateful07ErrorMessageParser.java b/pcep/ietf-stateful07/src/main/java/org/opendaylight/protocol/pcep/ietf/stateful07/Stateful07ErrorMessageParser.java index 006b4b15d0..12a3d0c17d 100644 --- a/pcep/ietf-stateful07/src/main/java/org/opendaylight/protocol/pcep/ietf/stateful07/Stateful07ErrorMessageParser.java +++ b/pcep/ietf-stateful07/src/main/java/org/opendaylight/protocol/pcep/ietf/stateful07/Stateful07ErrorMessageParser.java @@ -12,7 +12,7 @@ import com.google.common.base.Preconditions; 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; diff --git a/pcep/ietf-stateful07/src/main/java/org/opendaylight/protocol/pcep/ietf/stateful07/Stateful07LspaObjectParser.java b/pcep/ietf-stateful07/src/main/java/org/opendaylight/protocol/pcep/ietf/stateful07/Stateful07LspaObjectParser.java index ae6bca64e2..0290ff25e3 100644 --- a/pcep/ietf-stateful07/src/main/java/org/opendaylight/protocol/pcep/ietf/stateful07/Stateful07LspaObjectParser.java +++ b/pcep/ietf-stateful07/src/main/java/org/opendaylight/protocol/pcep/ietf/stateful07/Stateful07LspaObjectParser.java @@ -8,7 +8,7 @@ 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; diff --git a/pcep/ietf-stateful07/src/main/java/org/opendaylight/protocol/pcep/ietf/stateful07/Stateful07OpenObjectParser.java b/pcep/ietf-stateful07/src/main/java/org/opendaylight/protocol/pcep/ietf/stateful07/Stateful07OpenObjectParser.java index 71df414455..95b842b07d 100644 --- a/pcep/ietf-stateful07/src/main/java/org/opendaylight/protocol/pcep/ietf/stateful07/Stateful07OpenObjectParser.java +++ b/pcep/ietf-stateful07/src/main/java/org/opendaylight/protocol/pcep/ietf/stateful07/Stateful07OpenObjectParser.java @@ -8,7 +8,7 @@ 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; diff --git a/pcep/ietf-stateful07/src/test/java/org/opendaylight/protocol/pcep/ietf/PCEPObjectParserTest.java b/pcep/ietf-stateful07/src/test/java/org/opendaylight/protocol/pcep/ietf/PCEPObjectParserTest.java index 3686f31cf9..6f03421bca 100644 --- a/pcep/ietf-stateful07/src/test/java/org/opendaylight/protocol/pcep/ietf/PCEPObjectParserTest.java +++ b/pcep/ietf-stateful07/src/test/java/org/opendaylight/protocol/pcep/ietf/PCEPObjectParserTest.java @@ -19,7 +19,7 @@ import org.opendaylight.protocol.pcep.ietf.initiated00.CInitiated00SrpObjectPars 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; @@ -79,7 +79,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev public class PCEPObjectParserTest { private SimplePCEPExtensionProviderContext ctx; - private Activator act; + private BaseParserExtensionActivator act; private TlvRegistry tlvRegistry; private VendorInformationTlvRegistry viTlvRegistry; @@ -90,7 +90,7 @@ public class PCEPObjectParserTest { @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(); diff --git a/pcep/ietf-stateful07/src/test/java/org/opendaylight/protocol/pcep/ietf/PCEPValidatorTest.java b/pcep/ietf-stateful07/src/test/java/org/opendaylight/protocol/pcep/ietf/PCEPValidatorTest.java index f95150483a..7ee87f3c50 100644 --- a/pcep/ietf-stateful07/src/test/java/org/opendaylight/protocol/pcep/ietf/PCEPValidatorTest.java +++ b/pcep/ietf-stateful07/src/test/java/org/opendaylight/protocol/pcep/ietf/PCEPValidatorTest.java @@ -10,7 +10,6 @@ package org.opendaylight.protocol.pcep.ietf; 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; @@ -26,8 +25,8 @@ import org.opendaylight.protocol.pcep.ietf.stateful07.Stateful07ErrorMessagePars 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; @@ -126,7 +125,7 @@ public class PCEPValidatorTest { 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, @@ -163,7 +162,7 @@ public class PCEPValidatorTest { @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(); diff --git a/pcep/impl/pom.xml b/pcep/impl/pom.xml index e6b764146a..38d540ff73 100644 --- a/pcep/impl/pom.xml +++ b/pcep/impl/pom.xml @@ -40,6 +40,10 @@ ${project.groupId} pcep-spi + + ${project.groupId} + pcep-base-parser + ${project.groupId} rsvp-api diff --git a/pcep/impl/src/main/java/org/opendaylight/controller/config/yang/pcep/impl/BasePCEPParserModule.java b/pcep/impl/src/main/java/org/opendaylight/controller/config/yang/pcep/impl/BasePCEPParserModule.java index 1c7c349c65..877ce03560 100644 --- a/pcep/impl/src/main/java/org/opendaylight/controller/config/yang/pcep/impl/BasePCEPParserModule.java +++ b/pcep/impl/src/main/java/org/opendaylight/controller/config/yang/pcep/impl/BasePCEPParserModule.java @@ -16,7 +16,7 @@ */ package org.opendaylight.controller.config.yang.pcep.impl; -import org.opendaylight.protocol.pcep.impl.Activator; +import org.opendaylight.protocol.pcep.parser.BaseParserExtensionActivator; /** * @@ -37,6 +37,6 @@ public final class BasePCEPParserModule extends org.opendaylight.controller.conf @Override public java.lang.AutoCloseable createInstance() { - return new Activator(); + return new BaseParserExtensionActivator(); } } diff --git a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/spi/Util.java b/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/spi/Util.java index 62bc03c892..53db1d1dab 100644 --- a/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/spi/Util.java +++ b/pcep/impl/src/main/java/org/opendaylight/protocol/pcep/impl/spi/Util.java @@ -8,17 +8,10 @@ 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; @@ -26,7 +19,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.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 @@ -49,46 +41,4 @@ public final class Util { 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 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; - } } diff --git a/pcep/impl/src/test/java/org/opendaylight/protocol/pcep/impl/LabelSubobjectParserTest.java b/pcep/impl/src/test/java/org/opendaylight/protocol/pcep/impl/LabelSubobjectParserTest.java index ff7a61671f..76f28aafda 100644 --- a/pcep/impl/src/test/java/org/opendaylight/protocol/pcep/impl/LabelSubobjectParserTest.java +++ b/pcep/impl/src/test/java/org/opendaylight/protocol/pcep/impl/LabelSubobjectParserTest.java @@ -14,9 +14,9 @@ import static org.junit.Assert.fail; 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; diff --git a/pcep/impl/src/test/java/org/opendaylight/protocol/pcep/impl/PCEPEROSubobjectParserTest.java b/pcep/impl/src/test/java/org/opendaylight/protocol/pcep/impl/PCEPEROSubobjectParserTest.java index 80a680fef9..d414dd49ba 100644 --- a/pcep/impl/src/test/java/org/opendaylight/protocol/pcep/impl/PCEPEROSubobjectParserTest.java +++ b/pcep/impl/src/test/java/org/opendaylight/protocol/pcep/impl/PCEPEROSubobjectParserTest.java @@ -17,14 +17,15 @@ import io.netty.buffer.Unpooled; 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; @@ -69,12 +70,12 @@ public class PCEPEROSubobjectParserTest { 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); } diff --git a/pcep/impl/src/test/java/org/opendaylight/protocol/pcep/impl/PCEPObjectParserTest.java b/pcep/impl/src/test/java/org/opendaylight/protocol/pcep/impl/PCEPObjectParserTest.java index 1e3888a240..a5c94e5a9e 100644 --- a/pcep/impl/src/test/java/org/opendaylight/protocol/pcep/impl/PCEPObjectParserTest.java +++ b/pcep/impl/src/test/java/org/opendaylight/protocol/pcep/impl/PCEPObjectParserTest.java @@ -23,35 +23,36 @@ import java.util.List; 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; @@ -142,13 +143,13 @@ public class PCEPObjectParserTest { 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); diff --git a/pcep/impl/src/test/java/org/opendaylight/protocol/pcep/impl/PCEPRROSubobjectParserTest.java b/pcep/impl/src/test/java/org/opendaylight/protocol/pcep/impl/PCEPRROSubobjectParserTest.java index 174ae43a9b..18a833557f 100644 --- a/pcep/impl/src/test/java/org/opendaylight/protocol/pcep/impl/PCEPRROSubobjectParserTest.java +++ b/pcep/impl/src/test/java/org/opendaylight/protocol/pcep/impl/PCEPRROSubobjectParserTest.java @@ -14,12 +14,13 @@ import static org.junit.Assert.fail; 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; @@ -198,7 +199,7 @@ public class PCEPRROSubobjectParserTest { @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(); diff --git a/pcep/impl/src/test/java/org/opendaylight/protocol/pcep/impl/PCEPTlvParserTest.java b/pcep/impl/src/test/java/org/opendaylight/protocol/pcep/impl/PCEPTlvParserTest.java index cbd21943c8..d1adcb58db 100644 --- a/pcep/impl/src/test/java/org/opendaylight/protocol/pcep/impl/PCEPTlvParserTest.java +++ b/pcep/impl/src/test/java/org/opendaylight/protocol/pcep/impl/PCEPTlvParserTest.java @@ -17,13 +17,13 @@ import io.netty.buffer.Unpooled; 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; diff --git a/pcep/impl/src/test/java/org/opendaylight/protocol/pcep/impl/PCEPValidatorTest.java b/pcep/impl/src/test/java/org/opendaylight/protocol/pcep/impl/PCEPValidatorTest.java index a24add8674..2587e78492 100644 --- a/pcep/impl/src/test/java/org/opendaylight/protocol/pcep/impl/PCEPValidatorTest.java +++ b/pcep/impl/src/test/java/org/opendaylight/protocol/pcep/impl/PCEPValidatorTest.java @@ -21,16 +21,17 @@ import java.util.List; 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; @@ -165,13 +166,13 @@ public class PCEPValidatorTest { 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); diff --git a/pcep/impl/src/test/java/org/opendaylight/protocol/pcep/impl/PCEPXROSubobjectParserTest.java b/pcep/impl/src/test/java/org/opendaylight/protocol/pcep/impl/PCEPXROSubobjectParserTest.java index 6f7fa30aa8..14d292d896 100644 --- a/pcep/impl/src/test/java/org/opendaylight/protocol/pcep/impl/PCEPXROSubobjectParserTest.java +++ b/pcep/impl/src/test/java/org/opendaylight/protocol/pcep/impl/PCEPXROSubobjectParserTest.java @@ -14,13 +14,13 @@ import static org.junit.Assert.fail; 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; diff --git a/pcep/impl/src/test/java/org/opendaylight/protocol/pcep/impl/TestVendorInformationObjectParser.java b/pcep/impl/src/test/java/org/opendaylight/protocol/pcep/impl/TestVendorInformationObjectParser.java index a9dbc53be1..81087386fb 100644 --- a/pcep/impl/src/test/java/org/opendaylight/protocol/pcep/impl/TestVendorInformationObjectParser.java +++ b/pcep/impl/src/test/java/org/opendaylight/protocol/pcep/impl/TestVendorInformationObjectParser.java @@ -11,7 +11,7 @@ package org.opendaylight.protocol.pcep.impl; 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; diff --git a/pcep/impl/src/test/java/org/opendaylight/protocol/pcep/impl/TestVendorInformationTlvParser.java b/pcep/impl/src/test/java/org/opendaylight/protocol/pcep/impl/TestVendorInformationTlvParser.java index 8489e5d6a6..cd8eadd453 100644 --- a/pcep/impl/src/test/java/org/opendaylight/protocol/pcep/impl/TestVendorInformationTlvParser.java +++ b/pcep/impl/src/test/java/org/opendaylight/protocol/pcep/impl/TestVendorInformationTlvParser.java @@ -9,8 +9,7 @@ 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; diff --git a/pcep/pcc-mock/src/main/java/org/opendaylight/protocol/pcep/pcc/mock/PCCEndPointIpv4ObjectParser.java b/pcep/pcc-mock/src/main/java/org/opendaylight/protocol/pcep/pcc/mock/PCCEndPointIpv4ObjectParser.java index 22c1f05607..304ccf0dbb 100644 --- a/pcep/pcc-mock/src/main/java/org/opendaylight/protocol/pcep/pcc/mock/PCCEndPointIpv4ObjectParser.java +++ b/pcep/pcc-mock/src/main/java/org/opendaylight/protocol/pcep/pcc/mock/PCCEndPointIpv4ObjectParser.java @@ -10,7 +10,7 @@ package org.opendaylight.protocol.pcep.pcc.mock; 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; diff --git a/pcep/pom.xml b/pcep/pom.xml index a275a8ed7d..dcf0abf73c 100644 --- a/pcep/pom.xml +++ b/pcep/pom.xml @@ -33,6 +33,7 @@ api impl spi + base-parser ietf-stateful07 testtool topology-api diff --git a/pcep/segment-routing/src/main/java/org/opendaylight/protocol/pcep/segment/routing/SrPathSetupTypeTlvParser.java b/pcep/segment-routing/src/main/java/org/opendaylight/protocol/pcep/segment/routing/SrPathSetupTypeTlvParser.java index 1dc0151ca0..149ff0d24c 100644 --- a/pcep/segment-routing/src/main/java/org/opendaylight/protocol/pcep/segment/routing/SrPathSetupTypeTlvParser.java +++ b/pcep/segment-routing/src/main/java/org/opendaylight/protocol/pcep/segment/routing/SrPathSetupTypeTlvParser.java @@ -7,7 +7,7 @@ */ 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 { diff --git a/pcep/segment-routing/src/test/java/org/opendaylight/protocol/pcep/segment/routing/SrObjectParserTest.java b/pcep/segment-routing/src/test/java/org/opendaylight/protocol/pcep/segment/routing/SrObjectParserTest.java index 6d623e46a6..a86ccc9266 100644 --- a/pcep/segment-routing/src/test/java/org/opendaylight/protocol/pcep/segment/routing/SrObjectParserTest.java +++ b/pcep/segment-routing/src/test/java/org/opendaylight/protocol/pcep/segment/routing/SrObjectParserTest.java @@ -17,7 +17,7 @@ import io.netty.buffer.Unpooled; 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; -- 2.36.6