import org.opendaylight.transportpce.servicehandler.validation.ServiceCreateValidation;
import org.opendaylight.transportpce.servicehandler.validation.checks.ComplianceCheckResult;
import org.opendaylight.transportpce.servicehandler.validation.checks.ServicehandlerComplianceCheck;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev200128.PathComputationRequestOutput;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.pce.rev210701.PathComputationRequestOutput;
import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.RpcActions;
import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.ServiceNotificationTypes;
import org.opendaylight.yang.gen.v1.http.org.openroadm.common.service.types.rev190531.configuration.response.common.ConfigurationResponseCommon;
input, ResponseCodes.FINAL_ACK_YES,
validationResult.getResultMessage(), ResponseCodes.RESPONSE_FAILED);
}
- PublishNotificationService nbiNotification = new PublishNotificationServiceBuilder()
- .setServiceName(input.getServiceName())
- .setServiceAEnd(new ServiceAEndBuilder(input.getServiceAEnd()).build())
- .setServiceZEnd(new ServiceZEndBuilder(input.getServiceZEnd()).build())
- .setCommonId(input.getCommonId()).setConnectionType(input.getConnectionType())
- .setResponseFailed("")
- .setMessage("ServiceCreate request received ...")
- .setOperationalState(State.OutOfService)
- .setTopic(topic)
- .build();
- sendNbiNotification(nbiNotification);
this.pceListenerImpl.setInput(new ServiceInput(input));
this.pceListenerImpl.setServiceReconfigure(false);
this.pceListenerImpl.setserviceDataStoreOperations(this.serviceDataStoreOperations);
PathComputationRequestOutput output = this.pceServiceWrapper.performPCE(input, true);
if (output == null) {
LOG.warn(SERVICE_CREATE_MSG, LogMessages.ABORT_PCE_FAILED);
- nbiNotification = new PublishNotificationServiceBuilder(nbiNotification)
+ sendNbiNotification(new PublishNotificationServiceBuilder()
+ .setServiceName(input.getServiceName())
+ .setServiceAEnd(new ServiceAEndBuilder(input.getServiceAEnd()).build())
+ .setServiceZEnd(new ServiceZEndBuilder(input.getServiceZEnd()).build())
+ .setCommonId(input.getCommonId()).setConnectionType(input.getConnectionType())
.setResponseFailed(LogMessages.ABORT_PCE_FAILED)
.setMessage("ServiceCreate request failed ...")
.setOperationalState(State.Degraded)
- .build();
- sendNbiNotification(nbiNotification);
+ .build());
return ModelMappingUtils.createCreateServiceReply(input, ResponseCodes.FINAL_ACK_YES,
LogMessages.PCE_FAILED, ResponseCodes.RESPONSE_FAILED);
}
LogMessages.serviceNotInDS(serviceName), ResponseCodes.RESPONSE_FAILED);
}
service = serviceOpt.get();
- PublishNotificationService nbiNotification = new PublishNotificationServiceBuilder()
- .setServiceName(service.getServiceName())
- .setServiceAEnd(new ServiceAEndBuilder(service.getServiceAEnd()).build())
- .setServiceZEnd(new ServiceZEndBuilder(service.getServiceZEnd()).build())
- .setCommonId(service.getCommonId()).setConnectionType(service.getConnectionType())
- .setMessage("ServiceDelete request received ...")
- .setOperationalState(State.OutOfService)
- .setResponseFailed("")
- .setTopic(topic)
- .build();
- sendNbiNotification(nbiNotification);
LOG.debug("serviceDelete: Service '{}' found in datastore", serviceName);
this.pceListenerImpl.setInput(new ServiceInput(input));
this.pceListenerImpl.setServiceReconfigure(false);
if (output == null) {
LOG.error(SERVICE_DELETE_MSG, LogMessages.RENDERER_DELETE_FAILED);
- nbiNotification = new PublishNotificationServiceBuilder(nbiNotification)
- .setMessage("ServiceCreate request failed ...")
- .setOperationalState(State.OutOfService)
- .setResponseFailed(LogMessages.ABORT_PCE_FAILED)
- .build();
- sendNbiNotification(nbiNotification);
+ sendNbiNotification(new PublishNotificationServiceBuilder()
+ .setServiceName(service.getServiceName())
+ .setServiceAEnd(new ServiceAEndBuilder(service.getServiceAEnd()).build())
+ .setServiceZEnd(new ServiceZEndBuilder(service.getServiceZEnd()).build())
+ .setCommonId(service.getCommonId()).setConnectionType(service.getConnectionType())
+ .setMessage("ServiceDelete request failed ...")
+ .setOperationalState(State.InService)
+ .setResponseFailed(LogMessages.RENDERER_DELETE_FAILED)
+ .build());
return ModelMappingUtils.createDeleteServiceReply(
input, ResponseCodes.FINAL_ACK_YES,
LogMessages.RENDERER_DELETE_FAILED, ResponseCodes.RESPONSE_FAILED);