summaryrefslogtreecommitdiffstats
path: root/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint
diff options
context:
space:
mode:
Diffstat (limited to 'mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint')
-rw-r--r--mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint/Appconfig.java22
-rw-r--r--mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint/Blueprint.java11
-rw-r--r--mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint/DmaapObj.java51
-rw-r--r--mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint/Properties.java121
-rw-r--r--mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint/StartInputs.java51
-rw-r--r--mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint/TlsInfo.java37
-rw-r--r--mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint/pgaas/PgaasNode.java35
-rw-r--r--mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint/pgaas/PgaasNodeProperties.java40
-rw-r--r--mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint/policy/PolicyNode.java34
-rw-r--r--mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint/policy/PolicyNodeProperties.java37
10 files changed, 315 insertions, 124 deletions
diff --git a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint/Appconfig.java b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint/Appconfig.java
index 6d5b7d7..04745dc 100644
--- a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint/Appconfig.java
+++ b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint/Appconfig.java
@@ -48,7 +48,8 @@ public class Appconfig {
return params;
}
- public TreeMap<String, LinkedHashMap<String, Object>> createAppconfig(TreeMap<String, LinkedHashMap<String, Object>> inps, ComponentSpec cs, String override) {
+ public TreeMap<String, LinkedHashMap<String, Object>> createAppconfig(TreeMap<String, LinkedHashMap<String, Object>> inps, ComponentSpec cs, String override,
+ boolean isDmaap) {
TreeMap<String, LinkedHashMap<String, Object>> retInputs = new TreeMap<String, LinkedHashMap<String, Object>>();
retInputs = inps;
@@ -58,26 +59,24 @@ public class Appconfig {
//set the stream publishes
TreeMap<String, DmaapObj> streamPublishes = new TreeMap<String, DmaapObj>();
- int counter = 0;
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();
- String name = "feed" + counter;
- retInputs = pub.createOnapDmaapDRObj(retInputs, config, 'p', "feed" + counter, name);
+ String name = p.getConfig_key() +"_feed";
+ retInputs = pub.createOnapDmaapDRObj(retInputs, config, 'p', name, name, isDmaap);
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();
- String name = "topic" + counter;
- retInputs = pub.createOnapDmaapMRObj(retInputs, config, 'p', "topic" + counter, name);
+ String name = p.getConfig_key() + "_topic";
+ retInputs = pub.createOnapDmaapMRObj(retInputs, config, 'p', name, name, isDmaap);
pub.setType(p.getType());
streamPublishes.put(config, pub);
}
- counter++;
}
}
@@ -90,19 +89,18 @@ public class Appconfig {
//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();
- String name = "feed" + counter;
- retInputs = sub.createOnapDmaapDRObj(retInputs, config, 'p', "feed" + counter, name);
+ String name = s.getConfig_key() + "_feed";
+ retInputs = sub.createOnapDmaapDRObj(retInputs, config, 'p', name, name, isDmaap);
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();
- String name = "topic" + counter;
- retInputs = sub.createOnapDmaapMRObj(retInputs, config, 's', "topic" + counter, name);
+ String name = s.getConfig_key() + "_topic";
+ retInputs = sub.createOnapDmaapMRObj(retInputs, config, 's', name, name, isDmaap);
sub.setType(s.getType());
streamSubscribes.put(config, sub);
}
- counter++;
}
}
diff --git a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint/Blueprint.java b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint/Blueprint.java
index 06c42c5..75c79ba 100644
--- a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint/Blueprint.java
+++ b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint/Blueprint.java
@@ -20,11 +20,7 @@
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.io.*;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.TreeMap;
@@ -50,7 +46,7 @@ import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
-
+import org.yaml.snakeyaml.Yaml;
@Getter @Setter
@@ -194,7 +190,6 @@ public class Blueprint {
System.out.println("Blueprint created");
}
-
public String blueprintToString() {
String ret = "";
@@ -206,6 +201,6 @@ public class Blueprint {
}
- return ret;
+ return Fixes.applyFixes(ret);
}
}
diff --git a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint/DmaapObj.java b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint/DmaapObj.java
index 10092c8..7d78e3d 100644
--- a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint/DmaapObj.java
+++ b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint/DmaapObj.java
@@ -23,8 +23,6 @@ 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;
@@ -32,12 +30,13 @@ import lombok.Getter; import lombok.Setter;
@JsonInclude(value=Include.NON_NULL)
@Getter @Setter
public class DmaapObj {
- private String dmaap_info;
+ private Object dmaap_info;
private String type;
private GetInput pass;
private GetInput user;
- public TreeMap<String, LinkedHashMap<String, Object>> createOnapDmaapMRObj(TreeMap<String, LinkedHashMap<String, Object>> inps, String config, char type, String n, String num) {
+ public TreeMap<String, LinkedHashMap<String, Object>> createOnapDmaapMRObj(TreeMap<String, LinkedHashMap<String, Object>> inps,
+ String config, char type, String n, String num, boolean isDmaap) {
TreeMap<String, LinkedHashMap<String, Object>> retInputs = new TreeMap<String, LinkedHashMap<String, Object>>();
LinkedHashMap<String, Object> stringType = new LinkedHashMap();
stringType.put("type", "string");
@@ -45,31 +44,41 @@ public class DmaapObj {
//set the dmaapinfo
DmaapInfo info = new DmaapInfo();
- String infoType = "<<" + n + ">>";
- this.setDmaap_info(infoType);
-
- //set username
- GetInput u = new GetInput();
- u.setGet_input(config + "_" + num +"_aaf_username");
- this.setUser(u);
- retInputs.put(config + "_" + num +"_aaf_username", stringType);
-
- //set password
- GetInput p = new GetInput();
- p.setGet_input(config + "_" + num +"_aaf_password");
- this.setPass(p);
- retInputs.put(config + "_" + num +"_aaf_password", stringType);
+ if(!isDmaap){
+ info.createOnapDmaapMRInfo(inps, config, type);
+ this.setDmaap_info(info);
+ }
+ else{
+ String infoType = "<<" + n + ">>";
+ this.setDmaap_info(infoType);
+ //set username
+ GetInput u = new GetInput();
+ u.setGet_input(config + "_" + num +"_aaf_username");
+ this.setUser(u);
+ retInputs.put(config + "_" + num +"_aaf_username", stringType);
+ //set password
+ GetInput p = new GetInput();
+ p.setGet_input(config + "_" + num +"_aaf_password");
+ this.setPass(p);
+ retInputs.put(config + "_" + num +"_aaf_password", stringType);
+ }
return retInputs;
}
- public TreeMap<String, LinkedHashMap<String, Object>> createOnapDmaapDRObj(TreeMap<String, LinkedHashMap<String, Object>> inps, String config, char type, String n, String num) {
+ public TreeMap<String, LinkedHashMap<String, Object>> createOnapDmaapDRObj(TreeMap<String, LinkedHashMap<String, Object>> inps, String config, char type, String n, String num, boolean isDmaap) {
TreeMap<String, LinkedHashMap<String, Object>> retInputs = new TreeMap<String, LinkedHashMap<String, Object>>();
retInputs = inps;
//set the dmaapinfo
DmaapInfo info = new DmaapInfo();
- String infoType = "<<" + n + ">>";
- this.setDmaap_info(infoType);
+ if(!isDmaap){
+ info.createOnapDmaapDRInfo(inps, config, type);
+ this.setDmaap_info(info);
+ }
+ else {
+ String infoType = "<<" + n + ">>";
+ this.setDmaap_info(infoType);
+ }
return retInputs;
}
}
diff --git a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint/Properties.java b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint/Properties.java
index 25c4c53..31df9c3 100644
--- a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint/Properties.java
+++ b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint/Properties.java
@@ -26,12 +26,9 @@ 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.componentspec.Publishes;
import org.onap.blueprintgenerator.models.componentspec.Subscribes;
-import org.onap.blueprintgenerator.models.componentspec.Volumes;
import org.onap.blueprintgenerator.models.dmaapbp.DmaapStreams;
-import org.onap.blueprintgenerator.models.onapbp.LogDirectory;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
@@ -54,8 +51,9 @@ public class Properties {
private GetInput feed_name;
ArrayList<DmaapStreams> streams_publishes;
ArrayList<DmaapStreams> streams_subscribes;
- private TreeMap<String, Object> tls_info;
+ private TlsInfo tls_info;
private ResourceConfig resource_config;
+ private GetInput always_pull_image;
//private boolean useExisting;
public TreeMap<String, LinkedHashMap<String, Object>> createOnapProperties(TreeMap<String, LinkedHashMap<String, Object>> inps, ComponentSpec cs, String override) {
@@ -77,18 +75,11 @@ public class Properties {
this.setLocation_id(location);
LinkedHashMap<String, Object> locMap = new LinkedHashMap();
locMap.put("type", "string");
- locMap.put("default", "central");
+ locMap.put("default", "");
+ retInputs.put("location_id", locMap);
//set the log info
- GetInput logD = new GetInput();
- logD.setGet_input("log_directory");
- TreeMap<String, Object> l = new TreeMap();
- l.put("log_directory", logD);
- this.setLog_info(l);
- LinkedHashMap<String, Object> logMap = new LinkedHashMap();
- logMap.put("type", "string");
- logMap.put("default", "''");
- retInputs.put("log_directory", logMap);
+ this.setLog_info(cs.getAuxilary().getLog_info());
//set the replicas
GetInput replica = new GetInput();
@@ -108,35 +99,29 @@ public class Properties {
//set the docker config
Auxilary aux = cs.getAuxilary();
- if(aux.getPorts() != null) {
- retInputs = aux.createPorts(retInputs);
- }
+// if(aux.getPorts() != null) {
+// retInputs = aux.createPorts(retInputs);
+// }
this.setDocker_config(aux);
//set the app config
Appconfig app = new Appconfig();
- retInputs = app.createAppconfig(retInputs, cs, override);
+ retInputs = app.createAppconfig(retInputs, cs, override, false);
this.setApplication_config(app);
- //set the tls info
- GetInput tls = new GetInput();
- tls.setGet_input("use_tls");
- GetInput cert = new GetInput();
- cert.setGet_input("cert_directory");
- TreeMap<String, Object> tlsInfo = new TreeMap();
- tlsInfo.put("cert_directory", cert);
- tlsInfo.put("use_tls", tls);
- this.setTls_info(tlsInfo);
-
- LinkedHashMap<String, Object> certMap = new LinkedHashMap();
- certMap.put("type", "string");
- certMap.put("default", "''");
- retInputs.put("cert_directory", certMap);
+ // set always_pull_image
+ this.always_pull_image = new GetInput();
+ this.always_pull_image.setGet_input("always_pull_image");
+ LinkedHashMap<String, Object> inputAlwaysPullImage = new LinkedHashMap<String, Object>();
+ inputAlwaysPullImage.put("type", "boolean");
+ inputAlwaysPullImage.put("description", "Set to true if the image should always be pulled");
+ inputAlwaysPullImage.put("default", true);
+ retInputs.put("always_pull_image", inputAlwaysPullImage);
- LinkedHashMap<String, Object> useMap = new LinkedHashMap();
- useMap.put("type", "boolean");
- useMap.put("default", false);
- retInputs.put("use_tls", useMap);
+ //set the tls info
+ if(cs.getAuxilary().getTls_info() != null){
+ addTlsInfo(cs,retInputs);
+ }
//set the reource config
ResourceConfig resource = new ResourceConfig();
@@ -160,15 +145,7 @@ public class Properties {
retInputs.put("tag_version", img);
//set the log info
- GetInput logD = new GetInput();
- logD.setGet_input("log_directory");
- TreeMap<String, Object> l = new TreeMap();
- l.put("log_directory", logD);
- this.setLog_info(l);
- LinkedHashMap<String, Object> logMap = new LinkedHashMap();
- logMap.put("type", "string");
- logMap.put("default", "''");
- retInputs.put("log_directory", logMap);
+ this.setLog_info(cs.getAuxilary().getLog_info());
//set service component type
String sType = cs.getSelf().getName();
@@ -176,24 +153,9 @@ public class Properties {
this.setService_component_type(sType);
//set the tls info
- GetInput tls = new GetInput();
- tls.setGet_input("use_tls");
- GetInput cert = new GetInput();
- cert.setGet_input("cert_directory");
- TreeMap<String, Object> tlsInfo = new TreeMap();
- tlsInfo.put("cert_directory", cert);
- tlsInfo.put("use_tls", tls);
- this.setTls_info(tlsInfo);
-
- LinkedHashMap<String, Object> certMap = new LinkedHashMap();
- certMap.put("type", "string");
- certMap.put("default", "''");
- retInputs.put("cert_directory", certMap);
-
- LinkedHashMap<String, Object> useMap = new LinkedHashMap();
- useMap.put("type", "boolean");
- useMap.put("default", false);
- retInputs.put("use_tls", useMap);
+ if(cs.getAuxilary().getTls_info() != null){
+ addTlsInfo(cs,retInputs);
+ }
//set the replicas
GetInput replica = new GetInput();
@@ -213,34 +175,32 @@ public class Properties {
//set the docker config
Auxilary aux = cs.getAuxilary();
- if(aux.getPorts() != null) {
- retInputs = aux.createPorts(retInputs);
- }
+// if(aux.getPorts() != null) {
+// retInputs = aux.createPorts(retInputs);
+// }
this.setDocker_config(aux);
//set the appconfig
Appconfig app = new Appconfig();
- retInputs = app.createAppconfig(retInputs, cs, override);
+ retInputs = app.createAppconfig(retInputs, cs, override, true);
this.setApplication_config(app);
//set the stream publishes
ArrayList<DmaapStreams> pubStreams = new ArrayList();
- int counter = 0;
if(cs.getStreams().getPublishes() != null) {
for(Publishes p: cs.getStreams().getPublishes()) {
if(p.getType().equals("message_router") || p.getType().equals("message router")) {
- String topic = "topic" + counter;
+ String topic = p.getConfig_key() + "_topic";
DmaapStreams mrStreams = new DmaapStreams();
retInputs = mrStreams.createStreams(inps, cs, topic, p.getType(), p.getConfig_key(), p.getRoute(), 'p');
pubStreams.add(mrStreams);
}
else if(p.getType().equals("data_router") || p.getType().equals("data router")){
- String feed = "feed" + counter;
+ String feed = p.getConfig_key() + "_feed";
DmaapStreams drStreams = new DmaapStreams();
retInputs = drStreams.createStreams(inps, cs, feed, p.getType(), p.getConfig_key(), p.getRoute(), 'p');
pubStreams.add(drStreams);
}
- counter++;
}
}
@@ -249,18 +209,17 @@ public class Properties {
if(cs.getStreams().getSubscribes() != null) {
for(Subscribes s: cs.getStreams().getSubscribes()) {
if(s.getType().equals("message_router") || s.getType().equals("message router")) {
- String topic = "topic" + counter;
+ String topic = s.getConfig_key() + "_topic";
DmaapStreams mrStreams = new DmaapStreams();
retInputs = mrStreams.createStreams(inps, cs, topic, s.getType(), s.getConfig_key(), s.getRoute(), 's');
subStreams.add(mrStreams);
}
else if(s.getType().equals("data_router") || s.getType().equals("data router")){
- String feed = "feed" + counter;
+ String feed = s.getConfig_key() + "_feed";
DmaapStreams drStreams = new DmaapStreams();
retInputs = drStreams.createStreams(inps, cs, feed, s.getType(), s.getConfig_key(), s.getRoute(), 's');
subStreams.add(drStreams);
}
- counter++;
}
}
@@ -279,4 +238,18 @@ public class Properties {
return retInputs;
}
+
+ private void addTlsInfo(ComponentSpec cs, TreeMap<String, LinkedHashMap<String, Object>> retInputs) {
+ TlsInfo tlsInfo = new TlsInfo();
+ tlsInfo.setCertDirectory((String) cs.getAuxilary().getTls_info().get("cert_directory"));
+ GetInput useTLSFlag = new GetInput();
+ useTLSFlag.setGet_input("use_tls");
+ tlsInfo.setUseTls(useTLSFlag);
+ this.setTls_info(tlsInfo);
+ LinkedHashMap<String, Object> useTlsFlagInput = new LinkedHashMap<String, Object>();
+ useTlsFlagInput.put("type", "boolean");
+ useTlsFlagInput.put("description", "flag to indicate tls enable/disable");
+ useTlsFlagInput.put("default", cs.getAuxilary().getTls_info().get("use_tls"));
+ retInputs.put("use_tls", useTlsFlagInput);
+ }
}
diff --git a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint/StartInputs.java b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint/StartInputs.java
index 1c1cf6c..f81bf9a 100644
--- a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint/StartInputs.java
+++ b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint/StartInputs.java
@@ -24,6 +24,8 @@ import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.TreeMap;
+import org.onap.blueprintgenerator.core.PgaasNodeBuilder;
+import org.onap.blueprintgenerator.models.componentspec.Auxilary;
import org.onap.blueprintgenerator.models.componentspec.ComponentSpec;
import com.fasterxml.jackson.annotation.JsonInclude;
@@ -34,14 +36,36 @@ import lombok.Getter; import lombok.Setter;
@Getter @Setter
@JsonInclude(value=Include.NON_NULL)
public class StartInputs {
- //private ArrayList<String> ports;
- private GetInput envs;
+ private ArrayList<String> ports;
+ private Object envs;
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>();
+ TreeMap<String, LinkedHashMap<String, Object>> retInputs = inps;
+ int count = 0;
+ ArrayList<String> portList = new ArrayList();
+ Auxilary aux = cs.getAuxilary();
+
+ if (aux.getPorts() != null) {
+
+ for(Object p : aux.getPorts()) {
+ String[] ports = p.toString().split(":");
+ String internal
+ = String.format("concat: [\"%s:\", {get_input: external_port_%d}]"
+ , ports[0], count);
+ portList.add(internal);
+
+ LinkedHashMap<String, Object> portType = new LinkedHashMap();
+ portType.put("type", "string");
+ portType.put("default", ports[1]);
+ retInputs.put("external_port_" + count, portType);
+
+ count++;
+ }
+
+ }
+
+ this.setPorts(portList);
// ArrayList<String> port = new ArrayList<String>();
// String external = "";
// if(cs.getAuxilary().getPorts() != null) {
@@ -73,13 +97,22 @@ public class StartInputs {
// }
//set the envs
- GetInput env = new GetInput();
- env.setGet_input("envs");
- this.setEnvs(env);
LinkedHashMap<String, Object> eMap = new LinkedHashMap();
- eMap.put("default", "{}");
+ if(cs.getAuxilary().getDatabases() != null){
+ //set db env variables
+ LinkedHashMap<String, Object> envVars = PgaasNodeBuilder.getEnvVariables(cs.getAuxilary().getDatabases());
+ this.setEnvs(envVars);
+ eMap.put("default", "&envs {}");
+ }
+ else {
+ GetInput env = new GetInput();
+ env.setGet_input("envs");
+ this.setEnvs(env);
+ eMap.put("default", "{}");
+ }
retInputs.put("envs", eMap);
+
return retInputs;
}
}
diff --git a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint/TlsInfo.java b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint/TlsInfo.java
new file mode 100644
index 0000000..2130fe3
--- /dev/null
+++ b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint/TlsInfo.java
@@ -0,0 +1,37 @@
+/**============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 com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+
+@Getter
+@Setter
+@NoArgsConstructor
+public class TlsInfo {
+
+ @JsonProperty("cert_directory")
+ private String certDirectory;
+
+ @JsonProperty("use_tls")
+ private GetInput useTls;
+}
diff --git a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint/pgaas/PgaasNode.java b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint/pgaas/PgaasNode.java
new file mode 100644
index 0000000..35f958e
--- /dev/null
+++ b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint/pgaas/PgaasNode.java
@@ -0,0 +1,35 @@
+/**============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.pgaas;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+import org.onap.blueprintgenerator.models.blueprint.Node;
+
+@Getter
+@Setter
+@NoArgsConstructor
+public class PgaasNode extends Node {
+
+ @JsonProperty("properties")
+ private PgaasNodeProperties pgaasNodeProperties;
+}
diff --git a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint/pgaas/PgaasNodeProperties.java b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint/pgaas/PgaasNodeProperties.java
new file mode 100644
index 0000000..709c66e
--- /dev/null
+++ b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint/pgaas/PgaasNodeProperties.java
@@ -0,0 +1,40 @@
+/**============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.pgaas;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+import org.onap.blueprintgenerator.models.blueprint.GetInput;
+
+@Getter @Setter
+@NoArgsConstructor
+public class PgaasNodeProperties {
+
+ @JsonProperty("writerfqdn")
+ private GetInput writerfqdn;
+
+ @JsonProperty("name")
+ private GetInput name;
+
+ @JsonProperty("use_existing")
+ private boolean useExisting;
+}
diff --git a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint/policy/PolicyNode.java b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint/policy/PolicyNode.java
new file mode 100644
index 0000000..b4740df
--- /dev/null
+++ b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint/policy/PolicyNode.java
@@ -0,0 +1,34 @@
+/**============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.policy;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+import org.onap.blueprintgenerator.models.blueprint.Node;
+
+@Getter @Setter
+@NoArgsConstructor
+public class PolicyNode extends Node {
+
+ @JsonProperty("properties")
+ private PolicyNodeProperties policyNodeProperties;
+}
diff --git a/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint/policy/PolicyNodeProperties.java b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint/policy/PolicyNodeProperties.java
new file mode 100644
index 0000000..6d23b23
--- /dev/null
+++ b/mod/bpgenerator/src/main/java/org/onap/blueprintgenerator/models/blueprint/policy/PolicyNodeProperties.java
@@ -0,0 +1,37 @@
+/**============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.policy;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import lombok.Getter;
+import lombok.NoArgsConstructor;
+import lombok.Setter;
+import org.onap.blueprintgenerator.models.blueprint.GetInput;
+
+@Getter @Setter
+@NoArgsConstructor
+public class PolicyNodeProperties {
+
+ @JsonProperty("policy_id")
+ private GetInput policyId;
+
+ @JsonProperty("policy_model_id")
+ private String policyModelId;
+}