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;
}
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;
}
Aggregations