- private Map<NodeRuleGroupKey, NodeRuleGroup> createNodeRuleGroupForRdmNode(Uuid nodeUuid,
- Collection<OwnedNodeEdgePoint> onepl) {
- Map<org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.node.rule.group.NodeEdgePointKey,
- org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.node.rule.group.NodeEdgePoint>
- nepMap = new HashMap<>();
- for (OwnedNodeEdgePoint onep : onepl) {
- org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.node.rule.group.NodeEdgePoint
- nep = new org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.node.rule.group
- .NodeEdgePointBuilder()
- .setTopologyUuid(tapiTopoUuid)
- .setNodeUuid(nodeUuid)
- .setNodeEdgePointUuid(onep.key().getUuid())
- .build();
- nepMap.put(nep.key(), nep);
- }
- Map<NodeRuleGroupKey, NodeRuleGroup> nodeRuleGroupMap = new HashMap<>();
- Map<RuleKey, Rule> ruleList = new HashMap<>();
- Rule rule = new RuleBuilder()
- .setLocalId("forward")
- .setForwardingRule(ForwardingRule.MAYFORWARDACROSSGROUP)
- .setRuleType(RuleType.FORWARDING)
- .build();
- ruleList.put(rule.key(), rule);
- NodeRuleGroup nodeRuleGroup = new NodeRuleGroupBuilder()
- .setUuid(new Uuid(UUID.nameUUIDFromBytes((this.ietfNodeId + " node rule group")
- .getBytes(Charset.forName("UTF-8"))).toString()))
- .setRule(ruleList)
- .setNodeEdgePoint(nepMap)
- .build();
- nodeRuleGroupMap.put(nodeRuleGroup.key(), nodeRuleGroup);
- return nodeRuleGroupMap;
- }
-
- private Map<MappedServiceInterfacePointKey, MappedServiceInterfacePoint> createMSIP(int nb,
- LayerProtocolName layerProtocol,
- TerminationPoint tp,
- String nodeid) {
- // add them to SIP context
- Map<MappedServiceInterfacePointKey, MappedServiceInterfacePoint> msipl = new HashMap<>();
- for (int i = 0; i < nb; i++) {
- LOG.info("SIP = {}", String.join("+", "SIP", nodeid, tp.getTpId().getValue()));
- Uuid sipUuid = new Uuid(UUID.nameUUIDFromBytes((String.join("+", "SIP", nodeid,
- tp.getTpId().getValue())).getBytes(Charset.forName("UTF-8"))).toString());
- MappedServiceInterfacePoint msip = new MappedServiceInterfacePointBuilder()
- .setServiceInterfacePointUuid(sipUuid).build();
- ServiceInterfacePoint sip = createSIP(sipUuid, layerProtocol, tp, nodeid);
- this.tapiSips.put(sip.key(), sip);
- msipl.put(msip.key(), msip);
- }
- return msipl;
- }
-
- private ServiceInterfacePoint createSIP(Uuid sipUuid, LayerProtocolName layerProtocol, TerminationPoint tp,
- String nodeid) {
- // TODO: what value should be set in total capacity and available capacity??
- // LOG.info("SIP name = {}", String.join("+", nodeid, tp.getTpId().getValue()));
- Name sipName = new NameBuilder()
- .setValueName("SIP name")
- .setValue(String.join("+", nodeid, tp.getTpId().getValue()))
- .build();
- return new ServiceInterfacePointBuilder()
- .setUuid(sipUuid)
- .setName(Map.of(sipName.key(), sipName))
- .setLayerProtocolName(layerProtocol)
- .setAdministrativeState(setTapiAdminState(
- tp.augmentation(TerminationPoint1.class).getAdministrativeState()))
- .setOperationalState(setTapiOperationalState(
- tp.augmentation(TerminationPoint1.class).getOperationalState()))
- .setLifecycleState(LifecycleState.INSTALLED)
- .setAvailableCapacity(new AvailableCapacityBuilder().build())
- .setTotalPotentialCapacity(new TotalPotentialCapacityBuilder().build())
- .setSupportedLayerProtocolQualifier(createSupportedLayerProtocolQualifier(tp, layerProtocol))
- .build();
- }
-
- private List<Class<? extends LAYERPROTOCOLQUALIFIER>> createSupportedLayerProtocolQualifier(TerminationPoint tp,
- LayerProtocolName lpn) {
- Set<Class<? extends LAYERPROTOCOLQUALIFIER>> sclpqSet = new HashSet<>();
- List<SupportedInterfaceCapability> sicList;
- org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev200529.TerminationPoint1 tp1 =
- tp.augmentation(org.opendaylight.yang.gen.v1.http
- .org.openroadm.otn.network.topology.rev200529.TerminationPoint1.class);
- if (tp1 == null) {
- return new ArrayList<>(sclpqSet);
- }
- if (tp1.getTpSupportedInterfaces() == null) {
- LOG.warn("Tp supported interface doesnt exist on TP {}", tp.getTpId().getValue());
- return new ArrayList<>(sclpqSet);
- }
- sicList = new ArrayList<>(tp1.getTpSupportedInterfaces().getSupportedInterfaceCapability().values());
- for (SupportedInterfaceCapability sic : sicList) {
- switch (lpn.getName()) {
- case "DSR":
- switch (sic.getIfCapType().getSimpleName()) {
- case "If10GEODU2e":
- sclpqSet.add(ODUTYPEODU2E.class);
- sclpqSet.add(DIGITALSIGNALTYPE10GigELAN.class);
- break;
- case "If10GEODU2":
- sclpqSet.add(ODUTYPEODU2.class);
- sclpqSet.add(DIGITALSIGNALTYPE10GigELAN.class);
- break;
- case "If10GE":
- sclpqSet.add(DIGITALSIGNALTYPE10GigELAN.class);
- break;
- case "If100GEODU4":
- sclpqSet.add(DIGITALSIGNALTYPE100GigE.class);
- sclpqSet.add(ODUTYPEODU4.class);
- break;
- case "If100GE":
- sclpqSet.add(DIGITALSIGNALTYPE100GigE.class);
- break;
- case "IfOCHOTU4ODU4":
- case "IfOCH":
- sclpqSet.add(ODUTYPEODU4.class);
- break;
- default:
- LOG.error("IfCapability type not managed");
- break;
- }
- break;
- case "PHOTONIC_MEDIA":
- if (sic.getIfCapType().getSimpleName().equals("IfOCHOTU4ODU4")
- || sic.getIfCapType().getSimpleName().equals("IfOCH")) {
- sclpqSet.add(PHOTONICLAYERQUALIFIEROTSi.class);
- sclpqSet.add(PHOTONICLAYERQUALIFIEROMS.class);
- }
- break;
- default:
- LOG.error("Layer Protocol Name is unknown");
- break;
- }
- }
- return new ArrayList<>(sclpqSet);
- }
-
- private void createTapiTransitionalLinks() {
- for (TerminationPoint tp : this.oorNetworkPortList) {
- Map<NodeEdgePointKey, NodeEdgePoint> nepList = new HashMap<>();
- String sourceKey = String.join("+", this.ietfNodeId, I_ODU, tp.getTpId().getValue());
- Uuid sourceUuidTp = this.uuidMap.get(sourceKey);
- String destKey = String.join("+", this.ietfNodeId, I_OTSI, tp.getTpId().getValue());
- Uuid destUuidTp = this.uuidMap.get(destKey);
- NodeEdgePoint sourceNep = new NodeEdgePointBuilder()
- .setTopologyUuid(this.tapiTopoUuid)
- .setNodeUuid(this.uuidMap.get(String.join("+", this.ietfNodeId, DSR)))
- .setNodeEdgePointUuid(sourceUuidTp)
- .build();
- nepList.put(sourceNep.key(), sourceNep);
- NodeEdgePoint destNep = new NodeEdgePointBuilder()
- .setTopologyUuid(this.tapiTopoUuid)
- .setNodeUuid(this.uuidMap.get(String.join("+", this.ietfNodeId, OTSI)))
- .setNodeEdgePointUuid(destUuidTp)
- .build();
- nepList.put(destNep.key(), destNep);
- Name linkName = new NameBuilder().setValueName("transitional link name")
- .setValue(String.join("--", this.ietfNodeId, sourceKey, destKey))
- .build();
- CostCharacteristic costCharacteristic = new CostCharacteristicBuilder()
- .setCostAlgorithm("Restricted Shortest Path - RSP")
- .setCostName("HOP_COUNT")
- .setCostValue("12345678")
- .build();
- LatencyCharacteristic latencyCharacteristic = new LatencyCharacteristicBuilder()
- .setFixedLatencyCharacteristic("12345678")
- .setQueingLatencyCharacteristic("12345678")
- .setJitterCharacteristic("12345678")
- .setWanderCharacteristic("12345678")
- .setTrafficPropertyName("FIXED_LATENCY")
- .build();
- RiskCharacteristic riskCharacteristic = new RiskCharacteristicBuilder()
- .setRiskCharacteristicName("risk characteristic")
- .setRiskIdentifierList(List.of("risk identifier1", "risk identifier2"))
- .build();
- ValidationMechanism validationMechanism = new ValidationMechanismBuilder()
- .setValidationMechanism("validation mechanism")
- .setValidationRobustness("validation robustness")
- .setLayerProtocolAdjacencyValidated("layer protocol adjacency")
- .build();
- Link transiLink = new LinkBuilder()
- .setUuid(new Uuid(
- UUID.nameUUIDFromBytes((String.join("--", this.ietfNodeId, sourceKey, destKey))
- .getBytes(Charset.forName("UTF-8")))
- .toString()))
- .setName(Map.of(linkName.key(), linkName))
- .setTransitionedLayerProtocolName(Arrays.asList(LayerProtocolName.ODU.getName(),
- LayerProtocolName.PHOTONICMEDIA.getName()))
- .setLayerProtocolName(Arrays.asList(LayerProtocolName.ODU, LayerProtocolName.PHOTONICMEDIA))
- .setNodeEdgePoint(nepList)
- .setDirection(ForwardingDirection.BIDIRECTIONAL)
- .setAvailableCapacity(new AvailableCapacityBuilder().setTotalSize(
- new TotalSizeBuilder().setUnit(CapacityUnit.GBPS).setValue(Uint64.valueOf(100)).build())
- .build())
- .setResilienceType(new ResilienceTypeBuilder().setProtectionType(ProtectionType.NOPROTECTON)
- .setRestorationPolicy(RestorationPolicy.NA)
- .build())
- .setAdministrativeState(AdministrativeState.UNLOCKED)
- .setOperationalState(OperationalState.ENABLED)
- .setLifecycleState(LifecycleState.INSTALLED)
- .setTotalPotentialCapacity(new TotalPotentialCapacityBuilder().setTotalSize(
- new TotalSizeBuilder().setUnit(CapacityUnit.GBPS).setValue(Uint64.valueOf(100)).build())
- .build())
- .setCostCharacteristic(Map.of(costCharacteristic.key(), costCharacteristic))
- .setLatencyCharacteristic(Map.of(latencyCharacteristic.key(), latencyCharacteristic))
- .setRiskCharacteristic(Map.of(riskCharacteristic.key(), riskCharacteristic))
- .setErrorCharacteristic("error")
- .setLossCharacteristic("loss")
- .setRepeatDeliveryCharacteristic("repeat delivery")
- .setDeliveryOrderCharacteristic("delivery order")
- .setUnavailableTimeCharacteristic("unavailable time")
- .setServerIntegrityProcessCharacteristic("server integrity process")
- .setValidationMechanism(Map.of(validationMechanism.key(), validationMechanism))
- .build();
- this.tapiLinks.put(transiLink.key(), transiLink);
- }
- }
-
- private Link createTapiLink(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang
- .ietf.network.topology.rev180226.networks.network.Link link,
- org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang
- .ietf.network.topology.rev180226.networks.network.Link oppositeLink) {
- String prefix = link.getLinkId().getValue().split("-")[0];
- String sourceNode = link.getSource().getSourceNode().getValue();
- String sourceTp = link.getSource().getSourceTp().getValue();
- String destNode = link.getDestination().getDestNode().getValue();
- String destTp = link.getDestination().getDestTp().getValue();
- LOG.info("prefix = {}, sourceNode = {}, sourceTp = {}, destNode = {}, destTp = {}",
- prefix, sourceNode, sourceTp, destNode, destTp);
- Map<NodeEdgePointKey, NodeEdgePoint> nepList = new HashMap<>();
- Uuid sourceUuidTp;
- Uuid sourceUuidNode;
- Uuid destUuidTp;
- Uuid destUuidNode;
- Name linkName;
- AdminStates oppositeLinkAdminState = null;
- State oppositeLinkOperState = null;
- if (oppositeLink != null) {
- oppositeLinkAdminState = oppositeLink.augmentation(
- org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev200529.Link1.class)
- .getAdministrativeState();
- oppositeLinkOperState = oppositeLink.augmentation(
- org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev200529.Link1.class)
- .getOperationalState();
- }
- CostCharacteristic costCharacteristic = new CostCharacteristicBuilder()
- .setCostAlgorithm("Restricted Shortest Path - RSP")
- .setCostName("HOP_COUNT")
- .setCostValue("12345678")
- .build();
- LatencyCharacteristic latencyCharacteristic = new LatencyCharacteristicBuilder()
- .setFixedLatencyCharacteristic("12345678")
- .setQueingLatencyCharacteristic("12345678")
- .setJitterCharacteristic("12345678")
- .setWanderCharacteristic("12345678")
- .setTrafficPropertyName("FIXED_LATENCY")
- .build();
- RiskCharacteristic riskCharacteristic = new RiskCharacteristicBuilder()
- .setRiskCharacteristicName("risk characteristic")
- .setRiskIdentifierList(List.of("risk identifier1", "risk identifier2"))
- .build();
- ValidationMechanism validationMechanism = new ValidationMechanismBuilder()
- .setValidationMechanism("validation mechanism")
- .setValidationRobustness("validation robustness")
- .setLayerProtocolAdjacencyValidated("layer protocol adjacency")
- .build();
- switch (prefix) {
- case "OTU4":
- sourceUuidTp = this.uuidMap.get(String.join("+", sourceNode, I_OTSI, sourceTp));
- sourceUuidNode = this.uuidMap.get(String.join("+", sourceNode, OTSI));
- NodeEdgePoint sourceNep = new NodeEdgePointBuilder()
- .setTopologyUuid(this.tapiTopoUuid)
- .setNodeUuid(sourceUuidNode)
- .setNodeEdgePointUuid(sourceUuidTp)
- .build();
- nepList.put(sourceNep.key(), sourceNep);
- destUuidTp = this.uuidMap.get(String.join("+", destNode, I_OTSI, destTp));
- destUuidNode = this.uuidMap.get(String.join("+", destNode, OTSI));
- NodeEdgePoint destNep = new NodeEdgePointBuilder()
- .setTopologyUuid(this.tapiTopoUuid)
- .setNodeUuid(destUuidNode)
- .setNodeEdgePointUuid(destUuidTp)
- .build();
- nepList.put(destNep.key(), destNep);
- linkName = new NameBuilder().setValueName("otn link name")
- .setValue(link.getLinkId().getValue())
- .build();
- return new LinkBuilder()
- .setUuid(new Uuid(UUID.nameUUIDFromBytes((link.getLinkId().getValue())
- .getBytes(Charset.forName("UTF-8"))).toString()))
- .setName(Map.of(linkName.key(), linkName))
- .setLayerProtocolName(Arrays.asList(LayerProtocolName.PHOTONICMEDIA))
- .setTransitionedLayerProtocolName(new ArrayList<>())
- .setAdministrativeState(setTapiAdminState(link
- .augmentation(
- org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev200529.Link1.class)
- .getAdministrativeState(), oppositeLinkAdminState))
- .setOperationalState(setTapiOperationalState(link
- .augmentation(
- org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev200529.Link1.class)
- .getOperationalState(), oppositeLinkOperState))
- .setDirection(ForwardingDirection.BIDIRECTIONAL)
- .setNodeEdgePoint(nepList)
- .setTotalPotentialCapacity(new TotalPotentialCapacityBuilder().setTotalSize(
- new TotalSizeBuilder().setUnit(CapacityUnit.GBPS)
- .setValue(Uint64.valueOf(100)).build()).build())
- .setAvailableCapacity(new AvailableCapacityBuilder().setTotalSize(
- new TotalSizeBuilder().setUnit(CapacityUnit.MBPS)
- .setValue(Uint64.valueOf(link.augmentation(Link1.class).getAvailableBandwidth())).build())
- .build())
- .setResilienceType(new ResilienceTypeBuilder().setProtectionType(ProtectionType.NOPROTECTON)
- .setRestorationPolicy(RestorationPolicy.NA)
- .build())
- .setLifecycleState(LifecycleState.INSTALLED)
- .setCostCharacteristic(Map.of(costCharacteristic.key(), costCharacteristic))
- .setLatencyCharacteristic(Map.of(latencyCharacteristic.key(), latencyCharacteristic))
- .setRiskCharacteristic(Map.of(riskCharacteristic.key(), riskCharacteristic))
- .setErrorCharacteristic("error")
- .setLossCharacteristic("loss")
- .setRepeatDeliveryCharacteristic("repeat delivery")
- .setDeliveryOrderCharacteristic("delivery order")
- .setUnavailableTimeCharacteristic("unavailable time")
- .setServerIntegrityProcessCharacteristic("server integrity process")
- .setValidationMechanism(Map.of(validationMechanism.key(), validationMechanism))
- .build();
- case "ODTU4":
- sourceUuidTp = this.uuidMap.get(String.join("+", sourceNode, E_ODU, sourceTp));
- sourceUuidNode = this.uuidMap.get(String.join("+", sourceNode, DSR));
- NodeEdgePoint sourceNep2 = new NodeEdgePointBuilder()
- .setTopologyUuid(this.tapiTopoUuid)
- .setNodeUuid(sourceUuidNode)
- .setNodeEdgePointUuid(sourceUuidTp)
- .build();
- nepList.put(sourceNep2.key(), sourceNep2);
- destUuidTp = this.uuidMap.get(String.join("+", destNode, E_ODU, destTp));
- destUuidNode = this.uuidMap.get(String.join("+", destNode, DSR));
- NodeEdgePoint destNep2 = new NodeEdgePointBuilder()
- .setTopologyUuid(this.tapiTopoUuid)
- .setNodeUuid(destUuidNode)
- .setNodeEdgePointUuid(destUuidTp)
- .build();
- nepList.put(destNep2.key(), destNep2);
- linkName = new NameBuilder().setValueName("otn link name")
- .setValue(link.getLinkId().getValue())
- .build();
- return new LinkBuilder()
- .setUuid(new Uuid(UUID.nameUUIDFromBytes((link.getLinkId().getValue())
- .getBytes(Charset.forName("UTF-8"))).toString()))
- .setName(Map.of(linkName.key(), linkName))
- .setLayerProtocolName(Arrays.asList(LayerProtocolName.ODU))
- .setTransitionedLayerProtocolName(new ArrayList<>())
- .setAdministrativeState(setTapiAdminState(link
- .augmentation(
- org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev200529.Link1.class)
- .getAdministrativeState(), oppositeLinkAdminState))
- .setOperationalState(setTapiOperationalState(link
- .augmentation(
- org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev200529.Link1.class)
- .getOperationalState(), oppositeLinkOperState))
- .setDirection(ForwardingDirection.BIDIRECTIONAL)
- .setNodeEdgePoint(nepList)
- .setTotalPotentialCapacity(new TotalPotentialCapacityBuilder().setTotalSize(
- new TotalSizeBuilder().setUnit(CapacityUnit.GBPS)
- .setValue(Uint64.valueOf(100)).build()).build())
- .setAvailableCapacity(new AvailableCapacityBuilder().setTotalSize(
- new TotalSizeBuilder().setUnit(CapacityUnit.MBPS)
- .setValue(Uint64.valueOf(link.augmentation(Link1.class).getAvailableBandwidth())).build())
- .build())
- .setResilienceType(new ResilienceTypeBuilder().setProtectionType(ProtectionType.NOPROTECTON)
- .setRestorationPolicy(RestorationPolicy.NA)
- .build())
- .setLifecycleState(LifecycleState.INSTALLED)
- .setCostCharacteristic(Map.of(costCharacteristic.key(), costCharacteristic))
- .setLatencyCharacteristic(Map.of(latencyCharacteristic.key(), latencyCharacteristic))
- .setRiskCharacteristic(Map.of(riskCharacteristic.key(), riskCharacteristic))
- .setErrorCharacteristic("error")
- .setLossCharacteristic("loss")
- .setRepeatDeliveryCharacteristic("repeat delivery")
- .setDeliveryOrderCharacteristic("delivery order")
- .setUnavailableTimeCharacteristic("unavailable time")
- .setServerIntegrityProcessCharacteristic("server integrity process")
- .setValidationMechanism(Map.of(validationMechanism.key(), validationMechanism))
- .build();
- default:
- LOG.error("OTN link of type {} not managed yet", prefix);
- return null;
- }
- }
-
- private Link createTapiOmsLink(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang
- .ietf.network.topology.rev180226.networks.network.Link link,
- org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang
- .ietf.network.topology.rev180226.networks.network.Link oppositeLink) {
- String sourceNode = getIdBasedOnModelVersion(link.getSource().getSourceNode().getValue());
- String sourceTp = link.getSource().getSourceTp().getValue();
- String destNode = getIdBasedOnModelVersion(link.getDestination().getDestNode().getValue());
- String destTp = link.getDestination().getDestTp().toString();
- AdminStates oppositeLinkAdminState = null;
- State oppositeLinkOperState = null;
- if (oppositeLink != null) {
- oppositeLinkAdminState = oppositeLink.augmentation(
- org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev200529.Link1.class)
- .getAdministrativeState();
- oppositeLinkOperState = oppositeLink.augmentation(
- org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev200529.Link1.class)
- .getOperationalState();
- }
- Map<NodeEdgePointKey, NodeEdgePoint> nepList = new HashMap<>();
- Uuid sourceUuidNode = new Uuid(UUID.nameUUIDFromBytes((String.join("+", sourceNode,
- PHTNC_MEDIA)).getBytes(Charset.forName("UTF-8"))).toString());
- Uuid sourceUuidTp = new Uuid(UUID.nameUUIDFromBytes((String.join("+", sourceNode, PHTNC_MEDIA, sourceTp))
- .getBytes(Charset.forName("UTF-8"))).toString());
- Uuid destUuidNode = new Uuid(UUID.nameUUIDFromBytes((String.join("+", destNode,
- PHTNC_MEDIA)).getBytes(Charset.forName("UTF-8"))).toString());
- Uuid destUuidTp = new Uuid(UUID.nameUUIDFromBytes((String.join("+", destNode, PHTNC_MEDIA, destTp))
- .getBytes(Charset.forName("UTF-8"))).toString());
- NodeEdgePoint sourceNep = new NodeEdgePointBuilder()
- .setTopologyUuid(this.tapiTopoUuid)
- .setNodeUuid(sourceUuidNode)
- .setNodeEdgePointUuid(sourceUuidTp)
- .build();
- nepList.put(sourceNep.key(), sourceNep);
- NodeEdgePoint destNep = new NodeEdgePointBuilder()
- .setTopologyUuid(this.tapiTopoUuid)
- .setNodeUuid(destUuidNode)
- .setNodeEdgePointUuid(destUuidTp)
- .build();
- nepList.put(destNep.key(), destNep);
- Name linkName = new NameBuilder().setValueName("OMS link name")
- .setValue(link.getLinkId().getValue())
- .build();
- CostCharacteristic costCharacteristic = new CostCharacteristicBuilder()
- .setCostAlgorithm("Restricted Shortest Path - RSP")
- .setCostName("HOP_COUNT")
- .setCostValue("12345678")
- .build();
- LatencyCharacteristic latencyCharacteristic = new LatencyCharacteristicBuilder()
- .setFixedLatencyCharacteristic("12345678")
- .setQueingLatencyCharacteristic("12345678")
- .setJitterCharacteristic("12345678")
- .setWanderCharacteristic("12345678")
- .setTrafficPropertyName("FIXED_LATENCY")
- .build();
- RiskCharacteristic riskCharacteristic = new RiskCharacteristicBuilder()
- .setRiskCharacteristicName("risk characteristic")
- .setRiskIdentifierList(List.of("risk identifier1", "risk identifier2"))
- .build();
- ValidationMechanism validationMechanism = new ValidationMechanismBuilder()
- .setValidationMechanism("validation mechanism")
- .setValidationRobustness("validation robustness")
- .setLayerProtocolAdjacencyValidated("layer protocol adjacency")
- .build();
- return new LinkBuilder()
- .setUuid(new Uuid(
- UUID.nameUUIDFromBytes((link.getLinkId().getValue()).getBytes(Charset.forName("UTF-8")))
- .toString()))
- .setName(Map.of(linkName.key(), linkName))
- .setLayerProtocolName(List.of(LayerProtocolName.PHOTONICMEDIA))
- .setTransitionedLayerProtocolName(new ArrayList<>())
- .setNodeEdgePoint(nepList)
- .setDirection(ForwardingDirection.BIDIRECTIONAL)
- .setResilienceType(new ResilienceTypeBuilder().setProtectionType(ProtectionType.NOPROTECTON)
- .setRestorationPolicy(RestorationPolicy.NA)
- .build())
- .setAdministrativeState(setTapiAdminState(link
- .augmentation(
- org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev200529.Link1.class)
- .getAdministrativeState(), oppositeLinkAdminState))
- .setOperationalState(setTapiOperationalState(link
- .augmentation(
- org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev200529.Link1.class)
- .getOperationalState(), oppositeLinkOperState))
- .setLifecycleState(LifecycleState.INSTALLED)
- .setTotalPotentialCapacity(new TotalPotentialCapacityBuilder().setTotalSize(
- new TotalSizeBuilder().setUnit(CapacityUnit.GBPS)
- .setValue(Uint64.valueOf(100)).build()).build())
- .setAvailableCapacity(new AvailableCapacityBuilder().setTotalSize(
- new TotalSizeBuilder().setUnit(CapacityUnit.MBPS)
- .setValue(Uint64.valueOf(100)).build())
- .build())
- .setCostCharacteristic(Map.of(costCharacteristic.key(), costCharacteristic))
- .setLatencyCharacteristic(Map.of(latencyCharacteristic.key(), latencyCharacteristic))
- .setRiskCharacteristic(Map.of(riskCharacteristic.key(), riskCharacteristic))
- .setErrorCharacteristic("error")
- .setLossCharacteristic("loss")
- .setRepeatDeliveryCharacteristic("repeat delivery")
- .setDeliveryOrderCharacteristic("delivery order")
- .setUnavailableTimeCharacteristic("unavailable time")
- .setServerIntegrityProcessCharacteristic("server integrity process")
- .setValidationMechanism(Map.of(validationMechanism.key(), validationMechanism))
- .build();
- }
-
- public void convertXpdrToRdmLinks(List<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang
- .ietf.network.topology.rev180226.networks.network.Link> xpdrRdmLinkList) {