+ private void sendServiceRpcResultNotification(RendererRpcResultSp notification, ServiceNotificationTypes type) {
+ try {
+ ServiceRpcResult serviceRpcResult = new ServiceRpcResultBuilder()
+ .setServiceName(notification.getServiceName())
+ .setNotificationType(type)
+ .setStatusMessage(notification.getStatusMessage())
+ .setCommonId(notification.getCommonId())
+ .setPathComputationResult(new PathComputationResultBuilder()
+ .setAToZ(new AToZBuilder()
+ .setFrequency(notification
+ .getAToZDirection()
+ .getCentralFrequency())
+ .setWidth(notification
+ .getAToZDirection()
+ .getWidth())
+ // TODO: here the optical operational mode should be set
+ // TODO: also set the GNSR, OSNR, power values
+ .setOpticalOperationalMode("test")
+ .build())
+ .setZToA(new ZToABuilder()
+ .setFrequency(notification
+ .getZToADirection()
+ .getCentralFrequency())
+ .setWidth(notification
+ .getZToADirection()
+ .getWidth())
+ // TODO: here the optical operational mode should be set
+ // TODO: also set the GNSR, OSNR, power values
+ .setOpticalOperationalMode("test")
+ .build())
+ .build())
+ .build();
+ LOG.info("Sending the notification for service-rpc-result {}", serviceRpcResult);
+ notificationPublishService.putNotification(
+ serviceRpcResult);
+ } catch (InterruptedException e) {
+ LOG.warn("Something went wrong while sending notification for service {}",
+ serviceRpcResultSp.getServiceName(), e);
+ Thread.currentThread().interrupt();
+ }
+ }
+
+
+