7fca996e9e573cccb31fade86e1300ede4d0005e
[ccsdk/features.git] /
1 /*
2  * ============LICENSE_START=======================================================
3  * ONAP : ccsdk features
4  * ================================================================================
5  * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property.
6  * All rights reserved.
7  * ================================================================================
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  *     http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  * ============LICENSE_END=========================================================
20  *
21  */
22 package org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.interfaces;
23
24 import java.util.ArrayList;
25 import java.util.Collection;
26 import java.util.List;
27 import java.util.Map;
28 import java.util.Objects;
29 import org.eclipse.jdt.annotation.NonNull;
30 import org.eclipse.jdt.annotation.Nullable;
31 import org.onap.ccsdk.features.sdnr.wt.common.YangHelper;
32 import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.equipment.Onf14DomEquipmentManager;
33 import org.onap.ccsdk.features.sdnr.wt.devicemanager.onf14.impl.util.Debug;
34 import org.onap.ccsdk.features.sdnr.wt.devicemanager.service.DeviceManagerServiceProvider;
35 import org.onap.ccsdk.features.sdnr.wt.devicemanager.types.FaultData;
36 import org.onap.ccsdk.features.sdnr.wt.netconfnodestateservice.NetconfDomAccessor;
37 import org.opendaylight.mdsal.binding.dom.codec.api.BindingNormalizedNodeSerializer;
38 import org.opendaylight.mdsal.dom.api.DOMNotification;
39 import org.opendaylight.mdsal.dom.api.DOMNotificationListener;
40 import org.opendaylight.yang.gen.v1.urn.onf.yang.air._interface._2._0.rev200121.AttributeValueChangedNotification;
41 import org.opendaylight.yang.gen.v1.urn.onf.yang.air._interface._2._0.rev200121.LAYERPROTOCOLNAMETYPEAIRLAYER;
42 import org.opendaylight.yang.gen.v1.urn.onf.yang.air._interface._2._0.rev200121.LayerProtocol1;
43 import org.opendaylight.yang.gen.v1.urn.onf.yang.air._interface._2._0.rev200121.ObjectCreationNotification;
44 import org.opendaylight.yang.gen.v1.urn.onf.yang.air._interface._2._0.rev200121.ObjectDeletionNotification;
45 import org.opendaylight.yang.gen.v1.urn.onf.yang.air._interface._2._0.rev200121.ProblemNotification;
46 import org.opendaylight.yang.gen.v1.urn.onf.yang.air._interface._2._0.rev200121.air._interface.lp.spec.AirInterfacePac;
47 import org.opendaylight.yang.gen.v1.urn.onf.yang.air._interface._2._0.rev200121.air._interface.pac.AirInterfaceCurrentProblems;
48 import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.ControlConstruct;
49 import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.LAYERPROTOCOLNAMETYPE;
50 import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.UniversalId;
51 import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.control.construct.LogicalTerminationPoint;
52 import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.control.construct.LogicalTerminationPointKey;
53 import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.logical.termination.point.LayerProtocol;
54 import org.opendaylight.yang.gen.v1.urn.onf.yang.core.model._1._4.rev191127.logical.termination.point.LayerProtocolKey;
55 import org.opendaylight.yang.gen.v1.urn.onf.yang.ethernet.container._2._0.rev200121.LAYERPROTOCOLNAMETYPEETHERNETCONTAINERLAYER;
56 import org.opendaylight.yang.gen.v1.urn.onf.yang.wire._interface._2._0.rev200123.LAYERPROTOCOLNAMETYPEWIRELAYER;
57 import org.opendaylight.yangtools.yang.binding.Notification;
58 import org.opendaylight.yangtools.yang.common.QName;
59 import org.slf4j.Logger;
60 import org.slf4j.LoggerFactory;
61
62 /*
63 * Notifications streams provided by device NTSSim ONF14
64 * Stream{getName=StreamNameType{_value=nc-notifications}, isReplaySupport=true, augmentation=[]},
65 * Stream{getName=StreamNameType{_value=hybrid-mw-structure-2-0}, isReplaySupport=true, augmentation=[]},
66 * Stream{getName=StreamNameType{_value=vlan-interface-1-0}, isReplaySupport=true, augmentation=[]},
67 * Stream{getName=StreamNameType{_value=tdm-container-2-0}, isReplaySupport=true, augmentation=[]},
68 * Stream{getName=StreamNameType{_value=ethernet-container-2-0}, isReplaySupport=true, augmentation=[]},
69 * Stream{getName=StreamNameType{_value=ietf-yang-library}, isReplaySupport=false, augmentation=[]},
70 * Stream{getDescription=Default NETCONF stream containing all the Event Notifications., getName=StreamNameType{_value=NETCONF}, isReplaySupport=true, augmentation=[]},
71 * Stream{getName=StreamNameType{_value=vlan-fd-1-0}, isReplaySupport=true, augmentation=[]},
72 * Stream{getName=StreamNameType{_value=wire-interface-2-0}, isReplaySupport=true, augmentation=[]},
73 * Stream{getName=StreamNameType{_value=mac-fd-1-0}, isReplaySupport=true, augmentation=[]},
74 * Stream{getName=StreamNameType{_value=co-channel-profile-1-0}, isReplaySupport=true, augmentation=[]},
75 * Stream{getName=StreamNameType{_value=mac-interface-1-0}, isReplaySupport=true, augmentation=[]},
76 * Stream{getName=StreamNameType{_value=ietf-keystore}, isReplaySupport=true, augmentation=[]},
77 * Stream{getName=StreamNameType{_value=pure-ethernet-structure-2-0}, isReplaySupport=true, augmentation=[]},
78 * Stream{getName=StreamNameType{_value=ietf-netconf-notifications}, isReplaySupport=true, augmentation=[]},
79 * Stream{getName=StreamNameType{_value=mac-fc-1-0}, isReplaySupport=true, augmentation=[]},
80 * Stream{getName=StreamNameType{_value=wred-profile-1-0}, isReplaySupport=true, augmentation=[]},
81 * Stream{getName=StreamNameType{_value=air-interface-2-0}, isReplaySupport=true, augmentation=[]},
82 * Stream{getName=StreamNameType{_value=ip-interface-1-0}, isReplaySupport=true, augmentation=[]},
83 * Stream{getName=StreamNameType{_value=qos-profile-1-0}, isReplaySupport=true, augmentation=[]},
84 * Stream{getName=StreamNameType{_value=vlan-fc-1-0}, isReplaySupport=true, augmentation=[]},
85 * Stream{getName=StreamNameType{_value=l-3vpn-profile-1-0}, isReplaySupport=true, augmentation=[]}]
86 */
87
88 public class Onf14DomInterfacePacManager implements DOMNotificationListener {
89
90     // constants
91     private static final Logger log = LoggerFactory.getLogger(Onf14DomEquipmentManager.class);
92     // end of constants
93
94     // variables
95     private final NetconfDomAccessor netconfDomAccessor;
96     private final @NonNull DeviceManagerServiceProvider serviceProvider;
97
98     // air interface related members
99     private final List<TechnologySpecificPacKeys> airInterfaceList = new ArrayList<TechnologySpecificPacKeys>();
100     private @NonNull final Onf14AirInterfaceNotificationListener airInterfaceNotificationListener;
101
102     // ethernet container related members
103     private final List<TechnologySpecificPacKeys> ethernetContainerList = new ArrayList<TechnologySpecificPacKeys>();
104     private @NonNull final Onf14EthernetContainerNotificationListener ethernetContainerNotificationListener;
105
106     // wire interface related members
107     private final List<TechnologySpecificPacKeys> wireInterfaceList = new ArrayList<TechnologySpecificPacKeys>();
108     private @NonNull final Onf14WireInterfaceNotificationListener wireInterfaceNotificationListener;
109     private @NonNull final BindingNormalizedNodeSerializer serializer;
110     // end of variables
111
112
113     // constructors
114     public Onf14DomInterfacePacManager(@NonNull NetconfDomAccessor netconfDomAccessor,
115             @NonNull DeviceManagerServiceProvider serviceProvider) {
116
117         this.netconfDomAccessor = Objects.requireNonNull(netconfDomAccessor);
118         this.serviceProvider = Objects.requireNonNull(serviceProvider);
119         this.serializer = Objects.requireNonNull(netconfDomAccessor.getBindingNormalizedNodeSerializer());
120
121         this.airInterfaceNotificationListener =
122                 new Onf14AirInterfaceNotificationListener(netconfDomAccessor, serviceProvider);
123         this.ethernetContainerNotificationListener =
124                 new Onf14EthernetContainerNotificationListener(netconfDomAccessor, serviceProvider);
125         this.wireInterfaceNotificationListener =
126                 new Onf14WireInterfaceNotificationListener(netconfDomAccessor, serviceProvider);
127     }
128     // end of constructors
129
130     // getters and setters
131     // end of getters and setters
132
133     // private methods
134     // end of private methods
135
136     // public methods
137     public void readAllAirInterfaceCurrentProblems(NetconfDomAccessor netconfDomAccessor,
138             ControlConstruct controlConstruct, FaultData resultList) {
139
140         int idxStart; // Start index for debug messages
141
142         for (TechnologySpecificPacKeys key : airInterfaceList) {
143             idxStart = resultList.size();
144
145             readAirInterfaceCurrentProblemForLtp(netconfDomAccessor, controlConstruct, key.getLtpUuid(),
146                     key.getLocalId(), resultList);
147             Debug.debugResultList(key.getLtpUuid().getValue(), resultList, idxStart);
148         }
149     }
150
151     /*
152     public void readAllEhernetContainerCurrentProblems(FaultData resultList) {
153
154         int idxStart; // Start index for debug messages
155
156         for (TechnologySpecificPacKeys key : ethernetContainerList) {
157             idxStart = resultList.size();
158
159             readEthernetConainerCurrentProblemForLtp(key.getLtpUuid(), key.getLocalId(), resultList);
160             debugResultList(key.getLtpUuid().getValue(), resultList, idxStart);
161         }
162     }
163
164     public void readAllWireInterfaceCurrentProblems(FaultData resultList) {
165
166         int idxStart; // Start index for debug messages
167
168         for (TechnologySpecificPacKeys key : wireInterfaceList) {
169             idxStart = resultList.size();
170
171             readWireInterfaceCurrentProblemForLtp(key.getLtpUuid(), key.getLocalId(), resultList);
172             debugResultList(key.getLtpUuid().getValue(), resultList, idxStart);
173         }
174     }*/
175     public void readKeys(ControlConstruct controlConstruct) {
176
177         @NonNull
178         Collection<LogicalTerminationPoint> ltpList =
179                 YangHelper.getCollection(controlConstruct.nonnullLogicalTerminationPoint());
180         log.debug("Iterating the LTP list for node {}", netconfDomAccessor.getNodeId().getValue());
181
182         // iterating all the Logical Termination Point list
183         for (LogicalTerminationPoint ltp : ltpList) {
184             @NonNull
185             List<LayerProtocol> lpList = YangHelper.getList(ltp.nonnullLayerProtocol());
186             // the Layer Protocol list should contain only one item, since we have an 1:1 relationship between the LTP and the LP
187             if (lpList.size() != 1) {
188                 log.debug("Layer protocol has no 1:1 relationship with the LTP.");
189                 return;
190             }
191             // accessing the LP, which should be only 1
192             LayerProtocol lp = lpList.get(0);
193             @Nullable
194             Class<? extends LAYERPROTOCOLNAMETYPE> layerProtocolName = lp.getLayerProtocolName();
195             if (layerProtocolName != null) {
196                 // if the LTP has an airInterface technology extension, the layer protocol name is air-layer
197                 if (layerProtocolName.getTypeName() == LAYERPROTOCOLNAMETYPEAIRLAYER.class.getName()) {
198                     TechnologySpecificPacKeys airInterfaceKey =
199                             new TechnologySpecificPacKeys(ltp.getUuid(), lp.getLocalId());
200                     airInterfaceList.add(airInterfaceKey);
201                     log.debug("Adding Ltp with uuid {} and local-id {} to the air-interface list",
202                             ltp.getUuid().getValue(), lp.getLocalId());
203                 }
204                 // if the LTP has an ethernetContainier technology extension, the layer protocol name is ethernet-container-layer
205                 else if (layerProtocolName.getTypeName() == LAYERPROTOCOLNAMETYPEETHERNETCONTAINERLAYER.class
206                         .getName()) {
207                     TechnologySpecificPacKeys ethernetContainerKey =
208                             new TechnologySpecificPacKeys(ltp.getUuid(), lp.getLocalId());
209                     ethernetContainerList.add(ethernetContainerKey);
210                     log.debug("Adding Ltp with uuid {} and local-id {} to the ethernet-contatinier list",
211                             ltp.getUuid().getValue(), lp.getLocalId());
212                 } else if (layerProtocolName.getTypeName() == LAYERPROTOCOLNAMETYPEWIRELAYER.class.getName()) {
213                     TechnologySpecificPacKeys wireInterfaceKey =
214                             new TechnologySpecificPacKeys(ltp.getUuid(), lp.getLocalId());
215                     wireInterfaceList.add(wireInterfaceKey);
216                     log.debug("Adding Ltp with uuid {} and local-id {} to the wire-interface list",
217                             ltp.getUuid().getValue(), lp.getLocalId());
218                 }
219             }
220         }
221     }
222
223     private static void readAirInterfaceCurrentProblemForLtp(NetconfDomAccessor netconfDomAccessor,
224             ControlConstruct controlConstruct, UniversalId ltpUuid, String localId, FaultData resultList) {
225
226         final Class<AirInterfacePac> clazzPac = AirInterfacePac.class;
227
228         log.info("DBRead Get current problems for class {} from mountpoint {} for LTP uuid {} and local-id {}",
229                 clazzPac.getSimpleName(), netconfDomAccessor.getNodeId().getValue(), ltpUuid.getValue(), localId);
230
231         // constructing the IID needs the augmentation exposed byy the air-interface-2-0 model
232         //        InstanceIdentifier<AirInterfaceCurrentProblems> airInterfaceCurrentProblem_IID = InstanceIdentifier
233         //                .builder(ControlConstruct.class)
234         //                .child(LogicalTerminationPoint.class, new LogicalTerminationPointKey(ltpUuid))
235         //                .child(LayerProtocol.class, new LayerProtocolKey(localId))
236         //                .augmentation(
237         //                        org.opendaylight.yang.gen.v1.urn.onf.yang.air._interface._2._0.rev200121.LayerProtocol1.class)
238         //                .child(AirInterfacePac.class)
239         //                .child(AirInterfaceCurrentProblems.class).build();
240         /*
241         final YangInstanceIdentifier airInterfaceCurrentProblem_IID =
242                 YangInstanceIdentifier.builder().node(ControlConstruct.QNAME)
243                         .nodeWithKey(LogicalTerminationPoint.QNAME,
244                                 QName.create(LogicalTerminationPoint.QNAME, "logical-termination-point-key").intern(),
245                                 ltpUuid.getValue())
246                         .nodeWithKey(LayerProtocol.QNAME,
247                                 QName.create(LayerProtocol.QNAME, "layer-protocol-key").intern(), localId)
248                         //.node(org.opendaylight.yang.gen.v1.urn.onf.yang.air._interface._2._0.rev200121.LayerProtocol1.QNAME)
249                         .node(AirInterfacePac.QNAME).node(AirInterfaceCurrentProblems.QNAME).build();
250
251         // reading all the current-problems list for this specific LTP and LP
252         AirInterfaceCurrentProblems problems =
253                  netconfDomAccessor.readData(LogicalDatastoreType.OPERATIONAL, airInterfaceCurrentProblem_IID);
254          */
255
256         @NonNull
257         Map<LogicalTerminationPointKey, LogicalTerminationPoint> ltpMap =
258                 controlConstruct.nonnullLogicalTerminationPoint();
259         LogicalTerminationPoint ltp = ltpMap.get(new LogicalTerminationPointKey(ltpUuid));
260         if (ltp != null) {
261             @NonNull
262             Map<LayerProtocolKey, LayerProtocol> lpMap = ltp.nonnullLayerProtocol();
263             LayerProtocol lp = lpMap.get(new LayerProtocolKey(localId));
264             @Nullable
265             LayerProtocol1 lp1 = lp.augmentation(
266                     org.opendaylight.yang.gen.v1.urn.onf.yang.air._interface._2._0.rev200121.LayerProtocol1.class);
267             if (lp1 != null) {
268                 @Nullable
269                 AirInterfacePac airInterfacePack = lp1.getAirInterfacePac();
270                 if (airInterfacePack != null) {
271                     @Nullable
272                     AirInterfaceCurrentProblems cp = airInterfacePack.getAirInterfaceCurrentProblems();
273                     if (cp == null) {
274                         log.debug("DBRead Id {} no AirInterfaceCurrentProblems", ltpUuid);
275                     } else {
276                         for (org.opendaylight.yang.gen.v1.urn.onf.yang.air._interface._2._0.rev200121.air._interface.current.problems.CurrentProblemList problem : YangHelper
277                                 .getCollection(cp.nonnullCurrentProblemList())) {
278                             resultList.add(netconfDomAccessor.getNodeId(), (int) problem.getSequenceNumber(),
279                                     problem.getTimestamp(), ltpUuid.getValue(), problem.getProblemName(),
280                                     Onf14AirInterface.mapSeverity(problem.getProblemSeverity()));
281                         }
282                     }
283                 }
284             }
285         }
286     }
287
288     @Override
289     public void onNotification(@NonNull DOMNotification domNotification) {
290         @Nullable
291         Notification notification =
292                 serializer.fromNormalizedNodeNotification(domNotification.getType(), domNotification.getBody());
293         if (notification instanceof ProblemNotification) {
294             ProblemNotification problemNotification = (ProblemNotification) notification;
295             log.debug("DOM ProblemNotification: {}", problemNotification);
296             airInterfaceNotificationListener.onProblemNotification(problemNotification);
297         } else if (notification instanceof AttributeValueChangedNotification) {
298             AttributeValueChangedNotification attributeValueChangeNotification =
299                     (AttributeValueChangedNotification) notification;
300             log.debug("DOM AttributeValueChangedNotification: {}", attributeValueChangeNotification);
301             airInterfaceNotificationListener.onAttributeValueChangedNotification(attributeValueChangeNotification);
302         } else if (notification instanceof ObjectDeletionNotification) {
303             ObjectDeletionNotification objectDeletionNotification = (ObjectDeletionNotification) notification;
304             log.debug("DOM ObjectDeletionNotification: {}", objectDeletionNotification);
305             airInterfaceNotificationListener.onObjectDeletionNotification(objectDeletionNotification);
306         } else if (notification instanceof ObjectCreationNotification) {
307             ObjectCreationNotification objectCreationNotification = (ObjectCreationNotification) notification;
308             log.debug("DOM ObjectDeletionNotification: {}", objectCreationNotification);
309             airInterfaceNotificationListener.onObjectCreationNotification(objectCreationNotification);
310         } else {
311             log.warn("DOM Notification ignored: {}", domNotification);
312         }
313     }
314
315     /**
316      * Register notifications to handle
317      */
318     public void subscribeNotifications() {
319         QName[] notifications = { ObjectCreationNotification.QNAME, ObjectDeletionNotification.QNAME,
320                 AttributeValueChangedNotification.QNAME, ProblemNotification.QNAME };
321         netconfDomAccessor.doRegisterNotificationListener(this, notifications);
322     }
323
324     /*
325     private void readEthernetConainerCurrentProblemForLtp(UniversalId ltpUuid, String localId, FaultData resultList) {
326
327         final Class<EthernetContainerPac> clazzPac = EthernetContainerPac.class;
328
329         log.info("DBRead Get current problems for class {} from mountpoint {} for LTP uuid {} and local-id {}",
330                 clazzPac.getSimpleName(), netconfDomAccessor.getNodeId().getValue(), ltpUuid.getValue(), localId);
331
332         // constructing the IID needs the augmentation exposed by the ethernet-container-2-0 model
333         //        InstanceIdentifier<EthernetContainerCurrentProblems> etherneContainerCurrentProblem_IID = InstanceIdentifier
334         //                .builder(ControlConstruct.class)
335         //                .child(LogicalTerminationPoint.class, new LogicalTerminationPointKey(ltpUuid))
336         //                .child(LayerProtocol.class, new LayerProtocolKey(localId))
337         //                .augmentation(
338         //                        org.opendaylight.yang.gen.v1.urn.onf.yang.ethernet.container._2._0.rev200121.LayerProtocol1.class)
339         //                .child(EthernetContainerPac.class).child(EthernetContainerCurrentProblems.class).build();
340         final YangInstanceIdentifier etherneContainerCurrentProblem_IID =
341                 YangInstanceIdentifier.builder().node(ControlConstruct.QNAME)
342                         .nodeWithKey(LogicalTerminationPoint.QNAME,
343                                 QName.create(LogicalTerminationPoint.QNAME, "logical-termination-point-key").intern(),
344                                 ltpUuid.getValue())
345                         .nodeWithKey(LayerProtocol.QNAME,
346                                 QName.create(LayerProtocol.QNAME, "layer-protocol-key").intern(), localId)
347                         //.node(org.opendaylight.yang.gen.v1.urn.onf.yang.ethernet.container._2._0.rev200121.LayerProtocol1.QNAME)
348                         .node(EthernetContainerPac.QNAME).node(EthernetContainerCurrentProblems.QNAME).build();
349
350         // reading all the current-problems list for this specific LTP and LP
351         EthernetContainerCurrentProblems problems =
352                 netconfDomAccessor.readData(LogicalDatastoreType.OPERATIONAL, etherneContainerCurrentProblem_IID);
353
354         if (problems == null) {
355             log.debug("DBRead Id {} no EthernetContainerCurrentProblems", ltpUuid);
356         } else if (problems.getCurrentProblemList() == null) {
357             log.debug("DBRead Id {} empty CurrentProblemList", ltpUuid);
358         } else {
359             for (org.opendaylight.yang.gen.v1.urn.onf.yang.ethernet.container._2._0.rev200121.ethernet.container.current.problems.CurrentProblemList problem : YangHelper
360                     .getCollection(problems.nonnullCurrentProblemList())) {
361                 resultList.add(netconfDomAccessor.getNodeId(), (int) problem.getSequenceNumber(),
362                         problem.getTimestamp(), ltpUuid.getValue(), problem.getProblemName(),
363                         Onf14EthernetContainer.mapSeverity(problem.getProblemSeverity()));
364             }
365         }
366     }
367
368     private void readWireInterfaceCurrentProblemForLtp(UniversalId ltpUuid, String localId, FaultData resultList) {
369
370         final Class<WireInterfacePac> clazzPac = WireInterfacePac.class;
371
372         log.info("DBRead Get current problems for class {} from mountpoint {} for LTP uuid {} and local-id {}",
373                 clazzPac.getSimpleName(), netconfDomAccessor.getNodeId().getValue(), ltpUuid.getValue(), localId);
374
375         // constructing the IID needs the augmentation exposed by the wire-interface-2-0 model
376         //        InstanceIdentifier<WireInterfaceCurrentProblems> wireInterfaceCurrentProblem_IID = InstanceIdentifier
377         //                .builder(ControlConstruct.class)
378         //                .child(LogicalTerminationPoint.class, new LogicalTerminationPointKey(ltpUuid))
379         //                .child(LayerProtocol.class, new LayerProtocolKey(localId))
380         //                .augmentation(
381         //                        org.opendaylight.yang.gen.v1.urn.onf.yang.wire._interface._2._0.rev200123.LayerProtocol1.class)
382         //                .child(WireInterfacePac.class).child(WireInterfaceCurrentProblems.class).build();
383         final YangInstanceIdentifier wireInterfaceCurrentProblem_IID =
384                 YangInstanceIdentifier.builder().node(ControlConstruct.QNAME)
385                         .nodeWithKey(LogicalTerminationPoint.QNAME,
386                                 QName.create(LogicalTerminationPoint.QNAME, "logical-termination-point-key").intern(),
387                                 ltpUuid.getValue())
388                         .nodeWithKey(LayerProtocol.QNAME,
389                                 QName.create(LayerProtocol.QNAME, "layer-protocol-key").intern(), localId)
390                         //.node(org.opendaylight.yang.gen.v1.urn.onf.yang.wire._interface._2._0.rev200123.LayerProtocol1.QNAME)
391                         .node(WireInterfacePac.QNAME).node(WireInterfaceCurrentProblems.QNAME).build();
392
393         // reading all the current-problems list for this specific LTP and LP
394         WireInterfaceCurrentProblems problems =
395                 netconfDomAccessor.readData(LogicalDatastoreType.OPERATIONAL, wireInterfaceCurrentProblem_IID);
396
397         if (problems == null) {
398             log.debug("DBRead Id {} no WireInterfaceCurrentProblems", ltpUuid);
399         } else if (problems.getCurrentProblemList() == null) {
400             log.debug("DBRead Id {} empty CurrentProblemList", ltpUuid);
401         } else {
402             for (org.opendaylight.yang.gen.v1.urn.onf.yang.wire._interface._2._0.rev200123.wire._interface.current.problems.CurrentProblemList problem : YangHelper
403                     .getCollection(problems.nonnullCurrentProblemList())) {
404                 resultList.add(netconfDomAccessor.getNodeId(), (int) problem.getSequenceNumber(),
405                         problem.getTimestamp(), ltpUuid.getValue(), problem.getProblemName(),
406                         Onf14WireInterface.mapSeverity(problem.getProblemSeverity()));
407             }
408         }
409     }
410     */
411
412     // end of public methods
413
414     // static methods
415     // end of static methods
416
417     // private classes
418     // end of private classes
419 }