Network concurrency support 82/92382/2
authorBrandon, Bruce (bb2697) <bb2697@att.com>
Wed, 31 Jul 2019 16:17:27 +0000 (16:17 +0000)
committerTimoney, Dan (dt5972) <dtimoney@att.com>
Wed, 31 Jul 2019 18:27:00 +0000 (14:27 -0400)
Add ability in network GR-API for DG to do the MD-SAL update

Change-Id: I3b94c0cfb31fc915f9c5f85c7b8e04995c446a22
Issue-ID: SDNC-826
Signed-off-by: Brandon, Bruce (bb2697) <bb2697@att.com>
27 files changed:
features/features-sdnc-northbound/pom.xml
features/installer/pom.xml
features/pom.xml
features/sdnc-northbound-all/pom.xml
generic-resource-api/client/pom.xml
generic-resource-api/features/features-generic-resource-api/pom.xml
generic-resource-api/features/pom.xml
generic-resource-api/features/sdnc-generic-resource-api/pom.xml
generic-resource-api/installer/pom.xml
generic-resource-api/model/pom.xml
generic-resource-api/pom.xml
generic-resource-api/provider/pom.xml
generic-resource-api/provider/src/main/java/org/onap/sdnc/northbound/GenericResourceApiProvider.java
pom.xml
vnfapi/features/features-vnfapi/pom.xml
vnfapi/features/pom.xml
vnfapi/features/sdnc-vnfapi/pom.xml
vnfapi/installer/pom.xml
vnfapi/model/pom.xml
vnfapi/pom.xml
vnfapi/provider/pom.xml
vnftools/features/features-vnftools/pom.xml
vnftools/features/pom.xml
vnftools/features/sdnc-vnftools/pom.xml
vnftools/installer/pom.xml
vnftools/pom.xml
vnftools/provider/pom.xml

index c9bb3a9..3ef6c21 100644 (file)
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.onap.ccsdk.parent</groupId>
         <artifactId>feature-repo-parent</artifactId>
-        <version>1.3.0-SNAPSHOT</version>
+        <version>1.3.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
index 38bad8e..1156fce 100755 (executable)
@@ -5,7 +5,7 @@
        <parent>
                <groupId>org.onap.ccsdk.parent</groupId>
                <artifactId>odlparent-lite</artifactId>
-               <version>1.3.0-SNAPSHOT</version>
+               <version>1.3.1-SNAPSHOT</version>
                <relativePath/>
        </parent>
 
index 9a6fd29..d55cf92 100755 (executable)
@@ -5,7 +5,7 @@
        <parent>
                <groupId>org.onap.ccsdk.parent</groupId>
                <artifactId>odlparent-lite</artifactId>
-               <version>1.3.0-SNAPSHOT</version>
+               <version>1.3.1-SNAPSHOT</version>
                <relativePath/>
        </parent>
 
index 83116e3..d91f2dc 100644 (file)
@@ -5,7 +5,7 @@
        <parent>
                <groupId>org.onap.ccsdk.parent</groupId>
                <artifactId>single-feature-parent</artifactId>
-               <version>1.3.0-SNAPSHOT</version>
+               <version>1.3.1-SNAPSHOT</version>
                <relativePath/>
        </parent>
 
index 8e33a97..e721e90 100644 (file)
@@ -15,7 +15,7 @@
     <parent>
         <groupId>org.onap.ccsdk.parent</groupId>
         <artifactId>client-parent</artifactId>
-        <version>1.3.0-SNAPSHOT</version>
+        <version>1.3.1-SNAPSHOT</version>
     </parent>
 
     <dependencies>
index 0c30940..73660d1 100644 (file)
@@ -5,7 +5,7 @@
        <parent>
                <groupId>org.onap.ccsdk.parent</groupId>
                <artifactId>feature-repo-parent</artifactId>
-               <version>1.3.0-SNAPSHOT</version>
+               <version>1.3.1-SNAPSHOT</version>
                <relativePath/>
        </parent>
 
index 8cc19e5..36e2b90 100644 (file)
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.onap.ccsdk.parent</groupId>
         <artifactId>odlparent-lite</artifactId>
-        <version>1.3.0-SNAPSHOT</version>
+        <version>1.3.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
index 4dab8be..b8e23a7 100644 (file)
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.onap.ccsdk.parent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>1.3.0-SNAPSHOT</version>
+        <version>1.3.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
index b3e6b3c..650a959 100755 (executable)
@@ -5,7 +5,7 @@
        <parent>
                <groupId>org.onap.ccsdk.parent</groupId>
                <artifactId>odlparent-lite</artifactId>
-               <version>1.3.0-SNAPSHOT</version>
+               <version>1.3.1-SNAPSHOT</version>
                <relativePath/>
        </parent>
 
index b3458be..1120348 100644 (file)
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.onap.ccsdk.parent</groupId>
         <artifactId>binding-parent</artifactId>
-        <version>1.3.0-SNAPSHOT</version>
+        <version>1.3.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
index b5cba12..c846918 100644 (file)
@@ -5,7 +5,7 @@
        <parent>
                <groupId>org.onap.ccsdk.parent</groupId>
                <artifactId>odlparent-lite</artifactId>
-               <version>1.3.0-SNAPSHOT</version>
+               <version>1.3.1-SNAPSHOT</version>
                <relativePath/>
        </parent>
 
index 3772b4f..5aaf467 100644 (file)
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.onap.ccsdk.parent</groupId>
         <artifactId>binding-parent</artifactId>
-        <version>1.3.0-SNAPSHOT</version>
+        <version>1.3.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
index eedbab8..583c633 100644 (file)
@@ -1104,11 +1104,9 @@ public class GenericResourceApiProvider implements AutoCloseable, GENERICRESOURC
             serviceObjectPath = respProps.getProperty(SERVICE_OBJECT_PATH_PARAM);
             vnfObjectPath = respProps.getProperty(VNF_OBJECT_PATH_PARAM);
             skipMdsalUpdate = respProps.getProperty(SKIP_MDSAL_UPDATE_PROP);
-            log.info("skipMdsalUpdate originally is " + skipMdsalUpdate);
             if (skipMdsalUpdate == null) {
                 skipMdsalUpdate = "N";
             }
-            log.info("skipMdsalUpdate is " + skipMdsalUpdate);
         }
 
         setServiceStatus(serviceStatusBuilder, responseObject.getStatusCode(), responseObject.getMessage(), ackFinal);
@@ -1873,6 +1871,7 @@ public class GenericResourceApiProvider implements AutoCloseable, GENERICRESOURC
         String networkId = ERROR_NETWORK_ID;
         String serviceObjectPath = null;
         String networkObjectPath = null;
+        String skipMdsalUpdate = null;
         Properties respProps = tryGetProperties(svcOperation, parms, serviceDataBuilder, responseObject);
 
         if (respProps != null) {
@@ -1882,6 +1881,10 @@ public class GenericResourceApiProvider implements AutoCloseable, GENERICRESOURC
             networkId = respProps.getProperty("networkId");
             serviceObjectPath = respProps.getProperty(SERVICE_OBJECT_PATH_PARAM);
             networkObjectPath = respProps.getProperty(NETWORK_OBJECT_PATH_PARAM);
+            skipMdsalUpdate = respProps.getProperty(SKIP_MDSAL_UPDATE_PROP);
+            if (skipMdsalUpdate == null) {
+                skipMdsalUpdate = "N";
+            }
         }
 
         if (failed(responseObject)) {
@@ -1899,18 +1902,27 @@ public class GenericResourceApiProvider implements AutoCloseable, GENERICRESOURC
 
         // Got success from SLI
         try {
+            if (skipMdsalUpdate.equals("N")) {
+                serviceData = serviceDataBuilder.build();
+                log.info(UPDATING_MDSAL_INFO_MESSAGE, svcOperation, siid, serviceData);
 
-            serviceData = serviceDataBuilder.build();
-            log.info(UPDATING_MDSAL_INFO_MESSAGE, svcOperation, siid, serviceData);
-
-            // service object
-            ServiceBuilder serviceBuilder = new ServiceBuilder();
-            serviceBuilder.setServiceData(serviceData);
-            serviceBuilder.setServiceInstanceId(siid);
-            serviceBuilder.setServiceStatus(serviceStatusBuilder.build());
-            saveService(serviceBuilder.build(), false, LogicalDatastoreType.CONFIGURATION);
+                // service object
+                ServiceBuilder serviceBuilder = new ServiceBuilder();
+                serviceBuilder.setServiceData(serviceData);
+                serviceBuilder.setServiceInstanceId(siid);
+                serviceBuilder.setServiceStatus(serviceStatusBuilder.build());
+                saveService(serviceBuilder.build(), false, LogicalDatastoreType.CONFIGURATION);
 
-            trySaveService(input, serviceBuilder);
+                trySaveService(input, serviceBuilder);
+            } else {
+                // Even if we are skipping the MD-SAL update, update the service status object
+                ServiceBuilder serviceBuilder = new ServiceBuilder();
+                serviceBuilder.setServiceInstanceId(siid);
+                serviceBuilder.setServiceStatus(serviceStatusBuilder.build());
+                Service service = serviceBuilder.build();
+                log.info(UPDATING_MDSAL_INFO_MESSAGE, svcOperation, siid, service);
+                saveService(service, true, LogicalDatastoreType.CONFIGURATION);
+            }
 
             NetworkResponseInformationBuilder networkResponseInformationBuilder = new NetworkResponseInformationBuilder();
             networkResponseInformationBuilder.setInstanceId(networkId);
@@ -1921,7 +1933,6 @@ public class GenericResourceApiProvider implements AutoCloseable, GENERICRESOURC
             serviceResponseInformationBuilder.setInstanceId(siid);
             serviceResponseInformationBuilder.setObjectPath(serviceObjectPath);
             responseBuilder.setServiceResponseInformation(serviceResponseInformationBuilder.build());
-
         } catch (IllegalStateException e) {
             log.error(UPDATING_MDSAL_ERROR_MESSAGE, svcOperation, siid, e);
             responseBuilder.setResponseCode("500");
diff --git a/pom.xml b/pom.xml
index d403571..3c95c0d 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
        <parent>
                <groupId>org.onap.ccsdk.parent</groupId>
                <artifactId>odlparent-lite</artifactId>
-               <version>1.3.0-SNAPSHOT</version>
+               <version>1.3.1-SNAPSHOT</version>
                <relativePath/>
        </parent>
 
index 9a35831..5b65e2d 100644 (file)
@@ -5,7 +5,7 @@
        <parent>
                <groupId>org.onap.ccsdk.parent</groupId>
                <artifactId>feature-repo-parent</artifactId>
-               <version>1.3.0-SNAPSHOT</version>
+               <version>1.3.1-SNAPSHOT</version>
                <relativePath/>
        </parent>
 
index 812f533..032343e 100644 (file)
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.onap.ccsdk.parent</groupId>
         <artifactId>odlparent-lite</artifactId>
-        <version>1.3.0-SNAPSHOT</version>
+        <version>1.3.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
index d5ba266..5319ad8 100644 (file)
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.onap.ccsdk.parent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>1.3.0-SNAPSHOT</version>
+        <version>1.3.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
index c81185b..50256a2 100755 (executable)
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.onap.ccsdk.parent</groupId>
         <artifactId>odlparent-lite</artifactId>
-        <version>1.3.0-SNAPSHOT</version>
+        <version>1.3.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
index 053d7ac..5bc386d 100644 (file)
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.onap.ccsdk.parent</groupId>
         <artifactId>binding-parent</artifactId>
-        <version>1.3.0-SNAPSHOT</version>
+        <version>1.3.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
index 6671b13..06e042b 100644 (file)
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.onap.ccsdk.parent</groupId>
         <artifactId>odlparent-lite</artifactId>
-        <version>1.3.0-SNAPSHOT</version>
+        <version>1.3.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
index cfb607d..98adba0 100644 (file)
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.onap.ccsdk.parent</groupId>
         <artifactId>binding-parent</artifactId>
-        <version>1.3.0-SNAPSHOT</version>
+        <version>1.3.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
index 1906edb..effeec2 100644 (file)
@@ -5,7 +5,7 @@
        <parent>
                <groupId>org.onap.ccsdk.parent</groupId>
                <artifactId>feature-repo-parent</artifactId>
-               <version>1.3.0-SNAPSHOT</version>
+               <version>1.3.1-SNAPSHOT</version>
                <relativePath/>
        </parent>
 
index 14d81fc..ab70060 100644 (file)
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.onap.ccsdk.parent</groupId>
         <artifactId>odlparent-lite</artifactId>
-        <version>1.3.0-SNAPSHOT</version>
+        <version>1.3.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
index b166995..579e537 100644 (file)
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.onap.ccsdk.parent</groupId>
         <artifactId>single-feature-parent</artifactId>
-        <version>1.3.0-SNAPSHOT</version>
+        <version>1.3.1-SNAPSHOT</version>
         <relativePath/>
     </parent>
 
index cde4638..5786175 100755 (executable)
@@ -5,7 +5,7 @@
        <parent>
                <groupId>org.onap.ccsdk.parent</groupId>
                <artifactId>odlparent-lite</artifactId>
-               <version>1.3.0-SNAPSHOT</version>
+               <version>1.3.1-SNAPSHOT</version>
        </parent>
 
        <groupId>org.onap.sdnc.northbound</groupId>
index 241910b..3ff96b5 100644 (file)
@@ -5,7 +5,7 @@
        <parent>
                <groupId>org.onap.ccsdk.parent</groupId>
                <artifactId>odlparent-lite</artifactId>
-               <version>1.3.0-SNAPSHOT</version>
+               <version>1.3.1-SNAPSHOT</version>
        </parent>
 
        <groupId>org.onap.sdnc.northbound</groupId>
index 004ca22..5c7c2c7 100644 (file)
@@ -5,7 +5,7 @@
     <parent>
         <groupId>org.onap.ccsdk.parent</groupId>
         <artifactId>binding-parent</artifactId>
-        <version>1.3.0-SNAPSHOT</version>
+        <version>1.3.1-SNAPSHOT</version>
         <relativePath/>
     </parent>