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