summaryrefslogtreecommitdiffstats
path: root/blueprint-generator/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'blueprint-generator/src/main')
-rw-r--r--blueprint-generator/src/main/java/org/onap/blueprintgenerator/core/BlueprintGenerator.java136
-rw-r--r--blueprint-generator/src/main/java/org/onap/blueprintgenerator/core/Fixes.java70
-rw-r--r--blueprint-generator/src/main/java/org/onap/blueprintgenerator/core/TestComponentSpec.java132
-rw-r--r--blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/blueprint/Appconfig.java154
-rw-r--r--blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/blueprint/Blueprint.java255
-rw-r--r--blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/blueprint/ConcatObj.java57
-rw-r--r--blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/blueprint/DmaapInfo.java99
-rw-r--r--blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/blueprint/DmaapObj.java58
-rw-r--r--blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/blueprint/GetInput.java29
-rw-r--r--blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/blueprint/GetProperty.java55
-rw-r--r--blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/blueprint/Imports.java76
-rw-r--r--blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/blueprint/Interfaces.java44
-rw-r--r--blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/blueprint/Node.java28
-rw-r--r--blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/blueprint/Properties.java135
-rw-r--r--blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/blueprint/Start.java49
-rw-r--r--blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/blueprint/StartInputs.java68
-rw-r--r--blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/blueprint/TemplateNode.java69
-rw-r--r--blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Artifacts.java64
-rw-r--r--blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Auxilary.java87
-rw-r--r--blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/CallsObj.java50
-rw-r--r--blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/ComponentSpec.java149
-rw-r--r--blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/ConstraintsObj.java70
-rw-r--r--blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Container.java60
-rw-r--r--blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/EntrySchemaObj.java84
-rw-r--r--blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/HealthCheck.java72
-rw-r--r--blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Host.java56
-rw-r--r--blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Parameters.java109
-rw-r--r--blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Policy.java62
-rw-r--r--blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/PolicySchemaObj.java88
-rw-r--r--blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/ProvidesObj.java65
-rw-r--r--blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Publishes.java71
-rw-r--r--blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/ReconfigsObj.java61
-rw-r--r--blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/RequestResponseObj.java48
-rw-r--r--blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Self.java72
-rw-r--r--blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Services.java63
-rw-r--r--blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Streams.java63
-rw-r--r--blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Subscribes.java77
-rw-r--r--blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Volumes.java61
-rw-r--r--blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/onapbp/LogDirectory.java28
-rw-r--r--blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/onapbp/OnapBlueprint.java90
-rw-r--r--blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/onapbp/OnapNode.java74
41 files changed, 3238 insertions, 0 deletions
diff --git a/blueprint-generator/src/main/java/org/onap/blueprintgenerator/core/BlueprintGenerator.java b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/core/BlueprintGenerator.java
new file mode 100644
index 0000000..25328f8
--- /dev/null
+++ b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/core/BlueprintGenerator.java
@@ -0,0 +1,136 @@
+/**============LICENSE_START=======================================================
+ org.onap.dcae
+ ================================================================================
+ Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+
+ */
+
+package org.onap.blueprintgenerator.core;
+
+
+
+import org.apache.commons.cli.BasicParser;
+import org.apache.commons.cli.CommandLine;
+import org.apache.commons.cli.Options;
+import org.onap.blueprintgenerator.models.blueprint.Blueprint;
+import org.onap.blueprintgenerator.models.componentspec.ComponentSpec;
+
+
+
+@SuppressWarnings("deprecation")
+public class BlueprintGenerator {
+
+ private static String componentSpecPath = "";
+
+ private static String bluePrintName = "";
+
+ private static String outputPath = "";
+
+ private static char bpType = 'o';
+
+ private static String importPath = "";
+
+
+ public static void main(String[] args) throws Exception {
+
+ printInstructions();
+
+ parseInputs(args);
+
+
+ //create the component Spec we are going to be working with
+ ComponentSpec cs = new ComponentSpec();
+ cs.createComponentSpecFromFile(componentSpecPath);
+// if(bpType != 't') {
+// cs.createComponentSpecFromFile(componentSpecPath);
+// }
+// if(bpType == 't') {
+// Self self = new Self();
+// self.setName("blueprint_template");
+// self.setDescription("A template yaml file for blueprints");
+// self.setVersion("1.0.0");
+// self.setComponent_type("template");
+// cs.setSelf(self);
+// }
+
+ Blueprint bp = new Blueprint();
+ bp = bp.createBlueprint(cs, bluePrintName, bpType, importPath);
+ bp.blueprintToYaml(outputPath, bluePrintName, cs);
+ }
+
+
+ public static void printInstructions() {
+ System.out.println("OPTIONS:");
+ System.out.println("-i: The path to the JSON spec file (required)");
+ System.out.println("-n: Name of the blueprint (optional)");
+ System.out.println("-p: The path to the final blueprint (required)");
+ System.out.println("-t: The path to the yaml import file (optional)");
+ //System.out.println("-t: This flag will create a template of how a blueprint will look. No ComponentSpec is required if you add this flag (optional");
+
+ }
+
+
+ public static void parseInputs(String[] args) throws Exception {
+ //convert the arguments array to a string to make it easier
+ String commands = "";
+ for(String s: args) {
+ if(commands.length() == 0) {
+ commands = s;
+ }
+ else {
+ commands = commands + " " + s;
+ }
+ }
+ //check if it has the required inputs
+// if(commands.contains("-t")) {
+// bpType = 't';
+// CommandLineParser parser = new BasicParser();
+// Options options = new Options();
+// options.addOption("p", "Path", true, "Path to the final blueprint");
+// options.addOption("i", "Spec", true, "ComponentSpec import file");
+// options.addOption("n", "name", true, "Name of the blueprint");
+// options.addOption("t", "Template", false, "Create a bp tempalte");
+// CommandLine commandLine = parser.parse(options, args);
+// outputPath = commandLine.getOptionValue("p");
+// }
+ if(!commands.contains("-p") || !commands.contains("-i")) {
+ System.out.println("did not enter the required inputs");
+ }
+ else {
+ BasicParser parser = new BasicParser();
+ Options options = new Options();
+ options.addOption("i", "Spec", true, "ComponentSpec import file");
+ options.addOption("p", "Path", true, "Path to the final blueprint");
+ options.addOption("n", "Name", true, "Name of the blueprint");
+ options.addOption("t", "imports", true, "Path to the import file");
+
+ CommandLine commandLine = parser.parse(options, args);
+ componentSpecPath = commandLine.getOptionValue("i");
+ outputPath = commandLine.getOptionValue("p");
+ if(!(commandLine.getOptionValue("n") == null)){
+ bluePrintName = commandLine.getOptionValue("n");
+ }
+ if(!(commandLine.getOptionValue("t") == null)) {
+ importPath = commandLine.getOptionValue("t");
+ }
+ }
+
+ }
+
+
+
+}
+
diff --git a/blueprint-generator/src/main/java/org/onap/blueprintgenerator/core/Fixes.java b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/core/Fixes.java
new file mode 100644
index 0000000..2487306
--- /dev/null
+++ b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/core/Fixes.java
@@ -0,0 +1,70 @@
+/**============LICENSE_START=======================================================
+ org.onap.dcae
+ ================================================================================
+ Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+
+*/
+
+package org.onap.blueprintgenerator.core;
+
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.ArrayList;
+
+public class Fixes {
+ private static ArrayList<String> lines = new ArrayList<String>();
+ private static String line = null;
+
+ public static void fixSingleQuotes(File f) throws IOException {
+ File translateFile = f;
+ try {
+ FileReader fr = new FileReader(translateFile);
+ BufferedReader br = new BufferedReader(fr);
+
+ while((line = br.readLine()) != null) {
+ if(line.contains("'")) {
+ line = line.replace("'", "");
+ }
+ lines.add(line);
+
+ }
+
+ fr.close();
+ br.close();
+
+ FileWriter fw = new FileWriter(translateFile);
+ PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(f, true)));
+ for(String s: lines) {
+ out.println();
+ out.write(s);
+ out.flush();
+ }
+
+ out.close();
+ fw.close();
+ line = null;
+ lines = new ArrayList<String>();
+ } catch (FileNotFoundException e) {
+ throw new RuntimeException(e);
+ }
+ }
+}
diff --git a/blueprint-generator/src/main/java/org/onap/blueprintgenerator/core/TestComponentSpec.java b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/core/TestComponentSpec.java
new file mode 100644
index 0000000..5d4131b
--- /dev/null
+++ b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/core/TestComponentSpec.java
@@ -0,0 +1,132 @@
+/**============LICENSE_START=======================================================
+ org.onap.dcae
+ ================================================================================
+ Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+
+*/
+
+
+package org.onap.blueprintgenerator.core;
+
+
+
+
+import lombok.Getter;
+import lombok.Setter;
+
+@Getter @Setter
+public class TestComponentSpec {
+ private String cs = "{\r\n" +
+ " \"self\": {\r\n" +
+ " \"component_type\": \"docker\",\r\n" +
+ " \"description\": \"Test component spec\",\r\n" +
+ " \"name\": \"test.component.spec\",\r\n" +
+ " \"version\": \"1.0.1\"\r\n" +
+ " },\r\n" +
+ "\r\n" +
+ " \"service\": {\r\n" +
+ " \"calls\": [],\r\n" +
+ " \"provides\": []\r\n" +
+ " },\r\n" +
+ "\r\n" +
+ " \"streams\": {\r\n" +
+ " \"publishes\": [{\r\n" +
+ " \"config_key\": \"TEST-PUB-DR\",\r\n" +
+ " \"format\": \"dataformat_Hello_World_PM\",\r\n" +
+ " \"type\": \"data_router\",\r\n" +
+ " \"version\": \"1.0.0\"\r\n" +
+ " },\r\n" +
+ " {\r\n" +
+ " \"config_key\": \"TEST-PUB-MR\",\r\n" +
+ " \"format\": \"dataformat_Hello_World_PM\",\r\n" +
+ " \"type\": \"message_router\",\r\n" +
+ " \"version\": \"1.0.0\"\r\n" +
+ " }\r\n" +
+ " ],\r\n" +
+ "\r\n" +
+ " \"subscribes\": [{\r\n" +
+ " \"config_key\": \"TEST-SUB-MR\",\r\n" +
+ " \"format\": \"dataformat_Hello_World_PM\",\r\n" +
+ " \"route\": \"/TEST_HELLO_WORLD_SUB_MR\",\r\n" +
+ " \"type\": \"message_router\",\r\n" +
+ " \"version\": \"1.0.0\"\r\n" +
+ " },\r\n" +
+ " {\r\n" +
+ " \"config_key\": \"TEST-SUB-DR\",\r\n" +
+ " \"format\": \"dataformat_Hello_World_PM\",\r\n" +
+ " \"route\": \"/TEST-HELLO-WORLD-SUB-DR\",\r\n" +
+ " \"type\": \"data_router\",\r\n" +
+ " \"version\": \"1.0.0\"\r\n" +
+ " } \r\n" +
+ " ]\r\n" +
+ " },\r\n" +
+ "\r\n" +
+ " \"parameters\":\r\n" +
+ " [\r\n" +
+ " {\r\n" +
+ " \"name\": \"testParam1\",\r\n" +
+ " \"description\": \"test parameter 1\",\r\n" +
+ " \"value\": \"test-param-1\",\r\n" +
+ " \"type\": \"string\",\r\n" +
+ " \"sourced_at_deployment\": true,\r\n" +
+ " \"designer_editable\": true,\r\n" +
+ " \"policy_editable\": true,\r\n" +
+ " \"policy_group\": \"Test_Parameters\",\r\n" +
+ " \"required\": true\r\n" +
+ " }\r\n" +
+ " ],\r\n" +
+ "\r\n" +
+ " \"auxilary\": {\r\n" +
+ " \"healthcheck\": {\r\n" +
+ " \"type\": \"docker\",\r\n" +
+ " \"interval\": \"300s\",\r\n" +
+ " \"timeout\": \"120s\",\r\n" +
+ " \"script\": \"/etc/init.d/nagios status\"\r\n" +
+ " },\r\n" +
+ "\r\n" +
+ " \"databases\" : {\r\n" +
+ " \"TestDB1\": \"PGaaS\",\r\n" +
+ " \"TestDB2\": \"PGaaS\"\r\n" +
+ " },\r\n" +
+ "\r\n" +
+ " \"policy\": {\r\n" +
+ " \"trigger_type\": \"docker\",\r\n" +
+ " \"script_path\": \"/opt/app/manager/bin/reconfigure.sh\"\r\n" +
+ " },\r\n" +
+ " \"volumes\": [\r\n" +
+ " {\r\n" +
+ " \"container\": {\r\n" +
+ " \"bind\": \"/opt/app/manager/config/hostname\"\r\n" +
+ " },\r\n" +
+ " \"host\": {\r\n" +
+ " \"path\": \"/etc/hostname\",\r\n" +
+ " \"mode\": \"ro\"\r\n" +
+ " }\r\n" +
+ " }\r\n" +
+ "\r\n" +
+ " ],\r\n" +
+ " \"ports\": [\r\n" +
+ " \"80:80\"\r\n" +
+ " ]\r\n" +
+ " },\r\n" +
+ "\r\n" +
+ " \"artifacts\": [{\r\n" +
+ " \"type\": \"docker image\",\r\n" +
+ " \"uri\": \"test.tester\"\r\n" +
+ " }] \r\n" +
+ "\r\n" +
+ "}";
+}
diff --git a/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/blueprint/Appconfig.java b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/blueprint/Appconfig.java
new file mode 100644
index 0000000..e4f1230
--- /dev/null
+++ b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/blueprint/Appconfig.java
@@ -0,0 +1,154 @@
+/**============LICENSE_START=======================================================
+ org.onap.dcae
+ ================================================================================
+ Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+
+ */
+
+package org.onap.blueprintgenerator.models.blueprint;
+
+import java.util.LinkedHashMap;
+import java.util.TreeMap;
+
+import org.onap.blueprintgenerator.models.componentspec.CallsObj;
+import org.onap.blueprintgenerator.models.componentspec.ComponentSpec;
+import org.onap.blueprintgenerator.models.componentspec.Parameters;
+import org.onap.blueprintgenerator.models.componentspec.Publishes;
+import org.onap.blueprintgenerator.models.componentspec.Subscribes;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+
+
+import lombok.Getter;
+import lombok.Setter;
+
+@Getter
+@Setter
+public class Appconfig {
+ private CallsObj[] service_calls;
+ private TreeMap<String, DmaapObj> stream_publishes;
+ private TreeMap<String, DmaapObj> stream_subcribes;
+ private TreeMap<String, Object> params;
+
+ @JsonAnyGetter
+ public TreeMap<String, Object> getParams(){
+ return params;
+ }
+
+ public TreeMap<String, LinkedHashMap<String, Object>> createOnapAppconfig(TreeMap<String, LinkedHashMap<String, Object>> inps, ComponentSpec cs) {
+ TreeMap<String, LinkedHashMap<String, Object>> retInputs = new TreeMap<String, LinkedHashMap<String, Object>>();
+ retInputs = inps;
+
+ //set service calls
+ CallsObj[] call = new CallsObj[0];
+ this.setService_calls(call);
+
+ //set the stream publishes
+ TreeMap<String, DmaapObj> streamPublishes = new TreeMap<String, DmaapObj>();
+
+ if(cs.getStreams().getPublishes().length != 0) {
+ for(Publishes p: cs.getStreams().getPublishes()) {
+ if(p.getType().equals("data_router") || p.getType().equals("data router")) {
+ //in this case the data router information gets added to the params so for now leave it alone
+ String config = p.getConfig_key();
+ DmaapObj pub = new DmaapObj();
+ retInputs = pub.createOnapDmaapDRObj(retInputs, config, 'p');
+ pub.setType(p.getType());
+ streamPublishes.put(config, pub);
+ } else if(p.getType().equals("message_router") || p.getType().equals("message router")) {
+ String config = p.getConfig_key();
+ DmaapObj pub = new DmaapObj();
+ retInputs = pub.createOnapDmaapMRObj(retInputs, config, 'p');
+ pub.setType(p.getType());
+ streamPublishes.put(config, pub);
+ }
+ }
+ }
+
+ //set the stream publishes
+ TreeMap<String, DmaapObj> streamSubscribes = new TreeMap<String, DmaapObj>();
+
+ if(cs.getStreams().getSubscribes().length != 0) {
+ for(Subscribes s: cs.getStreams().getSubscribes()) {
+ if(s.getType().equals("data_router") || s.getType().equals("data router")) {
+ //in this case the data router information gets added to the params so for now leave it alone
+ String config = s.getConfig_key();
+ DmaapObj sub = new DmaapObj();
+ retInputs = sub.createOnapDmaapDRObj(retInputs, config, 'p');
+ sub.setType(s.getType());
+ streamSubscribes.put(config, sub);
+ } else if(s.getType().equals("message_router") || s.getType().equals("message router")) {
+ String config = s.getConfig_key();
+ DmaapObj sub = new DmaapObj();
+ retInputs = sub.createOnapDmaapMRObj(retInputs, config, 's');
+ sub.setType(s.getType());
+ streamSubscribes.put(config, sub);
+ }
+ }
+ }
+
+ this.setStream_publishes(streamPublishes);
+ this.setStream_subcribes(streamSubscribes);
+
+ //set the parameters into the appconfig
+ TreeMap<String, Object> parameters = new TreeMap<String, Object>();
+ for(Parameters p: cs.getParameters()) {
+ String pName = p.getName();
+ if(p.isSourced_at_deployment()) {
+ GetInput paramInput = new GetInput();
+ paramInput.setGet_input(pName);
+ parameters.put(pName, paramInput);
+
+ if(!p.getValue().equals("")) {
+ LinkedHashMap<String, Object> inputs = new LinkedHashMap<String, Object>();
+ inputs.put("type", "string");
+ inputs.put("default", p.getValue());
+ retInputs.put(pName, inputs);
+ } else {
+ LinkedHashMap<String, Object> inputs = new LinkedHashMap<String, Object>();
+ inputs.put("type", "string");
+ retInputs.put(pName, inputs);
+ }
+ } else {
+ if(p.getType() == "string") {
+ String val =(String) p.getValue();
+ val = '"' + val + '"';
+ parameters.put(pName, val);
+ }
+ else {
+ parameters.put(pName, p.getValue());
+ }
+
+ }
+ }
+ this.setParams(parameters);
+ return retInputs;
+ }
+
+// public void createTemplateAppconfig() {
+// //set service calls
+// CallsObj[] call = new CallsObj[0];
+// this.setService_calls(call);
+//
+// //set the stream publishes
+// TreeMap<String, DmaapObj> streamPublishes = new TreeMap<String, DmaapObj>();
+// this.setStream_publishes(streamPublishes);
+//
+// //set the stream subscribes
+// TreeMap<String, DmaapObj> streamSubscribes = new TreeMap<String, DmaapObj>();
+// this.setStream_subcribes(streamSubscribes);
+// }
+}
diff --git a/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/blueprint/Blueprint.java b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/blueprint/Blueprint.java
new file mode 100644
index 0000000..861c820
--- /dev/null
+++ b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/blueprint/Blueprint.java
@@ -0,0 +1,255 @@
+/**============LICENSE_START=======================================================
+ org.onap.dcae
+ ================================================================================
+ Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+
+ */
+
+package org.onap.blueprintgenerator.models.blueprint;
+
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.TreeMap;
+import java.util.regex.Pattern;
+
+import org.onap.blueprintgenerator.core.Fixes;
+import org.onap.blueprintgenerator.models.componentspec.ComponentSpec;
+import org.onap.blueprintgenerator.models.componentspec.Parameters;
+import org.onap.blueprintgenerator.models.componentspec.Publishes;
+import org.onap.blueprintgenerator.models.componentspec.Subscribes;
+import org.onap.blueprintgenerator.models.onapbp.OnapBlueprint;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.core.JsonProcessingException;
+//import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.dataformat.yaml.YAMLFactory;
+import com.fasterxml.jackson.dataformat.yaml.YAMLGenerator;
+
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+
+
+
+@Getter @Setter
+@JsonInclude(JsonInclude.Include.NON_NULL)
+
+public class Blueprint {
+
+
+ private String tosca_definitions_version;
+
+
+ private ArrayList<String> imports;
+
+
+ private TreeMap<String, LinkedHashMap<String, Object>> inputs;
+
+
+ private TreeMap<String, Node> node_templates;
+
+ public Blueprint createBlueprint(ComponentSpec cs, String name, char bpType, String importPath) {
+ Blueprint bp = new Blueprint();
+
+ if(bpType == 'o') {
+ OnapBlueprint onap = new OnapBlueprint();
+ bp = onap.createOnapBlueprint(cs, importPath);
+ bp = bp.setQuotations(bp);
+ }
+// if(bpType == 't') {
+// bp.createBlueprintTemplate();
+// }
+ return bp;
+ }
+
+ public Blueprint setQuotations(Blueprint bp) {
+ for(String s: bp.getInputs().keySet()) {
+ LinkedHashMap<String, Object> temp = bp.getInputs().get(s);
+ if(temp.get("type") == "string") {
+ String def = (String) temp.get("default");
+ def = '"' + def + '"';
+ temp.replace("default", def);
+ bp.getInputs().replace(s, temp);
+ }
+ }
+
+ return bp;
+ }
+
+// public void createBlueprintTemplate() {
+// //set the tosca definition
+// this.setTosca_definitions_version("cloudify_dsl_1_3");
+//
+// //set the imports
+// Imports imps = new Imports();
+// this.setImports(imps.createOnapImports());
+//
+// //create the needed inputs and just add the default ones
+// TreeMap<String, LinkedHashMap<String, Object>> inputs = createTemplateInputs();
+// this.setInputs(inputs);
+//
+// //create a node template
+// TreeMap<String, Node> nodeTemplate = new TreeMap<String, Node>();
+// TemplateNode template = new TemplateNode();
+// template.createTemplateNode();
+// nodeTemplate.put("Blueprint_Template", template);
+// this.setNode_template(nodeTemplate);
+//
+//
+// }
+// //add tag, externam port, and replicas since they are in all the bps
+// public TreeMap<String, LinkedHashMap<String, Object>> createTemplateInputs() {
+// TreeMap<String, LinkedHashMap<String, Object>> inputs = new TreeMap<String, LinkedHashMap<String, Object>>();
+//
+// LinkedHashMap<String, Object> tag = new LinkedHashMap<String, Object>();
+// tag.put("type", "string");
+// tag.put("default", "{{ ONAPTEMPLATE_DOCKERREGURL_org_onap_dcaegen2_releases }}/onap/org.onap.dcaegen2.collectors.ves.vescollector:1.3.1");
+// inputs.put("tag_version", tag);
+//
+// LinkedHashMap<String, Object> port = new LinkedHashMap<String, Object>();
+// port.put("type", "string");
+// port.put("description", "Kubernetes node port on which collector is exposed");
+// port.put("default", "30235");
+// inputs.put("external_port", port);
+//
+// LinkedHashMap<String, Object> rep = new LinkedHashMap<String, Object>();
+// rep.put("type", "integer");
+// rep.put("description", "number of instances");
+// rep.put("default", 1);
+// inputs.put("replicas", rep);
+//
+// return inputs;
+// }
+
+ public void blueprintToYaml(String outputPath, String bluePrintName, ComponentSpec cs) {
+ File outputFile;
+
+ if(bluePrintName.equals("")) {
+ String name = cs.getSelf().getName();
+ if(name.contains(".")) {
+ name = name.replaceAll(Pattern.quote("."), "_");
+ }
+ if(name.contains(" ")) {
+ name = name.replaceAll(" ", "");
+ }
+ String file = name + ".yaml";
+
+
+ outputFile = new File(outputPath, file);
+ outputFile.getParentFile().mkdirs();
+ try {
+ outputFile.createNewFile();
+ } catch (IOException e) {
+
+ throw new RuntimeException(e);
+ }
+ } else {
+ if(bluePrintName.contains(" ") || bluePrintName.contains(".")) {
+ bluePrintName = bluePrintName.replaceAll(Pattern.quote("."), "_");
+ bluePrintName = bluePrintName.replaceAll(" ", "");
+ }
+ String file = bluePrintName + ".yaml";
+ outputFile = new File(outputPath, file);
+ outputFile.getParentFile().mkdirs();
+ try {
+ outputFile.createNewFile();
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ String version = "#blueprint_version: " + cs.getSelf().getVersion() + '\n';
+ String description = "#description: " + cs.getSelf().getDescription() + '\n';
+
+ BufferedWriter writer = null;
+ try {
+ writer = new BufferedWriter(new FileWriter(outputFile, false));
+ } catch (IOException e1) {
+ throw new RuntimeException(e1);
+ }
+ if(writer != null) {
+ try {
+ writer.write(description);
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+ try {
+ writer.write(version);
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+ try {
+ writer.close();
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+
+ //read the translated blueprint into the file
+ ObjectMapper blueprintMapper = new ObjectMapper(new YAMLFactory().configure(YAMLGenerator.Feature.MINIMIZE_QUOTES, true));
+
+ PrintWriter out = null;
+ try {
+ out = new PrintWriter(new BufferedWriter(new FileWriter(outputFile, true)));
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+
+ try {
+ if(out != null) {
+ blueprintMapper.writeValue(out, this);
+ out.close();
+ }
+ } catch (IOException e) {
+
+ throw new RuntimeException(e);
+ }
+
+
+ Fixes fix = new Fixes();
+ try {
+ fix.fixSingleQuotes(outputFile);
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+
+ System.out.println("Blueprint created");
+ }
+
+
+ public String blueprintToString() {
+ String ret = "";
+
+ ObjectMapper blueprintMapper = new ObjectMapper(new YAMLFactory().configure(YAMLGenerator.Feature.MINIMIZE_QUOTES, true));
+ try {
+ ret = blueprintMapper.writerWithDefaultPrettyPrinter().writeValueAsString(this);
+ } catch (JsonProcessingException e) {
+ throw new RuntimeException(e);
+ }
+
+
+ return ret;
+ }
+}
diff --git a/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/blueprint/ConcatObj.java b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/blueprint/ConcatObj.java
new file mode 100644
index 0000000..edc257c
--- /dev/null
+++ b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/blueprint/ConcatObj.java
@@ -0,0 +1,57 @@
+/**============LICENSE_START=======================================================
+ org.onap.dcae
+ ================================================================================
+ Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+
+ */
+
+package org.onap.blueprintgenerator.models.blueprint;
+
+import java.util.ArrayList;
+
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+import com.fasterxml.jackson.annotation.JsonRawValue;
+
+import lombok.Getter; import lombok.Setter;
+import lombok.NoArgsConstructor;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class ConcatObj.
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+
+/* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+@Getter @Setter
+//@Builder
+
+/**
+ * Instantiates a new concat obj.
+ */
+@NoArgsConstructor
+@JsonInclude(value=Include.NON_NULL)
+
+public class ConcatObj {
+
+ /** The concat. */
+ private ArrayList<Object> concat;
+}
+
diff --git a/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/blueprint/DmaapInfo.java b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/blueprint/DmaapInfo.java
new file mode 100644
index 0000000..97dafc7
--- /dev/null
+++ b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/blueprint/DmaapInfo.java
@@ -0,0 +1,99 @@
+/**============LICENSE_START=======================================================
+ org.onap.dcae
+ ================================================================================
+ Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+
+ */
+
+package org.onap.blueprintgenerator.models.blueprint;
+
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.TreeMap;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+
+import lombok.Getter; import lombok.Setter;
+
+@Getter @Setter
+@JsonInclude(value=Include.NON_NULL)
+public class DmaapInfo {
+ private GetInput topic_url;
+ private GetInput username;
+ private GetInput password;
+ private GetInput location;
+ private GetInput delivery_url;
+ private GetInput subscriber_id;
+
+ public TreeMap<String, LinkedHashMap<String, Object>> createOnapDmaapMRInfo(TreeMap<String, LinkedHashMap<String, Object>> inps, String config, char type) {
+ TreeMap<String, LinkedHashMap<String, Object>> retInputs = new TreeMap<String, LinkedHashMap<String, Object>>();
+ retInputs = inps;
+ LinkedHashMap<String, Object> stringType = new LinkedHashMap<String, Object>();
+ stringType.put("type", "string");
+
+ config = config.replaceAll("-", "_");
+ if(type == 'p') {
+ config = config + "_publish_url";
+ }
+ else if(type == 's') {
+ config = config+ "_subscribe_url";
+ }
+
+ GetInput topic = new GetInput();
+ topic.setGet_input(config);
+ this.setTopic_url(topic);
+
+ retInputs.put(config, stringType);
+
+ return retInputs;
+ }
+
+ public TreeMap<String, LinkedHashMap<String, Object>> createOnapDmaapDRInfo(TreeMap<String, LinkedHashMap<String, Object>> inps, String config, char type) {
+ TreeMap<String, LinkedHashMap<String, Object>> retInputs = new TreeMap<String, LinkedHashMap<String, Object>>();
+ retInputs = inps;
+ LinkedHashMap<String, Object> stringType = new LinkedHashMap<String, Object>();
+ stringType.put("type", "string");
+
+ GetInput username = new GetInput();
+ username.setGet_input(config + "_" + "username");
+ this.setUsername(username);
+ retInputs.put(config + "_" + "username", stringType);
+
+ GetInput password = new GetInput();
+ password.setGet_input(config + "_" + "password");
+ this.setPassword(password);
+ retInputs.put(config + "_" + "password", stringType);
+
+ GetInput location = new GetInput();
+ location.setGet_input(config + "_" + "location");
+ this.setLocation(location);
+ retInputs.put(config + "_" + "location", stringType);
+
+ GetInput deliveryUrl = new GetInput();
+ deliveryUrl.setGet_input(config + "_" + "delivery_url");
+ this.setDelivery_url(deliveryUrl);
+ retInputs.put(config + "_" + "delivery_url", stringType);
+
+ GetInput subscriberID = new GetInput();
+ subscriberID.setGet_input(config + "_" + "subscriber_id");
+ this.setSubscriber_id(subscriberID);
+ retInputs.put(config + "_" + "subscriber_id", stringType);
+
+
+ return retInputs;
+ }
+}
diff --git a/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/blueprint/DmaapObj.java b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/blueprint/DmaapObj.java
new file mode 100644
index 0000000..7a96100
--- /dev/null
+++ b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/blueprint/DmaapObj.java
@@ -0,0 +1,58 @@
+/**============LICENSE_START=======================================================
+ org.onap.dcae
+ ================================================================================
+ Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+
+ */
+
+package org.onap.blueprintgenerator.models.blueprint;
+
+import java.util.LinkedHashMap;
+import java.util.TreeMap;
+
+import org.onap.blueprintgenerator.models.componentspec.ComponentSpec;
+
+import lombok.Getter; import lombok.Setter;
+
+@Getter @Setter
+public class DmaapObj {
+ private DmaapInfo dmaap_info;
+ private String type;
+
+ public TreeMap<String, LinkedHashMap<String, Object>> createOnapDmaapMRObj(TreeMap<String, LinkedHashMap<String, Object>> inps, String config, char type) {
+ TreeMap<String, LinkedHashMap<String, Object>> retInputs = new TreeMap<String, LinkedHashMap<String, Object>>();
+ retInputs = inps;
+
+ //set the dmaapinfo
+ DmaapInfo info = new DmaapInfo();
+ retInputs = info.createOnapDmaapMRInfo(retInputs, config, type);
+ this.setDmaap_info(info);
+
+ return retInputs;
+ }
+
+ public TreeMap<String, LinkedHashMap<String, Object>> createOnapDmaapDRObj(TreeMap<String, LinkedHashMap<String, Object>> inps, String config, char type) {
+ TreeMap<String, LinkedHashMap<String, Object>> retInputs = new TreeMap<String, LinkedHashMap<String, Object>>();
+ retInputs = inps;
+
+ //set the dmaapinfo
+ DmaapInfo info = new DmaapInfo();
+ retInputs = info.createOnapDmaapDRInfo(retInputs, config, type);
+ this.setDmaap_info(info);
+
+ return retInputs;
+ }
+}
diff --git a/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/blueprint/GetInput.java b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/blueprint/GetInput.java
new file mode 100644
index 0000000..e7980c8
--- /dev/null
+++ b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/blueprint/GetInput.java
@@ -0,0 +1,29 @@
+/**============LICENSE_START=======================================================
+ org.onap.dcae
+ ================================================================================
+ Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+
+ */
+
+package org.onap.blueprintgenerator.models.blueprint;
+
+import lombok.Getter; import lombok.Setter;
+
+@Getter @Setter
+public class GetInput {
+
+ private Object get_input;
+}
diff --git a/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/blueprint/GetProperty.java b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/blueprint/GetProperty.java
new file mode 100644
index 0000000..1f9bf1c
--- /dev/null
+++ b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/blueprint/GetProperty.java
@@ -0,0 +1,55 @@
+/**============LICENSE_START=======================================================
+ org.onap.dcae
+ ================================================================================
+ Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+
+ */
+
+package org.onap.blueprintgenerator.models.blueprint;
+
+import java.util.ArrayList;
+
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+
+import lombok.Getter; import lombok.Setter;
+import lombok.NoArgsConstructor;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class GetProperty.
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+
+/* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+@Getter @Setter
+//@Builder
+
+/**
+ * Instantiates a new gets the property.
+ */
+@NoArgsConstructor
+@JsonInclude(value=Include.NON_NULL)
+
+public class GetProperty {
+
+ /** The get property. */
+ private ArrayList<String> get_property;
+}
diff --git a/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/blueprint/Imports.java b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/blueprint/Imports.java
new file mode 100644
index 0000000..e4cea63
--- /dev/null
+++ b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/blueprint/Imports.java
@@ -0,0 +1,76 @@
+/**============LICENSE_START=======================================================
+ org.onap.dcae
+ ================================================================================
+ Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+
+*/
+
+package org.onap.blueprintgenerator.models.blueprint;
+
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+import com.fasterxml.jackson.core.JsonParseException;
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.dataformat.yaml.YAMLFactory;
+import com.fasterxml.jackson.dataformat.yaml.YAMLGenerator;
+import lombok.AllArgsConstructor;
+import lombok.Getter; import lombok.Setter;
+import lombok.NoArgsConstructor;
+
+
+
+@Getter @Setter
+@JsonInclude(value=Include.NON_NULL)
+public class Imports {
+
+ /** The imports. */
+ private ArrayList<String> imports;
+
+ public static ArrayList<String> createOnapImports() {
+ ArrayList<String> imps = new ArrayList<String>();
+
+ imps.add("http://www.getcloudify.org/spec/cloudify/3.4/types.yaml");
+ imps.add("https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R4/k8splugin/1.4.5/k8splugin_types.yaml");
+ imps.add("https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R4/dcaepolicyplugin/2.3.0/dcaepolicyplugin_types.yaml");
+
+ return imps;
+ }
+
+ public static ArrayList<String> createImportsFromFile(String path) {
+ Imports imports = new Imports();
+ ObjectMapper importMapper = new ObjectMapper(new YAMLFactory().configure(YAMLGenerator.Feature.MINIMIZE_QUOTES, true));
+ File importPath = new File(path);
+ try {
+ imports = importMapper.readValue(importPath, Imports.class);
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+
+ ArrayList<String> imps = new ArrayList<String>();
+ for(String s: imports.getImports()) {
+ imps.add(s);
+ }
+
+ return imps;
+ }
+}
diff --git a/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/blueprint/Interfaces.java b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/blueprint/Interfaces.java
new file mode 100644
index 0000000..2688d9d
--- /dev/null
+++ b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/blueprint/Interfaces.java
@@ -0,0 +1,44 @@
+/**============LICENSE_START=======================================================
+ org.onap.dcae
+ ================================================================================
+ Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+
+ */
+
+package org.onap.blueprintgenerator.models.blueprint;
+
+import java.util.LinkedHashMap;
+import java.util.TreeMap;
+
+import org.onap.blueprintgenerator.models.componentspec.ComponentSpec;
+
+import lombok.Getter; import lombok.Setter;
+
+@Getter @Setter
+public class Interfaces {
+ private Start start;
+
+ public TreeMap<String, LinkedHashMap<String, Object>> createOnapInterface(TreeMap<String, LinkedHashMap<String, Object>> inps, ComponentSpec cs){
+ TreeMap<String, LinkedHashMap<String, Object>> retInputs = new TreeMap<String, LinkedHashMap<String, Object>>();
+ retInputs = inps;
+
+ //create the start object
+ Start start = new Start();
+ retInputs = start.createOnapStart(retInputs, cs);
+ this.setStart(start);
+ return retInputs;
+ }
+}
diff --git a/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/blueprint/Node.java b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/blueprint/Node.java
new file mode 100644
index 0000000..bac795f
--- /dev/null
+++ b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/blueprint/Node.java
@@ -0,0 +1,28 @@
+/**============LICENSE_START=======================================================
+ org.onap.dcae
+ ================================================================================
+ Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+
+ */
+
+package org.onap.blueprintgenerator.models.blueprint;
+
+import lombok.Getter; import lombok.Setter;
+
+@Getter @Setter
+public class Node {
+ private String type;
+}
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
new file mode 100644
index 0000000..82afe33
--- /dev/null
+++ b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/blueprint/Properties.java
@@ -0,0 +1,135 @@
+/**============LICENSE_START=======================================================
+ org.onap.dcae
+ ================================================================================
+ Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+
+ */
+
+package org.onap.blueprintgenerator.models.blueprint;
+
+import java.util.LinkedHashMap;
+import java.util.TreeMap;
+
+import org.onap.blueprintgenerator.models.componentspec.ComponentSpec;
+import org.onap.blueprintgenerator.models.componentspec.HealthCheck;
+import org.onap.blueprintgenerator.models.componentspec.Volumes;
+import org.onap.blueprintgenerator.models.onapbp.LogDirectory;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+
+import lombok.Getter; import lombok.Setter;
+
+@Getter @Setter
+@JsonInclude(value=Include.NON_NULL)
+public class Properties {
+ private Appconfig application_config;
+ private HealthCheck docker_config;
+ private Object image;
+ private GetInput log_info;
+ private String dns_name;
+ private Object replicas;
+ private String name;
+
+ public TreeMap<String, LinkedHashMap<String, Object>> createOnapProperties(TreeMap<String, LinkedHashMap<String, Object>> inps, ComponentSpec cs) {
+ TreeMap<String, LinkedHashMap<String, Object>> retInputs = new TreeMap<String, LinkedHashMap<String, Object>>();
+ retInputs = inps;
+
+ //set the image
+ GetInput image = new GetInput();
+ image.setGet_input("tag_version");
+ this.setImage(image);
+ LinkedHashMap<String, Object> img = new LinkedHashMap<String, Object>();
+ img.put("type", "string");
+ img.put("default", cs.getArtifacts()[0].getUri());
+ retInputs.put("tag_version", img);
+
+ //set the log info
+ GetInput logD = new GetInput();
+ 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();
+ }
+ }
+ LinkedHashMap<String, Object> logInp = new LinkedHashMap<String, Object>();
+ logInp.put("type", "string");
+ if(logger != "") {
+ logInp.put("default", logger);
+ }
+ retInputs.put("log_directory", logInp);
+
+ //set the replicas
+ GetInput replica = new GetInput();
+ replica.setGet_input("replicas");
+ this.setReplicas(replica);
+ LinkedHashMap<String, Object> rep = new LinkedHashMap<String, Object>();
+ rep.put("type", "integer");
+ rep.put("description", "number of instances");
+ rep.put("default", 1);
+ retInputs.put("replicas", rep);
+
+ //set the dns name
+ this.setDns_name(cs.getSelf().getName());
+
+ //set the name
+ this.setName(cs.getSelf().getName());
+
+ //set the docker config
+ this.setDocker_config(cs.getAuxilary().getHealthcheck());
+
+ //set the app config
+ Appconfig app = new Appconfig();
+ retInputs = app.createOnapAppconfig(retInputs, cs);
+ this.setApplication_config(app);
+
+ return retInputs;
+ }
+
+// public void createTemplateProperties(ComponentSpec cs) {
+// //create dummy inputs just for methods
+// TreeMap<String, LinkedHashMap<String, Object>> inps = new TreeMap<String, LinkedHashMap<String, Object>>();
+//
+// //set the image
+// GetInput image = new GetInput();
+// image.setGet_input("tag_version");
+// this.setImage(image);
+//
+// //set the log info
+// LogDirectory log = new LogDirectory();
+// log.setLog_directory("Log directory");
+// this.setLog_info(log);
+//
+// //set the replicas
+// GetInput replica = new GetInput();
+// replica.setGet_input("replicas");
+// this.setReplicas(replica);
+//
+// //set the dns name
+// this.setDns_name("blueprint_template");
+//
+// //set the docker config
+// this.setDocker_config(cs.getAuxilary().getHealthcheck());
+//
+// //set the app config
+// Appconfig app = new Appconfig();
+// app.createTemplateAppconfig();
+// this.setApplication_config(app);
+// }
+
+}
diff --git a/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/blueprint/Start.java b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/blueprint/Start.java
new file mode 100644
index 0000000..d9c885d
--- /dev/null
+++ b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/blueprint/Start.java
@@ -0,0 +1,49 @@
+/**============LICENSE_START=======================================================
+ org.onap.dcae
+ ================================================================================
+ Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+
+ */
+
+package org.onap.blueprintgenerator.models.blueprint;
+
+import java.util.LinkedHashMap;
+import java.util.TreeMap;
+
+import org.onap.blueprintgenerator.models.componentspec.ComponentSpec;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+
+import lombok.Getter; import lombok.Setter;
+@Getter @Setter
+@JsonInclude(value=Include.NON_NULL)
+public class Start {
+ private StartInputs inputs;
+ private LinkedHashMap<String, Object> envs;
+
+ public TreeMap<String, LinkedHashMap<String, Object>> createOnapStart(TreeMap<String, LinkedHashMap<String, Object>> inps, ComponentSpec cs) {
+ TreeMap<String, LinkedHashMap<String, Object>> retInputs = inps;
+ retInputs = inps;
+
+ //create the start inputs
+ StartInputs inputs = new StartInputs();
+ inputs.createOnapStartInputs(retInputs, cs);
+ this.setInputs(inputs);
+
+ return retInputs;
+ }
+}
diff --git a/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/blueprint/StartInputs.java b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/blueprint/StartInputs.java
new file mode 100644
index 0000000..c831617
--- /dev/null
+++ b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/blueprint/StartInputs.java
@@ -0,0 +1,68 @@
+/**============LICENSE_START=======================================================
+ org.onap.dcae
+ ================================================================================
+ Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+
+*/
+
+package org.onap.blueprintgenerator.models.blueprint;
+
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.TreeMap;
+
+import org.onap.blueprintgenerator.models.componentspec.ComponentSpec;
+
+import lombok.Getter; import lombok.Setter;
+
+@Getter @Setter
+public class StartInputs {
+ private ArrayList<String> ports;
+
+ public TreeMap<String, LinkedHashMap<String, Object>> createOnapStartInputs(TreeMap<String, LinkedHashMap<String, Object>> inps, ComponentSpec cs){
+ TreeMap<String, LinkedHashMap<String, Object>> retInputs = new TreeMap<String, LinkedHashMap<String, Object>>();
+ retInputs = inps;
+ LinkedHashMap<String, Object> stringType = new LinkedHashMap<String, Object>();
+
+ ArrayList<String> port = new ArrayList<String>();
+ if(cs.getAuxilary().getPorts() != null) {
+ for(String s: cs.getAuxilary().getPorts()) {
+ //create the ports
+ String portNumber = "";
+ StringBuffer buf = new StringBuffer();
+ for(int i = 0; i < s.length(); i++) {
+ if(!(s.charAt(i) == ':')) {
+ buf.append(s.charAt(i));
+ }
+ else {
+ break;
+ }
+ }
+ portNumber = buf.toString();
+ String p = "concat: [" + '"' + portNumber + ":" + '"' +", {get_input: external_port }]";
+ port.add(p);
+ }
+ }
+ this.setPorts(port);
+ //add the external port input
+ stringType.put("type", "string");
+ stringType.put("description", "Kubernetes node port on which collector is exposed");
+ stringType.put("default", "'30235'");
+ retInputs.put("external_port", stringType);
+
+ return retInputs;
+ }
+}
diff --git a/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/blueprint/TemplateNode.java b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/blueprint/TemplateNode.java
new file mode 100644
index 0000000..7137cdb
--- /dev/null
+++ b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/blueprint/TemplateNode.java
@@ -0,0 +1,69 @@
+/**============LICENSE_START=======================================================
+ org.onap.dcae
+ ================================================================================
+ Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+*/
+
+package org.onap.blueprintgenerator.models.blueprint;
+
+import java.util.LinkedHashMap;
+import java.util.TreeMap;
+
+import org.onap.blueprintgenerator.models.componentspec.Auxilary;
+import org.onap.blueprintgenerator.models.componentspec.ComponentSpec;
+import org.onap.blueprintgenerator.models.componentspec.HealthCheck;
+import org.onap.blueprintgenerator.models.onapbp.OnapNode;
+
+import lombok.Getter; import lombok.Setter;
+
+
+public class TemplateNode extends OnapNode{
+
+// public void createTemplateNode() {
+// //dummy inputs just used for the inputs so i can reuse code
+// TreeMap<String, LinkedHashMap<String, Object>> inps = new TreeMap<String, LinkedHashMap<String, Object>>();
+//
+// //create a dummy componentspec to set the values later on
+// ComponentSpec cs = new ComponentSpec();
+// Auxilary aux = new Auxilary();
+// HealthCheck health = new HealthCheck();
+// health.setEndpoint("/healthcheck");
+// health.setInterval("15s");
+// health.setTimeout("1s");
+// health.setType("https");
+// aux.setHealthcheck(health);
+// String[] ports = new String[1];
+// ports[0] = "9999:9999";
+// aux.setPorts(ports);
+// cs.setAuxilary(aux);
+//
+// //set the type
+// this.setType("dcae.nodes.ContainerizedPlatformComponent");
+//
+// //set the interface
+// Interfaces inter = new Interfaces();
+// inter.createOnapInterface(inps, cs);
+// TreeMap<String, Interfaces> interfaces = new TreeMap<String, Interfaces>();
+// interfaces.put("cloudify.interfaces.lifecycle", inter);
+// this.setInterfaces(interfaces);
+//
+//
+// //create the properties
+// Properties props = new Properties();
+// props.createTemplateProperties(cs);
+// this.setProperties(props);
+// }
+}
diff --git a/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Artifacts.java b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Artifacts.java
new file mode 100644
index 0000000..f7f5a03
--- /dev/null
+++ b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Artifacts.java
@@ -0,0 +1,64 @@
+/**============LICENSE_START=======================================================
+ org.onap.dcae
+ ================================================================================
+ Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+
+ */
+
+package org.onap.blueprintgenerator.models.componentspec;
+
+
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Getter; import lombok.Setter;
+import lombok.NoArgsConstructor;
+
+// TODO: Auto-generated Javadoc
+/* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+@Getter @Setter
+
+/* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+
+
+/**
+ * Instantiates a new artifacts.
+ */
+@NoArgsConstructor
+
+/**
+ * Instantiates a new artifacts.
+ *
+ * @param type the type
+ * @param uri the uri
+ */
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+//Called in Component Spec Object
+public class Artifacts {
+
+ /** The type. */
+ private String type;
+
+ /** The uri. */
+ private String uri;
+}
diff --git a/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Auxilary.java b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Auxilary.java
new file mode 100644
index 0000000..a81a0fa
--- /dev/null
+++ b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Auxilary.java
@@ -0,0 +1,87 @@
+/**============LICENSE_START=======================================================
+ org.onap.dcae
+ ================================================================================
+ Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+
+ */
+package org.onap.blueprintgenerator.models.componentspec;
+
+
+import java.util.TreeMap;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Getter; import lombok.Setter;
+import lombok.NoArgsConstructor;
+
+// TODO: Auto-generated Javadoc
+/* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+@Getter @Setter
+
+/* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+
+
+/**
+ * Instantiates a new auxilary.
+ */
+@NoArgsConstructor
+
+/**
+ * Instantiates a new auxilary.
+ *
+ * @param healthcheck the healthcheck
+ * @param volumes the volumes
+ * @param policy the policy
+ * @param ports the ports
+ * @param reconfigs the reconfigs
+ * @param databases the databases
+ */
+
+@JsonInclude(value=Include.NON_NULL)
+//Called in component Spec Object
+public class Auxilary {
+
+ /** The healthcheck. */
+ private HealthCheck healthcheck;
+
+ /** The volumes. */
+ private Volumes[] volumes;
+
+ /** The policy. */
+ private Policy policy;
+
+ /** The ports. */
+ private String[] ports;
+
+ /** The reconfigs. */
+ private ReconfigsObj reconfigs;
+
+ /** The databases. */
+ @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
+ private TreeMap<String, String> databases;
+
+
+
+}
diff --git a/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/CallsObj.java b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/CallsObj.java
new file mode 100644
index 0000000..0b7dcee
--- /dev/null
+++ b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/CallsObj.java
@@ -0,0 +1,50 @@
+/**============LICENSE_START=======================================================
+ org.onap.dcae
+ ================================================================================
+ Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+ */
+
+package org.onap.blueprintgenerator.models.componentspec;
+
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Getter; import lombok.Setter;
+import lombok.NoArgsConstructor;
+
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class CallsObj.
+ */
+@JsonInclude(value=Include.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown = true)
+//called from service obj
+public class CallsObj {
+
+ /** The config key. */
+ private String config_key;
+
+ /** The request. */
+ private RequestResponseObj request;
+
+ /** The response. */
+ private RequestResponseObj response;
+}
diff --git a/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/ComponentSpec.java b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/ComponentSpec.java
new file mode 100644
index 0000000..b6bc0a1
--- /dev/null
+++ b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/ComponentSpec.java
@@ -0,0 +1,149 @@
+/**============LICENSE_START=======================================================
+ org.onap.dcae
+ ================================================================================
+ Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+
+ */
+
+package org.onap.blueprintgenerator.models.componentspec;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.Map;
+
+
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+import com.fasterxml.jackson.core.JsonParseException;
+import com.fasterxml.jackson.databind.JsonMappingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.Getter; import lombok.Setter;
+import lombok.NoArgsConstructor;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class ComponentSpec.
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+
+/* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+@Getter @Setter
+
+/* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+
+
+/**
+ * Instantiates a new component spec.
+ */
+@NoArgsConstructor
+
+/**
+ * Instantiates a new component spec.
+ *
+ * @param self the self
+ * @param services the services
+ * @param streams the streams
+ * @param parameters the parameters
+ * @param auxilary the auxilary
+ * @param artifacts the artifacts
+ */
+
+@JsonInclude(value=Include.NON_NULL)
+//main object that the component spec file is written in
+public class ComponentSpec {
+
+ /** The self. */
+ private Self self;
+
+ /** The services. */
+ private Services services;
+
+ /** The streams. */
+ private Streams streams;
+
+ /** The parameters. */
+ private Parameters[] parameters;
+
+ /** The auxilary. */
+ private Auxilary auxilary;
+
+ /** The artifacts. */
+ private Artifacts[] artifacts;
+
+ /**
+ * Creates the component spec from file.
+ *
+ * @param path the path
+ */
+ public void createComponentSpecFromFile(String path) {
+ ObjectMapper componentMapper = new ObjectMapper();
+ File specPathFile = new File(path);
+ ComponentSpec cs = new ComponentSpec();
+
+ try {
+ cs = componentMapper.readValue(specPathFile, ComponentSpec.class);
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+
+
+
+ //set all the pieces of the component spec
+ this.setSelf(cs.getSelf());
+ this.setArtifacts(cs.getArtifacts());
+ this.setAuxilary(cs.getAuxilary());
+ this.setParameters(cs.getParameters());
+ this.setServices(cs.getServices());
+ this.setStreams(cs.getStreams());
+ }
+
+
+ /**
+ * Creates the component spec from string.
+ *
+ * @param specString the spec string
+ */
+ public void createComponentSpecFromString(String specString) {
+ ObjectMapper componentMapper = new ObjectMapper();
+ ComponentSpec cs = new ComponentSpec();
+ try {
+ cs = componentMapper.readValue(specString, ComponentSpec.class);
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+
+ //set all the pieces of the component spec
+ this.setSelf(cs.getSelf());
+ this.setArtifacts(cs.getArtifacts());
+ this.setAuxilary(cs.getAuxilary());
+ this.setParameters(cs.getParameters());
+ this.setServices(cs.getServices());
+ this.setStreams(cs.getStreams());
+ }
+
+
+}
diff --git a/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/ConstraintsObj.java b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/ConstraintsObj.java
new file mode 100644
index 0000000..3615605
--- /dev/null
+++ b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/ConstraintsObj.java
@@ -0,0 +1,70 @@
+/**============LICENSE_START=======================================================
+ org.onap.dcae
+ ================================================================================
+ Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+
+ */
+
+package org.onap.blueprintgenerator.models.componentspec;
+
+import java.util.HashMap;
+
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Getter; import lombok.Setter;
+import lombok.NoArgsConstructor;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class ConstraintsObj.
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+@JsonInclude(value=Include.NON_NULL)
+
+public class ConstraintsObj {
+
+ /** The equal. */
+ private Object equal;
+
+ /** The greater than. */
+ private int greater_than;
+
+ /** The greater or equal. */
+ private int greater_or_equal;
+
+ /** The less than. */
+ private int less_than;
+
+ /** The less or equal. */
+ private int less_or_equal;
+
+ /** The valid values. */
+ private Object[] valid_values;
+
+ /** The length. */
+ private int length;
+
+ /** The min length. */
+ private int min_length;
+
+ /** The max length. */
+ private int max_length;
+}
diff --git a/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Container.java b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Container.java
new file mode 100644
index 0000000..d94e2bb
--- /dev/null
+++ b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Container.java
@@ -0,0 +1,60 @@
+/**============LICENSE_START=======================================================
+ org.onap.dcae
+ ================================================================================
+ Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+
+ */
+
+package org.onap.blueprintgenerator.models.componentspec;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Getter; import lombok.Setter;
+import lombok.NoArgsConstructor;
+
+// TODO: Auto-generated Javadoc
+/* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+@Getter @Setter
+
+/* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+/**
+ * Instantiates a new container.
+ */
+@NoArgsConstructor
+
+/**
+ * Instantiates a new container.
+ *
+ * @param bind the bind
+ * @param mode the mode
+ */
+
+@JsonInclude(value=Include.NON_NULL)
+public class Container {
+
+ /** The bind. */
+ private String bind;
+
+ /** The mode. */
+ private String mode;
+}
diff --git a/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/EntrySchemaObj.java b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/EntrySchemaObj.java
new file mode 100644
index 0000000..45f9091
--- /dev/null
+++ b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/EntrySchemaObj.java
@@ -0,0 +1,84 @@
+/**============LICENSE_START=======================================================
+ org.onap.dcae
+ ================================================================================
+ Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+
+ */
+
+package org.onap.blueprintgenerator.models.componentspec;
+
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Getter; import lombok.Setter;
+import lombok.NoArgsConstructor;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class EntrySchemaObj.
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+
+/* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+@Getter @Setter
+
+/* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+/**
+ * Instantiates a new entry schema obj.
+ */
+@NoArgsConstructor
+
+/**
+ * Instantiates a new entry schema obj.
+ *
+ * @param name the name
+ * @param description the description
+ * @param type the type
+ * @param value the value
+ * @param entry_schema the entry schema
+ * @param required the required
+ */
+
+@JsonInclude(value=Include.NON_NULL)
+//called from policy schema obj
+public class EntrySchemaObj {
+
+ /** The name. */
+ private String name;
+
+ /** The description. */
+ private String description;
+
+ /** The type. */
+ private String type;
+
+ /** The value. */
+ private String value;
+
+ /** The entry schema. */
+ private EntrySchemaObj[] entry_schema;
+
+ /** The required. */
+ private boolean required;
+}
diff --git a/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/HealthCheck.java b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/HealthCheck.java
new file mode 100644
index 0000000..acc9379
--- /dev/null
+++ b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/HealthCheck.java
@@ -0,0 +1,72 @@
+/**============LICENSE_START=======================================================
+ org.onap.dcae
+ ================================================================================
+ Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+
+ */
+
+package org.onap.blueprintgenerator.models.componentspec;
+
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Getter; import lombok.Setter;
+import lombok.NoArgsConstructor;
+
+// TODO: Auto-generated Javadoc
+/* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+@Getter @Setter
+
+/* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+/**
+ * Instantiates a new health check.
+ */
+@NoArgsConstructor
+
+/**
+ * Instantiates a new health check.
+ *
+ * @param interval the interval
+ * @param timeout the timeout
+ * @param script the script
+ * @param type the type
+ */
+
+@JsonInclude(value=Include.NON_NULL)
+//Called in Auxillary Object
+public class HealthCheck {
+
+ /** The interval. */
+ private String interval;
+
+ /** The timeout. */
+ private String timeout;
+
+ /** The script. */
+ private String script;
+
+ /** The type. */
+ private String type;
+
+ private String endpoint;
+}
diff --git a/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Host.java b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Host.java
new file mode 100644
index 0000000..91734ad
--- /dev/null
+++ b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Host.java
@@ -0,0 +1,56 @@
+/**============LICENSE_START=======================================================
+ org.onap.dcae
+ ================================================================================
+ Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+
+ */
+
+package org.onap.blueprintgenerator.models.componentspec;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Getter; import lombok.Setter;
+import lombok.NoArgsConstructor;
+
+// TODO: Auto-generated Javadoc
+/* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+@Getter @Setter
+
+/**
+ * Instantiates a new host.
+ */
+@NoArgsConstructor
+
+/**
+ * Instantiates a new host.
+ *
+ * @param path the path
+ * @param mode the mode
+ */
+@JsonInclude(value=Include.NON_NULL)
+public class Host{
+
+ /** The path. */
+ private String path;
+
+ /** The mode. */
+ private String mode;
+}
diff --git a/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Parameters.java b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Parameters.java
new file mode 100644
index 0000000..515ecc7
--- /dev/null
+++ b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Parameters.java
@@ -0,0 +1,109 @@
+/**============LICENSE_START=======================================================
+ org.onap.dcae
+ ================================================================================
+ Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+
+ */
+
+package org.onap.blueprintgenerator.models.componentspec;
+
+import java.util.ArrayList;
+
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Getter; import lombok.Setter;
+import lombok.NoArgsConstructor;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class Parameters.
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+
+/* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+@Getter @Setter
+
+/* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+/**
+ * Instantiates a new parameters.
+ */
+@NoArgsConstructor
+
+/**
+ * Instantiates a new parameters.
+ *
+ * @param name the name
+ * @param value the value
+ * @param description the description
+ * @param sourced_at_deployment the sourced at deployment
+ * @param designer_editable the designer editable
+ * @param policy_editable the policy editable
+ * @param required the required
+ * @param type the type
+ * @param policy_group the policy group
+ * @param policy_schema the policy schema
+ * @param entry_schema the entry schema
+ * @param constraints the constraints
+ */
+@JsonInclude(value=Include.NON_NULL)
+//Called in component Spec Object
+public class Parameters {
+
+ /** The name. */
+ private String name;
+
+ /** The value. */
+ private Object value;
+
+ /** The description. */
+ private String description;
+
+ /** The sourced at deployment. */
+ private boolean sourced_at_deployment;
+
+ /** The designer editable. */
+ private boolean designer_editable;
+
+ /** The policy editable. */
+ private boolean policy_editable;
+
+ /** The required. */
+ private boolean required;
+
+ /** The type. */
+ private String type;
+
+ /** The policy group. */
+ private String policy_group;
+
+ /** The policy schema. */
+ private PolicySchemaObj[] policy_schema;
+
+ /** The entry schema. */
+ private EntrySchemaObj[] entry_schema;
+
+ /** The constraints. */
+ private ConstraintsObj[] constraints;
+}
diff --git a/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Policy.java b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Policy.java
new file mode 100644
index 0000000..3cc14fe
--- /dev/null
+++ b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Policy.java
@@ -0,0 +1,62 @@
+/**============LICENSE_START=======================================================
+ org.onap.dcae
+ ================================================================================
+ Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+
+ */
+
+package org.onap.blueprintgenerator.models.componentspec;
+
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Getter; import lombok.Setter;
+import lombok.NoArgsConstructor;
+
+// TODO: Auto-generated Javadoc
+/* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+@Getter @Setter
+
+/* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+
+/**
+ * Instantiates a new policy.
+ */
+@NoArgsConstructor
+
+/**
+ * Instantiates a new policy.
+ *
+ * @param trigger_type the trigger type
+ * @param script_path the script path
+ */
+@JsonInclude(value=Include.NON_NULL)
+//called in auxilary
+public class Policy {
+
+ /** The trigger type. */
+ private String trigger_type;
+
+ /** The script path. */
+ private String script_path;
+}
diff --git a/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/PolicySchemaObj.java b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/PolicySchemaObj.java
new file mode 100644
index 0000000..7af16d6
--- /dev/null
+++ b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/PolicySchemaObj.java
@@ -0,0 +1,88 @@
+/**============LICENSE_START=======================================================
+ org.onap.dcae
+ ================================================================================
+ Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+
+ */
+
+package org.onap.blueprintgenerator.models.componentspec;
+
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Getter; import lombok.Setter;
+import lombok.NoArgsConstructor;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class PolicySchemaObj.
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+
+/* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+@Getter @Setter
+
+/* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+
+/**
+ * Instantiates a new policy schema obj.
+ */
+@NoArgsConstructor
+
+/**
+ * Instantiates a new policy schema obj.
+ *
+ * @param name the name
+ * @param description the description
+ * @param type the type
+ * @param value the value
+ * @param entry_schema the entry schema
+ * @param required the required
+ * @param constraints the constraints
+ */
+@JsonInclude(value=Include.NON_NULL)
+//called from parameters obj
+public class PolicySchemaObj {
+
+ /** The name. */
+ private String name;
+
+ /** The description. */
+ private String description;
+
+ /** The type. */
+ private String type;
+
+ /** The value. */
+ private String value;
+
+ /** The entry schema. */
+ private EntrySchemaObj[] entry_schema;
+
+ /** The required. */
+ private boolean required;
+
+ /** The constraints. */
+ private ConstraintsObj[] constraints;
+ }
diff --git a/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/ProvidesObj.java b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/ProvidesObj.java
new file mode 100644
index 0000000..ad9c87d
--- /dev/null
+++ b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/ProvidesObj.java
@@ -0,0 +1,65 @@
+/**============LICENSE_START=======================================================
+ org.onap.dcae
+ ================================================================================
+ Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+
+ */
+
+package org.onap.blueprintgenerator.models.componentspec;
+
+
+
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Getter; import lombok.Setter;
+import lombok.NoArgsConstructor;
+
+// TODO: Auto-generated Javadoc
+/* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+@Getter @Setter
+
+/* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+
+/**
+ * Instantiates a new provides obj.
+ */
+@NoArgsConstructor
+
+/**
+ * Instantiates a new provides obj.
+ *
+ * @param route the route
+ * @param request the request
+ * @param response the response
+ */
+//called from service obj
+public class ProvidesObj {
+
+ /** The route. */
+ private String route;
+
+ /** The request. */
+ private RequestResponseObj request;
+
+ /** The response. */
+ private RequestResponseObj response;
+
+ private String verb;
+}
diff --git a/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Publishes.java b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Publishes.java
new file mode 100644
index 0000000..292dca8
--- /dev/null
+++ b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Publishes.java
@@ -0,0 +1,71 @@
+/**============LICENSE_START=======================================================
+ org.onap.dcae
+ ================================================================================
+ Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+
+ */
+
+package org.onap.blueprintgenerator.models.componentspec;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Getter; import lombok.Setter;
+import lombok.NoArgsConstructor;
+
+// TODO: Auto-generated Javadoc
+/* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+@Getter @Setter
+
+/* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+
+/**
+ * Instantiates a new publishes.
+ */
+@NoArgsConstructor
+
+/**
+ * Instantiates a new publishes.
+ *
+ * @param config_key the config key
+ * @param format the format
+ * @param type the type
+ * @param version the version
+ */
+@JsonInclude(value=Include.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown = true)
+//Called in Streams Object
+public class Publishes {
+
+ /** The config key. */
+ private String config_key;
+
+ /** The format. */
+ private String format;
+
+ /** The type. */
+ private String type;
+
+ /** The version. */
+ private String version;
+}
diff --git a/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/ReconfigsObj.java b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/ReconfigsObj.java
new file mode 100644
index 0000000..6c389d6
--- /dev/null
+++ b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/ReconfigsObj.java
@@ -0,0 +1,61 @@
+/**============LICENSE_START=======================================================
+ org.onap.dcae
+ ================================================================================
+ Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+
+ */
+
+package org.onap.blueprintgenerator.models.componentspec;
+
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Getter; import lombok.Setter;
+import lombok.NoArgsConstructor;
+
+// TODO: Auto-generated Javadoc
+/* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+@Getter @Setter
+
+/* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+/**
+ * Instantiates a new reconfigs obj.
+ */
+@NoArgsConstructor
+
+/**
+ * Instantiates a new reconfigs obj.
+ *
+ * @param dti the dti
+ * @param policy the policy
+ */
+@JsonInclude(value=Include.NON_NULL)
+
+public class ReconfigsObj {
+
+ /** The dti. */
+ private String dti;
+
+ /** The policy. */
+ private String policy;
+}
diff --git a/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/RequestResponseObj.java b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/RequestResponseObj.java
new file mode 100644
index 0000000..2aaf60b
--- /dev/null
+++ b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/RequestResponseObj.java
@@ -0,0 +1,48 @@
+/**============LICENSE_START=======================================================
+ org.onap.dcae
+ ================================================================================
+ Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+
+ */
+
+package org.onap.blueprintgenerator.models.componentspec;
+
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Getter; import lombok.Setter;
+import lombok.NoArgsConstructor;
+
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class RequestResponseObj.
+ */
+@JsonInclude(value=Include.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown = true)
+//called in calls obj
+public class RequestResponseObj {
+
+ /** The format. */
+ private String format;
+
+ /** The version. */
+ private String version;
+}
diff --git a/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Self.java b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Self.java
new file mode 100644
index 0000000..a566661
--- /dev/null
+++ b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Self.java
@@ -0,0 +1,72 @@
+/**============LICENSE_START=======================================================
+ org.onap.dcae
+ ================================================================================
+ Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+
+ */
+
+package org.onap.blueprintgenerator.models.componentspec;
+
+import java.util.Map;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Getter; import lombok.Setter;
+import lombok.NoArgsConstructor;
+
+// TODO: Auto-generated Javadoc
+/* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+@Getter @Setter
+
+/* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+/**
+ * Instantiates a new self.
+ */
+@NoArgsConstructor
+
+/**
+ * Instantiates a new self.
+ *
+ * @param component_type the component type
+ * @param description the description
+ * @param name the name
+ * @param version the version
+ */
+@JsonInclude(value=Include.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown = true)
+//called in Component Spec object
+public class Self {
+
+ /** The component type. */
+ private String component_type;
+
+ /** The description. */
+ private String description;
+
+ /** The name. */
+ private String name;
+
+ /** The version. */
+ private String version;
+}
diff --git a/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Services.java b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Services.java
new file mode 100644
index 0000000..afe0904
--- /dev/null
+++ b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Services.java
@@ -0,0 +1,63 @@
+/**============LICENSE_START=======================================================
+ org.onap.dcae
+ ================================================================================
+ Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+
+ */
+
+package org.onap.blueprintgenerator.models.componentspec;
+
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Getter; import lombok.Setter;
+import lombok.NoArgsConstructor;
+
+// TODO: Auto-generated Javadoc
+/* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+@Getter @Setter
+
+/* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+/**
+ * Instantiates a new services.
+ */
+@NoArgsConstructor
+
+/**
+ * Instantiates a new services.
+ *
+ * @param calls the calls
+ * @param provides the provides
+ */
+@JsonInclude(value=Include.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown = true)
+//called in component spec object
+public class Services {
+
+ /** The calls. */
+ private CallsObj[] calls;
+
+ /** The provides. */
+ private ProvidesObj[] provides;
+}
diff --git a/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Streams.java b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Streams.java
new file mode 100644
index 0000000..1b7dcd3
--- /dev/null
+++ b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Streams.java
@@ -0,0 +1,63 @@
+/**============LICENSE_START=======================================================
+ org.onap.dcae
+ ================================================================================
+ Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+
+ */
+
+package org.onap.blueprintgenerator.models.componentspec;
+
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Getter; import lombok.Setter;
+import lombok.NoArgsConstructor;
+
+// TODO: Auto-generated Javadoc
+/* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+@Getter @Setter
+
+/* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+/**
+ * Instantiates a new streams.
+ */
+@NoArgsConstructor
+
+/**
+ * Instantiates a new streams.
+ *
+ * @param publishes the publishes
+ * @param subscribes the subscribes
+ */
+@JsonInclude(value=Include.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown = true)
+//Called in Component Spec Object
+public class Streams {
+
+ /** The publishes. */
+ private Publishes[] publishes;
+
+ /** The subscribes. */
+ private Subscribes[] subscribes;
+}
diff --git a/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Subscribes.java b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Subscribes.java
new file mode 100644
index 0000000..14485a0
--- /dev/null
+++ b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Subscribes.java
@@ -0,0 +1,77 @@
+/**============LICENSE_START=======================================================
+ org.onap.dcae
+ ================================================================================
+ Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+ */
+
+package org.onap.blueprintgenerator.models.componentspec;
+
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Getter; import lombok.Setter;
+import lombok.NoArgsConstructor;
+
+// TODO: Auto-generated Javadoc
+/* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+@Getter @Setter
+
+/* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+
+
+/**
+ * Instantiates a new subscribes.
+ */
+@NoArgsConstructor
+
+/**
+ * Instantiates a new subscribes.
+ *
+ * @param config_key the config key
+ * @param format the format
+ * @param route the route
+ * @param type the type
+ * @param version the version
+ */
+
+@JsonInclude(value=Include.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown = true)
+//Called in Streams Object
+public class Subscribes {
+
+ /** The config key. */
+ private String config_key;
+
+ /** The format. */
+ private String format;
+
+ /** The route. */
+ private String route;
+
+ /** The type. */
+ private String type;
+
+ /** The version. */
+ private String version;
+}
diff --git a/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Volumes.java b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Volumes.java
new file mode 100644
index 0000000..1034242
--- /dev/null
+++ b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/componentspec/Volumes.java
@@ -0,0 +1,61 @@
+/**============LICENSE_START=======================================================
+ org.onap.dcae
+ ================================================================================
+ Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+
+ */
+
+package org.onap.blueprintgenerator.models.componentspec;
+
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Getter; import lombok.Setter;
+import lombok.NoArgsConstructor;
+
+// TODO: Auto-generated Javadoc
+/* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+@Getter @Setter
+
+/* (non-Javadoc)
+ * @see java.lang.Object#toString()
+ */
+/**
+ * Instantiates a new volumes.
+ */
+@NoArgsConstructor
+
+/**
+ * Instantiates a new volumes.
+ *
+ * @param container the container
+ * @param host the host
+ */
+@JsonInclude(value=Include.NON_NULL)
+//Called in Auxillary Object
+public class Volumes {
+
+ /** The container. */
+ private Container container;
+
+ /** The host. */
+ private Host host;
+} \ No newline at end of file
diff --git a/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/onapbp/LogDirectory.java b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/onapbp/LogDirectory.java
new file mode 100644
index 0000000..c9e531f
--- /dev/null
+++ b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/onapbp/LogDirectory.java
@@ -0,0 +1,28 @@
+/**============LICENSE_START=======================================================
+ org.onap.dcae
+ ================================================================================
+ Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+
+*/
+
+package org.onap.blueprintgenerator.models.onapbp;
+
+import lombok.Getter; import lombok.Setter;
+
+@Getter @Setter
+public class LogDirectory {
+ private Object log_directory;
+}
diff --git a/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/onapbp/OnapBlueprint.java b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/onapbp/OnapBlueprint.java
new file mode 100644
index 0000000..d4212d9
--- /dev/null
+++ b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/onapbp/OnapBlueprint.java
@@ -0,0 +1,90 @@
+/**============LICENSE_START=======================================================
+ org.onap.dcae
+ ================================================================================
+ Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+
+ */
+
+package org.onap.blueprintgenerator.models.onapbp;
+
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.TreeMap;
+
+import org.onap.blueprintgenerator.models.blueprint.Blueprint;
+import org.onap.blueprintgenerator.models.blueprint.Imports;
+import org.onap.blueprintgenerator.models.blueprint.Node;
+import org.onap.blueprintgenerator.models.componentspec.ComponentSpec;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+
+import lombok.Getter; import lombok.Setter;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+
+@Getter @Setter
+@JsonInclude(value=Include.NON_NULL)
+
+public class OnapBlueprint extends Blueprint{
+
+ public Blueprint createOnapBlueprint(ComponentSpec cs, String importPath) {
+
+ //create the inputs that will be used
+ TreeMap<String, LinkedHashMap<String, Object>> inputs = new TreeMap<String, LinkedHashMap<String, Object>>();
+
+ //set the tosca definition which is the same for everything
+ this.setTosca_definitions_version("cloudify_dsl_1_3");
+
+ //set the imports
+ if(importPath != "") {
+ Imports imps = new Imports();
+ this.setImports(imps.createImportsFromFile(importPath));
+ }
+ else {
+ Imports imps = new Imports();
+ this.setImports(imps.createOnapImports());
+ }
+
+
+ //create the node template
+ TreeMap<String, Node> nodeTemplate = new TreeMap<String, Node>();
+ String nodeName = cs.getSelf().getName();
+
+ //create the onap node that will be used
+ OnapNode node = new OnapNode();
+ inputs = node.createOnapNode(inputs, cs);
+ nodeTemplate.put(nodeName, node);
+ this.setNode_templates(nodeTemplate);
+
+ //set the inputs
+ this.setInputs(inputs);
+
+ Blueprint bp = new Blueprint();
+ bp.setImports(this.getImports());
+ bp.setInputs(this.getInputs());
+ bp.setNode_templates(this.getNode_templates());
+ bp.setTosca_definitions_version(this.getTosca_definitions_version());
+
+ return bp;
+
+ }
+
+
+
+}
diff --git a/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/onapbp/OnapNode.java b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/onapbp/OnapNode.java
new file mode 100644
index 0000000..5131057
--- /dev/null
+++ b/blueprint-generator/src/main/java/org/onap/blueprintgenerator/models/onapbp/OnapNode.java
@@ -0,0 +1,74 @@
+/**============LICENSE_START=======================================================
+ org.onap.dcae
+ ================================================================================
+ Copyright (c) 2019 AT&T Intellectual Property. All rights reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+
+ */
+
+package org.onap.blueprintgenerator.models.onapbp;
+
+import java.util.LinkedHashMap;
+import java.util.TreeMap;
+
+import org.onap.blueprintgenerator.models.blueprint.Interfaces;
+import org.onap.blueprintgenerator.models.blueprint.Node;
+import org.onap.blueprintgenerator.models.blueprint.Properties;
+import org.onap.blueprintgenerator.models.componentspec.ComponentSpec;
+
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Getter; import lombok.Setter;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+@JsonIgnoreProperties(ignoreUnknown = true)
+@Getter @Setter
+@EqualsAndHashCode(callSuper=false)
+@NoArgsConstructor
+@JsonInclude(value=Include.NON_NULL)
+
+public class OnapNode extends Node{
+
+ private TreeMap<String, Interfaces> interfaces;
+ private Properties properties;
+
+
+ public TreeMap<String, LinkedHashMap<String, Object>> createOnapNode(TreeMap<String, LinkedHashMap<String, Object>> inps, ComponentSpec cs) {
+ TreeMap<String, LinkedHashMap<String, Object>> retInputs = new TreeMap<String, LinkedHashMap<String, Object>>();
+ retInputs = inps;
+
+ //create and set the interfaces
+ Interfaces inter = new Interfaces();
+ retInputs = inter.createOnapInterface(retInputs, cs);
+ TreeMap<String, Interfaces> interfaces = new TreeMap<String, Interfaces>();
+ interfaces.put("cloudify.interfaces.lifecycle", inter);
+ this.setInterfaces(interfaces);
+
+ //set the type
+ this.setType("dcae.nodes.ContainerizedPlatformComponent");
+
+ //set the properties
+ Properties props = new Properties();
+ retInputs = props.createOnapProperties(retInputs, cs);
+ this.setProperties(props);
+
+ return retInputs;
+ }
+}