import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
String.join("+", this.ietfNodeId, TapiStringConstants.DSR)).build();
Name nameNodeType = new NameBuilder().setValueName("Node Type")
.setValue(this.ietfNodeType.getName()).build();
String.join("+", this.ietfNodeId, TapiStringConstants.DSR)).build();
Name nameNodeType = new NameBuilder().setValueName("Node Type")
.setValue(this.ietfNodeType.getName()).build();
org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.topology
.Node dsrNode = createTapiNode(Map.of(nameDsrNode.key(), nameDsrNode, nameNodeType.key(), nameNodeType),
dsrLayerProtocols);
org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.topology
.Node dsrNode = createTapiNode(Map.of(nameDsrNode.key(), nameDsrNode, nameNodeType.key(), nameNodeType),
dsrLayerProtocols);
this.uuidMap.put(String.join("+", this.ietfNodeId, TapiStringConstants.OTSI), nodeUuid);
Name nameOtsiNode = new NameBuilder().setValueName("otsi node name").setValue(
String.join("+", this.ietfNodeId, TapiStringConstants.OTSI)).build();
this.uuidMap.put(String.join("+", this.ietfNodeId, TapiStringConstants.OTSI), nodeUuid);
Name nameOtsiNode = new NameBuilder().setValueName("otsi node name").setValue(
String.join("+", this.ietfNodeId, TapiStringConstants.OTSI)).build();
org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.topology
.Node otsiNode = createTapiNode(Map.of(nameOtsiNode.key(), nameOtsiNode, nameNodeType.key(), nameNodeType),
otsiLayerProtocols);
org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.topology
.Node otsiNode = createTapiNode(Map.of(nameOtsiNode.key(), nameOtsiNode, nameNodeType.key(), nameNodeType),
otsiLayerProtocols);
link.getDestination().getDestNode().getValue().split("-")[1]),
link.getDestination().getDestTp().getValue(), TapiStringConstants.OMS_RDM_RDM_LINK,
TapiStringConstants.PHTNC_MEDIA, TapiStringConstants.PHTNC_MEDIA, TapiStringConstants.PHTNC_MEDIA,
link.getDestination().getDestNode().getValue().split("-")[1]),
link.getDestination().getDestTp().getValue(), TapiStringConstants.OMS_RDM_RDM_LINK,
TapiStringConstants.PHTNC_MEDIA, TapiStringConstants.PHTNC_MEDIA, TapiStringConstants.PHTNC_MEDIA,
- TapiStringConstants.PHTNC_MEDIA, adminState, operState, List.of(LayerProtocolName.PHOTONICMEDIA),
- List.of(LayerProtocolName.PHOTONICMEDIA.getName()), this.tapiTopoUuid);
+ TapiStringConstants.PHTNC_MEDIA, adminState, operState, Set.of(LayerProtocolName.PHOTONICMEDIA),
+ Set.of(LayerProtocolName.PHOTONICMEDIA.getName()), this.tapiTopoUuid);
linksToNotConvert.add(link
.augmentation(Link1.class)
.getOppositeLink().getValue());
linksToNotConvert.add(link
.augmentation(Link1.class)
.getOppositeLink().getValue());
Name nameNodeType = new NameBuilder().setValueName("Node Type")
.setValue(this.ietfNodeType.getName()).build();
// Protocol Layer
Name nameNodeType = new NameBuilder().setValueName("Node Type")
.setValue(this.ietfNodeType.getName()).build();
// Protocol Layer
// Build tapi node
org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.topology
.Node roadmNode = createRoadmTapiNode(nodeUuid,
// Build tapi node
org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.topology
.Node roadmNode = createRoadmTapiNode(nodeUuid,
- TpId tpid2 = new TpId(tp.augmentation(
- org.opendaylight.yang.gen.v1.http.transportpce.topology.rev220123.TerminationPoint1.class)
- .getAssociatedConnectionMapPort());
- List<TpId> tpList = new ArrayList<>();
+ TpId tpid2 = tp.augmentation(
+ org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev211210.TerminationPoint1.class)
+ .getAssociatedConnectionMapTp().iterator().next();
+ Set<TpId> tpList = new HashSet<>();
Uuid nodeUuid = null;
Map<OwnedNodeEdgePointKey, OwnedNodeEdgePoint> onepl = new HashMap<>();
Map<NodeRuleGroupKey, NodeRuleGroup> nodeRuleGroupList = new HashMap<>();
Uuid nodeUuid = null;
Map<OwnedNodeEdgePointKey, OwnedNodeEdgePoint> onepl = new HashMap<>();
Map<NodeRuleGroupKey, NodeRuleGroup> nodeRuleGroupList = new HashMap<>();
CostCharacteristic costCharacteristic = new CostCharacteristicBuilder()
.setCostAlgorithm("Restricted Shortest Path - RSP")
.setCostName("HOP_COUNT")
CostCharacteristic costCharacteristic = new CostCharacteristicBuilder()
.setCostAlgorithm("Restricted Shortest Path - RSP")
.setCostName("HOP_COUNT")
- .setFixedLatencyCharacteristic("12345678")
- .setQueingLatencyCharacteristic("12345678")
- .setJitterCharacteristic("12345678")
- .setWanderCharacteristic("12345678")
+ .setFixedLatencyCharacteristic(TapiStringConstants.FIXED_LATENCY_VALUE)
+ .setQueingLatencyCharacteristic(TapiStringConstants.QUEING_LATENCY_VALUE)
+ .setJitterCharacteristic(TapiStringConstants.JITTER_VALUE)
+ .setWanderCharacteristic(TapiStringConstants.WANDER_VALUE)
- createRoadmTapiNode(Uuid nodeUuid, Map<NameKey, Name> nameMap, List<LayerProtocolName> layerProtocols,
+ createRoadmTapiNode(Uuid nodeUuid, Map<NameKey, Name> nameMap, Set<LayerProtocolName> layerProtocols,
Map<OwnedNodeEdgePointKey, OwnedNodeEdgePoint> oneplist) {
// Empty random creation of mandatory fields for avoiding errors....
CostCharacteristic costCharacteristic = new CostCharacteristicBuilder()
.setCostAlgorithm("Restricted Shortest Path - RSP")
.setCostName("HOP_COUNT")
Map<OwnedNodeEdgePointKey, OwnedNodeEdgePoint> oneplist) {
// Empty random creation of mandatory fields for avoiding errors....
CostCharacteristic costCharacteristic = new CostCharacteristicBuilder()
.setCostAlgorithm("Restricted Shortest Path - RSP")
.setCostName("HOP_COUNT")
- .setFixedLatencyCharacteristic("12345678")
- .setQueingLatencyCharacteristic("12345678")
- .setJitterCharacteristic("12345678")
- .setWanderCharacteristic("12345678")
+ .setFixedLatencyCharacteristic(TapiStringConstants.FIXED_LATENCY_VALUE)
+ .setQueingLatencyCharacteristic(TapiStringConstants.QUEING_LATENCY_VALUE)
+ .setJitterCharacteristic(TapiStringConstants.JITTER_VALUE)
+ .setWanderCharacteristic(TapiStringConstants.WANDER_VALUE)
CostCharacteristic costCharacteristic = new CostCharacteristicBuilder()
.setCostAlgorithm("Restricted Shortest Path - RSP")
.setCostName("HOP_COUNT")
CostCharacteristic costCharacteristic = new CostCharacteristicBuilder()
.setCostAlgorithm("Restricted Shortest Path - RSP")
.setCostName("HOP_COUNT")
- .setFixedLatencyCharacteristic("12345678")
- .setQueingLatencyCharacteristic("12345678")
- .setJitterCharacteristic("12345678")
- .setWanderCharacteristic("12345678")
+ .setFixedLatencyCharacteristic(TapiStringConstants.FIXED_LATENCY_VALUE)
+ .setQueingLatencyCharacteristic(TapiStringConstants.QUEING_LATENCY_VALUE)
+ .setJitterCharacteristic(TapiStringConstants.JITTER_VALUE)
+ .setWanderCharacteristic(TapiStringConstants.WANDER_VALUE)
.setTrafficPropertyName("FIXED_LATENCY")
.build();
RiskCharacteristic riskCharacteristic = new RiskCharacteristicBuilder()
.setRiskCharacteristicName("risk characteristic")
.setTrafficPropertyName("FIXED_LATENCY")
.build();
RiskCharacteristic riskCharacteristic = new RiskCharacteristicBuilder()
.setRiskCharacteristicName("risk characteristic")
CostCharacteristic costCharacteristic = new CostCharacteristicBuilder()
.setCostAlgorithm("Restricted Shortest Path - RSP")
.setCostName("HOP_COUNT")
CostCharacteristic costCharacteristic = new CostCharacteristicBuilder()
.setCostAlgorithm("Restricted Shortest Path - RSP")
.setCostName("HOP_COUNT")
- .setFixedLatencyCharacteristic("12345678")
- .setQueingLatencyCharacteristic("12345678")
- .setJitterCharacteristic("12345678")
- .setWanderCharacteristic("12345678")
+ .setFixedLatencyCharacteristic(TapiStringConstants.FIXED_LATENCY_VALUE)
+ .setQueingLatencyCharacteristic(TapiStringConstants.QUEING_LATENCY_VALUE)
+ .setJitterCharacteristic(TapiStringConstants.JITTER_VALUE)
+ .setWanderCharacteristic(TapiStringConstants.WANDER_VALUE)
.setTrafficPropertyName("FIXED_LATENCY")
.build();
RiskCharacteristic riskCharacteristic = new RiskCharacteristicBuilder()
.setRiskCharacteristicName("risk characteristic")
.setTrafficPropertyName("FIXED_LATENCY")
.build();
RiskCharacteristic riskCharacteristic = new RiskCharacteristicBuilder()
.setRiskCharacteristicName("risk characteristic")
.build();
NodeRuleGroup nodeRuleGroup = new NodeRuleGroupBuilder()
.setUuid(new Uuid(UUID.nameUUIDFromBytes(("dsr node rule group " + count)
.build();
NodeRuleGroup nodeRuleGroup = new NodeRuleGroupBuilder()
.setUuid(new Uuid(UUID.nameUUIDFromBytes(("dsr node rule group " + count)
.getBytes(Charset.forName("UTF-8"))).toString()))
.setLayerProtocolName(LayerProtocolName.PHOTONICMEDIA)
.setName(Map.of(nepName.key(), nepName))
.getBytes(Charset.forName("UTF-8"))).toString()))
.setLayerProtocolName(LayerProtocolName.PHOTONICMEDIA)
.setName(Map.of(nepName.key(), nepName))
.setLinkPortDirection(PortDirection.BIDIRECTIONAL)
.setLinkPortRole(PortRole.SYMMETRIC)
.setAdministrativeState(this.tapiLink.setTapiAdminState(admin.getName()))
.setLinkPortDirection(PortDirection.BIDIRECTIONAL)
.setLinkPortRole(PortRole.SYMMETRIC)
.setAdministrativeState(this.tapiLink.setTapiAdminState(admin.getName()))
TapiStringConstants.MC, tp.getTpId().getValue())).getBytes(Charset.forName("UTF-8"))).toString()))
.setLayerProtocolName(LayerProtocolName.PHOTONICMEDIA)
.setName(Map.of(nepName1.key(), nepName1))
TapiStringConstants.MC, tp.getTpId().getValue())).getBytes(Charset.forName("UTF-8"))).toString()))
.setLayerProtocolName(LayerProtocolName.PHOTONICMEDIA)
.setName(Map.of(nepName1.key(), nepName1))
.setLinkPortDirection(PortDirection.BIDIRECTIONAL)
.setLinkPortRole(PortRole.SYMMETRIC)
.setAdministrativeState(this.tapiLink.setTapiAdminState(admin.getName()))
.setLinkPortDirection(PortDirection.BIDIRECTIONAL)
.setLinkPortRole(PortRole.SYMMETRIC)
.setAdministrativeState(this.tapiLink.setTapiAdminState(admin.getName()))
.toString()))
.setLayerProtocolName(LayerProtocolName.PHOTONICMEDIA)
.setName(Map.of(nepName2.key(), nepName2))
.toString()))
.setLayerProtocolName(LayerProtocolName.PHOTONICMEDIA)
.setName(Map.of(nepName2.key(), nepName2))
.setLinkPortDirection(PortDirection.BIDIRECTIONAL)
.setLinkPortRole(PortRole.SYMMETRIC)
.setAdministrativeState(this.tapiLink.setTapiAdminState(admin.getName()))
.setLinkPortDirection(PortDirection.BIDIRECTIONAL)
.setLinkPortRole(PortRole.SYMMETRIC)
.setAdministrativeState(this.tapiLink.setTapiAdminState(admin.getName()))
org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210.TerminationPoint1 tp1 =
tp.augmentation(org.opendaylight.yang.gen.v1.http
.org.openroadm.otn.network.topology.rev211210.TerminationPoint1.class);
if (tp1 == null) {
org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210.TerminationPoint1 tp1 =
tp.augmentation(org.opendaylight.yang.gen.v1.http
.org.openroadm.otn.network.topology.rev211210.TerminationPoint1.class);
if (tp1 == null) {
}
if (tp1.getTpSupportedInterfaces() == null) {
LOG.warn("Tp supported interface doesnt exist on TP {}", tp.getTpId().getValue());
}
if (tp1.getTpSupportedInterfaces() == null) {
LOG.warn("Tp supported interface doesnt exist on TP {}", tp.getTpId().getValue());
Link transiLink = tapiLink.createTapiLink(this.ietfNodeId, tp.getTpId().getValue(), this.ietfNodeId,
tp.getTpId().getValue(), TapiStringConstants.TRANSITIONAL_LINK, TapiStringConstants.DSR,
TapiStringConstants.OTSI, TapiStringConstants.I_ODU, TapiStringConstants.I_OTSI,
Link transiLink = tapiLink.createTapiLink(this.ietfNodeId, tp.getTpId().getValue(), this.ietfNodeId,
tp.getTpId().getValue(), TapiStringConstants.TRANSITIONAL_LINK, TapiStringConstants.DSR,
TapiStringConstants.OTSI, TapiStringConstants.I_ODU, TapiStringConstants.I_OTSI,
- "inService", "inService", Arrays.asList(LayerProtocolName.ODU,
- LayerProtocolName.PHOTONICMEDIA),
- Arrays.asList(LayerProtocolName.ODU.getName(), LayerProtocolName.PHOTONICMEDIA.getName()),
+ "inService", "inService", Set.of(LayerProtocolName.ODU, LayerProtocolName.PHOTONICMEDIA),
+ Set.of(LayerProtocolName.ODU.getName(), LayerProtocolName.PHOTONICMEDIA.getName()),
Link tapLink = this.tapiLink.createTapiLink(sourceNode, sourceTp, destNode, destTp,
TapiStringConstants.OMS_XPDR_RDM_LINK, sourceNodeQual, destNodeQual,
TapiStringConstants.PHTNC_MEDIA, TapiStringConstants.PHTNC_MEDIA, adminState,
Link tapLink = this.tapiLink.createTapiLink(sourceNode, sourceTp, destNode, destTp,
TapiStringConstants.OMS_XPDR_RDM_LINK, sourceNodeQual, destNodeQual,
TapiStringConstants.PHTNC_MEDIA, TapiStringConstants.PHTNC_MEDIA, adminState,
- operState, List.of(LayerProtocolName.PHOTONICMEDIA),
- List.of(LayerProtocolName.PHOTONICMEDIA.getName()), this.tapiTopoUuid);
+ operState, Set.of(LayerProtocolName.PHOTONICMEDIA),
+ Set.of(LayerProtocolName.PHOTONICMEDIA.getName()), this.tapiTopoUuid);
linksToNotConvert.add(link.augmentation(Link1.class).getOppositeLink().getValue());
this.tapiLinks.put(tapLink.key(), tapLink);
}
linksToNotConvert.add(link.augmentation(Link1.class).getOppositeLink().getValue());
this.tapiLinks.put(tapLink.key(), tapLink);
}