From 4ee959cb070147d81415b581ebd747d68c8bf360 Mon Sep 17 00:00:00 2001 From: "Leigh, Phillip (pl876u)" Date: Thu, 14 Mar 2019 16:04:25 -0400 Subject: SdcCtxBuder:Upd Rsp w NOK to CxtAggr aft error occ This fix also includes the Tosca parser upgraded to the current latest version. Issue-ID: LOG-1015 Issue-ID: LOG-823 Change-Id: Ic59ac988afcd07d2bbf1c996c8625225f85cd972 Signed-off-by: Leigh, Phillip (pl876u) --- pom.xml | 792 ++++++++++----------- .../model/handlers/ToscaCsarArtifactHandler.java | 7 +- 2 files changed, 401 insertions(+), 398 deletions(-) diff --git a/pom.xml b/pom.xml index 663d934..8fdbaf7 100644 --- a/pom.xml +++ b/pom.xml @@ -1,396 +1,396 @@ - - - 4.0.0 - - org.onap.logging-analytics.pomba - pomba-sdc-context-builder - 1.4.0-SNAPSHOT - - - org.onap.oparent - oparent - 1.2.1 - - - - - 1.2.1 - UTF-8 - 1.2.3 - ${project.build.directory}/generated-resources/swagger - - ${project.version}-${timestamp} - ${project.version}-latest - - - - - - - org.springframework.boot - spring-boot-dependencies - 1.5.17.RELEASE - pom - import - - - - - - - - - org.springframework.boot - spring-boot-starter-web - - - org.springframework.boot - spring-boot-starter-jetty - - - org.springframework.boot - spring-boot-starter - - - ch.qos.logback - logback-classic - - - - - org.springframework.boot - spring-boot-starter-jersey - - - org.springframework.boot - spring-boot-starter-actuator - - - - org.springframework.boot - spring-boot-starter-test - test - - - com.sun.jersey - jersey-client - 1.19.4 - - - javax.ws.rs - jsr311-api - - - - - - - org.slf4j - slf4j-api - - - - ch.qos.logback - logback-core - ${logback.version} - - - ch.qos.logback - logback-classic - ${logback.version} - - - - org.eclipse.jetty - jetty-security - - - io.swagger - swagger-core - 1.5.9 - - - io.swagger - swagger-annotations - 1.5.9 - - - org.glassfish.jersey.core - jersey-client - 2.24 - - - org.glassfish.jersey.core - jersey-common - 2.24 - - - - org.onap.aai.logging-service - common-logging - 1.2.2 - - - - org.onap.aai.logging-service - logging-api - 1.2.2 - - - - org.onap.aai - rest-client - ${aai.rest.client.version} - - - org.apache.logging.log4j - log4j-slf4j-impl - - - - - org.onap.sdc.sdc-distribution-client - sdc-distribution-client - 1.3.0 - - - org.onap.sdc.sdc-tosca - sdc-tosca - 1.4.1 - - - org.onap.sdc.jtosca - jtosca - 1.4.4 - - - net.sf.flexjson - flexjson - 3.3 - - - - org.onap.logging-analytics.pomba - pomba-audit-common - 1.4.0-SNAPSHOT - - - - org.projectlombok - lombok - 1.18.0 - - - - - ${project.artifactId} - - - org.springframework.boot - spring-boot-maven-plugin - - - - repackage - - - - - - - - - src/main/resources - true - - **/* - - - - - - - - docker - - - - io.fabric8 - docker-maven-plugin - 0.28.0 - - true - 1.23 - - - onap/${project.artifactId} - ${project.artifactId} - - try - ${project.basedir}/target/docker-stage - - ${docker.snapshot.tag} - ${docker.latest.tag} - - - - - - - - generate-images - - build - - - - push-images - deploy - - build - push - - - - - - maven-resources-plugin - 3.1.0 - - - copy-resources - - prepare-package - - copy-resources - - - ${project.build.outputDirectory} - - - - ${project.build.directory}/generated-resources/swagger - - META-INF/resources/swagger - - - - - - - - - com.github.kongchen - swagger-maven-plugin - 3.1.3 - - - - org.onap.pomba.contextbuilder.sdc.service.rs - /sdccontextbuilder - - ${project.artifactId} Service - ${project.version} - - ${swagger.directory} - - - - - - - package - - generate - - - - - - maven-resources-plugin - 2.6 - - - copy-dockerfile - - copy-resources - - package - - ${project.basedir}/target/docker-stage - - - src/main/docker - - Dockerfile - - true - - - - - - copy-properties - - copy-resources - - validate - - ${project.basedir}/target/docker-stage/config - - - config - - *.properties - *.xml - - false - - - - - - copy-script - - copy-resources - - package - - ${project.basedir}/target/docker-stage/ - - - src/main/docker - - *.sh - - false - - - - - - copy-jar - - copy-resources - - package - - ${project.basedir}/target/docker-stage/ - - - target - - *.jar - - false - - - - - - - - - - - + + + 4.0.0 + + org.onap.logging-analytics.pomba + pomba-sdc-context-builder + 1.4.0-SNAPSHOT + + + org.onap.oparent + oparent + 1.2.1 + + + + + 1.2.1 + UTF-8 + 1.2.3 + ${project.build.directory}/generated-resources/swagger + + ${project.version}-${timestamp} + ${project.version}-latest + + + + + + + org.springframework.boot + spring-boot-dependencies + 1.5.17.RELEASE + pom + import + + + + + + + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.boot + spring-boot-starter-jetty + + + org.springframework.boot + spring-boot-starter + + + ch.qos.logback + logback-classic + + + + + org.springframework.boot + spring-boot-starter-jersey + + + org.springframework.boot + spring-boot-starter-actuator + + + + org.springframework.boot + spring-boot-starter-test + test + + + com.sun.jersey + jersey-client + 1.19.4 + + + javax.ws.rs + jsr311-api + + + + + + + org.slf4j + slf4j-api + + + + ch.qos.logback + logback-core + ${logback.version} + + + ch.qos.logback + logback-classic + ${logback.version} + + + + org.eclipse.jetty + jetty-security + + + io.swagger + swagger-core + 1.5.9 + + + io.swagger + swagger-annotations + 1.5.9 + + + org.glassfish.jersey.core + jersey-client + 2.24 + + + org.glassfish.jersey.core + jersey-common + 2.24 + + + + org.onap.aai.logging-service + common-logging + 1.2.2 + + + + org.onap.aai.logging-service + logging-api + 1.2.2 + + + + org.onap.aai + rest-client + ${aai.rest.client.version} + + + org.apache.logging.log4j + log4j-slf4j-impl + + + + + org.onap.sdc.sdc-distribution-client + sdc-distribution-client + 1.3.0 + + + org.onap.sdc.sdc-tosca + sdc-tosca + 1.5.0 + + + org.onap.sdc.jtosca + jtosca + 1.5.0 + + + net.sf.flexjson + flexjson + 3.3 + + + + org.onap.logging-analytics.pomba + pomba-audit-common + 1.4.0 + + + + org.projectlombok + lombok + 1.18.0 + + + + + ${project.artifactId} + + + org.springframework.boot + spring-boot-maven-plugin + + + + repackage + + + + + + + + + src/main/resources + true + + **/* + + + + + + + + docker + + + + io.fabric8 + docker-maven-plugin + 0.28.0 + + true + 1.23 + + + onap/${project.artifactId} + ${project.artifactId} + + try + ${project.basedir}/target/docker-stage + + ${docker.snapshot.tag} + ${docker.latest.tag} + + + + + + + + generate-images + + build + + + + push-images + deploy + + build + push + + + + + + maven-resources-plugin + 3.1.0 + + + copy-resources + + prepare-package + + copy-resources + + + ${project.build.outputDirectory} + + + + ${project.build.directory}/generated-resources/swagger + + META-INF/resources/swagger + + + + + + + + + com.github.kongchen + swagger-maven-plugin + 3.1.3 + + + + org.onap.pomba.contextbuilder.sdc.service.rs + /sdccontextbuilder + + ${project.artifactId} Service + ${project.version} + + ${swagger.directory} + + + + + + + package + + generate + + + + + + maven-resources-plugin + 2.6 + + + copy-dockerfile + + copy-resources + + package + + ${project.basedir}/target/docker-stage + + + src/main/docker + + Dockerfile + + true + + + + + + copy-properties + + copy-resources + + validate + + ${project.basedir}/target/docker-stage/config + + + config + + *.properties + *.xml + + false + + + + + + copy-script + + copy-resources + + package + + ${project.basedir}/target/docker-stage/ + + + src/main/docker + + *.sh + + false + + + + + + copy-jar + + copy-resources + + package + + ${project.basedir}/target/docker-stage/ + + + target + + *.jar + + false + + + + + + + + + + + diff --git a/src/main/java/org/onap/pomba/contextbuilder/sdc/model/handlers/ToscaCsarArtifactHandler.java b/src/main/java/org/onap/pomba/contextbuilder/sdc/model/handlers/ToscaCsarArtifactHandler.java index dceb4ef..e0a837e 100644 --- a/src/main/java/org/onap/pomba/contextbuilder/sdc/model/handlers/ToscaCsarArtifactHandler.java +++ b/src/main/java/org/onap/pomba/contextbuilder/sdc/model/handlers/ToscaCsarArtifactHandler.java @@ -29,6 +29,9 @@ import java.nio.file.StandardOpenOption; import java.text.MessageFormat; import java.util.HashMap; import java.util.Map; + +import javax.ws.rs.core.Response.Status; + import org.onap.pomba.contextbuilder.sdc.ToscaBuilderConfig; import org.onap.pomba.contextbuilder.sdc.exception.ToscaCsarException; import org.onap.pomba.contextbuilder.sdc.model.ArtifactInfo; @@ -81,7 +84,8 @@ public class ToscaCsarArtifactHandler { if(helper == null) { log.debug("CSAR artifact not found for model-version-id: " + modelVersionId); - response.setModelData(""); + response.setModelData("CSAR artifact not found for model-version-id: " + modelVersionId); + response.setHttpStatus(Status.NOT_FOUND); return response; } @@ -99,7 +103,6 @@ public class ToscaCsarArtifactHandler { * @throws ToscaCsarException */ private ISdcCsarHelper retrieveToscaCsarArtifact(String modelVersionId) throws ToscaCsarException { - if (config.getTestToscaCsarFile() != null && !config.getTestToscaCsarFile().isEmpty()) { return getSdcToscaContext(config.getTestToscaCsarFile()); } -- cgit 1.2.3-korg