this.ietfNodeType = ietfNode.augmentation(
org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev200529.Node1.class).getNodeType();
this.ietfNodeAdminState = ietfNode.augmentation(
- org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev200529.Node1.class)
+ org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev200529.Node1.class)
.getAdministrativeState();
this.ietfNodeOperState = ietfNode.augmentation(
- org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev200529.Node1.class)
+ org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev200529.Node1.class)
.getOperationalState();
this.oorNetworkPortList = ietfNode.augmentation(
- org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.Node1.class)
+ org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.Node1.class)
.getTerminationPoint().values().stream()
.filter(tp -> tp.augmentation(TerminationPoint1.class).getTpType().getIntValue()
== OpenroadmTpType.XPONDERNETWORK.getIntValue()
Uuid nodeUuid = new Uuid(UUID.nameUUIDFromBytes((String.join("+", this.ietfNodeId,
TapiStringConstants.DSR)).getBytes(Charset.forName("UTF-8"))).toString());
this.uuidMap.put(String.join("+", this.ietfNodeId, TapiStringConstants.DSR), nodeUuid);
- Name nameDsr = new NameBuilder().setValueName("dsr/odu node name").setValue(this.ietfNodeId).build();
+ Name nameDsr = new NameBuilder().setValueName("dsr/odu node name")
+ .setValue(String.join("+", this.ietfNodeId, TapiStringConstants.DSR)).build();
List<LayerProtocolName> dsrLayerProtocols = Arrays.asList(LayerProtocolName.DSR, LayerProtocolName.ODU);
org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.topology
.Node dsrNode = createTapiNode(Map.of(nameDsr.key(), nameDsr), dsrLayerProtocols);
nodeUuid = new Uuid(UUID.nameUUIDFromBytes((String.join("+", this.ietfNodeId, TapiStringConstants.OTSI))
.getBytes(Charset.forName("UTF-8"))).toString());
this.uuidMap.put(String.join("+", this.ietfNodeId, TapiStringConstants.OTSI), nodeUuid);
- Name nameOtsi = new NameBuilder().setValueName("otsi node name").setValue(this.ietfNodeId).build();
+ Name nameOtsi = new NameBuilder().setValueName("otsi node name")
+ .setValue(String.join("+", this.ietfNodeId, TapiStringConstants.OTSI)).build();
List<LayerProtocolName> otsiLayerProtocols = Arrays.asList(LayerProtocolName.PHOTONICMEDIA);
org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.topology
.Node otsiNode = createTapiNode(Map.of(nameOtsi.key(), nameOtsi), otsiLayerProtocols);
prunedTapiPhotonicNodes = new ArrayList<>();
List<org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.topology.Node> tapiPhotonicNodes
= this.tapiNodes.values().stream()
- .filter(n -> LayerProtocolName.PHOTONICMEDIA.equals(n.getLayerProtocolName().get(0)))
- .collect(Collectors.toList());
+ .filter(n -> LayerProtocolName.PHOTONICMEDIA.equals(n.getLayerProtocolName().get(0)))
+ .collect(Collectors.toList());
for (org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.topology.Node node
- : tapiPhotonicNodes) {
+ : tapiPhotonicNodes) {
Map<OwnedNodeEdgePointKey, OwnedNodeEdgePoint> onepM = new HashMap<>();
for (Map.Entry<OwnedNodeEdgePointKey, OwnedNodeEdgePoint> entry : node.getOwnedNodeEdgePoint().entrySet()) {
if (entry.getValue().getName().values().stream()
- .filter(name -> name.getValueName().startsWith("eNodeEdgePoint")).count() > 0) {
+ .filter(name -> name.getValueName().startsWith("eNodeEdgePoint")).count() > 0) {
onepM.put(entry.getKey(), entry.getValue());
}
}
}
private Map<String, String> convertListNodeWithListNepToMapForUuidAndName(
- List<org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.topology.Node> nodes) {
+ List<org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.topology.Node> nodes) {
Map<String, String> uuidNameMap = new HashMap<>();
for (org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.topology.Node node : nodes) {
for (OwnedNodeEdgePoint nep : node.nonnullOwnedNodeEdgePoint().values()) {
}
private Uuid getNodeUuid4Photonic(Map<OwnedNodeEdgePointKey, OwnedNodeEdgePoint> onepl,
- Map<NodeRuleGroupKey, NodeRuleGroup> nodeRuleGroupList, Map<RuleKey, Rule> ruleList) {
+ Map<NodeRuleGroupKey, NodeRuleGroup> nodeRuleGroupList,
+ Map<RuleKey, Rule> ruleList) {
Uuid nodeUuid;
nodeUuid = this.uuidMap.get(String.join("+", this.ietfNodeId, TapiStringConstants.OTSI));
// iNep creation on otsi node
for (int i = 0; i < oorNetworkPortList.size(); i++) {
Uuid nepUuid1 = new Uuid(UUID.nameUUIDFromBytes(
- (String.join("+", this.ietfNodeId, TapiStringConstants.I_OTSI,
- oorNetworkPortList.get(i).getTpId().getValue())).getBytes(Charset.forName("UTF-8")))
+ (String.join("+", this.ietfNodeId, TapiStringConstants.I_OTSI,
+ oorNetworkPortList.get(i).getTpId().getValue())).getBytes(Charset.forName("UTF-8")))
.toString());
this.uuidMap.put(String.join("+", this.ietfNodeId, TapiStringConstants.I_OTSI,
oorNetworkPortList.get(i).getTpId().getValue()), nepUuid1);
Name onedName = new NameBuilder()
.setValueName("iNodeEdgePoint")
- .setValue(oorNetworkPortList.get(i).getTpId().getValue())
+ .setValue(String.join("+", this.ietfNodeId, TapiStringConstants.I_OTSI,
+ oorNetworkPortList.get(i).getTpId().getValue()))
.build();
OwnedNodeEdgePoint onep = createNep(oorNetworkPortList.get(i), Map.of(onedName.key(), onedName),
// eNep creation on otsi node
for (int i = 0; i < oorNetworkPortList.size(); i++) {
Uuid nepUuid2 = new Uuid(UUID.nameUUIDFromBytes(
- (String.join("+", this.ietfNodeId, TapiStringConstants.E_OTSI,
- oorNetworkPortList.get(i).getTpId().getValue())).getBytes(Charset.forName("UTF-8")))
+ (String.join("+", this.ietfNodeId, TapiStringConstants.E_OTSI,
+ oorNetworkPortList.get(i).getTpId().getValue())).getBytes(Charset.forName("UTF-8")))
.toString());
this.uuidMap.put(String.join("+", this.ietfNodeId, TapiStringConstants.E_OTSI,
oorNetworkPortList.get(i).getTpId().getValue()), nepUuid2);
Name onedName = new NameBuilder()
.setValueName("eNodeEdgePoint")
- .setValue(oorNetworkPortList.get(i).getTpId().getValue())
+ .setValue(String.join("+", this.ietfNodeId, TapiStringConstants.E_OTSI,
+ oorNetworkPortList.get(i).getTpId().getValue()))
.build();
OwnedNodeEdgePoint onep = createNep(oorNetworkPortList.get(i), Map.of(onedName.key(), onedName),
}
private Uuid getNodeUuid4Dsr(Map<OwnedNodeEdgePointKey, OwnedNodeEdgePoint> onepl,
- Map<NodeRuleGroupKey, NodeRuleGroup> nodeRuleGroupList, Map<RuleKey, Rule> ruleList) {
+ Map<NodeRuleGroupKey, NodeRuleGroup> nodeRuleGroupList, Map<RuleKey, Rule> ruleList) {
Uuid nodeUuid;
nodeUuid = this.uuidMap.get(String.join("+", this.ietfNodeId, TapiStringConstants.DSR));
// client nep creation on DSR/ODU node
oorClientPortList.get(i).getTpId().getValue())).getBytes(Charset.forName("UTF-8"))).toString());
this.uuidMap.put(String.join("+", this.ietfNodeId, TapiStringConstants.DSR,
oorClientPortList.get(i).getTpId().getValue()), nepUuid);
- NameBuilder nameBldr = new NameBuilder().setValue(oorClientPortList.get(i).getTpId().getValue());
+ NameBuilder nameBldr = new NameBuilder().setValue(String.join("+", this.ietfNodeId, TapiStringConstants.DSR,
+ oorClientPortList.get(i).getTpId().getValue()));
Name name;
if (OpenroadmNodeType.TPDR.equals(this.ietfNodeType)) {
name = nameBldr.setValueName("100G-tpdr").build();
// network nep creation on DSR/ODU node
for (int i = 0; i < oorNetworkPortList.size(); i++) {
Uuid nepUuid = new Uuid(UUID.nameUUIDFromBytes(
- (String.join("+", this.ietfNodeId, TapiStringConstants.DSR,
+ (String.join("+", this.ietfNodeId, TapiStringConstants.I_ODU,
oorNetworkPortList.get(i).getTpId().getValue())).getBytes(Charset.forName("UTF-8"))).toString());
- this.uuidMap.put(String.join("+", this.ietfNodeId, TapiStringConstants.DSR,
+ this.uuidMap.put(String.join("+", this.ietfNodeId, TapiStringConstants.I_ODU,
oorNetworkPortList.get(i).getTpId().getValue()), nepUuid);
Name onedName = new NameBuilder()
- .setValueName("NodeEdgePoint_N")
- .setValue(oorNetworkPortList.get(i).getTpId().getValue())
+ .setValueName("iNodeEdgePoint_N")
+ .setValue(String.join("+", this.ietfNodeId, TapiStringConstants.I_ODU,
+ oorNetworkPortList.get(i).getTpId().getValue()))
.build();
OwnedNodeEdgePoint onep = createNep(oorNetworkPortList.get(i), Map.of(onedName.key(), onedName),
LayerProtocolName.ODU, LayerProtocolName.DSR, true, String.join("+", this.ietfNodeId,
- TapiStringConstants.DSR));
+ TapiStringConstants.I_ODU));
onepl.put(onep.key(), onep);
}
// create NodeRuleGroup
nepList = new HashMap<>();
for (TpId tp : nbl.getTpList()) {
if (this.uuidMap.containsKey(String.join("+", this.ietfNodeId, TapiStringConstants.DSR,
- tp.getValue()))) {
-
+ tp.getValue())) || this.uuidMap.containsKey(String.join(
+ "+", this.ietfNodeId, TapiStringConstants.I_ODU, tp.getValue()))) {
+ String qual = tp.getValue().contains("CLIENT") ? TapiStringConstants.DSR
+ : TapiStringConstants.I_ODU;
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()
.setNodeUuid(this.uuidMap.get(String.join("+", this.ietfNodeId,
TapiStringConstants.DSR)))
.setNodeEdgePointUuid(this.uuidMap.get(String.join("+", this.ietfNodeId,
- TapiStringConstants.DSR, tp.getValue())))
+ qual, tp.getValue())))
.build();
nepList.put(nep.key(), nep);
}
}
private OwnedNodeEdgePoint createNep(TerminationPoint oorTp, Map<NameKey, Name> nepNames,
- LayerProtocolName nepProtocol, LayerProtocolName nodeProtocol, boolean withSip, String keyword) {
+ LayerProtocolName nepProtocol, LayerProtocolName nodeProtocol,
+ boolean withSip, String keyword) {
String key = String.join("+", keyword, oorTp.getTpId().getValue());
AdministrativeState adminState = (oorTp.augmentation(TerminationPoint1.class).getAdministrativeState() != null)
? this.tapiLink.setTapiAdminState(oorTp.augmentation(TerminationPoint1.class).getAdministrativeState()
}
private Map<NodeRuleGroupKey, NodeRuleGroup> createNodeRuleGroupForRdmNode(Uuid nodeUuid,
- Collection<OwnedNodeEdgePoint> onepl) {
+ 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<>();
}
private Map<MappedServiceInterfacePointKey, MappedServiceInterfacePoint> createSIP(int nb, TerminationPoint tp,
- String nodeId) {
+ String nodeId) {
Map<MappedServiceInterfacePointKey, MappedServiceInterfacePoint> msipl = new HashMap<>();
for (int i = 0; i < nb; i++) {
MappedServiceInterfacePoint msip = new MappedServiceInterfacePointBuilder()
return msipl;
}
- private List<Class<? extends LAYERPROTOCOLQUALIFIER>> createSupportedCepLayerProtocolQualifier(TerminationPoint tp,
- LayerProtocolName lpn) {
+ private List<Class<? extends LAYERPROTOCOLQUALIFIER>>
+ createSupportedCepLayerProtocolQualifier(TerminationPoint tp, LayerProtocolName lpn) {
Set<Class<? extends LAYERPROTOCOLQUALIFIER>> sclpqSet = new HashSet<>();
List<SupportedInterfaceCapability> sicList = new ArrayList<>(
tp.augmentation(org.opendaylight.yang.gen.v1.http
- .org.openroadm.otn.network.topology.rev200529.TerminationPoint1.class).getTpSupportedInterfaces()
+ .org.openroadm.otn.network.topology.rev200529.TerminationPoint1.class).getTpSupportedInterfaces()
.getSupportedInterfaceCapability().values());
for (SupportedInterfaceCapability sic : sicList) {
switch (lpn.getName()) {
for (TerminationPoint tp : this.oorNetworkPortList) {
Link transiLink = tapiLink.createTapiLink(this.ietfNodeId, tp.getTpId().getValue(), this.ietfNodeId,
tp.getTpId().getValue(), TapiStringConstants.TRANSITIONAL_LINK, TapiStringConstants.DSR,
- TapiStringConstants.OTSI, TapiStringConstants.DSR, TapiStringConstants.I_OTSI,
+ TapiStringConstants.OTSI, TapiStringConstants.I_ODU, TapiStringConstants.I_OTSI,
"inService", "inService", Arrays.asList(LayerProtocolName.ODU,
LayerProtocolName.PHOTONICMEDIA),
Arrays.asList(LayerProtocolName.ODU.getName(), LayerProtocolName.PHOTONICMEDIA.getName()),
Link omsLink = new LinkBuilder()
.setUuid(new Uuid(
UUID.nameUUIDFromBytes((String.join(" and ", photonicEntry.getValue(), rdmEntry.getValue()))
- .getBytes(Charset.forName("UTF-8")))
+ .getBytes(Charset.forName("UTF-8")))
.toString()))
.setName(Map.of(linkName.key(), linkName))
.setLayerProtocolName(List.of(LayerProtocolName.PHOTONICMEDIA))