+ PathDescriptionBuilder path = sendingPCE.getPathDescription();
+ if (Boolean.FALSE.equals(sendingPCE.getSuccess()) || (path == null)) {
+ sendNotifications(
+ ServicePathNotificationTypes.PathComputationRequest,
+ input.getServiceName(),
+ RpcStatusEx.Failed,
+ "Path not calculated",
+ null);
+ return output
+ .setConfigurationResponseCommon(
+ configurationResponseCommon
+ .setAckFinalIndicator("Yes")
+ .setRequestId(input.getServiceHandlerHeader().getRequestId())
+ .setResponseCode(responseCode)
+ .setResponseMessage(message)
+ .build())
+ .build();
+ }
+ // Path calculator returned Success
+ PathDescription pathDescription =
+ new PathDescriptionBuilder()
+ .setAToZDirection(path.getAToZDirection())
+ .setZToADirection(path.getZToADirection())
+ .build();
+ sendNotifications(
+ ServicePathNotificationTypes.PathComputationRequest,
+ input.getServiceName(),
+ RpcStatusEx.Successful,
+ message,
+ pathDescription);
+ org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev220118
+ .response.parameters.sp.response.parameters.PathDescription pathDescription1 =
+ new org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev220118
+ .response.parameters.sp.response.parameters.PathDescriptionBuilder()
+ .setAToZDirection(path.getAToZDirection())
+ .setZToADirection(path.getZToADirection())
+ .build();
+ output
+ .setConfigurationResponseCommon(
+ configurationResponseCommon
+ .setAckFinalIndicator("Yes")
+ .setRequestId(input.getServiceHandlerHeader().getRequestId())
+ .setResponseCode(responseCode)
+ .setResponseMessage(message)
+ .build())
+ .setResponseParameters(
+ new ResponseParametersBuilder().setPathDescription(pathDescription1).build());
+ //debug prints
+ AToZDirection atoz = pathDescription.getAToZDirection();
+ if ((atoz != null) && (atoz.getAToZ() != null)) {
+ LOG.debug("Impl AtoZ Notification: [{}] elements in description", atoz.getAToZ().size());
+ for (org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev230501
+ .path.description.atoz.direction.AToZKey key : atoz.getAToZ().keySet()) {
+ LOG.debug("Impl AtoZ Notification: [{}] {}", key, atoz.getAToZ().get(key));
+ }
+ }
+ ZToADirection ztoa = pathDescription.getZToADirection();
+ if ((ztoa != null) && (ztoa.getZToA() != null)) {
+ LOG.debug("Impl ZtoA Notification: [{}] elements in description", ztoa.getZToA().size());
+ for (org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.pathdescription.rev230501
+ .path.description.ztoa.direction.ZToAKey key : ztoa.getZToA().keySet()) {
+ LOG.debug("Impl ZtoA Notification: [{}] {}", key, ztoa.getZToA().get(key));
+ }
+ }
+ return output.build();
+ }
+ });
+ }