Add aggregate routes and VNR rebuild to GR Yang
[sdnc/northbound.git] / generic-resource-api / provider / src / main / java / org / onap / sdnc / northbound / GenericResourceApiProvider.java
index 8946600..ef5b9e4 100644 (file)
@@ -869,6 +869,9 @@ public class GenericResourceApiProvider implements AutoCloseable, GENERICRESOURC
             responseObject.setMessage(respProps.getProperty(ERROR_MESSAGE_PARAM));
             responseObject.setStatusCode(respProps.getProperty(ERROR_CODE_PARAM));
             ackFinal = respProps.getProperty(ACK_FINAL_PARAM, "Y");
+            if (vnfId == null) {
+                vnfId = respProps.getProperty("vnfId");
+            }
             serviceObjectPath = respProps.getProperty(SERVICE_OBJECT_PATH_PARAM);
             vnfObjectPath = respProps.getProperty(VNF_OBJECT_PATH_PARAM);
         }
@@ -1813,7 +1816,6 @@ public class GenericResourceApiProvider implements AutoCloseable, GENERICRESOURC
 
         ServiceData serviceData;
         ServiceStatusBuilder serviceStatusBuilder = new ServiceStatusBuilder();
-        Properties properties = new Properties();
 
         String siid = input.getServiceInformation().getServiceInstanceId();
         log.info(ADDING_INPUT_DATA_LOG, svcOperation, siid, input);
@@ -1841,7 +1843,7 @@ public class GenericResourceApiProvider implements AutoCloseable, GENERICRESOURC
         String serviceObjectPath = null;
         String connectionAttachmentObjectPath = null;
 
-        Properties respProps = tryGetProperties(svcOperation, properties, serviceDataBuilder, responseObject);
+        Properties respProps = tryGetProperties(svcOperation, parms, serviceDataBuilder, responseObject);
 
         if (respProps != null) {
             responseObject.setStatusCode(respProps.getProperty(ERROR_CODE_PARAM));
@@ -2274,7 +2276,7 @@ public class GenericResourceApiProvider implements AutoCloseable, GENERICRESOURC
             responseBuilder.setAckFinalIndicator("Y");
             log.error(RETURNED_FAILED_MESSAGE, svcOperation, preloadId, responseBuilder.build());
             RpcResult<PreloadNetworkTopologyOperationOutput> rpcResult = RpcResultBuilder
-                    .<PreloadNetworkTopologyOperationOutput>status(false).withResult(responseBuilder.build()).build();
+                    .<PreloadNetworkTopologyOperationOutput>status(true).withResult(responseBuilder.build()).build();
             return Futures.immediateFuture(rpcResult);
         }
 
@@ -2453,7 +2455,7 @@ public class GenericResourceApiProvider implements AutoCloseable, GENERICRESOURC
             responseBuilder.setAckFinalIndicator("Y");
             log.error(RETURNED_FAILED_MESSAGE, svcOperation, preloadId, responseBuilder.build());
             RpcResult<PreloadVfModuleTopologyOperationOutput> rpcResult = RpcResultBuilder
-                    .<PreloadVfModuleTopologyOperationOutput>status(false).withResult(responseBuilder.build()).build();
+                    .<PreloadVfModuleTopologyOperationOutput>status(true).withResult(responseBuilder.build()).build();
             return Futures.immediateFuture(rpcResult);
         }