Merge "Fix ConvertORToTapiTopology getXpdrUsedWavelength"
[transportpce.git] / pce / src / main / java / org / opendaylight / transportpce / pce / networkanalyzer / PceOpticalNode.java
1 /*
2  * Copyright © 2020 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.math.BigDecimal;
12 import java.util.ArrayList;
13 import java.util.Arrays;
14 import java.util.BitSet;
15 import java.util.HashMap;
16 import java.util.List;
17 import java.util.Map;
18 import java.util.Optional;
19 import java.util.TreeMap;
20 import org.opendaylight.transportpce.common.StringConstants;
21 import org.opendaylight.transportpce.common.fixedflex.GridConstant;
22 import org.opendaylight.transportpce.common.mapping.PortMapping;
23 import org.opendaylight.transportpce.pce.SortPortsByName;
24 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev220808.path.computation.reroute.request.input.Endpoints;
25 import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev220316.mapping.Mapping;
26 import org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev211210.TerminationPoint1;
27 import org.opendaylight.yang.gen.v1.http.org.openroadm.common.state.types.rev191129.State;
28 import org.opendaylight.yang.gen.v1.http.org.openroadm.equipment.states.types.rev191129.AdminStates;
29 import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev211210.Node1;
30 import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev211210.networks.network.node.termination.point.XpdrNetworkAttributes;
31 import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev211210.OpenroadmNodeType;
32 import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev211210.OpenroadmTpType;
33 import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev211210.available.freq.map.AvailFreqMapsKey;
34 import org.opendaylight.yang.gen.v1.http.org.openroadm.port.types.rev201211.IfOCH;
35 import org.opendaylight.yang.gen.v1.http.org.openroadm.port.types.rev201211.IfOCHOTU4ODU4;
36 import org.opendaylight.yang.gen.v1.http.org.openroadm.port.types.rev201211.IfOtsiOtsigroup;
37 import org.opendaylight.yang.gen.v1.http.org.openroadm.port.types.rev201211.SupportedIfCapability;
38 import org.opendaylight.yang.gen.v1.http.org.openroadm.service.format.rev191129.ServiceFormat;
39 import org.opendaylight.yang.gen.v1.http.org.openroadm.xponder.rev211210.xpdr.mode.attributes.supported.operational.modes.OperationalMode;
40 import org.opendaylight.yang.gen.v1.http.org.openroadm.xponder.rev211210.xpdr.mode.attributes.supported.operational.modes.OperationalModeKey;
41 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.NodeId;
42 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.network.Node;
43 import org.opendaylight.yangtools.yang.common.Uint16;
44 import org.slf4j.Logger;
45 import org.slf4j.LoggerFactory;
46
47 public class PceOpticalNode implements PceNode {
48     private static final Logger LOG = LoggerFactory.getLogger(PceOpticalNode.class);
49
50     private boolean valid = true;
51
52     private Node node;
53     private NodeId nodeId;
54     private String deviceNodeId;
55     private OpenroadmNodeType nodeType;
56     private AdminStates adminStates;
57     private State state;
58     private String serviceType;
59     private PortMapping portMapping;
60
61     private Map<String, OpenroadmTpType> availableSrgPp = new TreeMap<>();
62     private Map<String, OpenroadmTpType> availableSrgCp = new TreeMap<>();
63     private List<String> usedXpndrNWTps = new ArrayList<>();
64     private List<PceLink> outgoingLinks = new ArrayList<>();
65     private Map<String, String> clientPerNwTp = new HashMap<>();
66     private final AvailFreqMapsKey freqMapKey = new AvailFreqMapsKey(GridConstant.C_BAND);
67     private BitSet frequenciesBitSet;
68     private String version;
69     private BigDecimal slotWidthGranularity;
70     private BigDecimal centralFreqGranularity;
71     private Endpoints endpoints;
72
73     public PceOpticalNode(String deviceNodeId, String serviceType, PortMapping portMapping, Node node,
74         OpenroadmNodeType nodeType, String version, BigDecimal slotWidthGranularity,
75                           BigDecimal centralFreqGranularity) {
76
77         if (deviceNodeId != null
78                 && serviceType != null
79                 && portMapping != null
80                 && node != null
81                 && node.getNodeId() != null
82                 && nodeType != null
83                 && version != null
84                 && slotWidthGranularity != null) {
85             this.deviceNodeId = deviceNodeId;
86             this.serviceType = serviceType;
87             this.portMapping = portMapping;
88             this.node = node;
89             this.nodeId = node.getNodeId();
90             this.nodeType = nodeType;
91             this.version = version;
92             this.slotWidthGranularity = slotWidthGranularity;
93             this.centralFreqGranularity = centralFreqGranularity;
94             this.adminStates = node.augmentation(org.opendaylight.yang.gen.v1.http
95                     .org.openroadm.common.network.rev211210.Node1.class).getAdministrativeState();
96             this.state = node.augmentation(org.opendaylight.yang.gen.v1.http
97                 .org.openroadm.common.network.rev211210.Node1.class).getOperationalState();
98         } else {
99             LOG.error("PceNode {} : one of parameters is not populated : nodeId, node type, slot width granularity",
100                 deviceNodeId);
101             this.valid = false;
102         }
103     }
104
105     public void initSrgTps() {
106         this.availableSrgPp.clear();
107         this.availableSrgCp.clear();
108         if (!isValid()) {
109             return;
110         }
111         LOG.debug("initSrgTpList: getting SRG tps from ROADM node {}", this.nodeId);
112         org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.Node1 nodeTp =
113                 this.node.augmentation(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang
114                     .ietf.network.topology.rev180226.Node1.class);
115         List<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.networks.network
116             .node.TerminationPoint> allTps = new ArrayList<>(nodeTp.nonnullTerminationPoint().values());
117         if (allTps.isEmpty()) {
118             LOG.error("initSrgTpList: ROADM TerminationPoint list is empty for node {}", this);
119             this.valid = false;
120             return;
121         }
122         for (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.networks.network
123             .node.TerminationPoint tp : allTps) {
124             TerminationPoint1 cntp1 = tp.augmentation(TerminationPoint1.class);
125             org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev211210.TerminationPoint1 nttp1 = tp
126                 .augmentation(org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev211210
127                         .TerminationPoint1.class);
128             OpenroadmTpType type = cntp1.getTpType();
129             LOG.debug("type = {} for tp {}", type.getName(), tp);
130
131             switch (type) {
132                 case SRGTXRXCP:
133                 case SRGRXCP:
134                 case SRGTXCP:
135                     if (State.InService.equals(cntp1.getOperationalState())) {
136                         LOG.debug("initSrgTpList: adding SRG-CP tp = {} ", tp.getTpId().getValue());
137                         this.availableSrgCp.put(tp.getTpId().getValue(), cntp1.getTpType());
138                     }
139                     break;
140                 case SRGRXPP:
141                 case SRGTXPP:
142                 case SRGTXRXPP:
143                     LOG.debug("initSrgTpList: SRG-PP tp = {} found", tp.getTpId().getValue());
144                     if (isTerminationPointAvailable(nttp1)) {
145                         LOG.debug("initSrgTpList: adding SRG-PP tp '{}'", tp.getTpId().getValue());
146                         this.availableSrgPp.put(tp.getTpId().getValue(), cntp1.getTpType());
147                         if (State.InService.equals(cntp1.getOperationalState())) {
148                             LOG.debug("initSrgTpList: adding SRG-PP tp '{}'", tp.getTpId().getValue());
149                             this.availableSrgPp.put(tp.getTpId().getValue(), cntp1.getTpType());
150                         }
151                     } else {
152                         LOG.warn("initSrgTpList: SRG-PP tp = {} found is busy !!", tp.getTpId().getValue());
153                     }
154                     break;
155                 default:
156                     break;
157             }
158         }
159         if (this.availableSrgPp.isEmpty() || this.availableSrgCp.isEmpty()) {
160             LOG.error("initSrgTpList: ROADM SRG TerminationPoint list is empty for node {}", this);
161             this.valid = false;
162             return;
163         }
164         LOG.debug("initSrgTpList: availableSrgPp size = {} && availableSrgCp size = {} in {}",
165             this.availableSrgPp.size(), this.availableSrgCp.size(), this);
166     }
167
168     private boolean isTerminationPointAvailable(
169             org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev211210.TerminationPoint1 nttp1) {
170         byte[] availableByteArray = new byte[GridConstant.NB_OCTECTS];
171         Arrays.fill(availableByteArray, (byte) GridConstant.AVAILABLE_SLOT_VALUE);
172         return nttp1 == null || nttp1.getPpAttributes() == null
173                 || nttp1.getPpAttributes().getAvailFreqMaps() == null
174                 || !nttp1.getPpAttributes().getAvailFreqMaps().containsKey(freqMapKey)
175                 || nttp1.getPpAttributes().getAvailFreqMaps().get(freqMapKey).getFreqMap() == null
176                 || Arrays.equals(nttp1.getPpAttributes().getAvailFreqMaps().get(freqMapKey).getFreqMap(),
177                         availableByteArray);
178     }
179
180     private boolean isTpWithGoodCapabilities(
181         org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.networks.network.node
182         .TerminationPoint tp) {
183         Mapping mapping = this.portMapping.getMapping(deviceNodeId, tp.getTpId().getValue());
184         if (mapping == null || mapping.getSupportedInterfaceCapability() == null) {
185             return true;
186         }
187         switch (this.serviceType) {
188             case "400GE":
189                 for (SupportedIfCapability ifCap : mapping.getSupportedInterfaceCapability()) {
190                     if (ifCap.equals(IfOtsiOtsigroup.VALUE)) {
191                         return true;
192                     }
193                 }
194                 return false;
195             case "100GE":
196                 return mapping.getSupportedInterfaceCapability().contains(IfOCH.VALUE)
197                         || mapping.getSupportedInterfaceCapability().contains(IfOCHOTU4ODU4.VALUE);
198             default:
199                 return true;
200         }
201     }
202
203     public void initFrequenciesBitSet() {
204         if (!isValid()) {
205             return;
206         }
207         Node1 node1 = this.node.augmentation(Node1.class);
208         org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev211210.Node1 node11 =
209                 this.node.augmentation(org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev211210.Node1
210                         .class);
211         switch (this.nodeType) {
212             case SRG :
213                 if (!State.InService.equals(node11.getOperationalState())) {
214                     this.valid = false;
215                     LOG.error("initWLlist: SRG node {} is OOS/degraded", this);
216                     return;
217                 }
218                 if (!node1.getSrgAttributes().nonnullAvailFreqMaps().containsKey(freqMapKey)) {
219                     LOG.error("initFrequenciesBitSet: SRG no cband available freq maps for node  {}", this);
220                     this.valid = false;
221                     return;
222                 }
223                 this.frequenciesBitSet = BitSet.valueOf(node1.getSrgAttributes()
224                         .nonnullAvailFreqMaps().get(freqMapKey).getFreqMap());
225                 break;
226             case DEGREE :
227                 if (!State.InService.equals(node11.getOperationalState())) {
228                     this.valid = false;
229                     LOG.error("initWLlist: Degree node {} is OOS/degraded", this);
230                     return;
231                 }
232                 if (!node1.getDegreeAttributes().nonnullAvailFreqMaps().containsKey(freqMapKey)) {
233                     LOG.error("initFrequenciesBitSet: DEG no cband available freq maps for node  {}", this);
234                     this.valid = false;
235                     return;
236                 }
237                 this.frequenciesBitSet = BitSet.valueOf(node1.getDegreeAttributes()
238                         .nonnullAvailFreqMaps().get(freqMapKey).getFreqMap());
239                 break;
240             case XPONDER :
241                 // at init all bits are set to false (unavailable)
242                 this.frequenciesBitSet = new BitSet(GridConstant.EFFECTIVE_BITS);
243                 //set all bits to true (available)
244                 this.frequenciesBitSet.set(0, GridConstant.EFFECTIVE_BITS);
245                 if (!State.InService.equals(node11.getOperationalState())) {
246                     this.valid = false;
247                     LOG.error("initWLlist: XPDR node {} is OOS/degraded", this);
248                 }
249                 break;
250             default:
251                 LOG.error("initFrequenciesBitSet: unsupported node type {} in node {}", this.nodeType, this);
252                 break;
253         }
254     }
255
256     public void initXndrTps(ServiceFormat serviceFormat) {
257         LOG.debug("PceNod: initXndrTps for node : {}", this.nodeId);
258         if (!isValid()) {
259             return;
260         }
261         this.valid = false;
262         org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.Node1 nodeTp =
263                 this.node.augmentation(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang
264                     .ietf.network.topology.rev180226.Node1.class);
265         List<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.networks.network
266             .node.TerminationPoint> allTps = new ArrayList<>(nodeTp.nonnullTerminationPoint().values());
267         if (allTps.isEmpty()) {
268             LOG.error("initXndrTps: XPONDER TerminationPoint list is empty for node {}", this);
269             return;
270         }
271         for (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.networks.network
272                 .node.TerminationPoint tp : allTps) {
273             TerminationPoint1 cntp1 = tp.augmentation(TerminationPoint1.class);
274             if (cntp1 == null) {
275                 LOG.error("initXndrTps: {} - {} has no tp type", this.nodeId, tp.getTpId().toString());
276                 continue;
277             }
278             if (cntp1.getTpType() != OpenroadmTpType.XPONDERNETWORK) {
279                 LOG.debug("initXndrTps: {} is not an Xponder network port", cntp1.getTpType().getName());
280                 continue;
281             }
282             if (!isTpWithGoodCapabilities(tp)) {
283                 LOG.warn("initXndrTps: {} network port has not correct if-capabilities", tp.getTpId().getValue());
284                 continue;
285             }
286             if (!State.InService.equals(cntp1.getOperationalState())) {
287                 LOG.warn("initXndrTps: XPONDER tp = {} is OOS/degraded", tp.getTpId().getValue());
288                 continue;
289             }
290             if (endpoints == null
291                     || (!endpoints.getAEndTp().equals(tp.getTpId().getValue())
292                         && !endpoints.getZEndTp().equals(tp.getTpId().getValue()))) {
293                 org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev211210.TerminationPoint1 nttp1 =
294                         tp.augmentation(org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.rev211210
295                                 .TerminationPoint1.class);
296                 if (nttp1 != null && nttp1.getXpdrNetworkAttributes().getWavelength() != null) {
297                     this.usedXpndrNWTps.add(tp.getTpId().getValue());
298                     LOG.debug("initXndrTps: XPONDER tp = {} is used", tp.getTpId().getValue());
299                     continue;
300                 }
301             }
302             // find Client of this network TP
303             if (cntp1.getAssociatedConnectionMapTp() != null) {
304                 String client = cntp1.getAssociatedConnectionMapTp().iterator().next().getValue();
305                 if (client != null) {
306                     this.clientPerNwTp.put(tp.getTpId().getValue(), client);
307                     this.valid = true;
308                 } else {
309                     LOG.error("Service Format {} not managed yet", serviceFormat.getName());
310                 }
311             } else {
312                 this.valid = true;
313             }
314         }
315         if (!isValid()) {
316             LOG.error("initXndrTps: XPONDER doesn't have available wavelengths for node  {}", this);
317         }
318     }
319
320     @Override
321     public String getRdmSrgClient(String tp, String direction) {
322         LOG.debug("getRdmSrgClient: Getting PP client for tp '{}' on node : {}", tp, this.nodeId);
323         OpenroadmTpType srgType = null;
324         OpenroadmTpType cpType = this.availableSrgCp.get(tp);
325         if (cpType == null) {
326             LOG.error("getRdmSrgClient: tp {} not existed in SRG CPterminationPoint list", tp);
327             return null;
328         }
329         switch (cpType) {
330             case SRGTXRXCP:
331                 LOG.debug("getRdmSrgClient: Getting BI Directional PP port ...");
332                 // Take the first-element in the available PP key set
333                 if (availableSrgPp.entrySet().iterator().next().getKey()
334                         // and check if the port is bidirectional
335                         .contains("TXRX")) {
336                     srgType = OpenroadmTpType.SRGTXRXPP;
337                 } else if (direction.equalsIgnoreCase("aToz")) {
338                     srgType = OpenroadmTpType.SRGRXPP;
339                 } else {
340                     srgType = OpenroadmTpType.SRGTXPP;
341                 }
342                 break;
343             case SRGTXCP:
344                 LOG.debug("getRdmSrgClient: Getting UNI Rx PP port ...");
345                 srgType = OpenroadmTpType.SRGRXPP;
346                 break;
347             case SRGRXCP:
348                 LOG.debug("getRdmSrgClient: Getting UNI Tx PP port ...");
349                 srgType = OpenroadmTpType.SRGTXPP;
350                 break;
351             default:
352                 break;
353         }
354         LOG.debug("getRdmSrgClient:  Getting client PP for CP '{}'", tp);
355         if (this.availableSrgPp.isEmpty()) {
356             LOG.error("getRdmSrgClient: SRG TerminationPoint PP list is not available for node {}", this);
357             return null;
358         }
359         final OpenroadmTpType openType = srgType;
360         Optional<String> client = this.availableSrgPp.entrySet()
361                 .stream().filter(pp -> pp.getValue().getName().equals(openType.getName()))
362                 .map(Map.Entry::getKey).min(new SortPortsByName());
363         if (client.isEmpty()) {
364             LOG.error("getRdmSrgClient: ROADM {} doesn't have PP Client for CP {}", this, tp);
365             return null;
366         }
367         LOG.debug("getRdmSrgClient: client PP {} for CP {} found !", client, tp);
368         return client.get();
369     }
370
371     @Override
372     public String getOperationalMode() {
373         Node1 node1 = this.node.augmentation(Node1.class);
374         if (node1 == null) {
375             LOG.warn("No openroadm node available for node {}", node);
376             return "";
377         }
378         switch (this.nodeType) {
379             case SRG :
380                 if (node1.getSrgAttributes().getSupportedOperationalModes() == null
381                         || node1.getSrgAttributes().getSupportedOperationalModes().stream().findFirst().isEmpty()) {
382                     LOG.debug("getOperationalMode: SRG has no operational mode declared");
383                     return StringConstants.UNKNOWN_MODE;
384                 } else {
385                     LOG.debug("getOperationalMode: SRG has operational mode declared {}",
386                         node1.getSrgAttributes().getSupportedOperationalModes().stream().findFirst().toString());
387                     return node1.getSrgAttributes().getSupportedOperationalModes().stream().findFirst().toString();
388                 }
389             case DEGREE :
390                 if (node1.getDegreeAttributes().getSupportedOperationalModes() == null
391                         || node1.getDegreeAttributes().getSupportedOperationalModes().stream().findFirst().isEmpty()) {
392                     LOG.debug("getOperationalMode: DEGREE has no operational mode declared");
393                     return StringConstants.UNKNOWN_MODE;
394                 } else {
395                     LOG.debug("getOperationalMode: DEGREE has operational mode declared {}",
396                         node1.getDegreeAttributes().getSupportedOperationalModes().stream().findFirst().toString());
397                     return node1.getDegreeAttributes().getSupportedOperationalModes().stream().findFirst().toString();
398                 }
399             default:
400                 LOG.debug("getOperationalMode: Did not succeed retrieving Operational Mode for the node");
401                 return "";
402         }
403     }
404
405     @Override
406     public String getXponderOperationalMode(XpdrNetworkAttributes tp) {
407         if (tp.getSupportedOperationalModes() == null) {
408             LOG.warn("getOperationalMode: NetworkPort {} has no operational mode declared compatible with service type",
409                 tp);
410             return StringConstants.UNKNOWN_MODE;
411         }
412         for (Map.Entry<OperationalModeKey, OperationalMode> mode : tp.getSupportedOperationalModes()
413                 .getOperationalMode().entrySet()) {
414             if (mode.getKey().toString().contains(StringConstants.SERVICE_TYPE_RATE
415                     .get(this.serviceType).toCanonicalString())) {
416                 LOG.info("getOperationalMode: NetworkPort {}  has {} operational mode declared", tp,
417                     mode.getKey().toString());
418                 return mode.getKey().toString();
419             }
420         }
421         LOG.warn("getOperationalMode: NetworkPort {}  has no operational mode declared compatible with service type",
422             tp);
423         return StringConstants.UNKNOWN_MODE;
424     }
425
426     public void validateAZxponder(String anodeId, String znodeId, ServiceFormat serviceFormat) {
427         if (!isValid() || this.nodeType != OpenroadmNodeType.XPONDER) {
428             return;
429         }
430         // Detect A and Z
431         if (anodeId.contains(this.getSupNetworkNodeId()) || (znodeId.contains(this.getSupNetworkNodeId()))) {
432             LOG.info("validateAZxponder: A or Z node detected == {}", nodeId.getValue());
433             initXndrTps(serviceFormat);
434             return;
435         }
436         LOG.debug("validateAZxponder: XPONDER == {} is ignored, supported by {} for aNodeId {} ", nodeId.getValue(),
437             this.getSupNetworkNodeId(), anodeId);
438         valid = false;
439     }
440
441     @Override
442     public boolean checkTP(String tp) {
443         return !this.usedXpndrNWTps.contains(tp);
444     }
445
446     public boolean isValid() {
447         if (node == null || nodeId == null || nodeType == null || this.getSupNetworkNodeId() == null
448                 || this.getSupClliNodeId() == null || adminStates == null || state == null) {
449             LOG.error("PceNode {},   nodeId {}  NodeType {} : one of parameters is not populated : nodeId, node type,"
450                 + " supporting nodeId, admin state, operational state", deviceNodeId, nodeId, nodeType);
451             valid = false;
452         }
453         return valid;
454     }
455
456     @Override
457     public List<PceLink> getOutgoingLinks() {
458         return outgoingLinks;
459     }
460
461     @Override
462     public AdminStates getAdminStates() {
463         return adminStates;
464     }
465
466     @Override
467     public State getState() {
468         return state;
469     }
470
471     @Override
472     public NodeId getNodeId() {
473         return nodeId;
474     }
475
476     @Override
477     public String toString() {
478         return "PceNode type=" + nodeType + " ID=" + nodeId.getValue() + " CLLI=" + this.getSupClliNodeId();
479     }
480
481     @Override
482     public String getPceNodeType() {
483         return "optical";
484     }
485
486     @Override
487     public String getSupNetworkNodeId() {
488         return MapUtils.getSupNetworkNode(this.node);
489     }
490
491     @Override
492     public String getSupClliNodeId() {
493         return MapUtils.getSupClliNode(this.node);
494     }
495
496     @Override
497     public void addOutgoingLink(PceLink outLink) {
498         this.outgoingLinks.add(outLink);
499     }
500
501     @Override
502     public String getXpdrClient(String tp) {
503         return this.clientPerNwTp.get(tp);
504     }
505
506     @Override
507     public Map<String, List<Uint16>> getAvailableTribPorts() {
508         return null;
509     }
510
511     @Override
512     public OpenroadmNodeType getORNodeType() {
513         return this.nodeType;
514     }
515
516     @Override
517     public Map<String, List<Uint16>> getAvailableTribSlots() {
518         return null;
519     }
520
521     /*
522     * (non-Javadoc)
523     *
524     * @see org.opendaylight.transportpce.pce.networkanalyzer.PceNode#getBitSetData()
525     */
526     @Override
527     public BitSet getBitSetData() {
528         return this.frequenciesBitSet;
529     }
530
531     /*
532     * (non-Javadoc)
533     *
534     * @see org.opendaylight.transportpce.pce.networkanalyzer.PceNode#getVersion()
535     */
536     @Override
537     public String getVersion() {
538         return this.version;
539     }
540
541     /*
542     * (non-Javadoc)
543     *
544     * @see org.opendaylight.transportpce.pce.networkanalyzer.PceNode#getSlotWidthGranularity()
545     */
546     @Override
547     public BigDecimal getSlotWidthGranularity() {
548         return slotWidthGranularity;
549     }
550
551     /*
552      * (non-Javadoc)
553      *
554      * @see org.opendaylight.transportpce.pce.networkanalyzer.PceNode#getCentralFreqGranularity()
555      */
556     @Override
557     public BigDecimal getCentralFreqGranularity() {
558         return centralFreqGranularity;
559     }
560
561     public void setEndpoints(Endpoints endpoints) {
562         this.endpoints = endpoints;
563     }
564
565 }