From a1f1bbb18ab529649d0a4a006e8ab8a84d3306ae Mon Sep 17 00:00:00 2001 From: "Brandon, Bruce (bb2697)" Date: Wed, 31 Jul 2019 16:17:27 +0000 Subject: Network concurrency support 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) --- features/features-sdnc-northbound/pom.xml | 2 +- features/installer/pom.xml | 2 +- features/pom.xml | 2 +- features/sdnc-northbound-all/pom.xml | 2 +- generic-resource-api/client/pom.xml | 2 +- .../features/features-generic-resource-api/pom.xml | 2 +- generic-resource-api/features/pom.xml | 2 +- .../features/sdnc-generic-resource-api/pom.xml | 2 +- generic-resource-api/installer/pom.xml | 2 +- generic-resource-api/model/pom.xml | 2 +- generic-resource-api/pom.xml | 2 +- generic-resource-api/provider/pom.xml | 2 +- .../northbound/GenericResourceApiProvider.java | 37 ++++++++++++++-------- pom.xml | 2 +- vnfapi/features/features-vnfapi/pom.xml | 2 +- vnfapi/features/pom.xml | 2 +- vnfapi/features/sdnc-vnfapi/pom.xml | 2 +- vnfapi/installer/pom.xml | 2 +- vnfapi/model/pom.xml | 2 +- vnfapi/pom.xml | 2 +- vnfapi/provider/pom.xml | 2 +- vnftools/features/features-vnftools/pom.xml | 2 +- vnftools/features/pom.xml | 2 +- vnftools/features/sdnc-vnftools/pom.xml | 2 +- vnftools/installer/pom.xml | 2 +- vnftools/pom.xml | 2 +- vnftools/provider/pom.xml | 2 +- 27 files changed, 50 insertions(+), 39 deletions(-) diff --git a/features/features-sdnc-northbound/pom.xml b/features/features-sdnc-northbound/pom.xml index c9bb3a96..3ef6c21a 100644 --- a/features/features-sdnc-northbound/pom.xml +++ b/features/features-sdnc-northbound/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT diff --git a/features/installer/pom.xml b/features/installer/pom.xml index 38bad8e8..1156fcea 100755 --- a/features/installer/pom.xml +++ b/features/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT diff --git a/features/pom.xml b/features/pom.xml index 9a6fd29a..d55cf926 100755 --- a/features/pom.xml +++ b/features/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT diff --git a/features/sdnc-northbound-all/pom.xml b/features/sdnc-northbound-all/pom.xml index 83116e3b..d91f2dc0 100644 --- a/features/sdnc-northbound-all/pom.xml +++ b/features/sdnc-northbound-all/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT 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 @@ org.onap.ccsdk.parent client-parent - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT 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 @@ org.onap.ccsdk.parent feature-repo-parent - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT 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 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT 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 @@ org.onap.ccsdk.parent single-feature-parent - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT 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 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT 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 @@ org.onap.ccsdk.parent binding-parent - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT 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 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT 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 @@ org.onap.ccsdk.parent binding-parent - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT 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"); diff --git a/pom.xml b/pom.xml index d4035718..3c95c0d7 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT diff --git a/vnfapi/features/features-vnfapi/pom.xml b/vnfapi/features/features-vnfapi/pom.xml index 9a35831d..5b65e2d5 100644 --- a/vnfapi/features/features-vnfapi/pom.xml +++ b/vnfapi/features/features-vnfapi/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT diff --git a/vnfapi/features/pom.xml b/vnfapi/features/pom.xml index 812f5339..032343ea 100644 --- a/vnfapi/features/pom.xml +++ b/vnfapi/features/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT diff --git a/vnfapi/features/sdnc-vnfapi/pom.xml b/vnfapi/features/sdnc-vnfapi/pom.xml index d5ba2664..5319ad86 100644 --- a/vnfapi/features/sdnc-vnfapi/pom.xml +++ b/vnfapi/features/sdnc-vnfapi/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT diff --git a/vnfapi/installer/pom.xml b/vnfapi/installer/pom.xml index c81185be..50256a22 100755 --- a/vnfapi/installer/pom.xml +++ b/vnfapi/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT diff --git a/vnfapi/model/pom.xml b/vnfapi/model/pom.xml index 053d7ac1..5bc386dd 100644 --- a/vnfapi/model/pom.xml +++ b/vnfapi/model/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT diff --git a/vnfapi/pom.xml b/vnfapi/pom.xml index 6671b135..06e042b9 100644 --- a/vnfapi/pom.xml +++ b/vnfapi/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT diff --git a/vnfapi/provider/pom.xml b/vnfapi/provider/pom.xml index cfb607d4..98adba0b 100644 --- a/vnfapi/provider/pom.xml +++ b/vnfapi/provider/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT diff --git a/vnftools/features/features-vnftools/pom.xml b/vnftools/features/features-vnftools/pom.xml index 1906edbe..effeec20 100644 --- a/vnftools/features/features-vnftools/pom.xml +++ b/vnftools/features/features-vnftools/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT diff --git a/vnftools/features/pom.xml b/vnftools/features/pom.xml index 14d81fcf..ab70060d 100644 --- a/vnftools/features/pom.xml +++ b/vnftools/features/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT diff --git a/vnftools/features/sdnc-vnftools/pom.xml b/vnftools/features/sdnc-vnftools/pom.xml index b1669954..579e5372 100644 --- a/vnftools/features/sdnc-vnftools/pom.xml +++ b/vnftools/features/sdnc-vnftools/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT diff --git a/vnftools/installer/pom.xml b/vnftools/installer/pom.xml index cde46381..57861757 100755 --- a/vnftools/installer/pom.xml +++ b/vnftools/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT org.onap.sdnc.northbound diff --git a/vnftools/pom.xml b/vnftools/pom.xml index 241910b2..3ff96b5c 100644 --- a/vnftools/pom.xml +++ b/vnftools/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT org.onap.sdnc.northbound diff --git a/vnftools/provider/pom.xml b/vnftools/provider/pom.xml index 004ca224..5c7c2c72 100644 --- a/vnftools/provider/pom.xml +++ b/vnftools/provider/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 1.3.0-SNAPSHOT + 1.3.1-SNAPSHOT -- cgit 1.2.3-korg