- Map<NodeEdgePointKey, NodeEdgePoint> nepList = new HashMap<>();
- String sourceKey = String.join("+", nodeId, I_ODU, mapping.getLogicalConnectionPoint());
- Uuid sourceUuidTp = new Uuid(UUID.nameUUIDFromBytes(
- (String.join("+", nodeId, I_ODU, mapping.getLogicalConnectionPoint()))
- .getBytes(Charset.forName("UTF-8"))).toString());
- String destKey = String.join("+", nodeId, I_OTSI, mapping.getLogicalConnectionPoint());
- Uuid destUuidTp = new Uuid(UUID.nameUUIDFromBytes(
- (String.join("+", nodeId, I_OTSI, mapping.getLogicalConnectionPoint()))
- .getBytes(Charset.forName("UTF-8"))).toString());
- NodeEdgePoint sourceNep = new NodeEdgePointBuilder()
- .setTopologyUuid(this.tapiTopoUuid)
- .setNodeUuid(nodeUuidDsr)
- .setNodeEdgePointUuid(sourceUuidTp)
- .build();
- nepList.put(sourceNep.key(), sourceNep);
- NodeEdgePoint destNep = new NodeEdgePointBuilder()
- .setTopologyUuid(this.tapiTopoUuid)
- .setNodeUuid(nodeUuidOtsi)
- .setNodeEdgePointUuid(destUuidTp)
- .build();
- nepList.put(destNep.key(), destNep);
- Name linkName = new NameBuilder().setValueName("transitional link name")
- .setValue(String.join("--",nodeId, 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("--", nodeId, sourceKey, destKey))
- .getBytes(Charset.forName("UTF-8")))
- .toString()))
- .setName(Map.of(linkName.key(), linkName))
- .setTransitionedLayerProtocolName(Arrays.asList(LayerProtocolName.ODU.getName(),
- LayerProtocolName.PHOTONICMEDIA.getName()))
- .setNodeEdgePoint(nepList)
- .setLayerProtocolName(Arrays.asList(LayerProtocolName.PHOTONICMEDIA, LayerProtocolName.ODU))
- .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(transformAdminState(mapping.getPortAdminState()))
- .setOperationalState(transformOperState(mapping.getPortOperState()))
- .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();