2 * Copyright © 2019 Orange, Inc. and others. All rights reserved.
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
8 package org.opendaylight.transportpce.tapi.topology;
10 import java.nio.charset.Charset;
11 import java.util.ArrayList;
12 import java.util.Arrays;
13 import java.util.Collection;
14 import java.util.HashMap;
15 import java.util.Iterator;
16 import java.util.List;
18 import java.util.Map.Entry;
19 import java.util.UUID;
20 import java.util.stream.Collectors;
21 import org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev200529.TerminationPoint1;
22 import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.types.rev200327.xpdr.odu.switching.pools.OduSwitchingPools;
23 import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.types.rev200327.xpdr.odu.switching.pools.OduSwitchingPoolsBuilder;
24 import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.types.rev200327.xpdr.odu.switching.pools.odu.switching.pools.NonBlockingList;
25 import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.types.rev200327.xpdr.odu.switching.pools.odu.switching.pools.NonBlockingListBuilder;
26 import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.types.rev200327.xpdr.odu.switching.pools.odu.switching.pools.NonBlockingListKey;
27 import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev200529.OpenroadmNodeType;
28 import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev200529.OpenroadmTpType;
29 import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev200529.xpdr.tp.supported.interfaces.SupportedInterfaceCapability;
30 import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev200529.Link1;
31 import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev200529.Node1;
32 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.network.Node;
33 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.TpId;
34 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.networks.network.node.TerminationPoint;
35 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.common.rev181210.AdministrativeState;
36 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.common.rev181210.CapacityUnit;
37 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.common.rev181210.ForwardingDirection;
38 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.common.rev181210.LAYERPROTOCOLQUALIFIER;
39 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.common.rev181210.LayerProtocolName;
40 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.common.rev181210.LifecycleState;
41 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.common.rev181210.OperationalState;
42 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.common.rev181210.PortDirection;
43 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.common.rev181210.PortRole;
44 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.common.rev181210.TerminationDirection;
45 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.common.rev181210.TerminationState;
46 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.common.rev181210.Uuid;
47 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.common.rev181210.capacity.TotalSizeBuilder;
48 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.common.rev181210.capacity.pac.AvailableCapacityBuilder;
49 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.common.rev181210.capacity.pac.TotalPotentialCapacityBuilder;
50 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.common.rev181210.global._class.Name;
51 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.common.rev181210.global._class.NameBuilder;
52 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.common.rev181210.global._class.NameKey;
53 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.dsr.rev181210.DIGITALSIGNALTYPE100GigE;
54 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.dsr.rev181210.DIGITALSIGNALTYPE10GigELAN;
55 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.odu.rev181210.ODUTYPEODU2E;
56 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.odu.rev181210.ODUTYPEODU4;
57 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.photonic.media.rev181210.PHOTONICLAYERQUALIFIEROMS;
58 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.photonic.media.rev181210.PHOTONICLAYERQUALIFIEROTSi;
59 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.ForwardingRule;
60 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.RuleType;
61 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.link.NodeEdgePoint;
62 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.link.NodeEdgePointBuilder;
63 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.link.NodeEdgePointKey;
64 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.node.NodeRuleGroup;
65 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.node.NodeRuleGroupBuilder;
66 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.node.NodeRuleGroupKey;
67 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.node.OwnedNodeEdgePoint;
68 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.node.OwnedNodeEdgePointBuilder;
69 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.node.OwnedNodeEdgePointKey;
70 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.node.edge.point.MappedServiceInterfacePoint;
71 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.node.edge.point.MappedServiceInterfacePointBuilder;
72 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.node.edge.point.MappedServiceInterfacePointKey;
73 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.node.rule.group.Rule;
74 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.node.rule.group.RuleBuilder;
75 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.node.rule.group.RuleKey;
76 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.topology.Link;
77 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.topology.LinkBuilder;
78 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.topology.LinkKey;
79 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.topology.NodeBuilder;
80 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.topology.NodeKey;
81 import org.opendaylight.yangtools.yang.common.Uint16;
82 import org.opendaylight.yangtools.yang.common.Uint64;
83 import org.slf4j.Logger;
84 import org.slf4j.LoggerFactory;
87 public class ConvertORTopoToTapiTopo {
89 private static final String DSR = "DSR";
90 private static final String OTSI = "OTSi";
91 private static final String E_OTSI = "eOTSi";
92 private static final String I_OTSI = "iOTSi";
93 private static final String RDM_INFRA = "ROADM-infra";
94 private static final Logger LOG = LoggerFactory.getLogger(ConvertORTopoToTapiTopo.class);
95 private String ietfNodeId;
96 private OpenroadmNodeType ietfNodeType;
97 private List<TerminationPoint> oorClientPortList;
98 private List<TerminationPoint> oorNetworkPortList;
99 private OduSwitchingPools oorOduSwitchingPool;
100 private Uuid tapiTopoUuid;
101 private Map<NodeKey, org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.topology.Node>
103 private Map<LinkKey, Link> tapiLinks;
104 private Map<String, Uuid> uuidMap;
107 public ConvertORTopoToTapiTopo(Uuid tapiTopoUuid) {
108 this.tapiTopoUuid = tapiTopoUuid;
109 this.tapiNodes = new HashMap<>();
110 this.tapiLinks = new HashMap<>();
111 this.uuidMap = new HashMap<>();
114 public void convertNode(Node ietfNode, List<String> networkPorts) {
115 this.ietfNodeId = ietfNode.getNodeId().getValue();
116 if (ietfNode.augmentation(org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev200529.Node1.class)
120 this.ietfNodeType = ietfNode.augmentation(
121 org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev200529.Node1.class).getNodeType();
122 this.oorNetworkPortList = ietfNode.augmentation(
123 org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.Node1.class)
124 .getTerminationPoint().values().stream()
125 .filter(tp -> tp.augmentation(TerminationPoint1.class).getTpType().getIntValue()
126 == OpenroadmTpType.XPONDERNETWORK.getIntValue()
127 && networkPorts.contains(tp.getTpId().getValue()))
128 .sorted((tp1, tp2) -> tp1.getTpId().getValue().compareTo(tp2.getTpId().getValue()))
129 .collect(Collectors.toList());
130 if (!OpenroadmNodeType.TPDR.equals(this.ietfNodeType)) {
131 this.oorOduSwitchingPool = ietfNode.augmentation(Node1.class).getSwitchingPools().getOduSwitchingPools()
132 .values().stream().findFirst().get();
133 this.oorClientPortList = ietfNode.augmentation(
134 org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.Node1.class)
135 .getTerminationPoint().values().stream()
136 .filter(tp -> tp.augmentation(TerminationPoint1.class).getTpType().getIntValue()
137 == OpenroadmTpType.XPONDERCLIENT.getIntValue())
138 .sorted((tp1, tp2) -> tp1.getTpId().getValue().compareTo(tp2.getTpId().getValue()))
139 .collect(Collectors.toList());
141 this.oorOduSwitchingPool = createOduSwitchingPoolForTp100G();
142 List<TpId> toto = this.oorOduSwitchingPool.getNonBlockingList().values().stream()
143 .flatMap(nbl -> nbl.getTpList().stream())
144 .collect(Collectors.toList());
145 LOG.info("toto = {}", toto);
146 this.oorClientPortList = ietfNode.augmentation(
147 org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.Node1.class)
148 .getTerminationPoint().values().stream()
149 .filter(tp -> tp.augmentation(TerminationPoint1.class).getTpType().getIntValue()
150 == OpenroadmTpType.XPONDERCLIENT.getIntValue() && toto.contains(tp.getTpId()))
151 .sorted((tp1, tp2) -> tp1.getTpId().getValue().compareTo(tp2.getTpId().getValue()))
152 .collect(Collectors.toList());
153 this.oorClientPortList.forEach(tp -> LOG.info("tp = {}", tp.getTpId()));
156 // node creation [DSR/ODU]
157 LOG.info("creation of a DSR/ODU node for {}", this.ietfNodeId);
158 Uuid nodeUuid = new Uuid(UUID.nameUUIDFromBytes((String.join("+", this.ietfNodeId, DSR))
159 .getBytes(Charset.forName("UTF-8"))).toString());
160 this.uuidMap.put(String.join("+", this.ietfNodeId, DSR), nodeUuid);
161 Name nameDsr = new NameBuilder().setValueName("dsr/odu node name").setValue(this.ietfNodeId).build();
162 List<LayerProtocolName> dsrLayerProtocols = Arrays.asList(LayerProtocolName.DSR, LayerProtocolName.ODU);
163 org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.topology
164 .Node dsrNode = createTapiNode(Map.of(nameDsr.key(), nameDsr), dsrLayerProtocols);
165 tapiNodes.put(dsrNode.key(), dsrNode);
167 // node creation [otsi]
168 LOG.info("creation of an OTSi node for {}", this.ietfNodeId);
169 nodeUuid = new Uuid(UUID.nameUUIDFromBytes((String.join("+", this.ietfNodeId, OTSI))
170 .getBytes(Charset.forName("UTF-8"))).toString());
171 this.uuidMap.put(String.join("+", this.ietfNodeId, OTSI), nodeUuid);
172 Name nameOtsi = new NameBuilder().setValueName("otsi node name").setValue(this.ietfNodeId).build();
173 List<LayerProtocolName> otsiLayerProtocols = Arrays.asList(LayerProtocolName.PHOTONICMEDIA);
174 org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.topology
175 .Node otsiNode = createTapiNode(Map.of(nameOtsi.key(), nameOtsi), otsiLayerProtocols);
176 tapiNodes.put(otsiNode.key(), otsiNode);
178 // transitional link cration between network nep of DSR/ODU node and iNep of otsi node
179 LOG.info("creation of transitional links between DSR/ODU and OTSi nodes");
180 createTapiTransitionalLinks();
183 public void convertLinks(List
184 <org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.networks.network.Link>
186 List<String> linksToNotConvert = new ArrayList<>();
187 LOG.info("creation of {} otn links", otnLinkList.size() / 2);
188 for (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.networks.network
189 .Link link : otnLinkList) {
190 if (!linksToNotConvert.contains(link.getLinkId().getValue())) {
191 Link tapiLink = createTapiLink(link);
192 linksToNotConvert.add(link
193 .augmentation(org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev200529.Link1.class)
194 .getOppositeLink().getValue());
195 tapiLinks.put(tapiLink.key(), tapiLink);
200 public void convertRoadmInfrastructure() {
201 LOG.info("abstraction of the ROADM infrastructure towards a photonic node");
202 Uuid nodeUuid = new Uuid(UUID.nameUUIDFromBytes(RDM_INFRA.getBytes(Charset.forName("UTF-8"))).toString());
203 Name nodeName = new NameBuilder().setValueName("otsi node name").setValue(RDM_INFRA).build();
204 List<LayerProtocolName> nodeLayerProtocols = Arrays.asList(LayerProtocolName.PHOTONICMEDIA);
206 List<org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.topology.Node> tapiPhotonicNodes
207 = pruneTapiPhotonicNodes();
208 Map<String, String> photonicNepUuisMap = convertListNodeWithListNepToMapForUuidAndName(tapiPhotonicNodes);
209 // nep creation for rdm infra abstraction node
210 Map<OwnedNodeEdgePointKey, OwnedNodeEdgePoint> onepMap = createNepForRdmNode(photonicNepUuisMap.size());
211 // node rule group creation
212 Map<NodeRuleGroupKey, NodeRuleGroup> nodeRuleGroupList
213 = createNodeRuleGroupForRdmNode(nodeUuid, onepMap.values());
214 // build RDM infra node abstraction
215 org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.topology.Node rdmNode = new NodeBuilder()
217 .setName(Map.of(nodeName.key(), nodeName))
218 .setLayerProtocolName(nodeLayerProtocols)
219 .setAdministrativeState(AdministrativeState.UNLOCKED)
220 .setOperationalState(OperationalState.ENABLED)
221 .setLifecycleState(LifecycleState.INSTALLED)
222 .setOwnedNodeEdgePoint(onepMap)
223 .setNodeRuleGroup(nodeRuleGroupList)
225 tapiNodes.put(rdmNode.key(), rdmNode);
227 // OMS link creation between photonoci nodes and RDM infra abstraction node
228 Map<String, String> rdmInfraNepUuisMap = convertListNodeWithListNepToMapForUuidAndName(List.of(rdmNode));
229 if (photonicNepUuisMap.size() != rdmInfraNepUuisMap.size()) {
230 LOG.warn("Unable to build OMS links between photonics nodes and RDM infrasctructure abstraction");
232 createTapiOmsLinks(photonicNepUuisMap, rdmInfraNepUuisMap);
236 private OduSwitchingPools createOduSwitchingPoolForTp100G() {
237 Map<NonBlockingListKey, NonBlockingList> nblMap = new HashMap<>();
239 for (TerminationPoint tp : this.oorNetworkPortList) {
240 TpId tpid1 = tp.getTpId();
241 TpId tpid2 = new TpId(tp.augmentation(
242 org.opendaylight.yang.gen.v1.http.transportpce.topology.rev201019.TerminationPoint1.class)
243 .getAssociatedConnectionMapPort());
244 List<TpId> tpList = new ArrayList<>();
247 NonBlockingList nbl = new NonBlockingListBuilder()
248 .setNblNumber(Uint16.valueOf(count))
251 nblMap.put(nbl.key(), nbl);
254 return new OduSwitchingPoolsBuilder()
255 .setNonBlockingList(nblMap)
256 .setSwitchingPoolNumber(Uint16.valueOf(1))
260 private List<org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.topology.Node>
261 pruneTapiPhotonicNodes() {
262 List<org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.topology.Node>
263 prunedTapiPhotonicNodes = new ArrayList<>();
264 List<org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.topology.Node> tapiPhotonicNodes
265 = this.tapiNodes.values().stream()
266 .filter(n -> LayerProtocolName.PHOTONICMEDIA.equals(n.getLayerProtocolName().get(0)))
267 .collect(Collectors.toList());
268 for (org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.topology.Node node
269 : tapiPhotonicNodes) {
270 Map<OwnedNodeEdgePointKey, OwnedNodeEdgePoint> onepM = new HashMap<>();
271 for (Map.Entry<OwnedNodeEdgePointKey, OwnedNodeEdgePoint> entry : node.getOwnedNodeEdgePoint().entrySet()) {
272 if (entry.getValue().getName().values().stream()
273 .filter(name -> name.getValueName().startsWith("eNodeEdgePoint"))
275 onepM.put(entry.getKey(), entry.getValue());
278 org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.topology.Node prunedNode
279 = new NodeBuilder(node).setOwnedNodeEdgePoint(onepM).build();
280 prunedTapiPhotonicNodes.add(prunedNode);
282 return prunedTapiPhotonicNodes;
285 private Map<String, String> convertListNodeWithListNepToMapForUuidAndName(
286 List<org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.topology.Node> nodes) {
287 Map<String, String> uuidNameMap = new HashMap<>();
288 for (org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.topology.Node node : nodes) {
289 for (OwnedNodeEdgePoint nep : node.nonnullOwnedNodeEdgePoint().values()) {
290 String nodeUuid = node.getUuid().getValue();
291 String nepUuid = nep.getUuid().getValue();
292 String nodeName = node.getName().get(new NameKey("otsi node name")).getValue();
293 String nepName = nep.getName().get(new NameKey(nep.getName().keySet().stream().findFirst().get()))
295 uuidNameMap.put(String.join("--", nodeUuid, nepUuid), String.join("--", nodeName, nepName));
301 private org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.topology.Node
302 createTapiNode(Map<NameKey, Name> nodeNames, List<LayerProtocolName> layerProtocols) {
303 Uuid nodeUuid = null;
304 Map<OwnedNodeEdgePointKey, OwnedNodeEdgePoint> onepl = new HashMap<>();
305 Map<NodeRuleGroupKey, NodeRuleGroup> nodeRuleGroupList = new HashMap<>();
306 Map<RuleKey, Rule> ruleList = new HashMap<>();
307 Rule rule = new RuleBuilder()
308 .setLocalId("forward")
309 .setForwardingRule(ForwardingRule.MAYFORWARDACROSSGROUP)
310 .setRuleType(RuleType.FORWARDING)
312 ruleList.put(rule.key(), rule);
313 if (layerProtocols.contains(LayerProtocolName.DSR)) {
314 nodeUuid = getNodeUuid4Dsr(onepl, nodeRuleGroupList, ruleList);
315 } else if (layerProtocols.contains(LayerProtocolName.PHOTONICMEDIA)) {
316 nodeUuid = getNodeUuid4Photonic(onepl, nodeRuleGroupList, ruleList);
318 LOG.error("Undefined LayerProtocolName for {} node {}", nodeNames.get(nodeNames.keySet().iterator().next())
319 .getValueName(), nodeNames.get(nodeNames.keySet().iterator().next()).getValue());
321 return new NodeBuilder()
324 .setLayerProtocolName(layerProtocols)
325 .setAdministrativeState(AdministrativeState.UNLOCKED)
326 .setOperationalState(OperationalState.ENABLED)
327 .setLifecycleState(LifecycleState.INSTALLED)
328 .setOwnedNodeEdgePoint(onepl)
329 .setNodeRuleGroup(nodeRuleGroupList)
333 private Uuid getNodeUuid4Photonic(Map<OwnedNodeEdgePointKey, OwnedNodeEdgePoint> onepl,
334 Map<NodeRuleGroupKey, NodeRuleGroup> nodeRuleGroupList, Map<RuleKey, Rule> ruleList) {
336 nodeUuid = this.uuidMap.get(String.join("+", this.ietfNodeId, OTSI));
337 // iNep creation on otsi node
338 for (int i = 0; i < oorNetworkPortList.size(); i++) {
339 Uuid nepUuid1 = new Uuid(UUID.nameUUIDFromBytes(
340 (String.join("+", this.ietfNodeId, I_OTSI, oorNetworkPortList.get(i).getTpId().getValue()))
341 .getBytes(Charset.forName("UTF-8")))
343 this.uuidMap.put(String.join("+", this.ietfNodeId, I_OTSI, oorNetworkPortList.get(i).getTpId().getValue()),
345 Name onedName = new NameBuilder()
346 .setValueName("iNodeEdgePoint")
347 .setValue(oorNetworkPortList.get(i).getTpId().getValue())
350 OwnedNodeEdgePoint onep = createNep(oorNetworkPortList.get(i), Map.of(onedName.key(), onedName),
351 LayerProtocolName.PHOTONICMEDIA, LayerProtocolName.PHOTONICMEDIA, true,
352 String.join("+", this.ietfNodeId, I_OTSI));
353 onepl.put(onep.key(), onep);
355 // eNep creation on otsi node
356 for (int i = 0; i < oorNetworkPortList.size(); i++) {
357 Uuid nepUuid2 = new Uuid(UUID.nameUUIDFromBytes(
358 (String.join("+", this.ietfNodeId, E_OTSI, oorNetworkPortList.get(i).getTpId().getValue()))
359 .getBytes(Charset.forName("UTF-8")))
361 this.uuidMap.put(String.join("+", this.ietfNodeId, E_OTSI, oorNetworkPortList.get(i).getTpId().getValue()),
363 Name onedName = new NameBuilder()
364 .setValueName("eNodeEdgePoint")
365 .setValue(oorNetworkPortList.get(i).getTpId().getValue())
368 OwnedNodeEdgePoint onep = createNep(oorNetworkPortList.get(i), Map.of(onedName.key(), onedName),
369 LayerProtocolName.PHOTONICMEDIA, LayerProtocolName.PHOTONICMEDIA, true,
370 String.join("+", this.ietfNodeId, E_OTSI));
371 onepl.put(onep.key(), onep);
373 // create NodeRuleGroup
375 for (TerminationPoint tp : this.oorNetworkPortList) {
376 Map<org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.node.rule.group.NodeEdgePointKey,
377 org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.node.rule.group.NodeEdgePoint>
378 nepList = new HashMap<>();
379 org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.node.rule.group
380 .NodeEdgePoint inep = new org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210
381 .node.rule.group.NodeEdgePointBuilder()
382 .setTopologyUuid(tapiTopoUuid)
383 .setNodeUuid(this.uuidMap.get(String.join("+", this.ietfNodeId, OTSI)))
384 .setNodeEdgePointUuid(
385 this.uuidMap.get(String.join("+", this.ietfNodeId, I_OTSI, tp.getTpId().getValue())))
387 org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.node.rule.group
388 .NodeEdgePoint enep = new org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210
389 .node.rule.group.NodeEdgePointBuilder()
390 .setTopologyUuid(tapiTopoUuid)
391 .setNodeUuid(this.uuidMap.get(String.join("+", this.ietfNodeId, OTSI)))
392 .setNodeEdgePointUuid(
393 this.uuidMap.get(String.join("+", this.ietfNodeId, E_OTSI, tp.getTpId().getValue())))
395 nepList.put(inep.key(), inep);
396 nepList.put(enep.key(), enep);
397 NodeRuleGroup nodeRuleGroup = new NodeRuleGroupBuilder()
399 UUID.nameUUIDFromBytes(("otsi node rule group " + count).getBytes(Charset.forName("UTF-8")))
402 .setNodeEdgePoint(nepList)
404 nodeRuleGroupList.put(nodeRuleGroup.key(), nodeRuleGroup);
410 private Uuid getNodeUuid4Dsr(Map<OwnedNodeEdgePointKey, OwnedNodeEdgePoint> onepl,
411 Map<NodeRuleGroupKey, NodeRuleGroup> nodeRuleGroupList, Map<RuleKey, Rule> ruleList) {
413 nodeUuid = this.uuidMap.get(String.join("+", this.ietfNodeId, DSR));
414 // client nep creation on DSR/ODU node
415 for (int i = 0; i < oorClientPortList.size(); i++) {
416 Uuid nepUuid = new Uuid(UUID.nameUUIDFromBytes(
417 (String.join("+", this.ietfNodeId, DSR, oorClientPortList.get(i).getTpId().getValue()))
418 .getBytes(Charset.forName("UTF-8"))).toString());
419 this.uuidMap.put(String.join("+", this.ietfNodeId, DSR, oorClientPortList.get(i).getTpId().getValue()),
421 NameBuilder nameBldr = new NameBuilder().setValue(oorClientPortList.get(i).getTpId().getValue());
423 if (OpenroadmNodeType.TPDR.equals(this.ietfNodeType)) {
424 name = nameBldr.setValueName("100G-tpdr").build();
426 name = nameBldr.setValueName("NodeEdgePoint_C").build();
429 OwnedNodeEdgePoint onep = createNep(oorClientPortList.get(i), Map.of(name.key(), name),
430 LayerProtocolName.ETH, LayerProtocolName.DSR, true, String.join("+", this.ietfNodeId, DSR));
431 onepl.put(onep.key(), onep);
433 // network nep creation on DSR/ODU node
434 for (int i = 0; i < oorNetworkPortList.size(); i++) {
435 Uuid nepUuid = new Uuid(UUID.nameUUIDFromBytes(
436 (String.join("+", this.ietfNodeId, DSR, oorNetworkPortList.get(i).getTpId().getValue()))
437 .getBytes(Charset.forName("UTF-8"))).toString());
438 this.uuidMap.put(String.join("+", this.ietfNodeId, DSR, oorNetworkPortList.get(i).getTpId().getValue()),
440 Name onedName = new NameBuilder()
441 .setValueName("NodeEdgePoint_N")
442 .setValue(oorNetworkPortList.get(i).getTpId().getValue())
445 OwnedNodeEdgePoint onep = createNep(oorNetworkPortList.get(i), Map.of(onedName.key(), onedName),
446 LayerProtocolName.ODU, LayerProtocolName.DSR, true, String.join("+", this.ietfNodeId, DSR));
447 onepl.put(onep.key(), onep);
449 // create NodeRuleGroup
451 for (NonBlockingList nbl : this.oorOduSwitchingPool.nonnullNonBlockingList().values()) {
452 Map<org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.node.rule.group.NodeEdgePointKey,
453 org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.node.rule.group.NodeEdgePoint>
454 nepList = new HashMap<>();
455 for (TpId tp : nbl.getTpList()) {
456 if (this.uuidMap.containsKey(String.join("+", this.ietfNodeId, DSR, tp.getValue()))) {
457 org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.node.rule.group.NodeEdgePoint
458 nep = new org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.node.rule.group
459 .NodeEdgePointBuilder()
460 .setTopologyUuid(tapiTopoUuid)
461 .setNodeUuid(this.uuidMap.get(String.join("+", this.ietfNodeId, DSR)))
462 .setNodeEdgePointUuid(this.uuidMap.get(String.join("+", this.ietfNodeId, DSR, tp.getValue())))
464 nepList.put(nep.key(), nep);
467 NodeRuleGroup nodeRuleGroup = new NodeRuleGroupBuilder()
469 UUID.nameUUIDFromBytes(("dsr node rule group " + count).getBytes(Charset.forName("UTF-8")))
472 .setNodeEdgePoint(nepList)
474 nodeRuleGroupList.put(nodeRuleGroup.key(), nodeRuleGroup);
480 private OwnedNodeEdgePoint createNep(TerminationPoint oorTp, Map<NameKey, Name> nepNames,
481 LayerProtocolName nepProtocol, LayerProtocolName nodeProtocol, boolean withSip, String keyword) {
482 String key = String.join("+", keyword, oorTp.getTpId().getValue());
483 OwnedNodeEdgePointBuilder onepBldr = new OwnedNodeEdgePointBuilder()
484 .setUuid(this.uuidMap.get(key))
485 .setLayerProtocolName(nepProtocol)
488 onepBldr.setMappedServiceInterfacePoint(createSIP(this.uuidMap.get(key), 1));
490 onepBldr.setSupportedCepLayerProtocolQualifier(createSupportedCepLayerProtocolQualifier(oorTp, nodeProtocol));
491 onepBldr.setLinkPortDirection(PortDirection.BIDIRECTIONAL).setLinkPortRole(PortRole.SYMMETRIC)
492 .setAdministrativeState(AdministrativeState.UNLOCKED).setOperationalState(OperationalState.ENABLED)
493 .setLifecycleState(LifecycleState.INSTALLED).setTerminationDirection(TerminationDirection.BIDIRECTIONAL)
494 .setTerminationState(TerminationState.TERMINATEDBIDIRECTIONAL);
495 return onepBldr.build();
498 private Map<OwnedNodeEdgePointKey, OwnedNodeEdgePoint> createNepForRdmNode(int nbNep) {
499 Map<OwnedNodeEdgePointKey, OwnedNodeEdgePoint> onepMap = new HashMap<>();
500 for (int i = 1; i <= nbNep; i++) {
501 Uuid nepUuid = new Uuid(UUID.nameUUIDFromBytes((String.join("+", "roadm node", "nep", String.valueOf(i)))
502 .getBytes(Charset.forName("UTF-8"))).toString());
503 Name nepName = new NameBuilder()
504 .setValueName("NodeEdgePoint name")
505 .setValue(new StringBuilder("NodeEdgePoint_").append(i).toString())
507 OwnedNodeEdgePoint onep = new OwnedNodeEdgePointBuilder()
509 .setLayerProtocolName(LayerProtocolName.PHOTONICMEDIA)
510 .setName(Map.of(nepName.key(), nepName))
511 .setSupportedCepLayerProtocolQualifier(List.of(PHOTONICLAYERQUALIFIEROMS.class))
512 .setLinkPortDirection(PortDirection.BIDIRECTIONAL).setLinkPortRole(PortRole.SYMMETRIC)
513 .setAdministrativeState(AdministrativeState.UNLOCKED).setOperationalState(OperationalState.ENABLED)
514 .setLifecycleState(LifecycleState.INSTALLED).setTerminationDirection(TerminationDirection.BIDIRECTIONAL)
515 .setTerminationState(TerminationState.TERMINATEDBIDIRECTIONAL)
517 onepMap.put(onep.key(), onep);
522 private Map<NodeRuleGroupKey, NodeRuleGroup> createNodeRuleGroupForRdmNode(Uuid nodeUuid,
523 Collection<OwnedNodeEdgePoint> onepl) {
524 Map<org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.node.rule.group.NodeEdgePointKey,
525 org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.node.rule.group.NodeEdgePoint>
526 nepMap = new HashMap<>();
527 for (OwnedNodeEdgePoint onep : onepl) {
528 org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.node.rule.group.NodeEdgePoint
529 nep = new org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.node.rule.group
530 .NodeEdgePointBuilder()
531 .setTopologyUuid(tapiTopoUuid)
532 .setNodeUuid(nodeUuid)
533 .setNodeEdgePointUuid(onep.key().getUuid())
535 nepMap.put(nep.key(), nep);
537 Map<NodeRuleGroupKey, NodeRuleGroup> nodeRuleGroupMap = new HashMap<>();
538 Map<RuleKey, Rule> ruleList = new HashMap<>();
539 Rule rule = new RuleBuilder()
540 .setLocalId("forward")
541 .setForwardingRule(ForwardingRule.MAYFORWARDACROSSGROUP)
542 .setRuleType(RuleType.FORWARDING)
544 ruleList.put(rule.key(), rule);
545 NodeRuleGroup nodeRuleGroup = new NodeRuleGroupBuilder()
546 .setUuid(new Uuid(UUID.nameUUIDFromBytes(("rdm infra node rule group").getBytes(Charset.forName("UTF-8")))
549 .setNodeEdgePoint(nepMap)
551 nodeRuleGroupMap.put(nodeRuleGroup.key(), nodeRuleGroup);
552 return nodeRuleGroupMap;
555 private Map<MappedServiceInterfacePointKey, MappedServiceInterfacePoint> createSIP(Uuid nepUuid, int nb) {
556 Map<MappedServiceInterfacePointKey, MappedServiceInterfacePoint> msipl = new HashMap<>();
557 for (int i = 0; i < nb; i++) {
558 MappedServiceInterfacePoint msip = new MappedServiceInterfacePointBuilder()
559 .setServiceInterfacePointUuid(new Uuid(UUID.nameUUIDFromBytes(nepUuid.getValue()
560 .getBytes(Charset.forName("UTF-8"))).toString()))
562 msipl.put(msip.key(), msip);
567 private List<Class<? extends LAYERPROTOCOLQUALIFIER>> createSupportedCepLayerProtocolQualifier(TerminationPoint tp,
568 LayerProtocolName lpn) {
569 List<Class<? extends LAYERPROTOCOLQUALIFIER>> sclpqList = new ArrayList<>();
570 List<SupportedInterfaceCapability> sicList = new ArrayList<>(
571 tp.augmentation(org.opendaylight.yang.gen.v1.http
572 .org.openroadm.otn.network.topology.rev200529.TerminationPoint1.class).getTpSupportedInterfaces()
573 .getSupportedInterfaceCapability().values());
574 for (SupportedInterfaceCapability sic : sicList) {
575 switch (lpn.getName()) {
577 if (sic.getIfCapType().getSimpleName().equals("If10GEODU2e")) {
578 sclpqList.add(DIGITALSIGNALTYPE10GigELAN.class);
579 sclpqList.add(ODUTYPEODU2E.class);
580 } else if (sic.getIfCapType().getSimpleName().equals("IfOCHOTU4ODU4")) {
581 sclpqList.add(ODUTYPEODU4.class);
582 } else if (sic.getIfCapType().getSimpleName().equals("If100GEODU4")) {
583 sclpqList.add(DIGITALSIGNALTYPE100GigE.class);
584 sclpqList.add(ODUTYPEODU4.class);
585 } else if (sic.getIfCapType().getSimpleName().equals("If100GE")) {
586 sclpqList.add(DIGITALSIGNALTYPE100GigE.class);
589 case "PHOTONIC_MEDIA":
590 if (sic.getIfCapType().getSimpleName().equals("IfOCHOTU4ODU4")) {
591 sclpqList.add(PHOTONICLAYERQUALIFIEROTSi.class);
592 sclpqList.add(PHOTONICLAYERQUALIFIEROMS.class);
596 LOG.error("Layer Protocol Name is unknown");
603 private void createTapiTransitionalLinks() {
604 for (TerminationPoint tp : this.oorNetworkPortList) {
605 Map<NodeEdgePointKey, NodeEdgePoint> nepList = new HashMap<>();
606 String sourceKey = String.join("+", this.ietfNodeId, DSR, tp.getTpId().getValue());
607 Uuid sourceUuidTp = this.uuidMap.get(sourceKey);
608 String destKey = String.join("+", this.ietfNodeId, I_OTSI, tp.getTpId().getValue());
609 Uuid destUuidTp = this.uuidMap.get(destKey);
610 NodeEdgePoint sourceNep = new NodeEdgePointBuilder()
611 .setTopologyUuid(this.tapiTopoUuid)
612 .setNodeUuid(this.uuidMap.get(String.join("+", this.ietfNodeId, DSR)))
613 .setNodeEdgePointUuid(sourceUuidTp)
615 nepList.put(sourceNep.key(), sourceNep);
616 NodeEdgePoint destNep = new NodeEdgePointBuilder()
617 .setTopologyUuid(this.tapiTopoUuid)
618 .setNodeUuid(this.uuidMap.get(String.join("+", this.ietfNodeId, OTSI)))
619 .setNodeEdgePointUuid(destUuidTp)
621 nepList.put(destNep.key(), destNep);
622 Name linkName = new NameBuilder().setValueName("transitional link name")
623 .setValue(String.join("--", this.ietfNodeId, sourceKey, destKey))
625 Link transiLink = new LinkBuilder()
627 UUID.nameUUIDFromBytes((String.join("--", this.ietfNodeId, sourceKey, destKey))
628 .getBytes(Charset.forName("UTF-8")))
630 .setName(Map.of(linkName.key(), linkName))
631 .setTransitionedLayerProtocolName(Arrays.asList(LayerProtocolName.ODU.getName(),
632 LayerProtocolName.PHOTONICMEDIA.getName()))
633 .setNodeEdgePoint(nepList)
634 .setDirection(ForwardingDirection.BIDIRECTIONAL)
635 .setAvailableCapacity(new AvailableCapacityBuilder().setTotalSize(
636 new TotalSizeBuilder().setUnit(CapacityUnit.GBPS).setValue(Uint64.valueOf(100)).build()).build())
638 this.tapiLinks.put(transiLink.key(), transiLink);
642 private Link createTapiLink(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226
643 .networks.network.Link link) {
644 String prefix = link.getLinkId().getValue().split("-")[0];
645 String sourceNode = link.getSource().getSourceNode().getValue();
646 String sourceTp = link.getSource().getSourceTp().toString();
647 String destNode = link.getDestination().getDestNode().getValue();
648 String destTp = link.getDestination().getDestTp().toString();
649 Map<NodeEdgePointKey, NodeEdgePoint> nepList = new HashMap<>();
657 sourceUuidTp = this.uuidMap.get(String.join("+", sourceNode, I_OTSI, sourceTp));
658 sourceUuidNode = this.uuidMap.get(String.join("+", sourceNode, OTSI));
659 NodeEdgePoint sourceNep = new NodeEdgePointBuilder()
660 .setTopologyUuid(this.tapiTopoUuid)
661 .setNodeUuid(sourceUuidNode)
662 .setNodeEdgePointUuid(sourceUuidTp)
664 nepList.put(sourceNep.key(), sourceNep);
665 destUuidTp = this.uuidMap.get(String.join("+", destNode, I_OTSI, destTp));
666 destUuidNode = this.uuidMap.get(String.join("+", destNode, OTSI));
667 NodeEdgePoint destNep = new NodeEdgePointBuilder()
668 .setTopologyUuid(this.tapiTopoUuid)
669 .setNodeUuid(destUuidNode)
670 .setNodeEdgePointUuid(destUuidTp)
672 nepList.put(destNep.key(), destNep);
673 linkName = new NameBuilder().setValueName("otn link name")
674 .setValue(link.getLinkId().getValue())
676 return new LinkBuilder()
678 UUID.nameUUIDFromBytes((link.getLinkId().getValue())
679 .getBytes(Charset.forName("UTF-8")))
681 .setName(Map.of(linkName.key(), linkName))
682 .setLayerProtocolName(Arrays.asList(LayerProtocolName.PHOTONICMEDIA))
683 .setAdministrativeState(AdministrativeState.UNLOCKED)
684 .setOperationalState(OperationalState.ENABLED)
685 .setDirection(ForwardingDirection.BIDIRECTIONAL)
686 .setNodeEdgePoint(nepList)
687 .setTotalPotentialCapacity(new TotalPotentialCapacityBuilder().setTotalSize(
688 new TotalSizeBuilder().setUnit(CapacityUnit.GBPS)
689 .setValue(Uint64.valueOf(100)).build()).build())
690 .setAvailableCapacity(new AvailableCapacityBuilder().setTotalSize(
691 new TotalSizeBuilder().setUnit(CapacityUnit.MBPS)
692 .setValue(Uint64.valueOf(link.augmentation(Link1.class).getAvailableBandwidth())).build())
696 sourceUuidTp = this.uuidMap.get(String.join("+", sourceNode, DSR, sourceTp));
697 sourceUuidNode = this.uuidMap.get(String.join("+", sourceNode, DSR));
698 NodeEdgePoint sourceNep2 = new NodeEdgePointBuilder()
699 .setTopologyUuid(this.tapiTopoUuid)
700 .setNodeUuid(sourceUuidNode)
701 .setNodeEdgePointUuid(sourceUuidTp)
703 nepList.put(sourceNep2.key(), sourceNep2);
704 destUuidTp = this.uuidMap.get(String.join("+", destNode, DSR, destTp));
705 destUuidNode = this.uuidMap.get(String.join("+", destNode, DSR));
706 NodeEdgePoint destNep2 = new NodeEdgePointBuilder()
707 .setTopologyUuid(this.tapiTopoUuid)
708 .setNodeUuid(destUuidNode)
709 .setNodeEdgePointUuid(destUuidTp)
711 nepList.put(destNep2.key(), destNep2);
712 linkName = new NameBuilder().setValueName("otn link name")
713 .setValue(link.getLinkId().getValue())
715 return new LinkBuilder()
717 UUID.nameUUIDFromBytes((link.getLinkId().getValue())
718 .getBytes(Charset.forName("UTF-8")))
720 .setName(Map.of(linkName.key(), linkName))
721 .setLayerProtocolName(Arrays.asList(LayerProtocolName.ODU))
722 .setAdministrativeState(AdministrativeState.UNLOCKED)
723 .setOperationalState(OperationalState.ENABLED)
724 .setDirection(ForwardingDirection.BIDIRECTIONAL)
725 .setNodeEdgePoint(nepList)
726 .setTotalPotentialCapacity(new TotalPotentialCapacityBuilder().setTotalSize(
727 new TotalSizeBuilder().setUnit(CapacityUnit.GBPS)
728 .setValue(Uint64.valueOf(100)).build()).build())
729 .setAvailableCapacity(new AvailableCapacityBuilder().setTotalSize(
730 new TotalSizeBuilder().setUnit(CapacityUnit.MBPS)
731 .setValue(Uint64.valueOf(link.augmentation(Link1.class).getAvailableBandwidth())).build())
735 LOG.error("OTN link of type {} not managed yet", prefix);
740 private void createTapiOmsLinks(Map<String, String> photonicNepUuisMap, Map<String, String> rdmInfraNepUuisMap) {
741 Iterator<Entry<String, String>> it1 = photonicNepUuisMap.entrySet().iterator();
742 Iterator<Entry<String, String>> it2 = rdmInfraNepUuisMap.entrySet().iterator();
743 while (it1.hasNext()) {
744 Map<NodeEdgePointKey, NodeEdgePoint> nepMap = new HashMap<>();
745 Map.Entry<String, String> photonicEntry = it1.next();
746 Map.Entry<String, String> rdmEntry = it2.next();
747 Uuid sourceUuidTp = new Uuid(photonicEntry.getKey().split("--")[1]);
748 Uuid sourceUuidNode = new Uuid(photonicEntry.getKey().split("--")[0]);
749 Uuid destUuidTp = new Uuid(rdmEntry.getKey().split("--")[1]);
750 Uuid destUuidNode = new Uuid(rdmEntry.getKey().split("--")[0]);
751 NodeEdgePoint sourceNep = new NodeEdgePointBuilder()
752 .setTopologyUuid(this.tapiTopoUuid)
753 .setNodeUuid(sourceUuidNode)
754 .setNodeEdgePointUuid(sourceUuidTp)
756 nepMap.put(sourceNep.key(), sourceNep);
757 NodeEdgePoint destNep = new NodeEdgePointBuilder()
758 .setTopologyUuid(this.tapiTopoUuid)
759 .setNodeUuid(destUuidNode)
760 .setNodeEdgePointUuid(destUuidTp)
762 nepMap.put(destNep.key(), destNep);
763 Name linkName = new NameBuilder().setValueName("OMS link name")
764 .setValue(String.join(" and ", photonicEntry.getValue(), rdmEntry.getValue()))
766 Link omsLink = new LinkBuilder()
768 UUID.nameUUIDFromBytes((String.join(" and ", photonicEntry.getValue(), rdmEntry.getValue()))
769 .getBytes(Charset.forName("UTF-8")))
771 .setName(Map.of(linkName.key(), linkName))
772 .setLayerProtocolName(List.of(LayerProtocolName.PHOTONICMEDIA))
773 .setNodeEdgePoint(nepMap)
774 .setDirection(ForwardingDirection.BIDIRECTIONAL)
776 this.tapiLinks.put(omsLink.key(), omsLink);
780 public Map<NodeKey, org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.topology.Node>
785 public Map<LinkKey, Link> getTapiLinks() {