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> tpList = this.oorOduSwitchingPool.getNonBlockingList().values().stream()
143 .flatMap(nbl -> nbl.getTpList().stream())
144 .collect(Collectors.toList());
145 this.oorClientPortList = ietfNode.augmentation(
146 org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.Node1.class)
147 .getTerminationPoint().values().stream()
148 .filter(tp -> tp.augmentation(TerminationPoint1.class).getTpType().getIntValue()
149 == OpenroadmTpType.XPONDERCLIENT.getIntValue() && tpList.contains(tp.getTpId()))
150 .sorted((tp1, tp2) -> tp1.getTpId().getValue().compareTo(tp2.getTpId().getValue()))
151 .collect(Collectors.toList());
152 this.oorClientPortList.forEach(tp -> LOG.info("tp = {}", tp.getTpId()));
155 // node creation [DSR/ODU]
156 LOG.info("creation of a DSR/ODU node for {}", this.ietfNodeId);
157 Uuid nodeUuid = new Uuid(UUID.nameUUIDFromBytes((String.join("+", this.ietfNodeId, DSR))
158 .getBytes(Charset.forName("UTF-8"))).toString());
159 this.uuidMap.put(String.join("+", this.ietfNodeId, DSR), nodeUuid);
160 Name nameDsr = new NameBuilder().setValueName("dsr/odu node name").setValue(this.ietfNodeId).build();
161 List<LayerProtocolName> dsrLayerProtocols = Arrays.asList(LayerProtocolName.DSR, LayerProtocolName.ODU);
162 org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.topology
163 .Node dsrNode = createTapiNode(Map.of(nameDsr.key(), nameDsr), dsrLayerProtocols);
164 tapiNodes.put(dsrNode.key(), dsrNode);
166 // node creation [otsi]
167 LOG.info("creation of an OTSi node for {}", this.ietfNodeId);
168 nodeUuid = new Uuid(UUID.nameUUIDFromBytes((String.join("+", this.ietfNodeId, OTSI))
169 .getBytes(Charset.forName("UTF-8"))).toString());
170 this.uuidMap.put(String.join("+", this.ietfNodeId, OTSI), nodeUuid);
171 Name nameOtsi = new NameBuilder().setValueName("otsi node name").setValue(this.ietfNodeId).build();
172 List<LayerProtocolName> otsiLayerProtocols = Arrays.asList(LayerProtocolName.PHOTONICMEDIA);
173 org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.topology
174 .Node otsiNode = createTapiNode(Map.of(nameOtsi.key(), nameOtsi), otsiLayerProtocols);
175 tapiNodes.put(otsiNode.key(), otsiNode);
177 // transitional link cration between network nep of DSR/ODU node and iNep of otsi node
178 LOG.info("creation of transitional links between DSR/ODU and OTSi nodes");
179 createTapiTransitionalLinks();
182 public void convertLinks(List
183 <org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.networks.network.Link>
185 List<String> linksToNotConvert = new ArrayList<>();
186 LOG.info("creation of {} otn links", otnLinkList.size() / 2);
187 for (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.networks.network
188 .Link link : otnLinkList) {
189 if (!linksToNotConvert.contains(link.getLinkId().getValue())) {
190 Link tapiLink = createTapiLink(link);
191 linksToNotConvert.add(link
192 .augmentation(org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev200529.Link1.class)
193 .getOppositeLink().getValue());
194 tapiLinks.put(tapiLink.key(), tapiLink);
199 public void convertRoadmInfrastructure() {
200 LOG.info("abstraction of the ROADM infrastructure towards a photonic node");
201 Uuid nodeUuid = new Uuid(UUID.nameUUIDFromBytes(RDM_INFRA.getBytes(Charset.forName("UTF-8"))).toString());
202 Name nodeName = new NameBuilder().setValueName("otsi node name").setValue(RDM_INFRA).build();
203 List<LayerProtocolName> nodeLayerProtocols = Arrays.asList(LayerProtocolName.PHOTONICMEDIA);
205 List<org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.topology.Node> tapiPhotonicNodes
206 = pruneTapiPhotonicNodes();
207 Map<String, String> photonicNepUuisMap = convertListNodeWithListNepToMapForUuidAndName(tapiPhotonicNodes);
208 // nep creation for rdm infra abstraction node
209 Map<OwnedNodeEdgePointKey, OwnedNodeEdgePoint> onepMap = createNepForRdmNode(photonicNepUuisMap.size());
210 // node rule group creation
211 Map<NodeRuleGroupKey, NodeRuleGroup> nodeRuleGroupList
212 = createNodeRuleGroupForRdmNode(nodeUuid, onepMap.values());
213 // build RDM infra node abstraction
214 org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.topology.Node rdmNode = new NodeBuilder()
216 .setName(Map.of(nodeName.key(), nodeName))
217 .setLayerProtocolName(nodeLayerProtocols)
218 .setAdministrativeState(AdministrativeState.UNLOCKED)
219 .setOperationalState(OperationalState.ENABLED)
220 .setLifecycleState(LifecycleState.INSTALLED)
221 .setOwnedNodeEdgePoint(onepMap)
222 .setNodeRuleGroup(nodeRuleGroupList)
224 tapiNodes.put(rdmNode.key(), rdmNode);
226 // OMS link creation between photonoci nodes and RDM infra abstraction node
227 Map<String, String> rdmInfraNepUuisMap = convertListNodeWithListNepToMapForUuidAndName(List.of(rdmNode));
228 if (photonicNepUuisMap.size() != rdmInfraNepUuisMap.size()) {
229 LOG.warn("Unable to build OMS links between photonics nodes and RDM infrasctructure abstraction");
231 createTapiOmsLinks(photonicNepUuisMap, rdmInfraNepUuisMap);
235 private OduSwitchingPools createOduSwitchingPoolForTp100G() {
236 Map<NonBlockingListKey, NonBlockingList> nblMap = new HashMap<>();
238 for (TerminationPoint tp : this.oorNetworkPortList) {
239 TpId tpid1 = tp.getTpId();
240 TpId tpid2 = new TpId(tp.augmentation(
241 org.opendaylight.yang.gen.v1.http.transportpce.topology.rev201019.TerminationPoint1.class)
242 .getAssociatedConnectionMapPort());
243 List<TpId> tpList = new ArrayList<>();
246 NonBlockingList nbl = new NonBlockingListBuilder()
247 .setNblNumber(Uint16.valueOf(count))
250 nblMap.put(nbl.key(), nbl);
253 return new OduSwitchingPoolsBuilder()
254 .setNonBlockingList(nblMap)
255 .setSwitchingPoolNumber(Uint16.valueOf(1))
259 private List<org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.topology.Node>
260 pruneTapiPhotonicNodes() {
261 List<org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.topology.Node>
262 prunedTapiPhotonicNodes = new ArrayList<>();
263 List<org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.topology.Node> tapiPhotonicNodes
264 = this.tapiNodes.values().stream()
265 .filter(n -> LayerProtocolName.PHOTONICMEDIA.equals(n.getLayerProtocolName().get(0)))
266 .collect(Collectors.toList());
267 for (org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.topology.Node node
268 : tapiPhotonicNodes) {
269 Map<OwnedNodeEdgePointKey, OwnedNodeEdgePoint> onepM = new HashMap<>();
270 for (Map.Entry<OwnedNodeEdgePointKey, OwnedNodeEdgePoint> entry : node.getOwnedNodeEdgePoint().entrySet()) {
271 if (entry.getValue().getName().values().stream()
272 .filter(name -> name.getValueName().startsWith("eNodeEdgePoint"))
274 onepM.put(entry.getKey(), entry.getValue());
277 org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.topology.Node prunedNode
278 = new NodeBuilder(node).setOwnedNodeEdgePoint(onepM).build();
279 prunedTapiPhotonicNodes.add(prunedNode);
281 return prunedTapiPhotonicNodes;
284 private Map<String, String> convertListNodeWithListNepToMapForUuidAndName(
285 List<org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.topology.Node> nodes) {
286 Map<String, String> uuidNameMap = new HashMap<>();
287 for (org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.topology.Node node : nodes) {
288 for (OwnedNodeEdgePoint nep : node.nonnullOwnedNodeEdgePoint().values()) {
289 String nodeUuid = node.getUuid().getValue();
290 String nepUuid = nep.getUuid().getValue();
291 String nodeName = node.getName().get(new NameKey("otsi node name")).getValue();
292 String nepName = nep.getName().get(new NameKey(nep.getName().keySet().stream().findFirst().get()))
294 uuidNameMap.put(String.join("--", nodeUuid, nepUuid), String.join("--", nodeName, nepName));
300 private org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.topology.Node
301 createTapiNode(Map<NameKey, Name> nodeNames, List<LayerProtocolName> layerProtocols) {
302 Uuid nodeUuid = null;
303 Map<OwnedNodeEdgePointKey, OwnedNodeEdgePoint> onepl = new HashMap<>();
304 Map<NodeRuleGroupKey, NodeRuleGroup> nodeRuleGroupList = new HashMap<>();
305 Map<RuleKey, Rule> ruleList = new HashMap<>();
306 Rule rule = new RuleBuilder()
307 .setLocalId("forward")
308 .setForwardingRule(ForwardingRule.MAYFORWARDACROSSGROUP)
309 .setRuleType(RuleType.FORWARDING)
311 ruleList.put(rule.key(), rule);
312 if (layerProtocols.contains(LayerProtocolName.DSR)) {
313 nodeUuid = getNodeUuid4Dsr(onepl, nodeRuleGroupList, ruleList);
314 } else if (layerProtocols.contains(LayerProtocolName.PHOTONICMEDIA)) {
315 nodeUuid = getNodeUuid4Photonic(onepl, nodeRuleGroupList, ruleList);
317 LOG.error("Undefined LayerProtocolName for {} node {}", nodeNames.get(nodeNames.keySet().iterator().next())
318 .getValueName(), nodeNames.get(nodeNames.keySet().iterator().next()).getValue());
320 return new NodeBuilder()
323 .setLayerProtocolName(layerProtocols)
324 .setAdministrativeState(AdministrativeState.UNLOCKED)
325 .setOperationalState(OperationalState.ENABLED)
326 .setLifecycleState(LifecycleState.INSTALLED)
327 .setOwnedNodeEdgePoint(onepl)
328 .setNodeRuleGroup(nodeRuleGroupList)
332 private Uuid getNodeUuid4Photonic(Map<OwnedNodeEdgePointKey, OwnedNodeEdgePoint> onepl,
333 Map<NodeRuleGroupKey, NodeRuleGroup> nodeRuleGroupList, Map<RuleKey, Rule> ruleList) {
335 nodeUuid = this.uuidMap.get(String.join("+", this.ietfNodeId, OTSI));
336 // iNep creation on otsi node
337 for (int i = 0; i < oorNetworkPortList.size(); i++) {
338 Uuid nepUuid1 = new Uuid(UUID.nameUUIDFromBytes(
339 (String.join("+", this.ietfNodeId, I_OTSI, oorNetworkPortList.get(i).getTpId().getValue()))
340 .getBytes(Charset.forName("UTF-8")))
342 this.uuidMap.put(String.join("+", this.ietfNodeId, I_OTSI, oorNetworkPortList.get(i).getTpId().getValue()),
344 Name onedName = new NameBuilder()
345 .setValueName("iNodeEdgePoint")
346 .setValue(oorNetworkPortList.get(i).getTpId().getValue())
349 OwnedNodeEdgePoint onep = createNep(oorNetworkPortList.get(i), Map.of(onedName.key(), onedName),
350 LayerProtocolName.PHOTONICMEDIA, LayerProtocolName.PHOTONICMEDIA, true,
351 String.join("+", this.ietfNodeId, I_OTSI));
352 onepl.put(onep.key(), onep);
354 // eNep creation on otsi node
355 for (int i = 0; i < oorNetworkPortList.size(); i++) {
356 Uuid nepUuid2 = new Uuid(UUID.nameUUIDFromBytes(
357 (String.join("+", this.ietfNodeId, E_OTSI, oorNetworkPortList.get(i).getTpId().getValue()))
358 .getBytes(Charset.forName("UTF-8")))
360 this.uuidMap.put(String.join("+", this.ietfNodeId, E_OTSI, oorNetworkPortList.get(i).getTpId().getValue()),
362 Name onedName = new NameBuilder()
363 .setValueName("eNodeEdgePoint")
364 .setValue(oorNetworkPortList.get(i).getTpId().getValue())
367 OwnedNodeEdgePoint onep = createNep(oorNetworkPortList.get(i), Map.of(onedName.key(), onedName),
368 LayerProtocolName.PHOTONICMEDIA, LayerProtocolName.PHOTONICMEDIA, true,
369 String.join("+", this.ietfNodeId, E_OTSI));
370 onepl.put(onep.key(), onep);
372 // create NodeRuleGroup
374 for (TerminationPoint tp : this.oorNetworkPortList) {
375 Map<org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.node.rule.group.NodeEdgePointKey,
376 org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.node.rule.group.NodeEdgePoint>
377 nepList = new HashMap<>();
378 org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.node.rule.group
379 .NodeEdgePoint inep = new org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210
380 .node.rule.group.NodeEdgePointBuilder()
381 .setTopologyUuid(tapiTopoUuid)
382 .setNodeUuid(this.uuidMap.get(String.join("+", this.ietfNodeId, OTSI)))
383 .setNodeEdgePointUuid(
384 this.uuidMap.get(String.join("+", this.ietfNodeId, I_OTSI, tp.getTpId().getValue())))
386 org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.node.rule.group
387 .NodeEdgePoint enep = new org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210
388 .node.rule.group.NodeEdgePointBuilder()
389 .setTopologyUuid(tapiTopoUuid)
390 .setNodeUuid(this.uuidMap.get(String.join("+", this.ietfNodeId, OTSI)))
391 .setNodeEdgePointUuid(
392 this.uuidMap.get(String.join("+", this.ietfNodeId, E_OTSI, tp.getTpId().getValue())))
394 nepList.put(inep.key(), inep);
395 nepList.put(enep.key(), enep);
396 NodeRuleGroup nodeRuleGroup = new NodeRuleGroupBuilder()
398 UUID.nameUUIDFromBytes(("otsi node rule group " + count).getBytes(Charset.forName("UTF-8")))
401 .setNodeEdgePoint(nepList)
403 nodeRuleGroupList.put(nodeRuleGroup.key(), nodeRuleGroup);
409 private Uuid getNodeUuid4Dsr(Map<OwnedNodeEdgePointKey, OwnedNodeEdgePoint> onepl,
410 Map<NodeRuleGroupKey, NodeRuleGroup> nodeRuleGroupList, Map<RuleKey, Rule> ruleList) {
412 nodeUuid = this.uuidMap.get(String.join("+", this.ietfNodeId, DSR));
413 // client nep creation on DSR/ODU node
414 for (int i = 0; i < oorClientPortList.size(); i++) {
415 Uuid nepUuid = new Uuid(UUID.nameUUIDFromBytes(
416 (String.join("+", this.ietfNodeId, DSR, oorClientPortList.get(i).getTpId().getValue()))
417 .getBytes(Charset.forName("UTF-8"))).toString());
418 this.uuidMap.put(String.join("+", this.ietfNodeId, DSR, oorClientPortList.get(i).getTpId().getValue()),
420 NameBuilder nameBldr = new NameBuilder().setValue(oorClientPortList.get(i).getTpId().getValue());
422 if (OpenroadmNodeType.TPDR.equals(this.ietfNodeType)) {
423 name = nameBldr.setValueName("100G-tpdr").build();
425 name = nameBldr.setValueName("NodeEdgePoint_C").build();
428 OwnedNodeEdgePoint onep = createNep(oorClientPortList.get(i), Map.of(name.key(), name),
429 LayerProtocolName.ETH, LayerProtocolName.DSR, true, String.join("+", this.ietfNodeId, DSR));
430 onepl.put(onep.key(), onep);
432 // network nep creation on DSR/ODU node
433 for (int i = 0; i < oorNetworkPortList.size(); i++) {
434 Uuid nepUuid = new Uuid(UUID.nameUUIDFromBytes(
435 (String.join("+", this.ietfNodeId, DSR, oorNetworkPortList.get(i).getTpId().getValue()))
436 .getBytes(Charset.forName("UTF-8"))).toString());
437 this.uuidMap.put(String.join("+", this.ietfNodeId, DSR, oorNetworkPortList.get(i).getTpId().getValue()),
439 Name onedName = new NameBuilder()
440 .setValueName("NodeEdgePoint_N")
441 .setValue(oorNetworkPortList.get(i).getTpId().getValue())
444 OwnedNodeEdgePoint onep = createNep(oorNetworkPortList.get(i), Map.of(onedName.key(), onedName),
445 LayerProtocolName.ODU, LayerProtocolName.DSR, true, String.join("+", this.ietfNodeId, DSR));
446 onepl.put(onep.key(), onep);
448 // create NodeRuleGroup
450 for (NonBlockingList nbl : this.oorOduSwitchingPool.nonnullNonBlockingList().values()) {
451 Map<org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.node.rule.group.NodeEdgePointKey,
452 org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.node.rule.group.NodeEdgePoint>
453 nepList = new HashMap<>();
454 for (TpId tp : nbl.getTpList()) {
455 if (this.uuidMap.containsKey(String.join("+", this.ietfNodeId, DSR, tp.getValue()))) {
456 org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.node.rule.group.NodeEdgePoint
457 nep = new org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.node.rule.group
458 .NodeEdgePointBuilder()
459 .setTopologyUuid(tapiTopoUuid)
460 .setNodeUuid(this.uuidMap.get(String.join("+", this.ietfNodeId, DSR)))
461 .setNodeEdgePointUuid(this.uuidMap.get(String.join("+", this.ietfNodeId, DSR, tp.getValue())))
463 nepList.put(nep.key(), nep);
466 NodeRuleGroup nodeRuleGroup = new NodeRuleGroupBuilder()
468 UUID.nameUUIDFromBytes(("dsr node rule group " + count).getBytes(Charset.forName("UTF-8")))
471 .setNodeEdgePoint(nepList)
473 nodeRuleGroupList.put(nodeRuleGroup.key(), nodeRuleGroup);
479 private OwnedNodeEdgePoint createNep(TerminationPoint oorTp, Map<NameKey, Name> nepNames,
480 LayerProtocolName nepProtocol, LayerProtocolName nodeProtocol, boolean withSip, String keyword) {
481 String key = String.join("+", keyword, oorTp.getTpId().getValue());
482 OwnedNodeEdgePointBuilder onepBldr = new OwnedNodeEdgePointBuilder()
483 .setUuid(this.uuidMap.get(key))
484 .setLayerProtocolName(nepProtocol)
487 onepBldr.setMappedServiceInterfacePoint(createSIP(1));
489 onepBldr.setSupportedCepLayerProtocolQualifier(createSupportedCepLayerProtocolQualifier(oorTp, nodeProtocol));
490 onepBldr.setLinkPortDirection(PortDirection.BIDIRECTIONAL).setLinkPortRole(PortRole.SYMMETRIC)
491 .setAdministrativeState(AdministrativeState.UNLOCKED).setOperationalState(OperationalState.ENABLED)
492 .setLifecycleState(LifecycleState.INSTALLED).setTerminationDirection(TerminationDirection.BIDIRECTIONAL)
493 .setTerminationState(TerminationState.TERMINATEDBIDIRECTIONAL);
494 return onepBldr.build();
497 private Map<OwnedNodeEdgePointKey, OwnedNodeEdgePoint> createNepForRdmNode(int nbNep) {
498 Map<OwnedNodeEdgePointKey, OwnedNodeEdgePoint> onepMap = new HashMap<>();
499 for (int i = 1; i <= nbNep; i++) {
500 Uuid nepUuid = new Uuid(UUID.nameUUIDFromBytes((String.join("+", "roadm node", "nep", String.valueOf(i)))
501 .getBytes(Charset.forName("UTF-8"))).toString());
502 Name nepName = new NameBuilder()
503 .setValueName("NodeEdgePoint name")
504 .setValue(new StringBuilder("NodeEdgePoint_").append(i).toString())
506 OwnedNodeEdgePoint onep = new OwnedNodeEdgePointBuilder()
508 .setLayerProtocolName(LayerProtocolName.PHOTONICMEDIA)
509 .setName(Map.of(nepName.key(), nepName))
510 .setSupportedCepLayerProtocolQualifier(List.of(PHOTONICLAYERQUALIFIEROMS.class))
511 .setLinkPortDirection(PortDirection.BIDIRECTIONAL).setLinkPortRole(PortRole.SYMMETRIC)
512 .setAdministrativeState(AdministrativeState.UNLOCKED).setOperationalState(OperationalState.ENABLED)
513 .setLifecycleState(LifecycleState.INSTALLED).setTerminationDirection(TerminationDirection.BIDIRECTIONAL)
514 .setTerminationState(TerminationState.TERMINATEDBIDIRECTIONAL)
516 onepMap.put(onep.key(), onep);
521 private Map<NodeRuleGroupKey, NodeRuleGroup> createNodeRuleGroupForRdmNode(Uuid nodeUuid,
522 Collection<OwnedNodeEdgePoint> onepl) {
523 Map<org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.node.rule.group.NodeEdgePointKey,
524 org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.node.rule.group.NodeEdgePoint>
525 nepMap = new HashMap<>();
526 for (OwnedNodeEdgePoint onep : onepl) {
527 org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.node.rule.group.NodeEdgePoint
528 nep = new org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.node.rule.group
529 .NodeEdgePointBuilder()
530 .setTopologyUuid(tapiTopoUuid)
531 .setNodeUuid(nodeUuid)
532 .setNodeEdgePointUuid(onep.key().getUuid())
534 nepMap.put(nep.key(), nep);
536 Map<NodeRuleGroupKey, NodeRuleGroup> nodeRuleGroupMap = new HashMap<>();
537 Map<RuleKey, Rule> ruleList = new HashMap<>();
538 Rule rule = new RuleBuilder()
539 .setLocalId("forward")
540 .setForwardingRule(ForwardingRule.MAYFORWARDACROSSGROUP)
541 .setRuleType(RuleType.FORWARDING)
543 ruleList.put(rule.key(), rule);
544 NodeRuleGroup nodeRuleGroup = new NodeRuleGroupBuilder()
545 .setUuid(new Uuid(UUID.nameUUIDFromBytes(("rdm infra node rule group").getBytes(Charset.forName("UTF-8")))
548 .setNodeEdgePoint(nepMap)
550 nodeRuleGroupMap.put(nodeRuleGroup.key(), nodeRuleGroup);
551 return nodeRuleGroupMap;
554 private Map<MappedServiceInterfacePointKey, MappedServiceInterfacePoint> createSIP(int nb) {
555 Map<MappedServiceInterfacePointKey, MappedServiceInterfacePoint> msipl = new HashMap<>();
556 for (int i = 0; i < nb; i++) {
557 MappedServiceInterfacePoint msip = new MappedServiceInterfacePointBuilder()
558 .setServiceInterfacePointUuid(new Uuid(UUID.randomUUID().toString())).build();
559 msipl.put(msip.key(), msip);
564 private List<Class<? extends LAYERPROTOCOLQUALIFIER>> createSupportedCepLayerProtocolQualifier(TerminationPoint tp,
565 LayerProtocolName lpn) {
566 List<Class<? extends LAYERPROTOCOLQUALIFIER>> sclpqList = new ArrayList<>();
567 List<SupportedInterfaceCapability> sicList = new ArrayList<>(
568 tp.augmentation(org.opendaylight.yang.gen.v1.http
569 .org.openroadm.otn.network.topology.rev200529.TerminationPoint1.class).getTpSupportedInterfaces()
570 .getSupportedInterfaceCapability().values());
571 for (SupportedInterfaceCapability sic : sicList) {
572 switch (lpn.getName()) {
574 if (sic.getIfCapType().getSimpleName().equals("If10GEODU2e")) {
575 sclpqList.add(DIGITALSIGNALTYPE10GigELAN.class);
576 sclpqList.add(ODUTYPEODU2E.class);
577 } else if (sic.getIfCapType().getSimpleName().equals("IfOCHOTU4ODU4")) {
578 sclpqList.add(ODUTYPEODU4.class);
579 } else if (sic.getIfCapType().getSimpleName().equals("If100GEODU4")) {
580 sclpqList.add(DIGITALSIGNALTYPE100GigE.class);
581 sclpqList.add(ODUTYPEODU4.class);
582 } else if (sic.getIfCapType().getSimpleName().equals("If100GE")) {
583 sclpqList.add(DIGITALSIGNALTYPE100GigE.class);
586 case "PHOTONIC_MEDIA":
587 if (sic.getIfCapType().getSimpleName().equals("IfOCHOTU4ODU4")) {
588 sclpqList.add(PHOTONICLAYERQUALIFIEROTSi.class);
589 sclpqList.add(PHOTONICLAYERQUALIFIEROMS.class);
593 LOG.error("Layer Protocol Name is unknown");
600 private void createTapiTransitionalLinks() {
601 for (TerminationPoint tp : this.oorNetworkPortList) {
602 Map<NodeEdgePointKey, NodeEdgePoint> nepList = new HashMap<>();
603 String sourceKey = String.join("+", this.ietfNodeId, DSR, tp.getTpId().getValue());
604 Uuid sourceUuidTp = this.uuidMap.get(sourceKey);
605 String destKey = String.join("+", this.ietfNodeId, I_OTSI, tp.getTpId().getValue());
606 Uuid destUuidTp = this.uuidMap.get(destKey);
607 NodeEdgePoint sourceNep = new NodeEdgePointBuilder()
608 .setTopologyUuid(this.tapiTopoUuid)
609 .setNodeUuid(this.uuidMap.get(String.join("+", this.ietfNodeId, DSR)))
610 .setNodeEdgePointUuid(sourceUuidTp)
612 nepList.put(sourceNep.key(), sourceNep);
613 NodeEdgePoint destNep = new NodeEdgePointBuilder()
614 .setTopologyUuid(this.tapiTopoUuid)
615 .setNodeUuid(this.uuidMap.get(String.join("+", this.ietfNodeId, OTSI)))
616 .setNodeEdgePointUuid(destUuidTp)
618 nepList.put(destNep.key(), destNep);
619 Name linkName = new NameBuilder().setValueName("transitional link name")
620 .setValue(String.join("--", this.ietfNodeId, sourceKey, destKey))
622 Link transiLink = new LinkBuilder()
624 UUID.nameUUIDFromBytes((String.join("--", this.ietfNodeId, sourceKey, destKey))
625 .getBytes(Charset.forName("UTF-8")))
627 .setName(Map.of(linkName.key(), linkName))
628 .setTransitionedLayerProtocolName(Arrays.asList(LayerProtocolName.ODU.getName(),
629 LayerProtocolName.PHOTONICMEDIA.getName()))
630 .setNodeEdgePoint(nepList)
631 .setDirection(ForwardingDirection.BIDIRECTIONAL)
632 .setAvailableCapacity(new AvailableCapacityBuilder().setTotalSize(
633 new TotalSizeBuilder().setUnit(CapacityUnit.GBPS).setValue(Uint64.valueOf(100)).build()).build())
635 this.tapiLinks.put(transiLink.key(), transiLink);
639 private Link createTapiLink(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226
640 .networks.network.Link link) {
641 String prefix = link.getLinkId().getValue().split("-")[0];
642 String sourceNode = link.getSource().getSourceNode().getValue();
643 String sourceTp = link.getSource().getSourceTp().toString();
644 String destNode = link.getDestination().getDestNode().getValue();
645 String destTp = link.getDestination().getDestTp().toString();
646 Map<NodeEdgePointKey, NodeEdgePoint> nepList = new HashMap<>();
654 sourceUuidTp = this.uuidMap.get(String.join("+", sourceNode, I_OTSI, sourceTp));
655 sourceUuidNode = this.uuidMap.get(String.join("+", sourceNode, OTSI));
656 NodeEdgePoint sourceNep = new NodeEdgePointBuilder()
657 .setTopologyUuid(this.tapiTopoUuid)
658 .setNodeUuid(sourceUuidNode)
659 .setNodeEdgePointUuid(sourceUuidTp)
661 nepList.put(sourceNep.key(), sourceNep);
662 destUuidTp = this.uuidMap.get(String.join("+", destNode, I_OTSI, destTp));
663 destUuidNode = this.uuidMap.get(String.join("+", destNode, OTSI));
664 NodeEdgePoint destNep = new NodeEdgePointBuilder()
665 .setTopologyUuid(this.tapiTopoUuid)
666 .setNodeUuid(destUuidNode)
667 .setNodeEdgePointUuid(destUuidTp)
669 nepList.put(destNep.key(), destNep);
670 linkName = new NameBuilder().setValueName("otn link name")
671 .setValue(link.getLinkId().getValue())
673 return new LinkBuilder()
675 UUID.nameUUIDFromBytes((link.getLinkId().getValue())
676 .getBytes(Charset.forName("UTF-8")))
678 .setName(Map.of(linkName.key(), linkName))
679 .setLayerProtocolName(Arrays.asList(LayerProtocolName.PHOTONICMEDIA))
680 .setAdministrativeState(AdministrativeState.UNLOCKED)
681 .setOperationalState(OperationalState.ENABLED)
682 .setDirection(ForwardingDirection.BIDIRECTIONAL)
683 .setNodeEdgePoint(nepList)
684 .setTotalPotentialCapacity(new TotalPotentialCapacityBuilder().setTotalSize(
685 new TotalSizeBuilder().setUnit(CapacityUnit.GBPS)
686 .setValue(Uint64.valueOf(100)).build()).build())
687 .setAvailableCapacity(new AvailableCapacityBuilder().setTotalSize(
688 new TotalSizeBuilder().setUnit(CapacityUnit.MBPS)
689 .setValue(Uint64.valueOf(link.augmentation(Link1.class).getAvailableBandwidth())).build())
693 sourceUuidTp = this.uuidMap.get(String.join("+", sourceNode, DSR, sourceTp));
694 sourceUuidNode = this.uuidMap.get(String.join("+", sourceNode, DSR));
695 NodeEdgePoint sourceNep2 = new NodeEdgePointBuilder()
696 .setTopologyUuid(this.tapiTopoUuid)
697 .setNodeUuid(sourceUuidNode)
698 .setNodeEdgePointUuid(sourceUuidTp)
700 nepList.put(sourceNep2.key(), sourceNep2);
701 destUuidTp = this.uuidMap.get(String.join("+", destNode, DSR, destTp));
702 destUuidNode = this.uuidMap.get(String.join("+", destNode, DSR));
703 NodeEdgePoint destNep2 = new NodeEdgePointBuilder()
704 .setTopologyUuid(this.tapiTopoUuid)
705 .setNodeUuid(destUuidNode)
706 .setNodeEdgePointUuid(destUuidTp)
708 nepList.put(destNep2.key(), destNep2);
709 linkName = new NameBuilder().setValueName("otn link name")
710 .setValue(link.getLinkId().getValue())
712 return new LinkBuilder()
714 UUID.nameUUIDFromBytes((link.getLinkId().getValue())
715 .getBytes(Charset.forName("UTF-8")))
717 .setName(Map.of(linkName.key(), linkName))
718 .setLayerProtocolName(Arrays.asList(LayerProtocolName.ODU))
719 .setAdministrativeState(AdministrativeState.UNLOCKED)
720 .setOperationalState(OperationalState.ENABLED)
721 .setDirection(ForwardingDirection.BIDIRECTIONAL)
722 .setNodeEdgePoint(nepList)
723 .setTotalPotentialCapacity(new TotalPotentialCapacityBuilder().setTotalSize(
724 new TotalSizeBuilder().setUnit(CapacityUnit.GBPS)
725 .setValue(Uint64.valueOf(100)).build()).build())
726 .setAvailableCapacity(new AvailableCapacityBuilder().setTotalSize(
727 new TotalSizeBuilder().setUnit(CapacityUnit.MBPS)
728 .setValue(Uint64.valueOf(link.augmentation(Link1.class).getAvailableBandwidth())).build())
732 LOG.error("OTN link of type {} not managed yet", prefix);
737 private void createTapiOmsLinks(Map<String, String> photonicNepUuisMap, Map<String, String> rdmInfraNepUuisMap) {
738 Iterator<Entry<String, String>> it1 = photonicNepUuisMap.entrySet().iterator();
739 Iterator<Entry<String, String>> it2 = rdmInfraNepUuisMap.entrySet().iterator();
740 while (it1.hasNext()) {
741 Map<NodeEdgePointKey, NodeEdgePoint> nepMap = new HashMap<>();
742 Map.Entry<String, String> photonicEntry = it1.next();
743 Map.Entry<String, String> rdmEntry = it2.next();
744 Uuid sourceUuidTp = new Uuid(photonicEntry.getKey().split("--")[1]);
745 Uuid sourceUuidNode = new Uuid(photonicEntry.getKey().split("--")[0]);
746 Uuid destUuidTp = new Uuid(rdmEntry.getKey().split("--")[1]);
747 Uuid destUuidNode = new Uuid(rdmEntry.getKey().split("--")[0]);
748 NodeEdgePoint sourceNep = new NodeEdgePointBuilder()
749 .setTopologyUuid(this.tapiTopoUuid)
750 .setNodeUuid(sourceUuidNode)
751 .setNodeEdgePointUuid(sourceUuidTp)
753 nepMap.put(sourceNep.key(), sourceNep);
754 NodeEdgePoint destNep = new NodeEdgePointBuilder()
755 .setTopologyUuid(this.tapiTopoUuid)
756 .setNodeUuid(destUuidNode)
757 .setNodeEdgePointUuid(destUuidTp)
759 nepMap.put(destNep.key(), destNep);
760 Name linkName = new NameBuilder().setValueName("OMS link name")
761 .setValue(String.join(" and ", photonicEntry.getValue(), rdmEntry.getValue()))
763 Link omsLink = new LinkBuilder()
765 UUID.nameUUIDFromBytes((String.join(" and ", photonicEntry.getValue(), rdmEntry.getValue()))
766 .getBytes(Charset.forName("UTF-8")))
768 .setName(Map.of(linkName.key(), linkName))
769 .setLayerProtocolName(List.of(LayerProtocolName.PHOTONICMEDIA))
770 .setNodeEdgePoint(nepMap)
771 .setDirection(ForwardingDirection.BIDIRECTIONAL)
773 this.tapiLinks.put(omsLink.key(), omsLink);
777 public Map<NodeKey, org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.topology.Node>
782 public Map<LinkKey, Link> getTapiLinks() {