diff options
Diffstat (limited to 'vid-app-common/src/main/java/org/openecomp')
4 files changed, 9 insertions, 4 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;
}
|