dc1fac099d5979c6fbb754b753af1e8961c9eb78
[bgpcep.git] / pcep / impl / src / main / java / org / opendaylight / protocol / pcep / impl / Activator.java
1 /*
2  * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.protocol.pcep.impl;
9
10 import java.util.ArrayList;
11 import java.util.List;
12
13 import org.opendaylight.protocol.pcep.impl.message.PCEPCloseMessageParser;
14 import org.opendaylight.protocol.pcep.impl.message.PCEPErrorMessageParser;
15 import org.opendaylight.protocol.pcep.impl.message.PCEPKeepAliveMessageParser;
16 import org.opendaylight.protocol.pcep.impl.message.PCEPNotificationMessageParser;
17 import org.opendaylight.protocol.pcep.impl.message.PCEPOpenMessageParser;
18 import org.opendaylight.protocol.pcep.impl.object.PCEPBandwidthObjectParser;
19 import org.opendaylight.protocol.pcep.impl.object.PCEPClassTypeObjectParser;
20 import org.opendaylight.protocol.pcep.impl.object.PCEPCloseObjectParser;
21 import org.opendaylight.protocol.pcep.impl.object.PCEPEndPointsIpv4ObjectParser;
22 import org.opendaylight.protocol.pcep.impl.object.PCEPEndPointsIpv6ObjectParser;
23 import org.opendaylight.protocol.pcep.impl.object.PCEPErrorObjectParser;
24 import org.opendaylight.protocol.pcep.impl.object.PCEPExcludeRouteObjectParser;
25 import org.opendaylight.protocol.pcep.impl.object.PCEPExistingBandwidthObjectParser;
26 import org.opendaylight.protocol.pcep.impl.object.PCEPExplicitRouteObjectParser;
27 import org.opendaylight.protocol.pcep.impl.object.PCEPGlobalConstraintsObjectParser;
28 import org.opendaylight.protocol.pcep.impl.object.PCEPIncludeRouteObjectParser;
29 import org.opendaylight.protocol.pcep.impl.object.PCEPLoadBalancingObjectParser;
30 import org.opendaylight.protocol.pcep.impl.object.PCEPLspaObjectParser;
31 import org.opendaylight.protocol.pcep.impl.object.PCEPMetricObjectParser;
32 import org.opendaylight.protocol.pcep.impl.object.PCEPNoPathObjectParser;
33 import org.opendaylight.protocol.pcep.impl.object.PCEPNotificationObjectParser;
34 import org.opendaylight.protocol.pcep.impl.object.PCEPObjectiveFunctionObjectParser;
35 import org.opendaylight.protocol.pcep.impl.object.PCEPOpenObjectParser;
36 import org.opendaylight.protocol.pcep.impl.object.PCEPPathKeyObjectParser;
37 import org.opendaylight.protocol.pcep.impl.object.PCEPReportedRouteObjectParser;
38 import org.opendaylight.protocol.pcep.impl.object.PCEPRequestParameterObjectParser;
39 import org.opendaylight.protocol.pcep.impl.object.PCEPSvecObjectParser;
40 import org.opendaylight.protocol.pcep.impl.subobject.EROAsNumberSubobjectParser;
41 import org.opendaylight.protocol.pcep.impl.subobject.EROIpv4PrefixSubobjectParser;
42 import org.opendaylight.protocol.pcep.impl.subobject.EROIpv6PrefixSubobjectParser;
43 import org.opendaylight.protocol.pcep.impl.subobject.EROLabelSubobjectParser;
44 import org.opendaylight.protocol.pcep.impl.subobject.EROPathKey128SubobjectParser;
45 import org.opendaylight.protocol.pcep.impl.subobject.EROPathKey32SubobjectParser;
46 import org.opendaylight.protocol.pcep.impl.subobject.EROUnnumberedInterfaceSubobjectParser;
47 import org.opendaylight.protocol.pcep.impl.subobject.GeneralizedLabelParser;
48 import org.opendaylight.protocol.pcep.impl.subobject.RROIpv4PrefixSubobjectParser;
49 import org.opendaylight.protocol.pcep.impl.subobject.RROIpv6PrefixSubobjectParser;
50 import org.opendaylight.protocol.pcep.impl.subobject.RROLabelSubobjectParser;
51 import org.opendaylight.protocol.pcep.impl.subobject.RROPathKey128SubobjectParser;
52 import org.opendaylight.protocol.pcep.impl.subobject.RROPathKey32SubobjectParser;
53 import org.opendaylight.protocol.pcep.impl.subobject.RROUnnumberedInterfaceSubobjectParser;
54 import org.opendaylight.protocol.pcep.impl.subobject.Type1LabelParser;
55 import org.opendaylight.protocol.pcep.impl.subobject.WavebandSwitchingLabelParser;
56 import org.opendaylight.protocol.pcep.impl.subobject.XROAsNumberSubobjectParser;
57 import org.opendaylight.protocol.pcep.impl.subobject.XROIpv4PrefixSubobjectParser;
58 import org.opendaylight.protocol.pcep.impl.subobject.XROIpv6PrefixSubobjectParser;
59 import org.opendaylight.protocol.pcep.impl.subobject.XROPathKey128SubobjectParser;
60 import org.opendaylight.protocol.pcep.impl.subobject.XROPathKey32SubobjectParser;
61 import org.opendaylight.protocol.pcep.impl.subobject.XROSRLGSubobjectParser;
62 import org.opendaylight.protocol.pcep.impl.subobject.XROUnnumberedInterfaceSubobjectParser;
63 import org.opendaylight.protocol.pcep.impl.tlv.NoPathVectorTlvParser;
64 import org.opendaylight.protocol.pcep.impl.tlv.OFListTlvParser;
65 import org.opendaylight.protocol.pcep.impl.tlv.OrderTlvParser;
66 import org.opendaylight.protocol.pcep.impl.tlv.OverloadedDurationTlvParser;
67 import org.opendaylight.protocol.pcep.impl.tlv.ReqMissingTlvParser;
68 import org.opendaylight.protocol.pcep.spi.EROSubobjectRegistry;
69 import org.opendaylight.protocol.pcep.spi.LabelRegistry;
70 import org.opendaylight.protocol.pcep.spi.ObjectRegistry;
71 import org.opendaylight.protocol.pcep.spi.PCEPExtensionProviderContext;
72 import org.opendaylight.protocol.pcep.spi.RROSubobjectRegistry;
73 import org.opendaylight.protocol.pcep.spi.TlvRegistry;
74 import org.opendaylight.protocol.pcep.spi.XROSubobjectRegistry;
75 import org.opendaylight.protocol.pcep.spi.pojo.AbstractPCEPExtensionProviderActivator;
76 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.message.rev131007.Close;
77 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.message.rev131007.Keepalive;
78 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.message.rev131007.Pcerr;
79 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.message.rev131007.Pcntf;
80 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.bandwidth.object.Bandwidth;
81 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.classtype.object.ClassType;
82 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.close.object.CClose;
83 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.endpoints.object.EndpointsObj;
84 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.exclude.route.object.Xro;
85 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.explicit.route.object.Ero;
86 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.explicit.route.object.ero.subobject.subobject.type.PathKeyCase;
87 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.gc.object.Gc;
88 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.include.route.object.Iro;
89 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.load.balancing.object.LoadBalancing;
90 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.lspa.object.Lspa;
91 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.metric.object.Metric;
92 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.notification.object.CNotification;
93 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.of.list.tlv.OfList;
94 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.of.object.Of;
95 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.open.object.Open;
96 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.order.tlv.Order;
97 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.overload.duration.tlv.OverloadDuration;
98 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.pcep.error.object.ErrorObject;
99 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.pcrep.message.pcrep.message.replies.result.failure._case.NoPath;
100 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.pcrep.message.pcrep.message.replies.result.failure._case.no.path.tlvs.NoPathVector;
101 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.reported.route.object.Rro;
102 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.req.missing.tlv.ReqMissing;
103 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.rp.object.Rp;
104 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.svec.object.Svec;
105 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev130820.basic.explicit.route.subobjects.subobject.type.AsNumberCase;
106 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev130820.basic.explicit.route.subobjects.subobject.type.IpPrefixCase;
107 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev130820.basic.explicit.route.subobjects.subobject.type.LabelCase;
108 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev130820.basic.explicit.route.subobjects.subobject.type.SrlgCase;
109 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev130820.basic.explicit.route.subobjects.subobject.type.UnnumberedCase;
110 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev130820.label.subobject.label.type.GeneralizedLabelCase;
111 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev130820.label.subobject.label.type.Type1LabelCase;
112 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev130820.label.subobject.label.type.WavebandSwitchingLabelCase;
113
114 public final class Activator extends AbstractPCEPExtensionProviderActivator {
115         @Override
116         protected List<AutoCloseable> startImpl(final PCEPExtensionProviderContext context) {
117                 final List<AutoCloseable> regs = new ArrayList<>();
118
119                 final LabelRegistry labelReg = context.getLabelHandlerRegistry();
120                 context.registerLabelParser(Type1LabelParser.CTYPE, new Type1LabelParser());
121                 context.registerLabelParser(GeneralizedLabelParser.CTYPE, new GeneralizedLabelParser());
122                 context.registerLabelParser(WavebandSwitchingLabelParser.CTYPE, new WavebandSwitchingLabelParser());
123
124                 context.registerLabelSerializer(Type1LabelCase.class, new Type1LabelParser());
125                 context.registerLabelSerializer(GeneralizedLabelCase.class, new GeneralizedLabelParser());
126                 context.registerLabelSerializer(WavebandSwitchingLabelCase.class, new WavebandSwitchingLabelParser());
127
128                 final EROSubobjectRegistry eroSubReg = context.getEROSubobjectHandlerRegistry();
129                 context.registerEROSubobjectParser(EROIpv4PrefixSubobjectParser.TYPE, new EROIpv4PrefixSubobjectParser());
130                 context.registerEROSubobjectParser(EROIpv6PrefixSubobjectParser.TYPE, new EROIpv6PrefixSubobjectParser());
131                 context.registerEROSubobjectParser(EROAsNumberSubobjectParser.TYPE, new EROAsNumberSubobjectParser());
132                 context.registerEROSubobjectParser(EROLabelSubobjectParser.TYPE, new EROLabelSubobjectParser(labelReg));
133                 context.registerEROSubobjectParser(EROUnnumberedInterfaceSubobjectParser.TYPE, new EROUnnumberedInterfaceSubobjectParser());
134                 context.registerEROSubobjectParser(EROPathKey32SubobjectParser.TYPE, new EROPathKey32SubobjectParser());
135                 context.registerEROSubobjectParser(EROPathKey128SubobjectParser.TYPE, new EROPathKey128SubobjectParser());
136
137                 context.registerEROSubobjectSerializer(IpPrefixCase.class, new EROIpv4PrefixSubobjectParser());
138                 context.registerEROSubobjectSerializer(AsNumberCase.class, new EROAsNumberSubobjectParser());
139                 context.registerEROSubobjectSerializer(LabelCase.class, new EROLabelSubobjectParser(labelReg));
140                 context.registerEROSubobjectSerializer(UnnumberedCase.class, new EROUnnumberedInterfaceSubobjectParser());
141                 context.registerEROSubobjectSerializer(PathKeyCase.class, new EROPathKey32SubobjectParser());
142
143                 final RROSubobjectRegistry rroSubReg = context.getRROSubobjectHandlerRegistry();
144                 context.registerRROSubobjectParser(RROIpv4PrefixSubobjectParser.TYPE, new RROIpv4PrefixSubobjectParser());
145                 context.registerRROSubobjectParser(RROIpv6PrefixSubobjectParser.TYPE, new RROIpv6PrefixSubobjectParser());
146                 context.registerRROSubobjectParser(RROLabelSubobjectParser.TYPE, new RROLabelSubobjectParser(labelReg));
147                 context.registerRROSubobjectParser(RROUnnumberedInterfaceSubobjectParser.TYPE, new RROUnnumberedInterfaceSubobjectParser());
148                 context.registerRROSubobjectParser(RROPathKey32SubobjectParser.TYPE, new RROPathKey32SubobjectParser());
149                 context.registerRROSubobjectParser(RROPathKey128SubobjectParser.TYPE, new RROPathKey128SubobjectParser());
150
151                 context.registerRROSubobjectSerializer(
152                                 org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev130820.record.route.subobjects.subobject.type.IpPrefixCase.class,
153                                 new RROIpv4PrefixSubobjectParser());
154                 context.registerRROSubobjectSerializer(
155                                 org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev130820.record.route.subobjects.subobject.type.LabelCase.class,
156                                 new RROLabelSubobjectParser(labelReg));
157                 context.registerRROSubobjectSerializer(
158                                 org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev130820.record.route.subobjects.subobject.type.UnnumberedCase.class,
159                                 new RROUnnumberedInterfaceSubobjectParser());
160                 context.registerRROSubobjectSerializer(
161                                 org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.reported.route.object.rro.subobject.subobject.type.PathKeyCase.class,
162                                 new RROPathKey32SubobjectParser());
163
164                 final XROSubobjectRegistry xroSubReg = context.getXROSubobjectHandlerRegistry();
165                 context.registerXROSubobjectParser(XROIpv4PrefixSubobjectParser.TYPE, new XROIpv4PrefixSubobjectParser());
166                 context.registerXROSubobjectParser(XROIpv6PrefixSubobjectParser.TYPE, new XROIpv6PrefixSubobjectParser());
167                 context.registerXROSubobjectParser(XROAsNumberSubobjectParser.TYPE, new XROAsNumberSubobjectParser());
168                 context.registerXROSubobjectParser(XROSRLGSubobjectParser.TYPE, new XROSRLGSubobjectParser());
169                 context.registerXROSubobjectParser(XROUnnumberedInterfaceSubobjectParser.TYPE, new XROUnnumberedInterfaceSubobjectParser());
170                 context.registerXROSubobjectParser(XROPathKey32SubobjectParser.TYPE, new XROPathKey32SubobjectParser());
171                 context.registerXROSubobjectParser(XROPathKey128SubobjectParser.TYPE, new XROPathKey128SubobjectParser());
172
173                 context.registerXROSubobjectSerializer(IpPrefixCase.class, new XROIpv4PrefixSubobjectParser());
174                 context.registerXROSubobjectSerializer(AsNumberCase.class, new XROAsNumberSubobjectParser());
175                 context.registerXROSubobjectSerializer(SrlgCase.class, new XROSRLGSubobjectParser());
176                 context.registerXROSubobjectSerializer(UnnumberedCase.class, new XROUnnumberedInterfaceSubobjectParser());
177                 context.registerXROSubobjectSerializer(PathKeyCase.class, new XROPathKey32SubobjectParser());
178
179                 final TlvRegistry tlvReg = context.getTlvHandlerRegistry();
180                 context.registerTlvParser(NoPathVectorTlvParser.TYPE, new NoPathVectorTlvParser());
181                 context.registerTlvParser(OverloadedDurationTlvParser.TYPE, new OverloadedDurationTlvParser());
182                 context.registerTlvParser(ReqMissingTlvParser.TYPE, new ReqMissingTlvParser());
183                 context.registerTlvParser(OFListTlvParser.TYPE, new OFListTlvParser());
184                 context.registerTlvParser(OrderTlvParser.TYPE, new OrderTlvParser());
185
186                 context.registerTlvSerializer(NoPathVector.class, new NoPathVectorTlvParser());
187                 context.registerTlvSerializer(OverloadDuration.class, new OverloadedDurationTlvParser());
188                 context.registerTlvSerializer(ReqMissing.class, new ReqMissingTlvParser());
189                 context.registerTlvSerializer(OfList.class, new OFListTlvParser());
190                 context.registerTlvSerializer(Order.class, new OrderTlvParser());
191
192                 final ObjectRegistry objReg = context.getObjectHandlerRegistry();
193                 context.registerObjectParser(PCEPRequestParameterObjectParser.CLASS, PCEPRequestParameterObjectParser.TYPE,
194                                 new PCEPRequestParameterObjectParser(tlvReg));
195                 context.registerObjectParser(PCEPNoPathObjectParser.CLASS, PCEPNoPathObjectParser.TYPE, new PCEPNoPathObjectParser(tlvReg));
196                 context.registerObjectParser(PCEPEndPointsIpv4ObjectParser.CLASS, PCEPEndPointsIpv4ObjectParser.TYPE,
197                                 new PCEPEndPointsIpv4ObjectParser(tlvReg));
198                 context.registerObjectParser(PCEPEndPointsIpv6ObjectParser.CLASS, PCEPEndPointsIpv6ObjectParser.TYPE,
199                                 new PCEPEndPointsIpv4ObjectParser(tlvReg));
200                 context.registerObjectParser(PCEPBandwidthObjectParser.CLASS, PCEPBandwidthObjectParser.TYPE, new PCEPBandwidthObjectParser(tlvReg));
201                 context.registerObjectParser(PCEPExistingBandwidthObjectParser.CLASS, PCEPExistingBandwidthObjectParser.TYPE,
202                                 new PCEPExistingBandwidthObjectParser(tlvReg));
203                 context.registerObjectParser(PCEPMetricObjectParser.CLASS, PCEPMetricObjectParser.TYPE, new PCEPMetricObjectParser(tlvReg));
204
205                 context.registerObjectParser(PCEPExplicitRouteObjectParser.CLASS, PCEPExplicitRouteObjectParser.TYPE,
206                                 new PCEPExplicitRouteObjectParser(eroSubReg));
207                 context.registerObjectParser(PCEPReportedRouteObjectParser.CLASS, PCEPReportedRouteObjectParser.TYPE,
208                                 new PCEPReportedRouteObjectParser(rroSubReg));
209                 context.registerObjectParser(PCEPLspaObjectParser.CLASS, PCEPLspaObjectParser.TYPE, new PCEPLspaObjectParser(tlvReg));
210                 context.registerObjectParser(PCEPIncludeRouteObjectParser.CLASS, PCEPIncludeRouteObjectParser.TYPE,
211                                 new PCEPIncludeRouteObjectParser(eroSubReg));
212                 context.registerObjectParser(PCEPSvecObjectParser.CLASS, PCEPSvecObjectParser.TYPE, new PCEPSvecObjectParser(tlvReg));
213                 context.registerObjectParser(PCEPNotificationObjectParser.CLASS, PCEPNotificationObjectParser.TYPE,
214                                 new PCEPNotificationObjectParser(tlvReg));
215                 context.registerObjectParser(PCEPErrorObjectParser.CLASS, PCEPErrorObjectParser.TYPE, new PCEPErrorObjectParser(tlvReg));
216                 context.registerObjectParser(PCEPLoadBalancingObjectParser.CLASS, PCEPLoadBalancingObjectParser.TYPE,
217                                 new PCEPLoadBalancingObjectParser(tlvReg));
218                 context.registerObjectParser(PCEPCloseObjectParser.CLASS, PCEPCloseObjectParser.TYPE, new PCEPCloseObjectParser(tlvReg));
219                 context.registerObjectParser(PCEPPathKeyObjectParser.CLASS, PCEPPathKeyObjectParser.TYPE, new PCEPPathKeyObjectParser(eroSubReg));
220                 context.registerObjectParser(PCEPObjectiveFunctionObjectParser.CLASS, PCEPObjectiveFunctionObjectParser.TYPE,
221                                 new PCEPObjectiveFunctionObjectParser(tlvReg));
222                 context.registerObjectParser(PCEPClassTypeObjectParser.CLASS, PCEPClassTypeObjectParser.TYPE, new PCEPClassTypeObjectParser(tlvReg));
223                 context.registerObjectParser(PCEPOpenObjectParser.CLASS, PCEPOpenObjectParser.TYPE, new PCEPOpenObjectParser(tlvReg));
224
225                 context.registerObjectParser(PCEPGlobalConstraintsObjectParser.CLASS, PCEPGlobalConstraintsObjectParser.TYPE,
226                                 new PCEPGlobalConstraintsObjectParser(tlvReg));
227                 context.registerObjectParser(PCEPExcludeRouteObjectParser.CLASS, PCEPExcludeRouteObjectParser.TYPE,
228                                 new PCEPExcludeRouteObjectParser(xroSubReg));
229
230                 context.registerObjectSerializer(Rp.class, new PCEPRequestParameterObjectParser(tlvReg));
231                 context.registerObjectSerializer(NoPath.class, new PCEPNoPathObjectParser(tlvReg));
232                 context.registerObjectSerializer(EndpointsObj.class, new PCEPEndPointsIpv4ObjectParser(tlvReg));
233                 context.registerObjectSerializer(Bandwidth.class, new PCEPBandwidthObjectParser(tlvReg));
234                 context.registerObjectSerializer(Metric.class, new PCEPMetricObjectParser(tlvReg));
235                 context.registerObjectSerializer(Ero.class, new PCEPExplicitRouteObjectParser(eroSubReg));
236                 context.registerObjectSerializer(Rro.class, new PCEPReportedRouteObjectParser(rroSubReg));
237                 context.registerObjectSerializer(Lspa.class, new PCEPLspaObjectParser(tlvReg));
238                 context.registerObjectSerializer(Iro.class, new PCEPIncludeRouteObjectParser(eroSubReg));
239                 context.registerObjectSerializer(Svec.class, new PCEPSvecObjectParser(tlvReg));
240                 context.registerObjectSerializer(CNotification.class, new PCEPNotificationObjectParser(tlvReg));
241                 context.registerObjectSerializer(ErrorObject.class, new PCEPErrorObjectParser(tlvReg));
242                 context.registerObjectSerializer(LoadBalancing.class, new PCEPLoadBalancingObjectParser(tlvReg));
243                 context.registerObjectSerializer(CClose.class, new PCEPCloseObjectParser(tlvReg));
244                 context.registerObjectSerializer(
245                                 org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.path.key.object.PathKey.class,
246                                 new PCEPPathKeyObjectParser(eroSubReg));
247                 context.registerObjectSerializer(Of.class, new PCEPObjectiveFunctionObjectParser(tlvReg));
248                 context.registerObjectSerializer(ClassType.class, new PCEPClassTypeObjectParser(tlvReg));
249                 context.registerObjectSerializer(Gc.class, new PCEPGlobalConstraintsObjectParser(tlvReg));
250                 context.registerObjectSerializer(Xro.class, new PCEPExcludeRouteObjectParser(xroSubReg));
251                 context.registerObjectSerializer(Open.class, new PCEPOpenObjectParser(tlvReg));
252
253                 context.registerMessageParser(PCEPOpenMessageParser.TYPE, new PCEPOpenMessageParser(objReg));
254                 context.registerMessageParser(PCEPKeepAliveMessageParser.TYPE, new PCEPKeepAliveMessageParser(objReg));
255                 context.registerMessageParser(PCEPErrorMessageParser.TYPE, new PCEPErrorMessageParser(objReg));
256                 context.registerMessageParser(PCEPCloseMessageParser.TYPE, new PCEPCloseMessageParser(objReg));
257
258                 context.registerMessageSerializer(
259                                 org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.message.rev131007.Open.class,
260                                 new PCEPOpenMessageParser(objReg));
261                 context.registerMessageSerializer(Pcntf.class, new PCEPNotificationMessageParser(objReg));
262                 context.registerMessageSerializer(Keepalive.class, new PCEPKeepAliveMessageParser(objReg));
263                 context.registerMessageSerializer(Pcerr.class, new PCEPErrorMessageParser(objReg));
264                 context.registerMessageSerializer(Close.class, new PCEPCloseMessageParser(objReg));
265
266                 return regs;
267         }
268 }