diff options
author | ms236b <ms236B@att.com> | 2019-03-20 09:58:23 -0400 |
---|---|---|
committer | ms236b <ms236B@att.com> | 2019-03-20 15:43:46 -0400 |
commit | c40a403bd4fdd192b74e4cd970b3c94058a9e404 (patch) | |
tree | 325b9d1b071331491d88bc4d0bdef9dc267262d1 | |
parent | 507a5b3d3e8389dde606f2c9fe74408238e26680 (diff) |
Fixed an issue with volumes being null
Blueprint generator fix. Local code coverage: 56.9%. Fixed pom.
Issue-ID: DCAEGEN2-1125
Change-Id: Ib5db301b6ddfaadef4be1f9e1a56af03cf415f0a
Signed-off-by: ms236b <ms236B@att.com>
-rw-r--r-- | blueprint-generator/pom.xml | 4 | ||||
-rw-r--r-- | blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/blueprint/Properties.java | 9 | ||||
-rw-r--r-- | pom.xml | 2 |
3 files changed, 9 insertions, 6 deletions
diff --git a/blueprint-generator/pom.xml b/blueprint-generator/pom.xml index 2dbfd9e..6e00c71 100644 --- a/blueprint-generator/pom.xml +++ b/blueprint-generator/pom.xml @@ -28,8 +28,8 @@ <version>1.1.0-SNAPSHOT</version> </parent> <groupId>org.onap.dcaegen2.platform.cli</groupId> - <artifactId>blueprint-generator-onap</artifactId> - <version>0.0.1-SNAPSHOT</version> + <artifactId>blueprint-generator</artifactId> + <version>1.0.0-SNAPSHOT</version> <properties> <maven.compiler.source>1.6</maven.compiler.source> <maven.compiler.target>1.6</maven.compiler.target> diff --git a/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/blueprint/Properties.java b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/blueprint/Properties.java index 82afe33..40770f3 100644 --- a/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/blueprint/Properties.java +++ b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/blueprint/Properties.java @@ -62,11 +62,14 @@ public class Properties { logD.setGet_input("log_directory"); this.setLog_info(logD); String logger = ""; - for(Volumes v: cs.getAuxilary().getVolumes()) { - if(v.getContainer().getBind().contains("/opt/app/") && v.getContainer().getBind().contains("logs")) { - logger = v.getContainer().getBind(); + if(cs.getAuxilary().getVolumes() != null) { + for(Volumes v: cs.getAuxilary().getVolumes()) { + if(v.getContainer().getBind().contains("/opt/app/") && v.getContainer().getBind().contains("logs")) { + logger = v.getContainer().getBind(); + } } } + LinkedHashMap<String, Object> logInp = new LinkedHashMap<String, Object>(); logInp.put("type", "string"); if(logger != "") { @@ -38,7 +38,7 @@ ECOMP is a trademark and service mark of AT&T Intellectual Property. <packaging>pom</packaging> <modules> <module>dcae-cli</module> - <module>component-json-schemas</module> + <module>component-json-schemas</module> <module>blueprint-generator</module> </modules> |