Bump to Magnesium dependencies
[transportpce.git] / pce / src / main / java / org / opendaylight / transportpce / pce / networkanalyzer / PceOtnNode.java
1 /*
2  * Copyright © 2019 Orange, 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
9 package org.opendaylight.transportpce.pce.networkanalyzer;
10
11 import java.util.ArrayList;
12 import java.util.Comparator;
13 import java.util.HashMap;
14 import java.util.List;
15 import java.util.Map;
16 import java.util.TreeMap;
17 import java.util.stream.Collectors;
18
19 import org.eclipse.jdt.annotation.Nullable;
20 import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.types.rev181130.xpdr.odu.switching.pools.OduSwitchingPools;
21 import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.types.rev181130.xpdr.odu.switching.pools.odu.switching.pools.NonBlockingList;
22 import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev181130.OpenroadmNodeType;
23 import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev181130.OpenroadmTpType;
24 import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev181130.xpdr.tp.supported.interfaces.SupportedInterfaceCapability;
25 import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.common.types.rev181130.ODTU4TsAllocated;
26 import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev181130.Node1;
27 import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev181130.TerminationPoint1;
28 import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev181130.networks.network.node.SwitchingPools;
29 import org.opendaylight.yang.gen.v1.http.org.openroadm.port.types.rev181130.If100GEODU4;
30 import org.opendaylight.yang.gen.v1.http.org.openroadm.port.types.rev181130.If10GEODU2e;
31 import org.opendaylight.yang.gen.v1.http.org.openroadm.port.types.rev181130.If1GEODU0;
32 import org.opendaylight.yang.gen.v1.http.org.openroadm.port.types.rev181130.IfOCHOTU4ODU4;
33 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.NodeId;
34 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.network.Node;
35 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.TpId;
36 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.networks.network.node.TerminationPoint;
37 import org.opendaylight.yangtools.yang.common.Uint16;
38 import org.slf4j.Logger;
39 import org.slf4j.LoggerFactory;
40
41 public class PceOtnNode implements PceNode {
42     /* Logging. */
43     private static final Logger LOG = LoggerFactory.getLogger(PceCalculation.class);
44     ////////////////////////// OTN NODES ///////////////////////////
45     /*
46      * For This Class the node passed shall be at the otn-openroadm Layer
47      */
48
49     private boolean valid = true;
50
51     private final Node node;
52     private final NodeId nodeId;
53     private final OpenroadmNodeType nodeType;
54     private final String pceNodeType;
55     private final String otnServiceType;
56
57     private Map<String, List<Uint16>> tpAvailableTribPort = new TreeMap<String, List<Uint16>>();
58     private Map<String, List<Uint16>> tpAvailableTribSlot = new TreeMap<String, List<Uint16>>();
59     private Map<String, OpenroadmTpType> availableXponderTp = new TreeMap<String, OpenroadmTpType>();
60     private List<String> usedXpdrNWTps = new ArrayList<String>();
61     private List<TpId> availableXpdrNWTps;
62     private List<TpId> usableXpdrNWTps;
63     private List<String> usedXpdrClientTps = new ArrayList<String>();
64     private List<TpId> availableXpdrClientTps;
65     private List<TpId> usableXpdrClientTps;
66
67     private List<PceLink> outgoingLinks = new ArrayList<PceLink>();
68     private Map<String, String> clientPerNwTp = new HashMap<String, String>();
69
70     public PceOtnNode(Node node, OpenroadmNodeType nodeType, NodeId nodeId, String pceNodeType, String serviceType) {
71         this.node = node;
72         this.nodeId = nodeId;
73         this.nodeType = nodeType;
74         this.pceNodeType = pceNodeType;
75         this.otnServiceType = serviceType;
76         this.tpAvailableTribSlot.clear();
77         this.usedXpdrNWTps.clear();
78         this.availableXpdrNWTps = new ArrayList<TpId>();
79         this.usableXpdrNWTps = new ArrayList<TpId>();
80         this.usedXpdrClientTps.clear();
81         this.availableXpdrClientTps = new ArrayList<TpId>();
82         this.usableXpdrClientTps = new ArrayList<TpId>();
83         this.tpAvailableTribPort.clear();
84         checkAvailableTribPort();
85         this.tpAvailableTribSlot.clear();
86         checkAvailableTribSlot();
87         if ((node == null) || (nodeId == null) || (nodeType != OpenroadmNodeType.MUXPDR)
88             && (nodeType != OpenroadmNodeType.SWITCH) && (nodeType != OpenroadmNodeType.TPDR)) {
89             LOG.error("PceOtnNode: one of parameters is not populated : nodeId, node type");
90             this.valid = false;
91         }
92     }
93
94     public void initXndrTps(String mode) {
95         LOG.info("PceOtnNode: initXndrTps for node {}", this.nodeId.getValue());
96         this.availableXponderTp.clear();
97
98         org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.Node1 nodeTp
99             = this.node.augmentation(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang
100                 .ietf.network.topology.rev180226.Node1.class);
101         List<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.networks.network
102             .node.TerminationPoint> allTps = nodeTp.getTerminationPoint();
103         this.valid = false;
104         if (allTps == null) {
105             LOG.error("PceOtnNode: initXndrTps: XPONDER TerminationPoint list is empty for node {}", this.toString());
106             return;
107         }
108
109         for (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.networks.network
110             .node.TerminationPoint tp : allTps) {
111             org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev181130.@Nullable TerminationPoint1 ocnTp1
112                 = tp.augmentation(org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev181130
113                 .TerminationPoint1.class);
114             //TODO many nested if-structures below, this needs to be reworked
115             if (OpenroadmTpType.XPONDERNETWORK.equals(ocnTp1.getTpType()) && this.otnServiceType.equals("ODU4")) {
116                 TerminationPoint1 ontTp1;
117                 if (tp.augmentation(TerminationPoint1.class) != null) {
118                     ontTp1 = tp.augmentation(TerminationPoint1.class);
119                 } else {
120                     continue;
121                 }
122                 if (checkTpForOdtuTermination(ontTp1)) {
123                     LOG.info("TP {} of XPONDER {} is validated", tp.getTpId(), node.getNodeId().getValue());
124                     this.availableXpdrNWTps.add(tp.getTpId());
125                 } else {
126                     LOG.error("TP {} of {} does not allow ODU4 termination creation", tp.getTpId().getValue(),
127                         node.getNodeId().getValue());
128                 }
129             } else if (OpenroadmTpType.XPONDERNETWORK.equals(ocnTp1.getTpType())
130                 && (this.otnServiceType.equals("10GE") || this.otnServiceType.equals("1GE"))) {
131                 TerminationPoint1 ontTp1;
132                 if (tp.augmentation(TerminationPoint1.class) != null) {
133                     ontTp1 = tp.augmentation(TerminationPoint1.class);
134                 } else {
135                     continue;
136                 }
137                 if ("10GE".equals(otnServiceType) && checkOdtuTTPforLoOduCreation(ontTp1, 10)
138                     || "1GE".equals(otnServiceType) && checkOdtuTTPforLoOduCreation(ontTp1, 1)) {
139                     LOG.info("TP {} of XPONDER {} is validated", tp.getTpId(), node.getNodeId().getValue());
140                     this.availableXpdrNWTps.add(tp.getTpId());
141                 } else {
142                     if ("10GE".equals(otnServiceType)) {
143                         LOG.error("TP {} of {} does not allow OD2e termination creation", tp.getTpId().getValue(),
144                             node.getNodeId().getValue());
145                     } else if ("1GE".equals(otnServiceType)) {
146                         LOG.error("TP {} of {} does not allow ODU0 termination creation", tp.getTpId().getValue(),
147                             node.getNodeId().getValue());
148                     } else {
149                         LOG.error("TP {} of {} does not allow any termination creation", tp.getTpId().getValue(),
150                             node.getNodeId().getValue());
151                     }
152                 }
153             } else if (OpenroadmTpType.XPONDERCLIENT.equals(ocnTp1.getTpType())
154                 && (this.otnServiceType.equals("10GE") || this.otnServiceType.equals("1GE"))) {
155                 TerminationPoint1 ontTp1;
156                 if (tp.augmentation(TerminationPoint1.class) != null) {
157                     ontTp1 = tp.augmentation(TerminationPoint1.class);
158                 } else {
159                     continue;
160                 }
161                 if (checkClientTp(ontTp1)) {
162                     LOG.info("TP {} of XPONDER {} is validated", tp.getTpId(), node.getNodeId().getValue());
163                     this.availableXpdrClientTps.add(tp.getTpId());
164                 } else {
165                     LOG.error("TP {} of {} does not allow lo-ODU (ODU2e or ODU0) termination creation",
166                         tp.getTpId().getValue(), node.getNodeId().getValue());
167                 }
168             }
169         }
170
171         if ((this.otnServiceType.equals("ODU4") && mode.equals("AZ"))
172             || ((this.otnServiceType.equals("10GE") || this.otnServiceType.equals("1GE"))
173                 && mode.equals("AZ") && checkSwPool(availableXpdrClientTps, availableXpdrNWTps, 1, 1))
174             || ((this.otnServiceType.equals("10GE") || this.otnServiceType.equals("1GE"))
175                 && mode.equals("intermediate") && checkSwPool(null, availableXpdrNWTps, 0, 2))) {
176             this.valid = true;
177         } else {
178             this.valid = false;
179         }
180     }
181
182     private boolean checkSwPool(List<TpId> clientTps, List<TpId> netwTps, int nbClient, int nbNetw) {
183         if (clientTps != null && netwTps != null && nbClient == 1 && nbNetw == 1) {
184             clientTps.sort(Comparator.comparing(TpId::getValue));
185             netwTps.sort(Comparator.comparing(TpId::getValue));
186             for (TpId nwTp : netwTps) {
187                 for (TpId clTp : clientTps) {
188                     @Nullable
189                     List<NonBlockingList> nblList = node.augmentation(Node1.class).getSwitchingPools()
190                         .getOduSwitchingPools().get(0).getNonBlockingList();
191                     for (NonBlockingList nbl : nblList) {
192                         if (nbl.getTpList().contains(clTp) && nbl.getTpList().contains(nwTp)) {
193                             usableXpdrClientTps.add(clTp);
194                             usableXpdrNWTps.add(nwTp);
195                         }
196                         if (usableXpdrClientTps.size() >= nbClient && usableXpdrNWTps.size() >= nbNetw) {
197                             clientPerNwTp.put(nwTp.getValue(), clTp.getValue());
198                             return true;
199                         }
200                     }
201                 }
202             }
203
204         }
205         if (clientTps == null && netwTps != null && nbClient == 0 && nbNetw == 2) {
206             netwTps.sort(Comparator.comparing(TpId::getValue));
207             @Nullable
208             List<NonBlockingList> nblList = node.augmentation(Node1.class).getSwitchingPools().getOduSwitchingPools()
209                 .get(0).getNonBlockingList();
210             for (NonBlockingList nbl : nblList) {
211                 for (TpId nwTp : netwTps) {
212                     if (nbl.getTpList().contains(nwTp)) {
213                         usableXpdrNWTps.add(nwTp);
214                     }
215                     if (usableXpdrNWTps.size() >= nbNetw) {
216                         return true;
217                     }
218                 }
219             }
220         }
221         return false;
222     }
223
224     private boolean checkTpForOdtuTermination(TerminationPoint1 ontTp1) {
225         for (SupportedInterfaceCapability sic : ontTp1.getTpSupportedInterfaces().getSupportedInterfaceCapability()) {
226             LOG.debug("in checkTpForOduTermination - sic = {}", sic.getIfCapType());
227             if (sic.getIfCapType().equals(IfOCHOTU4ODU4.class)
228                 && ontTp1.getXpdrTpPortConnectionAttributes().getTsPool() == null) {
229                 return true;
230             }
231         }
232         return false;
233     }
234
235     private boolean checkOdtuTTPforLoOduCreation(TerminationPoint1 ontTp1, int tsNb) {
236         if (ontTp1.getXpdrTpPortConnectionAttributes() != null
237             && ontTp1.getXpdrTpPortConnectionAttributes().getTsPool() != null
238             && ontTp1.getXpdrTpPortConnectionAttributes().getOdtuTpnPool() != null
239             && ontTp1.getXpdrTpPortConnectionAttributes().getOdtuTpnPool().get(0).getOdtuType()
240                 .equals(ODTU4TsAllocated.class)
241             && ontTp1.getXpdrTpPortConnectionAttributes().getOdtuTpnPool().get(0).getTpnPool().size() >= 1
242             && ontTp1.getXpdrTpPortConnectionAttributes().getTsPool().size() >= tsNb) {
243             return true;
244         } else {
245             return false;
246         }
247     }
248
249     private boolean checkClientTp(TerminationPoint1 ontTp1) {
250         for (SupportedInterfaceCapability sic : ontTp1.getTpSupportedInterfaces().getSupportedInterfaceCapability()) {
251             LOG.debug("in checkTpForOduTermination - sic = {}", sic.getIfCapType());
252             switch (otnServiceType) {
253                 case "1GE":
254                 // we could also check the administrative status of the tp
255                     if (sic.getIfCapType().equals(If1GEODU0.class)) {
256                         return true;
257                     }
258                     break;
259                 case "10GE":
260                     if (sic.getIfCapType().equals(If10GEODU2e.class)) {
261                         return true;
262                     }
263                     break;
264                 case "100GE":
265                     if (sic.getIfCapType().equals(If100GEODU4.class)) {
266                         return true;
267                     }
268                     break;
269                 default:
270                     break;
271             }
272         }
273         return false;
274     }
275
276     private Boolean findClientCompliantInterface(List<SupportedInterfaceCapability> sic) {
277         boolean compliant = false;
278         for (SupportedInterfaceCapability sit : sic) {
279             String interfacetype = sit.getIfCapType().getName();
280             switch (interfacetype) {
281                 case "If1GEODU0":
282                 case "If1GE":
283                     if ("1GE".equals(this.otnServiceType)) {
284                         compliant = true;
285                     }
286                     break;
287                 case "If10GEODU2e":
288                 case "If10GE":
289                     if ("10GE".equals(this.otnServiceType)) {
290                         compliant = true;
291                     }
292                     break;
293                 case "If100GEODU4":
294                 case "If100GE":
295                     if ("100GE".equals(this.otnServiceType)) {
296                         compliant = true;
297                     }
298                     break;
299                 case "IfOTU4ODU4":
300                 case "IfOCHOTU4ODU4":
301                     if ("OTU4".equals(this.otnServiceType) || "ODU4".equals(this.otnServiceType)) {
302                         compliant = true;
303                     }
304                     break;
305                 default:
306                     compliant = false;
307                     break;
308             }
309         }
310         return compliant;
311     }
312
313     private Boolean findNetworkCompliantInterface(List<SupportedInterfaceCapability> sic) {
314         boolean compliant = false;
315         for (SupportedInterfaceCapability sit : sic) {
316             String interfacetype = sit.getIfCapType().toString();
317             switch (interfacetype) {
318                 case "IfOTU4ODU4":
319                 case "IfOCHOTU4ODU4":
320                     compliant = true;
321                     break;
322                 case "IfOTU2ODU2":
323                 case "IfOCHOTU2ODU2":
324                     if (("1GE".equals(this.otnServiceType)) || ("10GE".equals(this.otnServiceType))) {
325                         compliant = true;
326                     }
327                     break;
328                 // add all use case with higher rate interfaces when it shows up
329                 default:
330                     compliant = false;
331                     break;
332             }
333         }
334         return compliant;
335     }
336
337     public void validateXponder(String anodeId, String znodeId) {
338         if (!isValid()) {
339             return;
340         }
341         if (OpenroadmNodeType.SWITCH.equals(this.nodeType)) {
342             initXndrTps("intermediate");
343         }
344         if (this.nodeId.getValue().equals(anodeId) || (this.nodeId.getValue().equals(znodeId))) {
345             initXndrTps("AZ");
346         } else {
347             LOG.info("validateAZxponder: XPONDER is ignored == {}", nodeId.getValue());
348             valid = false;
349         }
350     }
351
352     public boolean validateSwitchingPoolBandwidth(
353             org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang
354                 .ietf.network.topology.rev180226.networks.network.node.TerminationPoint tp1,
355             org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang
356                 .ietf.network.topology.rev180226.networks.network.node.TerminationPoint tp2,
357             Long neededBW) {
358         if (this.nodeType != OpenroadmNodeType.TPDR) {
359             return true;
360         } else {
361             org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev181130.Node1 node1 =
362                 node.augmentation(
363                     org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev181130.Node1.class);
364             SwitchingPools sp = node1.getSwitchingPools();
365             List<OduSwitchingPools> osp = new ArrayList<OduSwitchingPools>();
366             osp = sp.getOduSwitchingPools();
367             for (OduSwitchingPools ospx : osp) {
368                 List<NonBlockingList> nbl = ospx.getNonBlockingList();
369                 for (NonBlockingList nbll : nbl) {
370                     if (nbll.getAvailableInterconnectBandwidth().toJava() >= neededBW) {
371                         List<TpId> tplist = new ArrayList<TpId>(nbll.getTpList());
372                         if ((tplist.contains(tp1.getTpId())) & (tplist.contains(tp2.getTpId()))) {
373                             LOG.debug("validateSwitchingPoolBandwidth: couple  of tp {} x {} valid for crossconnection",
374                                 tp1.getTpId().toString(), tp2.getTpId().toString());
375                             return true;
376                         }
377                     }
378                 }
379             }
380             LOG.debug("validateSwitchingPoolBandwidth: No valid Switching pool for crossconnecting tp {} and {}",
381                 tp1.getTpId().toString(), tp2.getTpId().toString());
382             return false;
383         }
384     }
385
386     public void validateIntermediateSwitch() {
387         if (!isValid()) {
388             return;
389         }
390         if (this.nodeType != OpenroadmNodeType.SWITCH) {
391             return;
392         }
393         // Validate switch for use as an intermediate XPONDER on the path
394         initXndrTps("intermediate");
395         if (!this.valid) {
396             LOG.debug("validateIntermediateSwitch: Switch unusable for transit == {}", nodeId.getValue());
397         } else {
398             LOG.info("validateIntermediateSwitch: Switch usable for transit == {}", nodeId.getValue());
399         }
400         return;
401     }
402
403     public void checkAvailableTribPort() {
404         List<TerminationPoint> networkTpList = node.augmentation(
405             org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.Node1.class)
406             .getTerminationPoint().stream()
407             .filter(type -> type
408                 .augmentation(
409                     org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev181130.TerminationPoint1.class)
410                 .getTpType().equals(OpenroadmTpType.XPONDERNETWORK))
411             .collect(Collectors.toList());
412
413         for (TerminationPoint tp : networkTpList) {
414             if (tp.augmentation(TerminationPoint1.class).getXpdrTpPortConnectionAttributes().getOdtuTpnPool() != null
415                 && tp.augmentation(TerminationPoint1.class).getXpdrTpPortConnectionAttributes().getOdtuTpnPool().get(0)
416                     .getOdtuType().equals(ODTU4TsAllocated.class)) {
417                 @Nullable
418                 List<Uint16> tpnPool = tp.augmentation(TerminationPoint1.class).getXpdrTpPortConnectionAttributes()
419                     .getOdtuTpnPool().get(0).getTpnPool();
420                 if (tpnPool != null) {
421                     tpAvailableTribPort.put(tp.getTpId().getValue(), tpnPool);
422                 }
423             }
424         }
425     }
426
427     public void checkAvailableTribSlot() {
428         List<TerminationPoint> networkTpList = node.augmentation(
429             org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.Node1.class)
430             .getTerminationPoint().stream()
431             .filter(type -> type
432                 .augmentation(
433                     org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev181130.TerminationPoint1.class)
434                 .getTpType().equals(OpenroadmTpType.XPONDERNETWORK))
435             .collect(Collectors.toList());
436
437         for (TerminationPoint tp : networkTpList) {
438             if (tp.augmentation(TerminationPoint1.class).getXpdrTpPortConnectionAttributes().getTsPool() != null) {
439                 @Nullable
440                 List<Uint16> tsPool = tp.augmentation(TerminationPoint1.class).getXpdrTpPortConnectionAttributes()
441                     .getTsPool();
442                 tpAvailableTribSlot.put(tp.getTpId().getValue(), tsPool);
443             }
444         }
445     }
446
447     public boolean isValid() {
448         if ((node == null) || (nodeId == null) || (nodeType == null) || (this.getSupNetworkNodeId() == null)
449             || (this.getSupClliNodeId() == null)) {
450             LOG.error("PceNode: one of parameters is not populated : nodeId, node type, supporting nodeId");
451             valid = false;
452         }
453         return valid;
454     }
455
456     public void addOutgoingLink(PceLink outLink) {
457         this.outgoingLinks.add(outLink);
458     }
459
460     public List<PceLink> getOutgoingLinks() {
461         return outgoingLinks;
462     }
463
464     @Override
465     public String getXpdrClient(String tp) {
466         return this.clientPerNwTp.get(tp);
467     }
468
469     public String toString() {
470         return "PceNode type=" + nodeType + " ID=" + nodeId.getValue() + " CLLI=" + this.getSupClliNodeId();
471     }
472
473     public void printLinksOfNode() {
474         LOG.info(" outgoing links of node {} : {} ", nodeId.getValue(), this.getOutgoingLinks().toString());
475     }
476
477     @Override
478     public Map<String, List<Uint16>> getAvailableTribPorts() {
479         return tpAvailableTribPort;
480     }
481
482     @Override
483     public Map<String, List<Uint16>> getAvailableTribSlots() {
484         return tpAvailableTribSlot;
485     }
486
487     public List<TpId> getUsableXpdrNWTps() {
488         return usableXpdrNWTps;
489     }
490
491     public List<TpId> getUsableXpdrClientTps() {
492         return usableXpdrClientTps;
493     }
494
495     @Override
496     public String getPceNodeType() {
497         return this.pceNodeType;
498     }
499
500     @Override
501     public String getSupNetworkNodeId() {
502         return MapUtils.getSupNetworkNode(this.node);
503     }
504
505     @Override
506     public String getSupClliNodeId() {
507         return MapUtils.getSupClliNode(this.node);
508     }
509
510     @Override
511     public String getRdmSrgClient(String tp) {
512         // TODO Auto-generated method stub
513         return null;
514     }
515
516     @Override
517     public NodeId getNodeId() {
518         return nodeId;
519     }
520
521     @Override
522     public boolean checkTP(String tp) {
523         // TODO Auto-generated method stub
524         return false;
525     }
526
527     @Override
528     public boolean checkWL(long index) {
529         // TODO Auto-generated method stub
530         return false;
531     }
532 }