X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=servicehandler%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Ftransportpce%2Fservicehandler%2Flisteners%2FRendererListenerImpl.java;h=82eb677604059711435d25c8cdbfadb1615d43db;hb=3e2029fe2f4ccc019f2d05e58ba3ae69481b3a99;hp=0c76eb001ad3b5dd55864861fa79f94b32e49711;hpb=73478a3a5354a2a557520fec6314532bf0ad6a29;p=transportpce.git diff --git a/servicehandler/src/main/java/org/opendaylight/transportpce/servicehandler/listeners/RendererListenerImpl.java b/servicehandler/src/main/java/org/opendaylight/transportpce/servicehandler/listeners/RendererListenerImpl.java index 0c76eb001..82eb67760 100644 --- a/servicehandler/src/main/java/org/opendaylight/transportpce/servicehandler/listeners/RendererListenerImpl.java +++ b/servicehandler/src/main/java/org/opendaylight/transportpce/servicehandler/listeners/RendererListenerImpl.java @@ -93,25 +93,26 @@ public class RendererListenerImpl implements TransportpceRendererListener { private void onServiceDeleteResult(RendererRpcResultSp notification) { switch (serviceRpcResultSp.getStatus()) { case Successful: - LOG.info("Service '{}' deleted !", notification.getServiceName()); String serviceType = notification.getServiceType(); switch (serviceType) { case StringConstants.SERVICE_TYPE_1GE: case StringConstants.SERVICE_TYPE_10GE: case StringConstants.SERVICE_TYPE_100GE_M: Short tribPort = Short.valueOf(notification.getAToZDirection().getMinTribSlot().getValue() - .split("\\.")[0]); + .split("\\.")[0]); Short minTribSlot = Short.valueOf(notification.getAToZDirection().getMinTribSlot().getValue() - .split("\\.")[1]); + .split("\\.")[1]); + Short maxTribSlot = Short.valueOf(notification.getAToZDirection().getMaxTribSlot().getValue() + .split("\\.")[1]); updateOtnTopology(notification.getLink(), true, notification.getServiceType(), - notification.getAToZDirection().getRate(), tribPort, minTribSlot); + notification.getAToZDirection().getRate(), tribPort, minTribSlot, maxTribSlot); break; case StringConstants.SERVICE_TYPE_OTU4: case StringConstants.SERVICE_TYPE_OTUC4: case StringConstants.SERVICE_TYPE_ODU4: case StringConstants.SERVICE_TYPE_ODUC4: updateOtnTopology(notification.getLink(), true, notification.getServiceType(), null, null, - null); + null, null); break; default: break; @@ -187,17 +188,19 @@ public class RendererListenerImpl implements TransportpceRendererListener { case StringConstants.SERVICE_TYPE_10GE: case StringConstants.SERVICE_TYPE_100GE_M: Short tribPort = Short.valueOf(notification.getAToZDirection().getMinTribSlot().getValue() - .split("\\.")[0]); + .split("\\.")[0]); Short minTribSlot = Short.valueOf(notification.getAToZDirection().getMinTribSlot().getValue() - .split("\\.")[1]); + .split("\\.")[1]); + Short maxTribSlot = Short.valueOf(notification.getAToZDirection().getMaxTribSlot().getValue() + .split("\\.")[1]); updateOtnTopology(notification.getLink(), false, notification.getServiceType(), - notification.getAToZDirection().getRate(), tribPort, minTribSlot); + notification.getAToZDirection().getRate(), tribPort, minTribSlot, maxTribSlot); break; case StringConstants.SERVICE_TYPE_OTU4: case StringConstants.SERVICE_TYPE_OTUC4: case StringConstants.SERVICE_TYPE_ODU4: case StringConstants.SERVICE_TYPE_ODUC4: - updateOtnTopology(notification.getLink(), false, notification.getServiceType(), null, null, null); + updateOtnTopology(notification.getLink(), false, notification.getServiceType(), null, null, null, null); break; default: break; @@ -348,7 +351,7 @@ public class RendererListenerImpl implements TransportpceRendererListener { } private void updateOtnTopology(Link link, boolean isDeletion, String serviceType, Uint32 rate, Short portNb, - Short slotNb) { + Short minSlotNb, Short maxSlotNb) { if (link == null) { return; } @@ -392,7 +395,7 @@ public class RendererListenerImpl implements TransportpceRendererListener { case StringConstants.SERVICE_TYPE_10GE: case StringConstants.SERVICE_TYPE_100GE_M: LOG.info("updating otn-topology node tps -tps and tpn pools"); - this.networkModelService.updateOtnLinks(link, rate, portNb, slotNb, isDeletion); + this.networkModelService.updateOtnLinks(link, rate, portNb, minSlotNb, maxSlotNb, isDeletion); break; default: break;