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.HashSet;
16 import java.util.Iterator;
17 import java.util.List;
19 import java.util.Map.Entry;
21 import java.util.UUID;
22 import java.util.stream.Collectors;
23 import org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev200529.TerminationPoint1;
24 import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.types.rev200327.xpdr.odu.switching.pools.OduSwitchingPools;
25 import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.types.rev200327.xpdr.odu.switching.pools.OduSwitchingPoolsBuilder;
26 import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.types.rev200327.xpdr.odu.switching.pools.odu.switching.pools.NonBlockingList;
27 import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.types.rev200327.xpdr.odu.switching.pools.odu.switching.pools.NonBlockingListBuilder;
28 import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.types.rev200327.xpdr.odu.switching.pools.odu.switching.pools.NonBlockingListKey;
29 import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev200529.OpenroadmNodeType;
30 import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev200529.OpenroadmTpType;
31 import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev200529.xpdr.tp.supported.interfaces.SupportedInterfaceCapability;
32 import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev200529.Link1;
33 import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev200529.Node1;
34 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.network.Node;
35 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.TpId;
36 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.networks.network.node.TerminationPoint;
37 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.common.rev181210.AdministrativeState;
38 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.common.rev181210.CapacityUnit;
39 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.common.rev181210.ForwardingDirection;
40 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.common.rev181210.LAYERPROTOCOLQUALIFIER;
41 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.common.rev181210.LayerProtocolName;
42 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.common.rev181210.LifecycleState;
43 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.common.rev181210.OperationalState;
44 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.common.rev181210.PortDirection;
45 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.common.rev181210.PortRole;
46 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.common.rev181210.TerminationDirection;
47 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.common.rev181210.TerminationState;
48 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.common.rev181210.Uuid;
49 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.common.rev181210.capacity.TotalSizeBuilder;
50 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.common.rev181210.capacity.pac.AvailableCapacityBuilder;
51 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.common.rev181210.capacity.pac.TotalPotentialCapacityBuilder;
52 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.common.rev181210.global._class.Name;
53 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.common.rev181210.global._class.NameBuilder;
54 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.common.rev181210.global._class.NameKey;
55 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.dsr.rev181210.DIGITALSIGNALTYPE100GigE;
56 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.dsr.rev181210.DIGITALSIGNALTYPE10GigELAN;
57 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.odu.rev181210.ODUTYPEODU2;
58 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.odu.rev181210.ODUTYPEODU2E;
59 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.odu.rev181210.ODUTYPEODU4;
60 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.photonic.media.rev181210.PHOTONICLAYERQUALIFIEROMS;
61 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.photonic.media.rev181210.PHOTONICLAYERQUALIFIEROTSi;
62 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.ForwardingRule;
63 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.RuleType;
64 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.link.NodeEdgePoint;
65 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.link.NodeEdgePointBuilder;
66 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.link.NodeEdgePointKey;
67 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.node.NodeRuleGroup;
68 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.node.NodeRuleGroupBuilder;
69 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.node.NodeRuleGroupKey;
70 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.node.OwnedNodeEdgePoint;
71 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.node.OwnedNodeEdgePointBuilder;
72 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.node.OwnedNodeEdgePointKey;
73 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.node.edge.point.MappedServiceInterfacePoint;
74 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.node.edge.point.MappedServiceInterfacePointBuilder;
75 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.node.edge.point.MappedServiceInterfacePointKey;
76 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.node.rule.group.Rule;
77 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.node.rule.group.RuleBuilder;
78 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.node.rule.group.RuleKey;
79 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.topology.Link;
80 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.topology.LinkBuilder;
81 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.topology.LinkKey;
82 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.topology.NodeBuilder;
83 import org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.topology.NodeKey;
84 import org.opendaylight.yangtools.yang.common.Uint16;
85 import org.opendaylight.yangtools.yang.common.Uint64;
86 import org.slf4j.Logger;
87 import org.slf4j.LoggerFactory;
90 public class ConvertORTopoToTapiTopo {
92 private static final String DSR = "DSR";
93 private static final String OTSI = "OTSi";
94 private static final String E_OTSI = "eOTSi";
95 private static final String I_OTSI = "iOTSi";
96 private static final String RDM_INFRA = "ROADM-infra";
97 private static final Logger LOG = LoggerFactory.getLogger(ConvertORTopoToTapiTopo.class);
98 private String ietfNodeId;
99 private OpenroadmNodeType ietfNodeType;
100 private List<TerminationPoint> oorClientPortList;
101 private List<TerminationPoint> oorNetworkPortList;
102 private OduSwitchingPools oorOduSwitchingPool;
103 private Uuid tapiTopoUuid;
104 private Map<NodeKey, org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.topology.Node>
106 private Map<LinkKey, Link> tapiLinks;
107 private Map<String, Uuid> uuidMap;
110 public ConvertORTopoToTapiTopo(Uuid tapiTopoUuid) {
111 this.tapiTopoUuid = tapiTopoUuid;
112 this.tapiNodes = new HashMap<>();
113 this.tapiLinks = new HashMap<>();
114 this.uuidMap = new HashMap<>();
117 public void convertNode(Node ietfNode, List<String> networkPorts) {
118 this.ietfNodeId = ietfNode.getNodeId().getValue();
119 if (ietfNode.augmentation(org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev200529.Node1.class)
123 this.ietfNodeType = ietfNode.augmentation(
124 org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev200529.Node1.class).getNodeType();
125 this.oorNetworkPortList = ietfNode.augmentation(
126 org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.Node1.class)
127 .getTerminationPoint().values().stream()
128 .filter(tp -> tp.augmentation(TerminationPoint1.class).getTpType().getIntValue()
129 == OpenroadmTpType.XPONDERNETWORK.getIntValue()
130 && networkPorts.contains(tp.getTpId().getValue()))
131 .sorted((tp1, tp2) -> tp1.getTpId().getValue().compareTo(tp2.getTpId().getValue()))
132 .collect(Collectors.toList());
133 if (!OpenroadmNodeType.TPDR.equals(this.ietfNodeType)) {
134 this.oorOduSwitchingPool = ietfNode.augmentation(Node1.class).getSwitchingPools().getOduSwitchingPools()
135 .values().stream().findFirst().get();
136 this.oorClientPortList = ietfNode.augmentation(
137 org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.Node1.class)
138 .getTerminationPoint().values().stream()
139 .filter(tp -> tp.augmentation(TerminationPoint1.class).getTpType().getIntValue()
140 == OpenroadmTpType.XPONDERCLIENT.getIntValue())
141 .sorted((tp1, tp2) -> tp1.getTpId().getValue().compareTo(tp2.getTpId().getValue()))
142 .collect(Collectors.toList());
144 this.oorOduSwitchingPool = createOduSwitchingPoolForTp100G();
145 List<TpId> tpList = this.oorOduSwitchingPool.getNonBlockingList().values().stream()
146 .flatMap(nbl -> nbl.getTpList().stream())
147 .collect(Collectors.toList());
148 this.oorClientPortList = ietfNode.augmentation(
149 org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.Node1.class)
150 .getTerminationPoint().values().stream()
151 .filter(tp -> tp.augmentation(TerminationPoint1.class).getTpType().getIntValue()
152 == OpenroadmTpType.XPONDERCLIENT.getIntValue() && tpList.contains(tp.getTpId()))
153 .sorted((tp1, tp2) -> tp1.getTpId().getValue().compareTo(tp2.getTpId().getValue()))
154 .collect(Collectors.toList());
155 this.oorClientPortList.forEach(tp -> LOG.info("tp = {}", tp.getTpId()));
158 // node creation [DSR/ODU]
159 LOG.info("creation of a DSR/ODU node for {}", this.ietfNodeId);
160 Uuid nodeUuid = new Uuid(UUID.nameUUIDFromBytes((String.join("+", this.ietfNodeId, DSR))
161 .getBytes(Charset.forName("UTF-8"))).toString());
162 this.uuidMap.put(String.join("+", this.ietfNodeId, DSR), nodeUuid);
163 Name nameDsr = new NameBuilder().setValueName("dsr/odu node name").setValue(this.ietfNodeId).build();
164 List<LayerProtocolName> dsrLayerProtocols = Arrays.asList(LayerProtocolName.DSR, LayerProtocolName.ODU);
165 org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.topology
166 .Node dsrNode = createTapiNode(Map.of(nameDsr.key(), nameDsr), dsrLayerProtocols);
167 tapiNodes.put(dsrNode.key(), dsrNode);
169 // node creation [otsi]
170 LOG.info("creation of an OTSi node for {}", this.ietfNodeId);
171 nodeUuid = new Uuid(UUID.nameUUIDFromBytes((String.join("+", this.ietfNodeId, OTSI))
172 .getBytes(Charset.forName("UTF-8"))).toString());
173 this.uuidMap.put(String.join("+", this.ietfNodeId, OTSI), nodeUuid);
174 Name nameOtsi = new NameBuilder().setValueName("otsi node name").setValue(this.ietfNodeId).build();
175 List<LayerProtocolName> otsiLayerProtocols = Arrays.asList(LayerProtocolName.PHOTONICMEDIA);
176 org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.topology
177 .Node otsiNode = createTapiNode(Map.of(nameOtsi.key(), nameOtsi), otsiLayerProtocols);
178 tapiNodes.put(otsiNode.key(), otsiNode);
180 // transitional link cration between network nep of DSR/ODU node and iNep of otsi node
181 LOG.info("creation of transitional links between DSR/ODU and OTSi nodes");
182 createTapiTransitionalLinks();
185 public void convertLinks(List
186 <org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.networks.network.Link>
188 List<String> linksToNotConvert = new ArrayList<>();
189 LOG.info("creation of {} otn links", otnLinkList.size() / 2);
190 for (org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.networks.network
191 .Link link : otnLinkList) {
192 if (!linksToNotConvert.contains(link.getLinkId().getValue())) {
193 Link tapiLink = createTapiLink(link);
194 linksToNotConvert.add(link
195 .augmentation(org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev200529.Link1.class)
196 .getOppositeLink().getValue());
197 tapiLinks.put(tapiLink.key(), tapiLink);
202 public void convertRoadmInfrastructure() {
203 LOG.info("abstraction of the ROADM infrastructure towards a photonic node");
204 Uuid nodeUuid = new Uuid(UUID.nameUUIDFromBytes(RDM_INFRA.getBytes(Charset.forName("UTF-8"))).toString());
205 Name nodeName = new NameBuilder().setValueName("otsi node name").setValue(RDM_INFRA).build();
206 List<LayerProtocolName> nodeLayerProtocols = Arrays.asList(LayerProtocolName.PHOTONICMEDIA);
208 List<org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.topology.Node> tapiPhotonicNodes
209 = pruneTapiPhotonicNodes();
210 Map<String, String> photonicNepUuisMap = convertListNodeWithListNepToMapForUuidAndName(tapiPhotonicNodes);
211 // nep creation for rdm infra abstraction node
212 Map<OwnedNodeEdgePointKey, OwnedNodeEdgePoint> onepMap = createNepForRdmNode(photonicNepUuisMap.size());
213 // node rule group creation
214 Map<NodeRuleGroupKey, NodeRuleGroup> nodeRuleGroupList
215 = createNodeRuleGroupForRdmNode(nodeUuid, onepMap.values());
216 // build RDM infra node abstraction
217 org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.topology.Node rdmNode = new NodeBuilder()
219 .setName(Map.of(nodeName.key(), nodeName))
220 .setLayerProtocolName(nodeLayerProtocols)
221 .setAdministrativeState(AdministrativeState.UNLOCKED)
222 .setOperationalState(OperationalState.ENABLED)
223 .setLifecycleState(LifecycleState.INSTALLED)
224 .setOwnedNodeEdgePoint(onepMap)
225 .setNodeRuleGroup(nodeRuleGroupList)
227 tapiNodes.put(rdmNode.key(), rdmNode);
229 // OMS link creation between photonoci nodes and RDM infra abstraction node
230 Map<String, String> rdmInfraNepUuisMap = convertListNodeWithListNepToMapForUuidAndName(List.of(rdmNode));
231 if (photonicNepUuisMap.size() != rdmInfraNepUuisMap.size()) {
232 LOG.warn("Unable to build OMS links between photonics nodes and RDM infrasctructure abstraction");
234 createTapiOmsLinks(photonicNepUuisMap, rdmInfraNepUuisMap);
238 private OduSwitchingPools createOduSwitchingPoolForTp100G() {
239 Map<NonBlockingListKey, NonBlockingList> nblMap = new HashMap<>();
241 for (TerminationPoint tp : this.oorNetworkPortList) {
242 TpId tpid1 = tp.getTpId();
243 TpId tpid2 = new TpId(tp.augmentation(
244 org.opendaylight.yang.gen.v1.http.transportpce.topology.rev201019.TerminationPoint1.class)
245 .getAssociatedConnectionMapPort());
246 List<TpId> tpList = new ArrayList<>();
249 NonBlockingList nbl = new NonBlockingListBuilder()
250 .setNblNumber(Uint16.valueOf(count))
253 nblMap.put(nbl.key(), nbl);
256 return new OduSwitchingPoolsBuilder()
257 .setNonBlockingList(nblMap)
258 .setSwitchingPoolNumber(Uint16.valueOf(1))
262 private List<org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.topology.Node>
263 pruneTapiPhotonicNodes() {
264 List<org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.topology.Node>
265 prunedTapiPhotonicNodes = new ArrayList<>();
266 List<org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.topology.Node> tapiPhotonicNodes
267 = this.tapiNodes.values().stream()
268 .filter(n -> LayerProtocolName.PHOTONICMEDIA.equals(n.getLayerProtocolName().get(0)))
269 .collect(Collectors.toList());
270 for (org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.topology.Node node
271 : tapiPhotonicNodes) {
272 Map<OwnedNodeEdgePointKey, OwnedNodeEdgePoint> onepM = new HashMap<>();
273 for (Map.Entry<OwnedNodeEdgePointKey, OwnedNodeEdgePoint> entry : node.getOwnedNodeEdgePoint().entrySet()) {
274 if (entry.getValue().getName().values().stream()
275 .filter(name -> name.getValueName().startsWith("eNodeEdgePoint"))
277 onepM.put(entry.getKey(), entry.getValue());
280 org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.topology.Node prunedNode
281 = new NodeBuilder(node).setOwnedNodeEdgePoint(onepM).build();
282 prunedTapiPhotonicNodes.add(prunedNode);
284 return prunedTapiPhotonicNodes;
287 private Map<String, String> convertListNodeWithListNepToMapForUuidAndName(
288 List<org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.topology.Node> nodes) {
289 Map<String, String> uuidNameMap = new HashMap<>();
290 for (org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.topology.Node node : nodes) {
291 for (OwnedNodeEdgePoint nep : node.nonnullOwnedNodeEdgePoint().values()) {
292 String nodeUuid = node.getUuid().getValue();
293 String nepUuid = nep.getUuid().getValue();
294 String nodeName = node.getName().get(new NameKey("otsi node name")).getValue();
295 String nepName = nep.getName().get(new NameKey(nep.getName().keySet().stream().findFirst().get()))
297 uuidNameMap.put(String.join("--", nodeUuid, nepUuid), String.join("--", nodeName, nepName));
303 private org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.topology.Node
304 createTapiNode(Map<NameKey, Name> nodeNames, List<LayerProtocolName> layerProtocols) {
305 Uuid nodeUuid = null;
306 Map<OwnedNodeEdgePointKey, OwnedNodeEdgePoint> onepl = new HashMap<>();
307 Map<NodeRuleGroupKey, NodeRuleGroup> nodeRuleGroupList = new HashMap<>();
308 Map<RuleKey, Rule> ruleList = new HashMap<>();
309 Rule rule = new RuleBuilder()
310 .setLocalId("forward")
311 .setForwardingRule(ForwardingRule.MAYFORWARDACROSSGROUP)
312 .setRuleType(RuleType.FORWARDING)
314 ruleList.put(rule.key(), rule);
315 if (layerProtocols.contains(LayerProtocolName.DSR)) {
316 nodeUuid = getNodeUuid4Dsr(onepl, nodeRuleGroupList, ruleList);
317 } else if (layerProtocols.contains(LayerProtocolName.PHOTONICMEDIA)) {
318 nodeUuid = getNodeUuid4Photonic(onepl, nodeRuleGroupList, ruleList);
320 LOG.error("Undefined LayerProtocolName for {} node {}", nodeNames.get(nodeNames.keySet().iterator().next())
321 .getValueName(), nodeNames.get(nodeNames.keySet().iterator().next()).getValue());
323 return new NodeBuilder()
326 .setLayerProtocolName(layerProtocols)
327 .setAdministrativeState(AdministrativeState.UNLOCKED)
328 .setOperationalState(OperationalState.ENABLED)
329 .setLifecycleState(LifecycleState.INSTALLED)
330 .setOwnedNodeEdgePoint(onepl)
331 .setNodeRuleGroup(nodeRuleGroupList)
335 private Uuid getNodeUuid4Photonic(Map<OwnedNodeEdgePointKey, OwnedNodeEdgePoint> onepl,
336 Map<NodeRuleGroupKey, NodeRuleGroup> nodeRuleGroupList, Map<RuleKey, Rule> ruleList) {
338 nodeUuid = this.uuidMap.get(String.join("+", this.ietfNodeId, OTSI));
339 // iNep creation on otsi node
340 for (int i = 0; i < oorNetworkPortList.size(); i++) {
341 Uuid nepUuid1 = new Uuid(UUID.nameUUIDFromBytes(
342 (String.join("+", this.ietfNodeId, I_OTSI, oorNetworkPortList.get(i).getTpId().getValue()))
343 .getBytes(Charset.forName("UTF-8")))
345 this.uuidMap.put(String.join("+", this.ietfNodeId, I_OTSI, oorNetworkPortList.get(i).getTpId().getValue()),
347 Name onedName = new NameBuilder()
348 .setValueName("iNodeEdgePoint")
349 .setValue(oorNetworkPortList.get(i).getTpId().getValue())
352 OwnedNodeEdgePoint onep = createNep(oorNetworkPortList.get(i), Map.of(onedName.key(), onedName),
353 LayerProtocolName.PHOTONICMEDIA, LayerProtocolName.PHOTONICMEDIA, true,
354 String.join("+", this.ietfNodeId, I_OTSI));
355 onepl.put(onep.key(), onep);
357 // eNep creation on otsi node
358 for (int i = 0; i < oorNetworkPortList.size(); i++) {
359 Uuid nepUuid2 = new Uuid(UUID.nameUUIDFromBytes(
360 (String.join("+", this.ietfNodeId, E_OTSI, oorNetworkPortList.get(i).getTpId().getValue()))
361 .getBytes(Charset.forName("UTF-8")))
363 this.uuidMap.put(String.join("+", this.ietfNodeId, E_OTSI, oorNetworkPortList.get(i).getTpId().getValue()),
365 Name onedName = new NameBuilder()
366 .setValueName("eNodeEdgePoint")
367 .setValue(oorNetworkPortList.get(i).getTpId().getValue())
370 OwnedNodeEdgePoint onep = createNep(oorNetworkPortList.get(i), Map.of(onedName.key(), onedName),
371 LayerProtocolName.PHOTONICMEDIA, LayerProtocolName.PHOTONICMEDIA, true,
372 String.join("+", this.ietfNodeId, E_OTSI));
373 onepl.put(onep.key(), onep);
375 // create NodeRuleGroup
377 for (TerminationPoint tp : this.oorNetworkPortList) {
378 Map<org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.node.rule.group.NodeEdgePointKey,
379 org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.node.rule.group.NodeEdgePoint>
380 nepList = new HashMap<>();
381 org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.node.rule.group
382 .NodeEdgePoint inep = new org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210
383 .node.rule.group.NodeEdgePointBuilder()
384 .setTopologyUuid(tapiTopoUuid)
385 .setNodeUuid(this.uuidMap.get(String.join("+", this.ietfNodeId, OTSI)))
386 .setNodeEdgePointUuid(
387 this.uuidMap.get(String.join("+", this.ietfNodeId, I_OTSI, tp.getTpId().getValue())))
389 org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.node.rule.group
390 .NodeEdgePoint enep = new org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210
391 .node.rule.group.NodeEdgePointBuilder()
392 .setTopologyUuid(tapiTopoUuid)
393 .setNodeUuid(this.uuidMap.get(String.join("+", this.ietfNodeId, OTSI)))
394 .setNodeEdgePointUuid(
395 this.uuidMap.get(String.join("+", this.ietfNodeId, E_OTSI, tp.getTpId().getValue())))
397 nepList.put(inep.key(), inep);
398 nepList.put(enep.key(), enep);
399 NodeRuleGroup nodeRuleGroup = new NodeRuleGroupBuilder()
401 UUID.nameUUIDFromBytes(("otsi node rule group " + count).getBytes(Charset.forName("UTF-8")))
404 .setNodeEdgePoint(nepList)
406 nodeRuleGroupList.put(nodeRuleGroup.key(), nodeRuleGroup);
412 private Uuid getNodeUuid4Dsr(Map<OwnedNodeEdgePointKey, OwnedNodeEdgePoint> onepl,
413 Map<NodeRuleGroupKey, NodeRuleGroup> nodeRuleGroupList, Map<RuleKey, Rule> ruleList) {
415 nodeUuid = this.uuidMap.get(String.join("+", this.ietfNodeId, DSR));
416 // client nep creation on DSR/ODU node
417 for (int i = 0; i < oorClientPortList.size(); i++) {
418 Uuid nepUuid = new Uuid(UUID.nameUUIDFromBytes(
419 (String.join("+", this.ietfNodeId, DSR, oorClientPortList.get(i).getTpId().getValue()))
420 .getBytes(Charset.forName("UTF-8"))).toString());
421 this.uuidMap.put(String.join("+", this.ietfNodeId, DSR, oorClientPortList.get(i).getTpId().getValue()),
423 NameBuilder nameBldr = new NameBuilder().setValue(oorClientPortList.get(i).getTpId().getValue());
425 if (OpenroadmNodeType.TPDR.equals(this.ietfNodeType)) {
426 name = nameBldr.setValueName("100G-tpdr").build();
428 name = nameBldr.setValueName("NodeEdgePoint_C").build();
431 OwnedNodeEdgePoint onep = createNep(oorClientPortList.get(i), Map.of(name.key(), name),
432 LayerProtocolName.ETH, LayerProtocolName.DSR, true, String.join("+", this.ietfNodeId, DSR));
433 onepl.put(onep.key(), onep);
435 // network nep creation on DSR/ODU node
436 for (int i = 0; i < oorNetworkPortList.size(); i++) {
437 Uuid nepUuid = new Uuid(UUID.nameUUIDFromBytes(
438 (String.join("+", this.ietfNodeId, DSR, oorNetworkPortList.get(i).getTpId().getValue()))
439 .getBytes(Charset.forName("UTF-8"))).toString());
440 this.uuidMap.put(String.join("+", this.ietfNodeId, DSR, oorNetworkPortList.get(i).getTpId().getValue()),
442 Name onedName = new NameBuilder()
443 .setValueName("NodeEdgePoint_N")
444 .setValue(oorNetworkPortList.get(i).getTpId().getValue())
447 OwnedNodeEdgePoint onep = createNep(oorNetworkPortList.get(i), Map.of(onedName.key(), onedName),
448 LayerProtocolName.ODU, LayerProtocolName.DSR, true, String.join("+", this.ietfNodeId, DSR));
449 onepl.put(onep.key(), onep);
451 // create NodeRuleGroup
453 for (NonBlockingList nbl : this.oorOduSwitchingPool.nonnullNonBlockingList().values()) {
454 Map<org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.node.rule.group.NodeEdgePointKey,
455 org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.node.rule.group.NodeEdgePoint>
456 nepList = new HashMap<>();
457 for (TpId tp : nbl.getTpList()) {
458 if (this.uuidMap.containsKey(String.join("+", this.ietfNodeId, DSR, tp.getValue()))) {
459 org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.node.rule.group.NodeEdgePoint
460 nep = new org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.node.rule.group
461 .NodeEdgePointBuilder()
462 .setTopologyUuid(tapiTopoUuid)
463 .setNodeUuid(this.uuidMap.get(String.join("+", this.ietfNodeId, DSR)))
464 .setNodeEdgePointUuid(this.uuidMap.get(String.join("+", this.ietfNodeId, DSR, tp.getValue())))
466 nepList.put(nep.key(), nep);
469 NodeRuleGroup nodeRuleGroup = new NodeRuleGroupBuilder()
471 UUID.nameUUIDFromBytes(("dsr node rule group " + count).getBytes(Charset.forName("UTF-8")))
474 .setNodeEdgePoint(nepList)
476 nodeRuleGroupList.put(nodeRuleGroup.key(), nodeRuleGroup);
482 private OwnedNodeEdgePoint createNep(TerminationPoint oorTp, Map<NameKey, Name> nepNames,
483 LayerProtocolName nepProtocol, LayerProtocolName nodeProtocol, boolean withSip, String keyword) {
484 String key = String.join("+", keyword, oorTp.getTpId().getValue());
485 OwnedNodeEdgePointBuilder onepBldr = new OwnedNodeEdgePointBuilder()
486 .setUuid(this.uuidMap.get(key))
487 .setLayerProtocolName(nepProtocol)
490 onepBldr.setMappedServiceInterfacePoint(createSIP(this.uuidMap.get(key), 1));
492 onepBldr.setSupportedCepLayerProtocolQualifier(createSupportedCepLayerProtocolQualifier(oorTp, nodeProtocol));
493 onepBldr.setLinkPortDirection(PortDirection.BIDIRECTIONAL).setLinkPortRole(PortRole.SYMMETRIC)
494 .setAdministrativeState(AdministrativeState.UNLOCKED).setOperationalState(OperationalState.ENABLED)
495 .setLifecycleState(LifecycleState.INSTALLED).setTerminationDirection(TerminationDirection.BIDIRECTIONAL)
496 .setTerminationState(TerminationState.TERMINATEDBIDIRECTIONAL);
497 return onepBldr.build();
500 private Map<OwnedNodeEdgePointKey, OwnedNodeEdgePoint> createNepForRdmNode(int nbNep) {
501 Map<OwnedNodeEdgePointKey, OwnedNodeEdgePoint> onepMap = new HashMap<>();
502 for (int i = 1; i <= nbNep; i++) {
503 Uuid nepUuid = new Uuid(UUID.nameUUIDFromBytes((String.join("+", "roadm node", "nep", String.valueOf(i)))
504 .getBytes(Charset.forName("UTF-8"))).toString());
505 Name nepName = new NameBuilder()
506 .setValueName("NodeEdgePoint name")
507 .setValue(new StringBuilder("NodeEdgePoint_").append(i).toString())
509 OwnedNodeEdgePoint onep = new OwnedNodeEdgePointBuilder()
511 .setLayerProtocolName(LayerProtocolName.PHOTONICMEDIA)
512 .setName(Map.of(nepName.key(), nepName))
513 .setSupportedCepLayerProtocolQualifier(List.of(PHOTONICLAYERQUALIFIEROMS.class))
514 .setLinkPortDirection(PortDirection.BIDIRECTIONAL).setLinkPortRole(PortRole.SYMMETRIC)
515 .setAdministrativeState(AdministrativeState.UNLOCKED).setOperationalState(OperationalState.ENABLED)
516 .setLifecycleState(LifecycleState.INSTALLED).setTerminationDirection(TerminationDirection.BIDIRECTIONAL)
517 .setTerminationState(TerminationState.TERMINATEDBIDIRECTIONAL)
519 onepMap.put(onep.key(), onep);
524 private Map<NodeRuleGroupKey, NodeRuleGroup> createNodeRuleGroupForRdmNode(Uuid nodeUuid,
525 Collection<OwnedNodeEdgePoint> onepl) {
526 Map<org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.node.rule.group.NodeEdgePointKey,
527 org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.node.rule.group.NodeEdgePoint>
528 nepMap = new HashMap<>();
529 for (OwnedNodeEdgePoint onep : onepl) {
530 org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.node.rule.group.NodeEdgePoint
531 nep = new org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.node.rule.group
532 .NodeEdgePointBuilder()
533 .setTopologyUuid(tapiTopoUuid)
534 .setNodeUuid(nodeUuid)
535 .setNodeEdgePointUuid(onep.key().getUuid())
537 nepMap.put(nep.key(), nep);
539 Map<NodeRuleGroupKey, NodeRuleGroup> nodeRuleGroupMap = new HashMap<>();
540 Map<RuleKey, Rule> ruleList = new HashMap<>();
541 Rule rule = new RuleBuilder()
542 .setLocalId("forward")
543 .setForwardingRule(ForwardingRule.MAYFORWARDACROSSGROUP)
544 .setRuleType(RuleType.FORWARDING)
546 ruleList.put(rule.key(), rule);
547 NodeRuleGroup nodeRuleGroup = new NodeRuleGroupBuilder()
548 .setUuid(new Uuid(UUID.nameUUIDFromBytes(("rdm infra node rule group").getBytes(Charset.forName("UTF-8")))
551 .setNodeEdgePoint(nepMap)
553 nodeRuleGroupMap.put(nodeRuleGroup.key(), nodeRuleGroup);
554 return nodeRuleGroupMap;
557 private Map<MappedServiceInterfacePointKey, MappedServiceInterfacePoint> createSIP(Uuid nepUuid, int nb) {
558 Map<MappedServiceInterfacePointKey, MappedServiceInterfacePoint> msipl = new HashMap<>();
559 for (int i = 0; i < nb; i++) {
560 MappedServiceInterfacePoint msip = new MappedServiceInterfacePointBuilder()
561 .setServiceInterfacePointUuid(new Uuid(UUID.nameUUIDFromBytes(nepUuid.getValue()
562 .getBytes(Charset.forName("UTF-8"))).toString()))
564 msipl.put(msip.key(), msip);
569 private List<Class<? extends LAYERPROTOCOLQUALIFIER>> createSupportedCepLayerProtocolQualifier(TerminationPoint tp,
570 LayerProtocolName lpn) {
571 Set<Class<? extends LAYERPROTOCOLQUALIFIER>> sclpqSet = new HashSet<>();
572 List<SupportedInterfaceCapability> sicList = new ArrayList<>(
573 tp.augmentation(org.opendaylight.yang.gen.v1.http
574 .org.openroadm.otn.network.topology.rev200529.TerminationPoint1.class).getTpSupportedInterfaces()
575 .getSupportedInterfaceCapability().values());
576 for (SupportedInterfaceCapability sic : sicList) {
577 switch (lpn.getName()) {
579 switch (sic.getIfCapType().getSimpleName()) {
581 sclpqSet.add(ODUTYPEODU2E.class);
582 sclpqSet.add(DIGITALSIGNALTYPE10GigELAN.class);
585 sclpqSet.add(ODUTYPEODU2.class);
586 sclpqSet.add(DIGITALSIGNALTYPE10GigELAN.class);
589 sclpqSet.add(DIGITALSIGNALTYPE10GigELAN.class);
592 sclpqSet.add(DIGITALSIGNALTYPE100GigE.class);
593 sclpqSet.add(ODUTYPEODU4.class);
596 sclpqSet.add(DIGITALSIGNALTYPE100GigE.class);
598 case "IfOCHOTU4ODU4":
600 sclpqSet.add(ODUTYPEODU4.class);
603 LOG.error("IfCapability type not managed");
607 case "PHOTONIC_MEDIA":
608 if (sic.getIfCapType().getSimpleName().equals("IfOCHOTU4ODU4")
609 || sic.getIfCapType().getSimpleName().equals("IfOCH")) {
610 sclpqSet.add(PHOTONICLAYERQUALIFIEROTSi.class);
611 sclpqSet.add(PHOTONICLAYERQUALIFIEROMS.class);
615 LOG.error("Layer Protocol Name is unknown");
619 return new ArrayList<>(sclpqSet);
622 private void createTapiTransitionalLinks() {
623 for (TerminationPoint tp : this.oorNetworkPortList) {
624 Map<NodeEdgePointKey, NodeEdgePoint> nepList = new HashMap<>();
625 String sourceKey = String.join("+", this.ietfNodeId, DSR, tp.getTpId().getValue());
626 Uuid sourceUuidTp = this.uuidMap.get(sourceKey);
627 String destKey = String.join("+", this.ietfNodeId, I_OTSI, tp.getTpId().getValue());
628 Uuid destUuidTp = this.uuidMap.get(destKey);
629 NodeEdgePoint sourceNep = new NodeEdgePointBuilder()
630 .setTopologyUuid(this.tapiTopoUuid)
631 .setNodeUuid(this.uuidMap.get(String.join("+", this.ietfNodeId, DSR)))
632 .setNodeEdgePointUuid(sourceUuidTp)
634 nepList.put(sourceNep.key(), sourceNep);
635 NodeEdgePoint destNep = new NodeEdgePointBuilder()
636 .setTopologyUuid(this.tapiTopoUuid)
637 .setNodeUuid(this.uuidMap.get(String.join("+", this.ietfNodeId, OTSI)))
638 .setNodeEdgePointUuid(destUuidTp)
640 nepList.put(destNep.key(), destNep);
641 Name linkName = new NameBuilder().setValueName("transitional link name")
642 .setValue(String.join("--", this.ietfNodeId, sourceKey, destKey))
644 Link transiLink = new LinkBuilder()
646 UUID.nameUUIDFromBytes((String.join("--", this.ietfNodeId, sourceKey, destKey))
647 .getBytes(Charset.forName("UTF-8")))
649 .setName(Map.of(linkName.key(), linkName))
650 .setTransitionedLayerProtocolName(Arrays.asList(LayerProtocolName.ODU.getName(),
651 LayerProtocolName.PHOTONICMEDIA.getName()))
652 .setNodeEdgePoint(nepList)
653 .setDirection(ForwardingDirection.BIDIRECTIONAL)
654 .setAvailableCapacity(new AvailableCapacityBuilder().setTotalSize(
655 new TotalSizeBuilder().setUnit(CapacityUnit.GBPS).setValue(Uint64.valueOf(100)).build()).build())
657 this.tapiLinks.put(transiLink.key(), transiLink);
661 private Link createTapiLink(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226
662 .networks.network.Link link) {
663 String prefix = link.getLinkId().getValue().split("-")[0];
664 String sourceNode = link.getSource().getSourceNode().getValue();
665 String sourceTp = link.getSource().getSourceTp().toString();
666 String destNode = link.getDestination().getDestNode().getValue();
667 String destTp = link.getDestination().getDestTp().toString();
668 Map<NodeEdgePointKey, NodeEdgePoint> nepList = new HashMap<>();
676 sourceUuidTp = this.uuidMap.get(String.join("+", sourceNode, I_OTSI, sourceTp));
677 sourceUuidNode = this.uuidMap.get(String.join("+", sourceNode, OTSI));
678 NodeEdgePoint sourceNep = new NodeEdgePointBuilder()
679 .setTopologyUuid(this.tapiTopoUuid)
680 .setNodeUuid(sourceUuidNode)
681 .setNodeEdgePointUuid(sourceUuidTp)
683 nepList.put(sourceNep.key(), sourceNep);
684 destUuidTp = this.uuidMap.get(String.join("+", destNode, I_OTSI, destTp));
685 destUuidNode = this.uuidMap.get(String.join("+", destNode, OTSI));
686 NodeEdgePoint destNep = new NodeEdgePointBuilder()
687 .setTopologyUuid(this.tapiTopoUuid)
688 .setNodeUuid(destUuidNode)
689 .setNodeEdgePointUuid(destUuidTp)
691 nepList.put(destNep.key(), destNep);
692 linkName = new NameBuilder().setValueName("otn link name")
693 .setValue(link.getLinkId().getValue())
695 return new LinkBuilder()
697 UUID.nameUUIDFromBytes((link.getLinkId().getValue())
698 .getBytes(Charset.forName("UTF-8")))
700 .setName(Map.of(linkName.key(), linkName))
701 .setLayerProtocolName(Arrays.asList(LayerProtocolName.PHOTONICMEDIA))
702 .setAdministrativeState(AdministrativeState.UNLOCKED)
703 .setOperationalState(OperationalState.ENABLED)
704 .setDirection(ForwardingDirection.BIDIRECTIONAL)
705 .setNodeEdgePoint(nepList)
706 .setTotalPotentialCapacity(new TotalPotentialCapacityBuilder().setTotalSize(
707 new TotalSizeBuilder().setUnit(CapacityUnit.GBPS)
708 .setValue(Uint64.valueOf(100)).build()).build())
709 .setAvailableCapacity(new AvailableCapacityBuilder().setTotalSize(
710 new TotalSizeBuilder().setUnit(CapacityUnit.MBPS)
711 .setValue(Uint64.valueOf(link.augmentation(Link1.class).getAvailableBandwidth())).build())
715 sourceUuidTp = this.uuidMap.get(String.join("+", sourceNode, DSR, sourceTp));
716 sourceUuidNode = this.uuidMap.get(String.join("+", sourceNode, DSR));
717 NodeEdgePoint sourceNep2 = new NodeEdgePointBuilder()
718 .setTopologyUuid(this.tapiTopoUuid)
719 .setNodeUuid(sourceUuidNode)
720 .setNodeEdgePointUuid(sourceUuidTp)
722 nepList.put(sourceNep2.key(), sourceNep2);
723 destUuidTp = this.uuidMap.get(String.join("+", destNode, DSR, destTp));
724 destUuidNode = this.uuidMap.get(String.join("+", destNode, DSR));
725 NodeEdgePoint destNep2 = new NodeEdgePointBuilder()
726 .setTopologyUuid(this.tapiTopoUuid)
727 .setNodeUuid(destUuidNode)
728 .setNodeEdgePointUuid(destUuidTp)
730 nepList.put(destNep2.key(), destNep2);
731 linkName = new NameBuilder().setValueName("otn link name")
732 .setValue(link.getLinkId().getValue())
734 return new LinkBuilder()
736 UUID.nameUUIDFromBytes((link.getLinkId().getValue())
737 .getBytes(Charset.forName("UTF-8")))
739 .setName(Map.of(linkName.key(), linkName))
740 .setLayerProtocolName(Arrays.asList(LayerProtocolName.ODU))
741 .setAdministrativeState(AdministrativeState.UNLOCKED)
742 .setOperationalState(OperationalState.ENABLED)
743 .setDirection(ForwardingDirection.BIDIRECTIONAL)
744 .setNodeEdgePoint(nepList)
745 .setTotalPotentialCapacity(new TotalPotentialCapacityBuilder().setTotalSize(
746 new TotalSizeBuilder().setUnit(CapacityUnit.GBPS)
747 .setValue(Uint64.valueOf(100)).build()).build())
748 .setAvailableCapacity(new AvailableCapacityBuilder().setTotalSize(
749 new TotalSizeBuilder().setUnit(CapacityUnit.MBPS)
750 .setValue(Uint64.valueOf(link.augmentation(Link1.class).getAvailableBandwidth())).build())
754 LOG.error("OTN link of type {} not managed yet", prefix);
759 private void createTapiOmsLinks(Map<String, String> photonicNepUuisMap, Map<String, String> rdmInfraNepUuisMap) {
760 Iterator<Entry<String, String>> it1 = photonicNepUuisMap.entrySet().iterator();
761 Iterator<Entry<String, String>> it2 = rdmInfraNepUuisMap.entrySet().iterator();
762 while (it1.hasNext()) {
763 Map<NodeEdgePointKey, NodeEdgePoint> nepMap = new HashMap<>();
764 Map.Entry<String, String> photonicEntry = it1.next();
765 Map.Entry<String, String> rdmEntry = it2.next();
766 Uuid sourceUuidTp = new Uuid(photonicEntry.getKey().split("--")[1]);
767 Uuid sourceUuidNode = new Uuid(photonicEntry.getKey().split("--")[0]);
768 Uuid destUuidTp = new Uuid(rdmEntry.getKey().split("--")[1]);
769 Uuid destUuidNode = new Uuid(rdmEntry.getKey().split("--")[0]);
770 NodeEdgePoint sourceNep = new NodeEdgePointBuilder()
771 .setTopologyUuid(this.tapiTopoUuid)
772 .setNodeUuid(sourceUuidNode)
773 .setNodeEdgePointUuid(sourceUuidTp)
775 nepMap.put(sourceNep.key(), sourceNep);
776 NodeEdgePoint destNep = new NodeEdgePointBuilder()
777 .setTopologyUuid(this.tapiTopoUuid)
778 .setNodeUuid(destUuidNode)
779 .setNodeEdgePointUuid(destUuidTp)
781 nepMap.put(destNep.key(), destNep);
782 Name linkName = new NameBuilder().setValueName("OMS link name")
783 .setValue(String.join(" and ", photonicEntry.getValue(), rdmEntry.getValue()))
785 Link omsLink = new LinkBuilder()
787 UUID.nameUUIDFromBytes((String.join(" and ", photonicEntry.getValue(), rdmEntry.getValue()))
788 .getBytes(Charset.forName("UTF-8")))
790 .setName(Map.of(linkName.key(), linkName))
791 .setLayerProtocolName(List.of(LayerProtocolName.PHOTONICMEDIA))
792 .setNodeEdgePoint(nepMap)
793 .setDirection(ForwardingDirection.BIDIRECTIONAL)
795 this.tapiLinks.put(omsLink.key(), omsLink);
799 public Map<NodeKey, org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.topology.Node>
804 public Map<LinkKey, Link> getTapiLinks() {