- // if the node is currently mounted then proceed.
- if (this.deviceTransactionManager.isDeviceMounted(nodeId)) {
- if (destTp.contains(OpenRoadmInterfacesImpl.NETWORK_TOKEN)
- || srcTp.contains(OpenRoadmInterfacesImpl.CLIENT_TOKEN)
- || srcTp.contains(OpenRoadmInterfacesImpl.NETWORK_TOKEN)
- || destTp.contains(OpenRoadmInterfacesImpl.CLIENT_TOKEN)) {
- if (destTp.contains(OpenRoadmInterfacesImpl.NETWORK_TOKEN)) {
- interfacesToDelete.add(destTp + "-ODU");
- interfacesToDelete.add(destTp + "-OTU");
- interfacesToDelete.add(
- this.openRoadmInterfaceFactory.createOpenRoadmOchInterfaceName(destTp, waveNumber));
- }
- if (srcTp.contains(OpenRoadmInterfacesImpl.NETWORK_TOKEN)) {
- interfacesToDelete.add(srcTp + "-ODU");
- interfacesToDelete.add(srcTp + "-OTU");
- interfacesToDelete.add(
- this.openRoadmInterfaceFactory.createOpenRoadmOchInterfaceName(srcTp, waveNumber));
- }
- if (srcTp.contains(OpenRoadmInterfacesImpl.CLIENT_TOKEN)) {
- interfacesToDelete.add(srcTp + "-ETHERNET");
- }
- if (destTp.contains(OpenRoadmInterfacesImpl.CLIENT_TOKEN)) {
- interfacesToDelete.add(destTp + "-ETHERNET");
- }
- } else {
- String connectionNumber = srcTp + "-" + destTp + "-" + waveNumber;
- if (!this.crossConnect.deleteCrossConnect(nodeId, connectionNumber)) {
- LOG.error("Failed to delete cross connect {}", connectionNumber);
- }
- connectionNumber = destTp + "-" + srcTp + "-" + waveNumber;
- String interfName = this.openRoadmInterfaceFactory.createOpenRoadmOchInterfaceName(srcTp,
- waveNumber);
- if (!isUsedByXc(nodeId, interfName, connectionNumber)) {
- interfacesToDelete.add(interfName);
- }
- interfName = this.openRoadmInterfaceFactory.createOpenRoadmOchInterfaceName(destTp, waveNumber);
- if (!isUsedByXc(nodeId, interfName, connectionNumber)) {
- interfacesToDelete.add(interfName);
- }
+ // if the node is currently mounted then proceed.
+ if (this.deviceTransactionManager.isDeviceMounted(nodeId)) {
+ if (destTp.contains(OpenRoadmInterfacesImpl.NETWORK_TOKEN) || srcTp.contains(
+ OpenRoadmInterfacesImpl.CLIENT_TOKEN) || srcTp.contains(OpenRoadmInterfacesImpl.NETWORK_TOKEN)
+ || destTp.contains(OpenRoadmInterfacesImpl.CLIENT_TOKEN)) {
+ if (destTp.contains(OpenRoadmInterfacesImpl.NETWORK_TOKEN)) {
+ interfacesToDelete.add(destTp + "-ODU");
+ interfacesToDelete.add(destTp + "-OTU");
+ interfacesToDelete.add(this.openRoadmInterfaceFactory.createOpenRoadmOchInterfaceName(destTp,
+ waveNumber));
+ }
+ if (srcTp.contains(OpenRoadmInterfacesImpl.NETWORK_TOKEN)) {
+ interfacesToDelete.add(srcTp + "-ODU");
+ interfacesToDelete.add(srcTp + "-OTU");
+ interfacesToDelete.add(this.openRoadmInterfaceFactory.createOpenRoadmOchInterfaceName(srcTp,
+ waveNumber));
+ }
+ if (srcTp.contains(OpenRoadmInterfacesImpl.CLIENT_TOKEN)) {
+ interfacesToDelete.add(srcTp + "-ETHERNET");
+ }
+ if (destTp.contains(OpenRoadmInterfacesImpl.CLIENT_TOKEN)) {
+ interfacesToDelete.add(destTp + "-ETHERNET");