Search in sources :

Example 1 with TlvRegistry

use of org.opendaylight.protocol.pcep.spi.TlvRegistry 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;
}
Also used : Stateful(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev171025.stateful.capability.tlv.Stateful) ArrayList(java.util.ArrayList) Lsp(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev171025.lsp.object.Lsp) Srp(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev171025.srp.object.Srp) VendorInformationTlvRegistry(org.opendaylight.protocol.pcep.spi.VendorInformationTlvRegistry) TlvRegistry(org.opendaylight.protocol.pcep.spi.TlvRegistry) VendorInformationTlvRegistry(org.opendaylight.protocol.pcep.spi.VendorInformationTlvRegistry) Pcinitiate(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.crabbe.initiated.rev171025.Pcinitiate)

Example 2 with TlvRegistry

use of org.opendaylight.protocol.pcep.spi.TlvRegistry 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;
}
Also used : Stateful(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev171025.stateful.capability.tlv.Stateful) LspErrorCode(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev171025.lsp.error.code.tlv.LspErrorCode) ArrayList(java.util.ArrayList) PathBinding(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev171025.path.binding.tlv.PathBinding) Open(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.open.object.Open) Srp(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev171025.srp.object.Srp) Pcrpt(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev171025.Pcrpt) VendorInformationTlvRegistry(org.opendaylight.protocol.pcep.spi.VendorInformationTlvRegistry) SymbolicPathName(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev171025.symbolic.path.name.tlv.SymbolicPathName) Pcupd(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev171025.Pcupd) LspIdentifiers(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev171025.lsp.identifiers.tlv.LspIdentifiers) Pcerr(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.message.rev131007.Pcerr) Lsp(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev171025.lsp.object.Lsp) RsvpErrorSpec(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev171025.rsvp.error.spec.tlv.RsvpErrorSpec) VendorInformationTlvRegistry(org.opendaylight.protocol.pcep.spi.VendorInformationTlvRegistry) TlvRegistry(org.opendaylight.protocol.pcep.spi.TlvRegistry) ObjectRegistry(org.opendaylight.protocol.pcep.spi.ObjectRegistry)

Example 3 with TlvRegistry

use of org.opendaylight.protocol.pcep.spi.TlvRegistry 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;
}
Also used : Stateful(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev171025.stateful.capability.tlv.Stateful) ArrayList(java.util.ArrayList) Lsp(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev171025.lsp.object.Lsp) Open(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.open.object.Open) VendorInformationTlvRegistry(org.opendaylight.protocol.pcep.spi.VendorInformationTlvRegistry) TlvRegistry(org.opendaylight.protocol.pcep.spi.TlvRegistry) LspDbVersion(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.pcep.sync.optimizations.rev171025.lsp.db.version.tlv.LspDbVersion) SpeakerEntityId(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.pcep.sync.optimizations.rev171025.speaker.entity.id.tlv.SpeakerEntityId) VendorInformationTlvRegistry(org.opendaylight.protocol.pcep.spi.VendorInformationTlvRegistry)

Example 4 with TlvRegistry

use of org.opendaylight.protocol.pcep.spi.TlvRegistry 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);
}
Also used : CClose(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.close.object.CClose) Ero(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.explicit.route.object.Ero) PCEPBandwidthObjectParser(org.opendaylight.protocol.pcep.parser.object.PCEPBandwidthObjectParser) Svec(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.svec.object.Svec) PCEPCloseObjectParser(org.opendaylight.protocol.pcep.parser.object.PCEPCloseObjectParser) Iro(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.include.route.object.Iro) PCEPLspaObjectParser(org.opendaylight.protocol.pcep.parser.object.PCEPLspaObjectParser) PCEPEndPointsIpv4ObjectParser(org.opendaylight.protocol.pcep.parser.object.PCEPEndPointsIpv4ObjectParser) PCEPMetricObjectParser(org.opendaylight.protocol.pcep.parser.object.PCEPMetricObjectParser) Rro(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.reported.route.object.Rro) Open(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.open.object.Open) EROSubobjectRegistry(org.opendaylight.protocol.pcep.spi.EROSubobjectRegistry) PCEPEndPointsIpv6ObjectParser(org.opendaylight.protocol.pcep.parser.object.PCEPEndPointsIpv6ObjectParser) Bandwidth(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.bandwidth.object.Bandwidth) VendorInformationTlvRegistry(org.opendaylight.protocol.pcep.spi.VendorInformationTlvRegistry) PCEPNoPathObjectParser(org.opendaylight.protocol.pcep.parser.object.PCEPNoPathObjectParser) EndpointsObj(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.endpoints.object.EndpointsObj) Rp(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.rp.object.Rp) CNotification(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.notification.object.CNotification) ErrorObject(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.pcep.error.object.ErrorObject) PCEPReportedRouteObjectParser(org.opendaylight.protocol.pcep.parser.object.PCEPReportedRouteObjectParser) LoadBalancing(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.load.balancing.object.LoadBalancing) PCEPExplicitRouteObjectParser(org.opendaylight.protocol.pcep.parser.object.PCEPExplicitRouteObjectParser) PCEPRequestParameterObjectParser(org.opendaylight.protocol.pcep.parser.object.PCEPRequestParameterObjectParser) PCEPNotificationObjectParser(org.opendaylight.protocol.pcep.parser.object.PCEPNotificationObjectParser) TlvRegistry(org.opendaylight.protocol.pcep.spi.TlvRegistry) VendorInformationTlvRegistry(org.opendaylight.protocol.pcep.spi.VendorInformationTlvRegistry) PCEPExistingBandwidthObjectParser(org.opendaylight.protocol.pcep.parser.object.PCEPExistingBandwidthObjectParser) PCEPIncludeRouteObjectParser(org.opendaylight.protocol.pcep.parser.object.PCEPIncludeRouteObjectParser) PCEPSvecObjectParser(org.opendaylight.protocol.pcep.parser.object.PCEPSvecObjectParser) PCEPErrorObjectParser(org.opendaylight.protocol.pcep.parser.object.PCEPErrorObjectParser) PCEPOpenObjectParser(org.opendaylight.protocol.pcep.parser.object.PCEPOpenObjectParser) NoPath(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.pcrep.message.pcrep.message.replies.result.failure._case.NoPath) Metric(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.metric.object.Metric) Lspa(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.lspa.object.Lspa) PCEPLoadBalancingObjectParser(org.opendaylight.protocol.pcep.parser.object.PCEPLoadBalancingObjectParser)

Example 5 with TlvRegistry

use of org.opendaylight.protocol.pcep.spi.TlvRegistry 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;
}
Also used : SrRroType(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.segment.routing.rev171025.add.lsp.input.arguments.rro.subobject.subobject.type.SrRroType) PathSetupType(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.path.setup.type.tlv.PathSetupType) SrPceCapability(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.segment.routing.rev171025.sr.pce.capability.tlv.SrPceCapability) Open(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.open.object.Open) VendorInformationTlvRegistry(org.opendaylight.protocol.pcep.spi.VendorInformationTlvRegistry) SrEroType(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.segment.routing.rev171025.add.lsp.input.arguments.ero.subobject.subobject.type.SrEroType) VendorInformationTlvRegistry(org.opendaylight.protocol.pcep.spi.VendorInformationTlvRegistry) TlvRegistry(org.opendaylight.protocol.pcep.spi.TlvRegistry)

Aggregations

TlvRegistry (org.opendaylight.protocol.pcep.spi.TlvRegistry)5 VendorInformationTlvRegistry (org.opendaylight.protocol.pcep.spi.VendorInformationTlvRegistry)5 Open (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.open.object.Open)4 ArrayList (java.util.ArrayList)3 Lsp (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev171025.lsp.object.Lsp)3 Stateful (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev171025.stateful.capability.tlv.Stateful)3 Srp (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev171025.srp.object.Srp)2 PCEPBandwidthObjectParser (org.opendaylight.protocol.pcep.parser.object.PCEPBandwidthObjectParser)1 PCEPCloseObjectParser (org.opendaylight.protocol.pcep.parser.object.PCEPCloseObjectParser)1 PCEPEndPointsIpv4ObjectParser (org.opendaylight.protocol.pcep.parser.object.PCEPEndPointsIpv4ObjectParser)1 PCEPEndPointsIpv6ObjectParser (org.opendaylight.protocol.pcep.parser.object.PCEPEndPointsIpv6ObjectParser)1 PCEPErrorObjectParser (org.opendaylight.protocol.pcep.parser.object.PCEPErrorObjectParser)1 PCEPExistingBandwidthObjectParser (org.opendaylight.protocol.pcep.parser.object.PCEPExistingBandwidthObjectParser)1 PCEPExplicitRouteObjectParser (org.opendaylight.protocol.pcep.parser.object.PCEPExplicitRouteObjectParser)1 PCEPIncludeRouteObjectParser (org.opendaylight.protocol.pcep.parser.object.PCEPIncludeRouteObjectParser)1 PCEPLoadBalancingObjectParser (org.opendaylight.protocol.pcep.parser.object.PCEPLoadBalancingObjectParser)1 PCEPLspaObjectParser (org.opendaylight.protocol.pcep.parser.object.PCEPLspaObjectParser)1 PCEPMetricObjectParser (org.opendaylight.protocol.pcep.parser.object.PCEPMetricObjectParser)1 PCEPNoPathObjectParser (org.opendaylight.protocol.pcep.parser.object.PCEPNoPathObjectParser)1 PCEPNotificationObjectParser (org.opendaylight.protocol.pcep.parser.object.PCEPNotificationObjectParser)1