use of org.opendaylight.protocol.pcep.spi.VendorInformationTlvRegistry in project bgpcep by opendaylight.
the class CrabbeInitiatedActivator method startImpl.
@Override
protected List<AutoCloseable> startImpl(final PCEPExtensionProviderContext context) {
final List<AutoCloseable> regs = new ArrayList<>();
regs.add(context.registerMessageParser(CInitiated00PCInitiateMessageParser.TYPE, new CInitiated00PCInitiateMessageParser(context.getObjectHandlerRegistry())));
regs.add(context.registerMessageSerializer(Pcinitiate.class, new CInitiated00PCInitiateMessageParser(context.getObjectHandlerRegistry())));
final TlvRegistry tlvReg = context.getTlvHandlerRegistry();
final VendorInformationTlvRegistry viTlvReg = context.getVendorInformationTlvRegistry();
regs.add(context.registerObjectParser(CInitiated00LspObjectParser.CLASS, CInitiated00LspObjectParser.TYPE, new CInitiated00LspObjectParser(tlvReg, viTlvReg)));
regs.add(context.registerObjectSerializer(Lsp.class, new CInitiated00LspObjectParser(tlvReg, viTlvReg)));
regs.add(context.registerObjectParser(CInitiated00SrpObjectParser.CLASS, CInitiated00SrpObjectParser.TYPE, new CInitiated00SrpObjectParser(tlvReg, viTlvReg)));
regs.add(context.registerObjectSerializer(Srp.class, new CInitiated00SrpObjectParser(tlvReg, viTlvReg)));
regs.add(context.registerTlvParser(CInitiated00StatefulCapabilityTlvParser.TYPE, new CInitiated00StatefulCapabilityTlvParser()));
regs.add(context.registerTlvSerializer(Stateful.class, new CInitiated00StatefulCapabilityTlvParser()));
return regs;
}
use of org.opendaylight.protocol.pcep.spi.VendorInformationTlvRegistry in project bgpcep by opendaylight.
the class StatefulActivator method startImpl.
@Override
protected List<AutoCloseable> startImpl(final PCEPExtensionProviderContext context) {
final List<AutoCloseable> regs = new ArrayList<>();
final ObjectRegistry objReg = context.getObjectHandlerRegistry();
regs.add(context.registerMessageParser(Stateful07PCUpdateRequestMessageParser.TYPE, new Stateful07PCUpdateRequestMessageParser(objReg)));
regs.add(context.registerMessageSerializer(Pcupd.class, new Stateful07PCUpdateRequestMessageParser(objReg)));
regs.add(context.registerMessageParser(Stateful07PCReportMessageParser.TYPE, new Stateful07PCReportMessageParser(objReg)));
regs.add(context.registerMessageSerializer(Pcrpt.class, new Stateful07PCReportMessageParser(objReg)));
regs.add(context.registerMessageParser(Stateful07ErrorMessageParser.TYPE, new Stateful07ErrorMessageParser(objReg)));
regs.add(context.registerMessageSerializer(Pcerr.class, new Stateful07ErrorMessageParser(objReg)));
final TlvRegistry tlvReg = context.getTlvHandlerRegistry();
final VendorInformationTlvRegistry viTlvReg = context.getVendorInformationTlvRegistry();
regs.add(context.registerObjectParser(Stateful07LspObjectParser.CLASS, Stateful07LspObjectParser.TYPE, new Stateful07LspObjectParser(tlvReg, viTlvReg)));
regs.add(context.registerObjectSerializer(Lsp.class, new Stateful07LspObjectParser(tlvReg, viTlvReg)));
regs.add(context.registerObjectParser(Stateful07SrpObjectParser.CLASS, Stateful07SrpObjectParser.TYPE, new Stateful07SrpObjectParser(tlvReg, viTlvReg)));
regs.add(context.registerObjectSerializer(Srp.class, new Stateful07SrpObjectParser(tlvReg, viTlvReg)));
regs.add(context.registerObjectParser(Stateful07OpenObjectParser.CLASS, Stateful07OpenObjectParser.TYPE, new Stateful07OpenObjectParser(tlvReg, viTlvReg)));
regs.add(context.registerObjectSerializer(Open.class, new Stateful07OpenObjectParser(tlvReg, viTlvReg)));
regs.add(context.registerTlvParser(Stateful07LSPIdentifierIpv4TlvParser.TYPE, new Stateful07LSPIdentifierIpv4TlvParser()));
regs.add(context.registerTlvParser(Stateful07LSPIdentifierIpv6TlvParser.TYPE, new Stateful07LSPIdentifierIpv6TlvParser()));
regs.add(context.registerTlvSerializer(LspIdentifiers.class, new Stateful07LSPIdentifierIpv4TlvParser()));
regs.add(context.registerTlvParser(Stateful07LspUpdateErrorTlvParser.TYPE, new Stateful07LspUpdateErrorTlvParser()));
regs.add(context.registerTlvSerializer(LspErrorCode.class, new Stateful07LspUpdateErrorTlvParser()));
regs.add(context.registerTlvParser(Stateful07RSVPErrorSpecTlvParser.TYPE, new Stateful07RSVPErrorSpecTlvParser()));
regs.add(context.registerTlvSerializer(RsvpErrorSpec.class, new Stateful07RSVPErrorSpecTlvParser()));
regs.add(context.registerTlvParser(Stateful07StatefulCapabilityTlvParser.TYPE, new Stateful07StatefulCapabilityTlvParser()));
regs.add(context.registerTlvSerializer(Stateful.class, new Stateful07StatefulCapabilityTlvParser()));
regs.add(context.registerTlvParser(Stateful07LspSymbolicNameTlvParser.TYPE, new Stateful07LspSymbolicNameTlvParser()));
regs.add(context.registerTlvSerializer(SymbolicPathName.class, new Stateful07LspSymbolicNameTlvParser()));
regs.add(context.registerTlvParser(PathBindingTlvParser.TYPE, new PathBindingTlvParser()));
regs.add(context.registerTlvSerializer(PathBinding.class, new PathBindingTlvParser()));
return regs;
}
use of org.opendaylight.protocol.pcep.spi.VendorInformationTlvRegistry in project bgpcep by opendaylight.
the class SyncOptimizationsActivator method startImpl.
@Override
protected List<AutoCloseable> startImpl(final PCEPExtensionProviderContext context) {
final List<AutoCloseable> regs = new ArrayList<>();
final TlvRegistry tlvReg = context.getTlvHandlerRegistry();
final VendorInformationTlvRegistry viTlvReg = context.getVendorInformationTlvRegistry();
regs.add(context.registerObjectParser(SyncOptimizationsLspObjectParser.CLASS, SyncOptimizationsLspObjectParser.TYPE, new SyncOptimizationsLspObjectParser(tlvReg, viTlvReg)));
regs.add(context.registerObjectSerializer(Lsp.class, new SyncOptimizationsLspObjectParser(tlvReg, viTlvReg)));
regs.add(context.registerObjectParser(SyncOptimizationsOpenObjectParser.CLASS, SyncOptimizationsOpenObjectParser.TYPE, new SyncOptimizationsOpenObjectParser(tlvReg, viTlvReg)));
regs.add(context.registerObjectSerializer(Open.class, new SyncOptimizationsOpenObjectParser(tlvReg, viTlvReg)));
regs.add(context.registerTlvParser(LspDbVersionTlvParser.TYPE, new LspDbVersionTlvParser()));
regs.add(context.registerTlvSerializer(LspDbVersion.class, new LspDbVersionTlvParser()));
regs.add(context.registerTlvParser(SpeakerEntityIdTlvParser.TYPE, new SpeakerEntityIdTlvParser()));
regs.add(context.registerTlvSerializer(SpeakerEntityId.class, new SpeakerEntityIdTlvParser()));
regs.add(context.registerTlvParser(SyncOptimizationsCapabilityTlvParser.TYPE, new SyncOptimizationsCapabilityTlvParser()));
regs.add(context.registerTlvSerializer(Stateful.class, new SyncOptimizationsCapabilityTlvParser()));
return regs;
}
use of org.opendaylight.protocol.pcep.spi.VendorInformationTlvRegistry in project bgpcep by opendaylight.
the class BaseParserExtensionActivator method registerObjectParsers.
private static void registerObjectParsers(final List<AutoCloseable> regs, final PCEPExtensionProviderContext context) {
final TlvRegistry tlvReg = context.getTlvHandlerRegistry();
final VendorInformationTlvRegistry viTlvReg = context.getVendorInformationTlvRegistry();
final PCEPOpenObjectParser openParser = new PCEPOpenObjectParser(tlvReg, viTlvReg);
regs.add(context.registerObjectParser(PCEPOpenObjectParser.CLASS, PCEPOpenObjectParser.TYPE, openParser));
regs.add(context.registerObjectSerializer(Open.class, openParser));
final PCEPRequestParameterObjectParser rpParser = new PCEPRequestParameterObjectParser(tlvReg, viTlvReg);
regs.add(context.registerObjectParser(PCEPRequestParameterObjectParser.CLASS, PCEPRequestParameterObjectParser.TYPE, rpParser));
regs.add(context.registerObjectSerializer(Rp.class, rpParser));
final PCEPNoPathObjectParser noPathParser = new PCEPNoPathObjectParser(tlvReg, viTlvReg);
regs.add(context.registerObjectParser(PCEPNoPathObjectParser.CLASS, PCEPNoPathObjectParser.TYPE, noPathParser));
regs.add(context.registerObjectSerializer(NoPath.class, noPathParser));
final PCEPEndPointsIpv4ObjectParser endpoints4Parser = new PCEPEndPointsIpv4ObjectParser();
final PCEPEndPointsIpv6ObjectParser endpoints6Parser = new PCEPEndPointsIpv6ObjectParser();
regs.add(context.registerObjectParser(PCEPEndPointsIpv4ObjectParser.CLASS, PCEPEndPointsIpv4ObjectParser.TYPE, endpoints4Parser));
regs.add(context.registerObjectParser(PCEPEndPointsIpv6ObjectParser.CLASS, PCEPEndPointsIpv6ObjectParser.TYPE, endpoints6Parser));
regs.add(context.registerObjectSerializer(EndpointsObj.class, endpoints4Parser));
final PCEPBandwidthObjectParser bwParser = new PCEPBandwidthObjectParser();
final PCEPExistingBandwidthObjectParser bwExistingParser = new PCEPExistingBandwidthObjectParser();
regs.add(context.registerObjectParser(PCEPBandwidthObjectParser.CLASS, PCEPBandwidthObjectParser.TYPE, bwParser));
regs.add(context.registerObjectParser(PCEPExistingBandwidthObjectParser.CLASS, PCEPExistingBandwidthObjectParser.TYPE, bwExistingParser));
regs.add(context.registerObjectSerializer(Bandwidth.class, bwParser));
regs.add(context.registerObjectSerializer(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.reoptimization.bandwidth.object.ReoptimizationBandwidth.class, bwExistingParser));
final PCEPMetricObjectParser metricParser = new PCEPMetricObjectParser();
regs.add(context.registerObjectParser(PCEPMetricObjectParser.CLASS, PCEPMetricObjectParser.TYPE, metricParser));
regs.add(context.registerObjectSerializer(Metric.class, metricParser));
final EROSubobjectRegistry eroSubReg = context.getEROSubobjectHandlerRegistry();
final PCEPExplicitRouteObjectParser eroParser = new PCEPExplicitRouteObjectParser(eroSubReg);
regs.add(context.registerObjectParser(PCEPExplicitRouteObjectParser.CLASS, PCEPExplicitRouteObjectParser.TYPE, eroParser));
regs.add(context.registerObjectSerializer(Ero.class, eroParser));
final PCEPReportedRouteObjectParser rroParser = new PCEPReportedRouteObjectParser(context.getRROSubobjectHandlerRegistry());
regs.add(context.registerObjectParser(PCEPReportedRouteObjectParser.CLASS, PCEPReportedRouteObjectParser.TYPE, rroParser));
regs.add(context.registerObjectSerializer(Rro.class, rroParser));
final PCEPLspaObjectParser lspaParser = new PCEPLspaObjectParser(tlvReg, viTlvReg);
regs.add(context.registerObjectParser(PCEPLspaObjectParser.CLASS, PCEPLspaObjectParser.TYPE, lspaParser));
regs.add(context.registerObjectSerializer(Lspa.class, lspaParser));
final PCEPIncludeRouteObjectParser iroParser = new PCEPIncludeRouteObjectParser(eroSubReg);
regs.add(context.registerObjectParser(PCEPIncludeRouteObjectParser.CLASS, PCEPIncludeRouteObjectParser.TYPE, iroParser));
regs.add(context.registerObjectSerializer(Iro.class, iroParser));
final PCEPSvecObjectParser svecParser = new PCEPSvecObjectParser();
regs.add(context.registerObjectParser(PCEPSvecObjectParser.CLASS, PCEPSvecObjectParser.TYPE, svecParser));
regs.add(context.registerObjectSerializer(Svec.class, svecParser));
final PCEPNotificationObjectParser notParser = new PCEPNotificationObjectParser(tlvReg, viTlvReg);
regs.add(context.registerObjectParser(PCEPNotificationObjectParser.CLASS, PCEPNotificationObjectParser.TYPE, notParser));
regs.add(context.registerObjectSerializer(CNotification.class, notParser));
final PCEPErrorObjectParser errParser = new PCEPErrorObjectParser(tlvReg, viTlvReg);
regs.add(context.registerObjectParser(PCEPErrorObjectParser.CLASS, PCEPErrorObjectParser.TYPE, errParser));
regs.add(context.registerObjectSerializer(ErrorObject.class, errParser));
final PCEPLoadBalancingObjectParser lbParser = new PCEPLoadBalancingObjectParser();
regs.add(context.registerObjectParser(PCEPLoadBalancingObjectParser.CLASS, PCEPLoadBalancingObjectParser.TYPE, lbParser));
regs.add(context.registerObjectSerializer(LoadBalancing.class, lbParser));
final PCEPCloseObjectParser closeParser = new PCEPCloseObjectParser(tlvReg, viTlvReg);
regs.add(context.registerObjectParser(PCEPCloseObjectParser.CLASS, PCEPCloseObjectParser.TYPE, closeParser));
regs.add(context.registerObjectSerializer(CClose.class, closeParser));
registerExtensionsObjectParsers(regs, context, tlvReg, viTlvReg, eroSubReg);
}
use of org.opendaylight.protocol.pcep.spi.VendorInformationTlvRegistry in project bgpcep by opendaylight.
the class SegmentRoutingActivator method startImpl.
@Override
protected List<AutoCloseable> startImpl(final PCEPExtensionProviderContext context) {
final List<AutoCloseable> regs = Lists.newArrayList();
/* Tlvs */
regs.add(context.registerTlvParser(SrPceCapabilityTlvParser.TYPE, new SrPceCapabilityTlvParser()));
regs.add(context.registerTlvParser(SrPathSetupTypeTlvParser.TYPE, new SrPathSetupTypeTlvParser()));
regs.add(context.registerTlvSerializer(PathSetupType.class, new SrPathSetupTypeTlvParser()));
regs.add(context.registerTlvSerializer(SrPceCapability.class, new SrPceCapabilityTlvParser()));
/* Subobjects */
final SrEroSubobjectParser srEroSubobjectParser = new SrEroSubobjectParser(this.ianaSrSubobjectsType);
regs.add(context.registerEROSubobjectParser(srEroSubobjectParser.getCodePoint(), srEroSubobjectParser));
regs.add(context.registerEROSubobjectSerializer(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.segment.routing.rev171025.network.topology.topology.node.path.computation.client.reported.lsp.path.ero.subobject.subobject.type.SrEroType.class, srEroSubobjectParser));
regs.add(context.registerEROSubobjectSerializer(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.segment.routing.rev171025.pcinitiate.pcinitiate.message.requests.ero.subobject.subobject.type.SrEroType.class, srEroSubobjectParser));
regs.add(context.registerEROSubobjectSerializer(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.segment.routing.rev171025.pcrep.pcrep.message.replies.result.success._case.success.paths.ero.subobject.subobject.type.SrEroType.class, srEroSubobjectParser));
regs.add(context.registerEROSubobjectSerializer(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.segment.routing.rev171025.pcrpt.pcrpt.message.reports.path.ero.subobject.subobject.type.SrEroType.class, srEroSubobjectParser));
regs.add(context.registerEROSubobjectSerializer(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.segment.routing.rev171025.pcupd.pcupd.message.updates.path.ero.subobject.subobject.type.SrEroType.class, srEroSubobjectParser));
regs.add(context.registerEROSubobjectSerializer(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.segment.routing.rev171025.update.lsp.input.arguments.ero.subobject.subobject.type.SrEroType.class, srEroSubobjectParser));
regs.add(context.registerEROSubobjectSerializer(SrEroType.class, srEroSubobjectParser));
final SrRroSubobjectParser srRroSubobjectParser = new SrRroSubobjectParser(this.ianaSrSubobjectsType);
regs.add(context.registerRROSubobjectParser(srRroSubobjectParser.getCodePoint(), srRroSubobjectParser));
regs.add(context.registerRROSubobjectSerializer(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.segment.routing.rev171025.network.topology.topology.node.path.computation.client.reported.lsp.path.rro.subobject.subobject.type.SrRroType.class, srRroSubobjectParser));
regs.add(context.registerRROSubobjectSerializer(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.segment.routing.rev171025.pcinitiate.pcinitiate.message.requests.rro.subobject.subobject.type.SrRroType.class, srRroSubobjectParser));
regs.add(context.registerRROSubobjectSerializer(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.segment.routing.rev171025.pcrep.pcrep.message.replies.result.failure._case.rro.subobject.subobject.type.SrRroType.class, srRroSubobjectParser));
regs.add(context.registerRROSubobjectSerializer(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.segment.routing.rev171025.pcreq.pcreq.message.requests.segment.computation.p2p.reported.route.rro.subobject.subobject.type.SrRroType.class, srRroSubobjectParser));
regs.add(context.registerRROSubobjectSerializer(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.segment.routing.rev171025.pcrpt.pcrpt.message.reports.path.rro.subobject.subobject.type.SrRroType.class, srRroSubobjectParser));
regs.add(context.registerRROSubobjectSerializer(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.segment.routing.rev171025.pcupd.pcupd.message.updates.path.rro.subobject.subobject.type.SrRroType.class, srRroSubobjectParser));
regs.add(context.registerRROSubobjectSerializer(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.segment.routing.rev171025.update.lsp.input.arguments.rro.subobject.subobject.type.SrRroType.class, srRroSubobjectParser));
regs.add(context.registerRROSubobjectSerializer(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.segment.routing.rev171025.pcrep.pcrep.message.replies.result.success._case.success.paths.rro.subobject.subobject.type.SrRroType.class, srRroSubobjectParser));
regs.add(context.registerRROSubobjectSerializer(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.segment.routing.rev171025.pcreq.pcreq.message.requests.segment.computation.p2p.rro.subobject.subobject.type.SrRroType.class, srRroSubobjectParser));
regs.add(context.registerRROSubobjectSerializer(SrRroType.class, srRroSubobjectParser));
/* Objects */
final TlvRegistry tlvReg = context.getTlvHandlerRegistry();
final VendorInformationTlvRegistry viTlvRegistry = context.getVendorInformationTlvRegistry();
regs.add(context.registerObjectParser(PcepOpenObjectWithSpcTlvParser.CLASS, PcepOpenObjectWithSpcTlvParser.TYPE, new PcepOpenObjectWithSpcTlvParser(tlvReg, viTlvRegistry)));
regs.add(context.registerObjectSerializer(Open.class, new PcepOpenObjectWithSpcTlvParser(tlvReg, viTlvRegistry)));
return regs;
}
Aggregations