- aendUuid = sip.getUuid();
- break;
- }
- } else {
- // Service from XPDR to XPDR
- AToZ firstElement;
- TerminationPoint tp;
- Uuid sipUuid;
- switch (serviceFormat) {
- case ODU:
- firstElement = mapatoz.values().stream().filter(atoz -> atoz.getId().equals("2")).findFirst()
- .orElseThrow();
- tp = (TerminationPoint) firstElement.getResource().getResource();
- // Network-Network ports --> iODU layer SIPs. TODO -> updated to eODU
- sipUuid = new Uuid(UUID.nameUUIDFromBytes((String.join("+", "SIP", tp.getTpNodeId(),
- TapiStringConstants.I_ODU, tp.getTpId())).getBytes(StandardCharsets.UTF_8)).toString());
- LOG.info("ODU XPDR SIP name = {}", String.join("+", tp.getTpNodeId(),
- TapiStringConstants.I_ODU, tp.getTpId()));
- break;
- case OTU:
- firstElement = mapatoz.values().stream().filter(atoz -> atoz.getId().equals("2")).findFirst()
- .orElseThrow();
- tp = (TerminationPoint) firstElement.getResource().getResource();
- // Network-Network ports --> iOTSi layer SIPs
- sipUuid = new Uuid(UUID.nameUUIDFromBytes((String.join("+", "SIP", tp.getTpNodeId(),
- TapiStringConstants.I_OTSI, tp.getTpId())).getBytes(StandardCharsets.UTF_8)).toString());
- LOG.info("OTU XPDR SIP name = {}", String.join("+", tp.getTpNodeId(),
- TapiStringConstants.I_OTSI, tp.getTpId()));
- break;
- case Ethernet:
- LOG.info("Elements AZ = {}", mapatoz.values().toString());
- firstElement = mapatoz.values().stream().filter(atoz -> atoz.getId().equals("0")).findFirst()
- .orElseThrow();
- tp = (TerminationPoint) firstElement.getResource().getResource();
- // Client-client ports --> DSR layer SIPs
- sipUuid = new Uuid(UUID.nameUUIDFromBytes((String.join("+", "SIP", tp.getTpNodeId(),
- TapiStringConstants.DSR, tp.getTpId())).getBytes(StandardCharsets.UTF_8)).toString());
- LOG.info("DSR XPDR SIP name = {}", String.join("+", tp.getTpNodeId(),
- TapiStringConstants.DSR, tp.getTpId()));
- break;
- default:
- sipUuid = null;
- LOG.warn("Service format {} not supported (?)", serviceFormat.getName());