diff options
author | Mantena, Ravi (rx908f) <rx908f@att.com> | 2020-07-01 14:18:48 -0400 |
---|---|---|
committer | Ravi Mantena <rx908f@att.com> | 2020-07-01 15:08:06 -0400 |
commit | 7e4e7939f698f593bf4019f3a4a1813206b77463 (patch) | |
tree | a3ccec6b7418d182a4946299499456aea6d9dd58 /mod/bpgenerator/src | |
parent | 8479ac77ba084f9d42e16b252e6671ff59aedd13 (diff) |
Switch between ContainerizedPlatformComponent to ContainerizedServiceComponent, Remove name, dns_name and add service_component_type for onap, Add location_id from dmaap in bp_gen
Issue-ID: DCAEGEN2-2144>
Change-Id: Ice8529336c21b2a6e27555509215e911f80279b8
Signed-off-by: Ravi Mantena <rx908f@att.com>
Diffstat (limited to 'mod/bpgenerator/src')
3 files changed, 20 insertions, 4 deletions
diff --git a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint/Properties.java b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint/Properties.java index 31df9c3..382964b 100644 --- a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint/Properties.java +++ b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint/Properties.java @@ -92,10 +92,10 @@ public class Properties { retInputs.put("replicas", rep); //set the dns name - this.setDns_name(cs.getSelf().getName()); + //this.setDns_name(cs.getSelf().getName()); //set the name - this.setName(cs.getSelf().getName()); + //this.setName(cs.getSelf().getName()); //set the docker config Auxilary aux = cs.getAuxilary(); @@ -118,6 +118,12 @@ public class Properties { inputAlwaysPullImage.put("default", true); retInputs.put("always_pull_image", inputAlwaysPullImage); + + //set service component type + String sType = cs.getSelf().getName(); + sType = sType.replace('.', '-'); + this.setService_component_type(sType); + //set the tls info if(cs.getAuxilary().getTls_info() != null){ addTlsInfo(cs,retInputs); @@ -144,6 +150,16 @@ public class Properties { img.put("default", cs.getArtifacts()[0].getUri()); retInputs.put("tag_version", img); + + //set the location id + GetInput location = new GetInput(); + location.setGet_input("location_id"); + this.setLocation_id(location); + LinkedHashMap<String, Object> locMap = new LinkedHashMap(); + locMap.put("type", "string"); + locMap.put("default", ""); + retInputs.put("location_id", locMap); + //set the log info this.setLog_info(cs.getAuxilary().getLog_info()); diff --git a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/onapbp/OnapNode.java b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/onapbp/OnapNode.java index a3d8e3e..dbff78c 100644 --- a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/onapbp/OnapNode.java +++ b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/onapbp/OnapNode.java @@ -64,7 +64,7 @@ public class OnapNode extends Node{ this.setInterfaces(interfaces); //set the type - this.setType("dcae.nodes.ContainerizedPlatformComponent"); + this.setType("dcae.nodes.ContainerizedServiceComponent"); //create and set the relationships ArrayList<LinkedHashMap<String, String>> rets = new ArrayList(); diff --git a/mod/bpgenerator/src/test/java/org/onap/blueprintgenerator/core/BlueprintGeneratorTest.java b/mod/bpgenerator/src/test/java/org/onap/blueprintgenerator/core/BlueprintGeneratorTest.java index 1827349..9c581cf 100644 --- a/mod/bpgenerator/src/test/java/org/onap/blueprintgenerator/core/BlueprintGeneratorTest.java +++ b/mod/bpgenerator/src/test/java/org/onap/blueprintgenerator/core/BlueprintGeneratorTest.java @@ -352,7 +352,7 @@ public class BlueprintGeneratorTest { OnapNode testNode = new OnapNode(); //set the type - testNode.setType("dcae.nodes.ContainerizedPlatformComponent"); + testNode.setType("dcae.nodes.ContainerizedServiceComponent"); ArrayList<String> ports = new ArrayList<String>(); ports.add("concat: [\"80:\", {get_input: external_port }]"); |