aboutsummaryrefslogtreecommitdiffstats
path: root/generic-resource-api
diff options
context:
space:
mode:
Diffstat (limited to 'generic-resource-api')
-rw-r--r--generic-resource-api/client/pom.xml2
-rw-r--r--generic-resource-api/features/features-generic-resource-api/pom.xml2
-rw-r--r--generic-resource-api/features/pom.xml2
-rw-r--r--generic-resource-api/features/sdnc-generic-resource-api/pom.xml2
-rwxr-xr-xgeneric-resource-api/installer/pom.xml2
-rw-r--r--generic-resource-api/model/pom.xml2
-rw-r--r--generic-resource-api/pom.xml2
-rw-r--r--generic-resource-api/provider/pom.xml2
-rw-r--r--generic-resource-api/provider/src/main/java/org/onap/sdnc/northbound/GenericResourceApiProvider.java37
9 files changed, 32 insertions, 21 deletions
diff --git a/generic-resource-api/client/pom.xml b/generic-resource-api/client/pom.xml
index 8e33a976..e721e905 100644
--- a/generic-resource-api/client/pom.xml
+++ b/generic-resource-api/client/pom.xml
@@ -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>
diff --git a/generic-resource-api/features/features-generic-resource-api/pom.xml b/generic-resource-api/features/features-generic-resource-api/pom.xml
index 0c30940e..73660d1a 100644
--- a/generic-resource-api/features/features-generic-resource-api/pom.xml
+++ b/generic-resource-api/features/features-generic-resource-api/pom.xml
@@ -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>
diff --git a/generic-resource-api/features/pom.xml b/generic-resource-api/features/pom.xml
index 8cc19e52..36e2b904 100644
--- a/generic-resource-api/features/pom.xml
+++ b/generic-resource-api/features/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>
diff --git a/generic-resource-api/features/sdnc-generic-resource-api/pom.xml b/generic-resource-api/features/sdnc-generic-resource-api/pom.xml
index 4dab8be0..b8e23a79 100644
--- a/generic-resource-api/features/sdnc-generic-resource-api/pom.xml
+++ b/generic-resource-api/features/sdnc-generic-resource-api/pom.xml
@@ -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>
diff --git a/generic-resource-api/installer/pom.xml b/generic-resource-api/installer/pom.xml
index b3e6b3c0..650a9590 100755
--- a/generic-resource-api/installer/pom.xml
+++ b/generic-resource-api/installer/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>
diff --git a/generic-resource-api/model/pom.xml b/generic-resource-api/model/pom.xml
index b3458be5..1120348f 100644
--- a/generic-resource-api/model/pom.xml
+++ b/generic-resource-api/model/pom.xml
@@ -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>
diff --git a/generic-resource-api/pom.xml b/generic-resource-api/pom.xml
index b5cba125..c8469185 100644
--- a/generic-resource-api/pom.xml
+++ b/generic-resource-api/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>
diff --git a/generic-resource-api/provider/pom.xml b/generic-resource-api/provider/pom.xml
index 3772b4f4..5aaf4671 100644
--- a/generic-resource-api/provider/pom.xml
+++ b/generic-resource-api/provider/pom.xml
@@ -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>
diff --git a/generic-resource-api/provider/src/main/java/org/onap/sdnc/northbound/GenericResourceApiProvider.java b/generic-resource-api/provider/src/main/java/org/onap/sdnc/northbound/GenericResourceApiProvider.java
index eedbab87..583c6335 100644
--- a/generic-resource-api/provider/src/main/java/org/onap/sdnc/northbound/GenericResourceApiProvider.java
+++ b/generic-resource-api/provider/src/main/java/org/onap/sdnc/northbound/GenericResourceApiProvider.java
@@ -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");