Disable optical control mode for temp service
[transportpce.git] / servicehandler / src / main / java / org / opendaylight / transportpce / servicehandler / listeners / PceListenerImpl.java
index cc003739098640a5e93129234deae99999b3bf0b..097e258235d2278c3836db85f42de1f8b20a07d4 100644 (file)
@@ -96,6 +96,7 @@ public class PceListenerImpl implements TransportpcePceListener, PceListener {
     private void onPathComputationResult(ServicePathRpcResult notification) {
         LOG.info("PCE '{}' Notification received : {}", servicePathRpcResult.getNotificationType().getName(),
                 notification);
+
         if (!checkStatus(notification)) {
             return;
         }
@@ -119,7 +120,9 @@ public class PceListenerImpl implements TransportpcePceListener, PceListener {
         }
         OperationResult operationResult = null;
         if (tempService) {
-            operationResult = this.serviceDataStoreOperations.createTempService(input.getTempServiceCreateInput());
+            operationResult =
+                    this.serviceDataStoreOperations.createTempService(
+                            input.getTempServiceCreateInput(), pathDescription);
             if (!operationResult.isSuccess()) {
                 LOG.error("Temp Service not created in datastore !");
             }
@@ -150,7 +153,8 @@ public class PceListenerImpl implements TransportpcePceListener, PceListener {
         ServiceImplementationRequestInput serviceImplementationRequest =
             ModelMappingUtils.createServiceImplementationRequest(input, pathDescription);
         LOG.info("Sending serviceImplementation request : {}", serviceImplementationRequest);
-        this.rendererServiceOperations.serviceImplementation(serviceImplementationRequest);
+        LOG.debug("Temp-service value is {}", tempService);
+        this.rendererServiceOperations.serviceImplementation(serviceImplementationRequest, tempService);
     }
 
     /**