diff options
Diffstat (limited to 'vid-app-common/src/main')
5 files changed, 13 insertions, 8 deletions
diff --git a/vid-app-common/src/main/java/org/openecomp/vid/asdc/local/LocalAsdcClient.java b/vid-app-common/src/main/java/org/openecomp/vid/asdc/local/LocalAsdcClient.java index d73c75b38..696e18904 100644 --- a/vid-app-common/src/main/java/org/openecomp/vid/asdc/local/LocalAsdcClient.java +++ b/vid-app-common/src/main/java/org/openecomp/vid/asdc/local/LocalAsdcClient.java @@ -328,9 +328,14 @@ public class LocalAsdcClient implements AsdcClient { JSONObject jsonServiceObject = categoryJsonArray.getJSONObject(i); if (jsonServiceObject.get("uuid").equals(serviceUuid.toString())) { toscaModelURL = jsonServiceObject.getString("toscaModelURL"); + break; } } + if (toscaModelURL==null){ + return null; + } + final InputStream toscaModelStream = getClass().getClassLoader().getResourceAsStream(toscaModelURL); ClassLoader classLoader = getClass().getClassLoader(); diff --git a/vid-app-common/src/main/java/org/openecomp/vid/asdc/memory/InMemoryAsdcClient.java b/vid-app-common/src/main/java/org/openecomp/vid/asdc/memory/InMemoryAsdcClient.java index 123cc5788..2b783d45a 100755 --- a/vid-app-common/src/main/java/org/openecomp/vid/asdc/memory/InMemoryAsdcClient.java +++ b/vid-app-common/src/main/java/org/openecomp/vid/asdc/memory/InMemoryAsdcClient.java @@ -114,7 +114,7 @@ public class InMemoryAsdcClient implements AsdcClient { *
* @param builder the builder
*/
- private InMemoryAsdcClient(Builder builder) {
+ InMemoryAsdcClient(Builder builder) {
catalog = builder.catalog;
mapper = builder.mapper;
}
diff --git a/vid-app-common/src/main/java/org/openecomp/vid/asdc/parser/ToscaParserImpl2.java b/vid-app-common/src/main/java/org/openecomp/vid/asdc/parser/ToscaParserImpl2.java index e2b32fa8c..f364d0b3d 100644 --- a/vid-app-common/src/main/java/org/openecomp/vid/asdc/parser/ToscaParserImpl2.java +++ b/vid-app-common/src/main/java/org/openecomp/vid/asdc/parser/ToscaParserImpl2.java @@ -47,7 +47,7 @@ public class ToscaParserImpl2 { public ServiceModel makeServiceModel(Path path, Service asdcServiceMetadata) throws Exception { ServiceModel serviceModel = new ServiceModel(); SdcToscaParserFactory factory = SdcToscaParserFactory.getInstance(); - ISdcCsarHelper sdcCsarHelper = factory.getSdcCsarHelper(path.toFile().getAbsolutePath()); + ISdcCsarHelper sdcCsarHelper = factory.getSdcCsarHelper(path.toFile().getAbsolutePath()); //, false); serviceModel.setService(extractServiceFromCsar(asdcServiceMetadata, sdcCsarHelper)); serviceModel.setVolumeGroups(extractVolumeGroups(sdcCsarHelper)); serviceModel.setVfModules(extractVfModuleFromCsar(sdcCsarHelper)); diff --git a/vid-app-common/src/main/java/org/openecomp/vid/model/ServiceModel.java b/vid-app-common/src/main/java/org/openecomp/vid/model/ServiceModel.java index 8742931c6..e879fd470 100755 --- a/vid-app-common/src/main/java/org/openecomp/vid/model/ServiceModel.java +++ b/vid-app-common/src/main/java/org/openecomp/vid/model/ServiceModel.java @@ -171,8 +171,8 @@ public class ServiceModel { service.setInputs(serviceToscaModel.gettopology_template().getInputs());
//FIXME: SDC is not sending the Version with the Tosca Model for 1610 - they should send it in 1702
//THIS IS A TEMPORARY FIX, AT SOME POINT UNCOMMENT ME
- //service.setVersion(serviceToscaModel.getMetadata().getVersion());
- service.setVersion(asdcServiceMetadata.getVersion());
+ service.setVersion(serviceToscaModel.getMetadata().getVersion());
+ //service.setVersion(asdcServiceMetadata.getVersion());
return service;
}
diff --git a/vid-app-common/src/main/resources/sdcservices.json b/vid-app-common/src/main/resources/sdcservices.json index e80caa665..81a08d931 100644 --- a/vid-app-common/src/main/resources/sdcservices.json +++ b/vid-app-common/src/main/resources/sdcservices.json @@ -4,7 +4,7 @@ "uuid": "48a52540-8772-4368-9cdb-1f124ea5c931", "invariantUUID": "f430728a-4530-42be-a577-1206b9484cef", "name": "4-27_vMME_Service", - "version": "1.0", + "version": "0.1", "toscaModelURL": "./service-vf-csar.zip", "category": "Mobility", "lifecycleState": "CERTIFIED", @@ -15,10 +15,10 @@ "resources": null }, { - "uuid": "cb49608f-5a24-4789-b0f7-2595473cb997", + "uuid": "68101369-6f08-4e99-9a28-fa6327d344f3", "invariantUUID": "0311f998-9268-4fd6-bbba-afff15087b72", "name": "4-27_vMME_Service", - "version": "1.0", + "version": "0.1", "toscaModelURL": "./service-vl-csar.zip", "category": "Mobility", "lifecycleState": "CERTIFIED", @@ -32,7 +32,7 @@ "uuid": "73e1322a-8a9a-49dc-9558-b0c5c5770e4a", "invariantUUID": "f430728a-4530-42be-a577-1206b9484cef", "name": "4-27_vMME_Service", - "version": "1.0", + "version": "0.1", "toscaModelURL": "./pnf.csar", "category": "Mobility", "lifecycleState": "CERTIFIED", |