Search in sources :

Example 16 with Registration

use of org.opendaylight.yangtools.concepts.Registration in project bgpcep by opendaylight.

the class SegmentRoutingActivator method start.

@Override
public List<Registration> start(final PCEPExtensionProviderContext context) {
    final List<Registration> regs = new ArrayList<>();
    /* 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(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.rev200720.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.rev200720.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.rev200720.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.rev200720.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.rev200720.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.rev200720.update.lsp.input.arguments.ero.subobject.subobject.type.SrEroType.class, srEroSubobjectParser));
    regs.add(context.registerEROSubobjectSerializer(SrEroType.class, srEroSubobjectParser));
    final SrRroSubobjectParser srRroSubobjectParser = new SrRroSubobjectParser(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.rev200720.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.rev200720.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.rev200720.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.rev200720.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.rev200720.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.rev200720.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.rev200720.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.rev200720.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.rev200720.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(new PcepOpenObjectWithSpcTlvParser(tlvReg, viTlvRegistry)));
    regs.add(context.registerObjectSerializer(Open.class, new PcepOpenObjectWithSpcTlvParser(tlvReg, viTlvRegistry)));
    return regs;
}
Also used : ArrayList(java.util.ArrayList) SrRroType(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.segment.routing.rev200720.add.lsp.input.arguments.rro.subobject.subobject.type.SrRroType) Registration(org.opendaylight.yangtools.concepts.Registration) PathSetupType(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.path.setup.type.tlv.PathSetupType) SrPceCapability(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.segment.routing.rev200720.sr.pce.capability.tlv.SrPceCapability) Open(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.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.rev200720.add.lsp.input.arguments.ero.subobject.subobject.type.SrEroType) VendorInformationTlvRegistry(org.opendaylight.protocol.pcep.spi.VendorInformationTlvRegistry) TlvRegistry(org.opendaylight.protocol.pcep.spi.TlvRegistry)

Example 17 with Registration

use of org.opendaylight.yangtools.concepts.Registration in project bgpcep by opendaylight.

the class StatefulActivator method start.

@Override
public List<Registration> start(final PCEPExtensionProviderContext context) {
    final List<Registration> regs = new ArrayList<>();
    final ObjectRegistry objReg = context.getObjectHandlerRegistry();
    regs.add(context.registerMessageParser(StatefulPCUpdateRequestMessageParser.TYPE, new StatefulPCUpdateRequestMessageParser(objReg)));
    regs.add(context.registerMessageSerializer(Pcupd.class, new StatefulPCUpdateRequestMessageParser(objReg)));
    regs.add(context.registerMessageParser(StatefulPCReportMessageParser.TYPE, new StatefulPCReportMessageParser(objReg)));
    regs.add(context.registerMessageSerializer(Pcrpt.class, new StatefulPCReportMessageParser(objReg)));
    regs.add(context.registerMessageParser(StatefulPCRequestMessageParser.TYPE, new StatefulPCRequestMessageParser(objReg)));
    regs.add(context.registerMessageSerializer(Pcreq.class, new StatefulPCRequestMessageParser(objReg)));
    regs.add(context.registerMessageParser(StatefulErrorMessageParser.TYPE, new StatefulErrorMessageParser(objReg)));
    regs.add(context.registerMessageSerializer(Pcerr.class, new StatefulErrorMessageParser(objReg)));
    final TlvRegistry tlvReg = context.getTlvHandlerRegistry();
    final VendorInformationTlvRegistry viTlvReg = context.getVendorInformationTlvRegistry();
    regs.add(context.registerObjectParser(new StatefulLspObjectParser(tlvReg, viTlvReg)));
    regs.add(context.registerObjectSerializer(Lsp.class, new StatefulLspObjectParser(tlvReg, viTlvReg)));
    regs.add(context.registerObjectParser(new StatefulSrpObjectParser(tlvReg, viTlvReg)));
    regs.add(context.registerObjectSerializer(Srp.class, new StatefulSrpObjectParser(tlvReg, viTlvReg)));
    regs.add(context.registerObjectParser(new StatefulOpenObjectParser(tlvReg, viTlvReg)));
    regs.add(context.registerObjectSerializer(Open.class, new StatefulOpenObjectParser(tlvReg, viTlvReg)));
    regs.add(context.registerTlvParser(StatefulLSPIdentifierIpv4TlvParser.TYPE, new StatefulLSPIdentifierIpv4TlvParser()));
    regs.add(context.registerTlvParser(StatefulLSPIdentifierIpv6TlvParser.TYPE, new StatefulLSPIdentifierIpv6TlvParser()));
    regs.add(context.registerTlvSerializer(LspIdentifiers.class, new StatefulLSPIdentifierIpv4TlvParser()));
    regs.add(context.registerTlvParser(StatefulLspUpdateErrorTlvParser.TYPE, new StatefulLspUpdateErrorTlvParser()));
    regs.add(context.registerTlvSerializer(LspErrorCode.class, new StatefulLspUpdateErrorTlvParser()));
    regs.add(context.registerTlvParser(StatefulRSVPErrorSpecTlvParser.TYPE, new StatefulRSVPErrorSpecTlvParser()));
    regs.add(context.registerTlvSerializer(RsvpErrorSpec.class, new StatefulRSVPErrorSpecTlvParser()));
    regs.add(context.registerTlvParser(StatefulStatefulCapabilityTlvParser.TYPE, new StatefulStatefulCapabilityTlvParser()));
    regs.add(context.registerTlvSerializer(Stateful.class, new StatefulStatefulCapabilityTlvParser()));
    regs.add(context.registerTlvParser(StatefulLspSymbolicNameTlvParser.TYPE, new StatefulLspSymbolicNameTlvParser()));
    regs.add(context.registerTlvSerializer(SymbolicPathName.class, new StatefulLspSymbolicNameTlvParser()));
    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.rev200720.stateful.capability.tlv.Stateful) LspErrorCode(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev200720.lsp.error.code.tlv.LspErrorCode) ArrayList(java.util.ArrayList) PathBinding(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev200720.path.binding.tlv.PathBinding) Open(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.open.object.Open) Srp(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev200720.srp.object.Srp) Pcrpt(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev200720.Pcrpt) Registration(org.opendaylight.yangtools.concepts.Registration) VendorInformationTlvRegistry(org.opendaylight.protocol.pcep.spi.VendorInformationTlvRegistry) SymbolicPathName(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev200720.symbolic.path.name.tlv.SymbolicPathName) Pcupd(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev200720.Pcupd) LspIdentifiers(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev200720.lsp.identifiers.tlv.LspIdentifiers) Pcerr(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.message.rev181109.Pcerr) Lsp(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev200720.lsp.object.Lsp) RsvpErrorSpec(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev200720.rsvp.error.spec.tlv.RsvpErrorSpec) VendorInformationTlvRegistry(org.opendaylight.protocol.pcep.spi.VendorInformationTlvRegistry) TlvRegistry(org.opendaylight.protocol.pcep.spi.TlvRegistry) Pcreq(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.message.rev181109.Pcreq) ObjectRegistry(org.opendaylight.protocol.pcep.spi.ObjectRegistry)

Aggregations

Registration (org.opendaylight.yangtools.concepts.Registration)17 ArrayList (java.util.ArrayList)9 Test (org.junit.Test)6 Ipv4NextHopCase (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev200120.next.hop.c.next.hop.Ipv4NextHopCase)4 Ipv6NextHopCase (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev200120.next.hop.c.next.hop.Ipv6NextHopCase)4 TlvRegistry (org.opendaylight.protocol.pcep.spi.TlvRegistry)3 VendorInformationTlvRegistry (org.opendaylight.protocol.pcep.spi.VendorInformationTlvRegistry)3 Open (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev181109.open.object.Open)3 Ipv4NextHopParserSerializer (org.opendaylight.protocol.bgp.inet.codec.nexthop.Ipv4NextHopParserSerializer)2 Ipv6NextHopParserSerializer (org.opendaylight.protocol.bgp.inet.codec.nexthop.Ipv6NextHopParserSerializer)2 NextHopParserSerializer (org.opendaylight.protocol.bgp.parser.spi.NextHopParserSerializer)2 ObjectRegistry (org.opendaylight.protocol.pcep.spi.ObjectRegistry)2 Ipv4AddressFamily (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev200120.Ipv4AddressFamily)2 Ipv6AddressFamily (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev200120.Ipv6AddressFamily)2 Lsp (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev200720.lsp.object.Lsp)2 Stateful (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev200720.stateful.capability.tlv.Stateful)2 ActorRef (akka.actor.ActorRef)1 AddressFromURIString (akka.actor.AddressFromURIString)1 Status (akka.actor.Status)1 Success (akka.actor.Status.Success)1