<modelVersion>4.0.0</modelVersion>
<artifactId>blueprint-generator-common</artifactId>
- <version>1.7.3-SNAPSHOT</version>
+ <version>1.8.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Common</name>
<parent>
<groupId>org.onap.dcaegen2.platform.mod</groupId>
<artifactId>blueprint-generator</artifactId>
- <version>1.7.3-SNAPSHOT</version>
+ <version>1.8.0-SNAPSHOT</version>
</parent>
public class Constants {
- public static final String _TOPIC = "_topic";
- public static final String _FEED = "_feed";
+ private Constants(){}
+
+ public static final String A_TOPIC = "_topic";
+ public static final String A_FEED = "_feed";
public static final String DATAROUTER_VALUE = "data router";
public static final String DATA_ROUTER = "data_router";
public static final String MESSAGEROUTER_VALUE = "message router";
public static final String ONAP_INPUT_CPU_LIMIT = "dcae-ves-collector_cpu_limit";
public static final String ONAP_NODETEMPLATES = "dcae-ves-collector";
public static final String ONAP_NODETEMPLATES_TYPE = "dcae.nodes.ContainerizedServiceComponent";
- public static final String ONAP_DEFAULT250m = "\"250m\"";
+ public static final String ONAP_DEFAULT250M = "\"250m\"";
public static final String ONAP_SERVICE_COMPONENTNAME_OVERRIDE_DEFAULT = "\"\"";
public static final String DMAAP_NODETEMPLATES_TYPE =
"dcae.nodes.ContainerizedServiceComponentUsingDmaap";
* * org.onap.dcae
* * ================================================================================
* * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved.
+ * * Copyright (c) 2021 Nokia. 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.
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;
-import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
private List<String> imports;
- private Map<String, LinkedHashMap<String, Object>> inputs;
+ private Map<String, Map<String, Object>> inputs;
}
* * org.onap.dcae
* * ================================================================================
* * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved.
+ * * Copyright (c) 2021 Nokia. 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.
@NoArgsConstructor
public class GetInput {
- // private Object get_input;
-
@JsonProperty("get_input")
private Object bpInputName;
}
* * org.onap.dcae
* * ================================================================================
* * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved.
+ * * Copyright (c) 2021 Nokia. 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.
@JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
private Map<String, String> databases;
- /* @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
- private Affinity affinity;*/
-
@JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
private Object hpa_config;
}
import org.onap.blueprintgenerator.constants.Constants;
import org.springframework.stereotype.Service;
+import java.util.Map;
import java.util.LinkedHashMap;
/**
* @param defaultValue Default value of Type
* @return
*/
- public LinkedHashMap<String, Object> createInputValue(
+ public Map<String, Object> createInputValue(
String type, String description, Object defaultValue) {
LinkedHashMap<String, Object> inputMap = new LinkedHashMap<>();
inputMap.put("type", type);
* @param description Description
* @return
*/
- public LinkedHashMap<String, Object> createInputValue(String type, String description) {
+ public Map<String, Object> createInputValue(String type, String description) {
LinkedHashMap<String, Object> inputMap = new LinkedHashMap<>();
inputMap.put("type", type);
inputMap.put("description", description);
* @param defaultValue Default value of Type
* @return
*/
- public LinkedHashMap<String, Object> createInputValue(String type, Object defaultValue) {
+ public Map<String, Object> createInputValue(String type, Object defaultValue) {
LinkedHashMap<String, Object> inputMap = new LinkedHashMap<>();
inputMap.put("type", type);
inputMap.put("default", defaultValue);
* @param defaultValue Default value of Type
* @return
*/
- public LinkedHashMap<String, Object> createIntegerInput(String description,
+ public Map<String, Object> createIntegerInput(String description,
Object defaultValue) {
return createInputValue(Constants.INTEGER_TYPE, description, defaultValue);
}
* @param description Description
* @return
*/
- public LinkedHashMap<String, Object> createIntegerInput(String description) {
+ public Map<String, Object> createIntegerInput(String description) {
return createInputValue(Constants.INTEGER_TYPE, description);
}
* @param defaultValue Default value of Type
* @return
*/
- public LinkedHashMap<String, Object> createIntegerInput(Object defaultValue) {
+ public Map<String, Object> createIntegerInput(Object defaultValue) {
return createInputValue(Constants.INTEGER_TYPE, defaultValue);
}
* @param defaultValue Default value of Type
* @return
*/
- public LinkedHashMap<String, Object> createBooleanInput(String description,
+ public Map<String, Object> createBooleanInput(String description,
Object defaultValue) {
return createInputValue(Constants.BOOLEAN_TYPE, description, defaultValue);
}
* @param description Description
* @return
*/
- public LinkedHashMap<String, Object> createBooleanInput(String description) {
+ public Map<String, Object> createBooleanInput(String description) {
return createInputValue(Constants.BOOLEAN_TYPE, description);
}
* @param defaultValue Default value of Type
* @return
*/
- public LinkedHashMap<String, Object> createBooleanInput(Object defaultValue) {
+ public Map<String, Object> createBooleanInput(Object defaultValue) {
return createInputValue(Constants.BOOLEAN_TYPE, defaultValue);
}
* @param defaultValue Default value of Type
* @return
*/
- public LinkedHashMap<String, Object> createStringInput(String description,
+ public Map<String, Object> createStringInput(String description,
Object defaultValue) {
return createInputValue(Constants.STRING_TYPE, description, defaultValue);
}
- /* public LinkedHashMap<String, Object> createStringInput(String description){
- return createInputValue(Constants.STRING_TYPE, description);
- }*/
-
/**
* creates String Input value for given Default value
*
* @param defaultValue Default value of Type
* @return
*/
- public LinkedHashMap<String, Object> createStringInput(Object defaultValue) {
+ public Map<String, Object> createStringInput(Object defaultValue) {
return createInputValue(Constants.STRING_TYPE, defaultValue);
}
* @param defaultValue Default value of Type
* @return
*/
- public LinkedHashMap<String, Object> createInputByType(String inputType, Object defaultValue) {
+ public Map<String, Object> createInputByType(String inputType, Object defaultValue) {
switch (inputType) {
case "boolean":
return createBooleanInput(defaultValue);
* * org.onap.dcae
* * ================================================================================
* * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved.
+ * * Copyright (c) 2021 Nokia. 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.
package org.onap.blueprintgenerator.service.base;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import java.io.FileReader;
-import java.nio.file.Paths;
import org.onap.blueprintgenerator.model.base.Blueprint;
import org.onap.blueprintgenerator.model.common.Input;
import org.onap.blueprintgenerator.model.componentspec.base.ComponentSpec;
@Service
public class BlueprintService {
+ private static final String TYPE_KEY = "type";
+ private static final String DEFAULT_KEY = "default";
+ private static final Logger logger = LoggerFactory.getLogger(BlueprintService.class);
+
@Autowired
protected FixesService fixesService;
String comment = "# " + input.getComment() + '\n';
try {
- File outputFile;
String name =
StringUtils.isEmpty(bluePrintName) ? cs.getSelf().getName() : bluePrintName;
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);
+ name = name.replace(" ", "");
}
- String appVersion = "";
- try {
- MavenXpp3Reader reader = new MavenXpp3Reader();
- Model model = reader.read(new FileReader("pom.xml"));
- appVersion = "#bpgen_application_version: " + model.getVersion() + '\n';
- } catch (Exception e) {
- e.printStackTrace();
- }
+ File outputFile = createFile(outputPath, name);
+ String appVersion = readAppVersion();
String version = "#blueprint_version: " + cs.getSelf().getVersion() + '\n';
String description = "#description: " + cs.getSelf().getDescription() + '\n';
fixesService.fixOnapSingleQuotes(outputFile);
}
- // new Yaml().load(new FileInputStream(outputFile));
-
- System.out.println("Blueprint is created with valid YAML Format");
+ logger.debug("Blueprint is created with valid YAML Format");
} catch (Exception ex) {
throw new RuntimeException(
"Unable to generate YAML file from Blueprint or the generated YAML is not valid",
inputs.forEach(
(key, value) -> {
- if (value.get("type") != null) {
- if (value.get("type").equals("string")
- && value.get("default") != null
+ if (value.get(TYPE_KEY) != null) {
+ if (value.get(TYPE_KEY).equals("string")
+ && value.get(DEFAULT_KEY) != null
&& !key.contains("policies")) {
- value.replace("default", "'" + value.get("default").toString() + "'");
- } else if (value.get("type").equals("map") || value.get("type")
+ value.replace(DEFAULT_KEY, "'" + value.get(DEFAULT_KEY).toString() + "'");
+ } else if (value.get(TYPE_KEY).equals("map") || value.get(TYPE_KEY)
.equals("list")) {
// Commented the Code as we need to read the object as is for Map and List. If the
// List object is to be converted to string uncomment the below code.
String temp = inputs.get(s).get("default").toString();
inputs.get(s).replace("default", temp);
}*/
- inputs.get(key).remove("type");
+ inputs.get(key).remove(TYPE_KEY);
}
}
});
|| input.getBpType().equals("m")
|| input.getBpType().equals("k");
}
+
+ private File createFile(String outputPath, String name) {
+ File outputFile;
+ String file = name + ".yaml";
+ outputFile = new File(outputPath, file);
+ outputFile.getParentFile().mkdirs();
+ try {
+ boolean isCreated = outputFile.createNewFile();
+ if (isCreated) {
+ logger.debug("The file " + file + " was successfully created.");
+ } else {
+ logger.debug("The file " + file + " already existed.");
+ }
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+ return outputFile;
+ }
+
+ private String readAppVersion() {
+ String appVersion = "";
+ try {
+ MavenXpp3Reader reader = new MavenXpp3Reader();
+ Model model = reader.read(new FileReader("pom.xml"));
+ appVersion = "#bpgen_application_version: " + model.getVersion() + '\n';
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ return appVersion;
+ }
}
* * org.onap.dcae
* * ================================================================================
* * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved.
+ * * Copyright (c) 2021 Nokia. 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.
FileReader fr = new FileReader(file);
BufferedReader br = new BufferedReader(fr);
for (String line = br.readLine(); line != null; line = br.readLine()) {
- if (line.contains("'")) {
- line = processLine(line);
+ String newLine = line;
+ if (newLine.contains("'")) {
+ newLine = processLine(newLine);
}
- if (line.contains("get_input") || line.contains("get_secret") || line
+ if (newLine.contains("get_input") || newLine.contains("get_secret") || newLine
.contains("envs")) {
- line = line.replaceAll("'", "");
+ newLine = newLine.replace("'", "");
}
-
- lines.add(line);
+ lines.add(newLine);
}
fr.close();
* @return
*/
public String fixStringQuotes(String string) {
- String sLines[] = string.split("\n");
- String ret = "";
+ String[] sLines = string.split("\n");
+ StringBuilder ret = new StringBuilder();
for (String line : sLines) {
if (line.contains("get_input")
|| line.contains("get_secret")
|| line.contains("dmaap")
|| line.contains(".\"'"))
&& line.contains("'"))) {
- line = line.replaceAll("'", "");
+ line = line.replace("'", "");
}
if (line.contains("'")) {
line = processLine(line);
}
- ret = ret + "\n" + line;
+ ret.append("\n");
+ ret.append(line);
}
- return ret;
+ return ret.toString();
}
/**
FileReader fr = new FileReader(file);
BufferedReader br = new BufferedReader(fr);
for (String line = br.readLine(); line != null; line = br.readLine()) {
- if (line.contains("'")) {
- line = line.replace("'", "");
+ String newLine = line;
+ if (newLine.contains("'")) {
+ newLine = newLine.replace("'", "");
}
- if (line.contains("\"\"") && (line.contains("m") || line.contains("M"))) {
- line = line.replaceAll("\"\"", "\"");
+ if (newLine.contains("\"\"") && (newLine.contains("m") || newLine.contains("M"))) {
+ newLine = newLine.replace("\"\"", "\"");
}
- lines.add(line);
+ lines.add(newLine);
}
fr.close();
br.close();
}
private String processLine(String line) {
- return line.replaceAll("'\\{", "{")
- .replaceAll("}'", "}")
- .replaceAll("'\\[", "[")
- .replaceAll("]'", "]")
- .replaceAll("'''''", "'")
- .replaceAll("'''", "'")
- .replaceAll("'''", "")
- .replaceAll("''\\{", "'{")
- .replaceAll("}''", "}'")
- .replaceAll("''\\[", "'[")
- .replaceAll("]''", "]'")
- .replaceAll("\"''", "'")
- .replaceAll("''\"", "'");
+ return line.replace("'\\{", "{")
+ .replace("}'", "}")
+ .replace("'\\[", "[")
+ .replace("]'", "]")
+ .replace("'''''", "'")
+ .replace("'''", "'")
+ .replace("'''", "")
+ .replace("''\\{", "'{")
+ .replace("}''", "}'")
+ .replace("''\\[", "'[")
+ .replace("]''", "]'")
+ .replace("\"''", "'")
+ .replace("''\"", "'");
}
}
<parent>
<artifactId>blueprint-generator</artifactId>
<groupId>org.onap.dcaegen2.platform.mod</groupId>
- <version>1.7.3-SNAPSHOT</version>
+ <version>1.8.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<dependency>
<groupId>org.onap.dcaegen2.platform.mod</groupId>
<artifactId>blueprint-generator-common</artifactId>
- <version>1.7.3-SNAPSHOT</version>
+ <version>1.8.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.onap.dcaegen2.platform.mod</groupId>
<artifactId>blueprint-generator-onap</artifactId>
- <version>1.7.3-SNAPSHOT</version>
+ <version>1.8.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.onap.dcaegen2.platform.mod</groupId>
<artifactId>blueprint-generator-onap-executable</artifactId>
- <version>1.7.3-SNAPSHOT</version>
+ <version>1.8.0-SNAPSHOT</version>
</dependency>
</dependencies>
<parent>
<artifactId>blueprint-generator</artifactId>
<groupId>org.onap.dcaegen2.platform.mod</groupId>
- <version>1.7.3-SNAPSHOT</version>
+ <version>1.8.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>blueprint-generator-onap-executable</artifactId>
- <version>1.7.3-SNAPSHOT</version>
+ <version>1.8.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>OnapExecutable</name>
<dependency>
<groupId>org.onap.dcaegen2.platform.mod</groupId>
<artifactId>blueprint-generator-onap</artifactId>
- <version>1.7.3-SNAPSHOT</version>
+ <version>1.8.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
</dependencies>
<modelVersion>4.0.0</modelVersion>
<artifactId>blueprint-generator-onap</artifactId>
- <version>1.7.3-SNAPSHOT</version>
+ <version>1.8.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Onap</name>
<parent>
<groupId>org.onap.dcaegen2.platform.mod</groupId>
<artifactId>blueprint-generator</artifactId>
- <version>1.7.3-SNAPSHOT</version>
+ <version>1.8.0-SNAPSHOT</version>
</parent>
<dependencies>
<dependency>
<groupId>org.onap.dcaegen2.platform.mod</groupId>
<artifactId>blueprint-generator-common</artifactId>
- <version>1.7.3-SNAPSHOT</version>
+ <version>1.8.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
</dependencies>
* * org.onap.dcae
* * ================================================================================
* * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved.
+ * * Copyright (c) 2021 Nokia. 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.
* @return
*/
public Map<String, Object> createMessageRouterInfo(
- Map<String, LinkedHashMap<String, Object>> inputs, String config, char type) {
+ Map<String, Map<String, Object>> inputs, String config, char type) {
Map<String, Object> response = new HashMap<>();
Info info = new Info();
- LinkedHashMap<String, Object> stringType = new LinkedHashMap<>();
+ Map<String, Object> stringType = new LinkedHashMap<>();
stringType.put("type", "string");
config = config.replaceAll("-", "_");
* @return
*/
public Map<String, Object> createDataRouterInfo(
- Map<String, LinkedHashMap<String, Object>> inputs, String config) {
+ Map<String, Map<String, Object>> inputs, String config) {
Map<String, Object> response = new HashMap<>();
Info info = new Info();
- LinkedHashMap<String, Object> stringType = new LinkedHashMap<>();
+ Map<String, Object> stringType = new LinkedHashMap<>();
stringType.put("type", "string");
String userNameInputName = blueprintHelperService.joinUnderscore(config, "username");
* @return
*/
public Map<String, Object> createAppconfig(
- Map<String, LinkedHashMap<String, Object>> inputs,
+ Map<String, Map<String, Object>> inputs,
OnapComponentSpec onapComponentSpec,
boolean isDmaap) {
paramInput.setBpInputName(pName);
parameters.put(pName, paramInput);
if (!"".equals(p.getValue())) {
- LinkedHashMap<String, Object> pInputs = createInputFromParameter(p);
+ Map<String, Object> pInputs = createInputFromParameter(p);
inputs.put(pName, pInputs);
} else {
LinkedHashMap<String, Object> pInputs = new LinkedHashMap<>();
return response;
}
- private LinkedHashMap<String, Object> createInputFromParameter(Parameters parameter) {
+ private Map<String, Object> createInputFromParameter(Parameters parameter) {
String inputType = parameter.getType() == null ? "string" : parameter.getType();
return blueprintHelperService.createInputByType(inputType, parameter.getValue());
* * org.onap.dcae
* * ================================================================================
* * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved.
+ * * Copyright (c) 2021 Nokia. 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.
* @return
*/
public Map<String, Object> createDmaapMessageRouter(
- Map<String, LinkedHashMap<String, Object>> inputs,
+ Map<String, Map<String, Object>> inputs,
String config,
char type,
String counter,
if (!isDmaap) {
Map<String, Object> infoResponse = infoService
.createMessageRouterInfo(inputs, config, type);
- inputs = (Map<String, LinkedHashMap<String, Object>>) infoResponse.get("inputs");
+ inputs = (Map<String, Map<String, Object>>) infoResponse.get("inputs");
dmaap.setDmaap_info(infoResponse.get("info"));
} else {
String infoType = "<<" + counter + ">>";
* @return
*/
public Map<String, Object> createDmaapDataRouter(
- Map<String, LinkedHashMap<String, Object>> inputs,
+ Map<String, Map<String, Object>> inputs,
String config,
String counter,
boolean isDmaap) {
if (!isDmaap) {
Map<String, Object> infoResponse = infoService.createDataRouterInfo(inputs, config);
- inputs = (Map<String, LinkedHashMap<String, Object>>) infoResponse.get("inputs");
+ inputs = (Map<String, Map<String, Object>>) infoResponse.get("inputs");
dmaap.setDmaap_info(infoResponse.get("info"));
} else {
String infoType = "<<" + counter + ">>";
* * org.onap.dcae
* * ================================================================================
* * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved.
- * * Copyright (c) 2020 Nokia. All rights reserved.
+ * * Copyright (c) 2020-2021 Nokia. 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.
*
* @return
*/
- public Map<String, LinkedHashMap<String, Object>> createInputList() {
- Map<String, LinkedHashMap<String, Object>> retInputs = new LinkedHashMap<>();
+ public Map<String, Map<String, Object>> createInputList() {
+ Map<String, Map<String, Object>> retInputs = new LinkedHashMap<>();
- LinkedHashMap<String, Object> commonNameInputMap =
+ Map<String, Object> commonNameInputMap =
blueprintHelperService.createStringInput(
"Common name which should be present in certificate.",
Constants.DEFAULT_COMMON_NAME);
retInputs.put(addPrefix(Constants.COMMON_NAME_FIELD), commonNameInputMap);
- LinkedHashMap<String, Object> sansInputMap =
+ Map<String, Object> sansInputMap =
blueprintHelperService.createStringInput(
"\"List of Subject Alternative Names (SANs) which should be present in certificate. "
+ "Delimiter - , Should contain a common_name value and other FQDNs under which the given "
* * org.onap.dcae
* * ================================================================================
* * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved.
+ * * Copyright (c) 2021 Nokia. 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.
import org.springframework.stereotype.Service;
import java.util.HashMap;
-import java.util.LinkedHashMap;
import java.util.Map;
/**
* @param cs ComponentSpec
* @return
*/
- public Map<String, LinkedHashMap<String, Object>> createInputListFromComponentSpec(
+ public Map<String, Map<String, Object>> createInputListFromComponentSpec(
OnapComponentSpec cs) {
- Map<String, LinkedHashMap<String, Object>> retInputs = new HashMap<>();
+ Map<String, Map<String, Object>> retInputs = new HashMap<>();
Map<String, Object> externalTlsInfoCs = cs.getAuxilary().getTls_info();
- LinkedHashMap<String, Object> useTlsFlagInput =
+ Map<String, Object> useTlsFlagInput =
blueprintHelperService.createBooleanInput(
"Flag to indicate external tls enable/disable.",
externalTlsInfoCs.get(Constants.USE_EXTERNAL_TLS_FIELD));
retInputs.put(addPrefix(Constants.USE_EXTERNAL_TLS_FIELD), useTlsFlagInput);
- LinkedHashMap<String, Object> caNameInputMap =
+ Map<String, Object> caNameInputMap =
blueprintHelperService.createStringInput(
"Name of Certificate Authority configured on CertService side.",
Constants.DEFAULT_CA);
retInputs.put(addPrefix(Constants.CA_NAME_FIELD), caNameInputMap);
- LinkedHashMap<String, Object> certTypeInputMap =
+ Map<String, Object> certTypeInputMap =
blueprintHelperService.createStringInput(
"Format of provided certificates", Constants.DEFAULT_CERT_TYPE);
retInputs.put(addPrefix(Constants.CERT_TYPE_FIELD), certTypeInputMap);
* * org.onap.dcae
* * ================================================================================
* * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved.
+ * * Copyright (c) 2021 Nokia. 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.
import org.springframework.stereotype.Service;
import java.util.HashMap;
-import java.util.LinkedHashMap;
import java.util.Map;
/**
* @return
*/
public Map<String, Object> createInterface(
- Map<String, LinkedHashMap<String, Object>> inputs, OnapComponentSpec onapComponentSpec) {
+ Map<String, Map<String, Object>> inputs, OnapComponentSpec onapComponentSpec) {
Map<String, Object> response = new HashMap<>();
Interfaces interfaces = new Interfaces();
Map<String, Object> startResponse = startService.createStart(inputs, onapComponentSpec);
- inputs = (Map<String, LinkedHashMap<String, Object>>) startResponse.get("inputs");
+ inputs = (Map<String, Map<String, Object>>) startResponse.get("inputs");
interfaces.setStart((Start) startResponse.get("start"));
* * org.onap.dcae
* * ================================================================================
* * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved.
+ * * Copyright (c) 2021 Nokia. 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.
* @return
*/
public Map<String, Object> createOnapNode(
- Map<String, LinkedHashMap<String, Object>> inputs,
+ Map<String, Map<String, Object>> inputs,
OnapComponentSpec onapComponentSpec,
String override) {
Map<String, Object> onapResponse = interfacesService
.createInterface(inputs, onapComponentSpec);
- inputs = (Map<String, LinkedHashMap<String, Object>>) onapResponse.get("inputs");
+ inputs = (Map<String, Map<String, Object>>) onapResponse.get("inputs");
Map<String, Interfaces> interfaces = new TreeMap<>();
interfaces.put(
Map<String, Object> propertiesResponse =
propertiesService.createOnapProperties(inputs, onapComponentSpec, override);
- inputs = (Map<String, LinkedHashMap<String, Object>>) propertiesResponse.get("inputs");
+ inputs = (Map<String, Map<String, Object>>) propertiesResponse.get("inputs");
onapNode.setProperties(
(org.onap.blueprintgenerator.model.common.Properties) propertiesResponse
.get("properties"));
*/
public Map<String, Object> createDmaapNode(
OnapComponentSpec onapComponentSpec,
- Map<String, LinkedHashMap<String, Object>> inputs,
+ Map<String, Map<String, Object>> inputs,
String override) {
Map<String, Object> response = new HashMap<>();
Map<String, Object> dmaapResponse =
interfacesService.createInterface(inputs, onapComponentSpec);
- inputs = (Map<String, LinkedHashMap<String, Object>>) dmaapResponse.get("inputs");
+ inputs = (Map<String, Map<String, Object>>) dmaapResponse.get("inputs");
Map<String, Interfaces> interfaces = new TreeMap<>();
interfaces.put(
Map<String, String> pubRelations = new LinkedHashMap();
if (blueprintHelperService.isMessageRouterType(publishes.getType())) {
pubRelations.put("type", Constants.PUBLISH_EVENTS);
- pubRelations.put("target", publishes.getConfig_key() + Constants._TOPIC);
+ pubRelations.put("target", publishes.getConfig_key() + Constants.A_TOPIC);
} else if (blueprintHelperService.isDataRouterType(publishes.getType())) {
pubRelations.put("type", Constants.PUBLISH_FILES);
- pubRelations.put("target", publishes.getConfig_key() + Constants._FEED);
+ pubRelations.put("target", publishes.getConfig_key() + Constants.A_FEED);
}
relationships.add(pubRelations);
}
Map<String, String> subRelations = new LinkedHashMap();
if (blueprintHelperService.isMessageRouterType(subscribes.getType())) {
subRelations.put("type", Constants.SUBSCRIBE_TO_EVENTS);
- subRelations.put("target", subscribes.getConfig_key() + Constants._TOPIC);
+ subRelations.put("target", subscribes.getConfig_key() + Constants.A_TOPIC);
} else if (blueprintHelperService.isDataRouterType(subscribes.getType())) {
subRelations.put("type", Constants.SUBSCRIBE_TO_FILES);
- subRelations.put("target", subscribes.getConfig_key() + Constants._FEED);
+ subRelations.put("target", subscribes.getConfig_key() + Constants.A_FEED);
}
relationships.add(subRelations);
}
Map<String, Object> propertiesResponse =
propertiesService.createDmaapProperties(inputs, onapComponentSpec, override);
- inputs = (Map<String, LinkedHashMap<String, Object>>) propertiesResponse.get("inputs");
+ inputs = (Map<String, Map<String, Object>>) propertiesResponse.get("inputs");
dmaapNode.setProperties(
(org.onap.blueprintgenerator.model.common.Properties) propertiesResponse
.get("properties"));
* @return
*/
public Map<String, Object> createFeedNode(
- Map<String, LinkedHashMap<String, Object>> inputs, String name) {
+ Map<String, Map<String, Object>> inputs, String name) {
Map<String, Object> response = new HashMap<>();
Node feedNode = new Node();
- LinkedHashMap<String, Object> stringType = new LinkedHashMap();
+ Map<String, Object> stringType = new LinkedHashMap();
stringType.put("type", "string");
feedNode.setType(Constants.FEED);
* @return
*/
public Map<String, Object> createTopicNode(
- Map<String, LinkedHashMap<String, Object>> inputs, String name) {
+ Map<String, Map<String, Object>> inputs, String name) {
Map<String, Object> response = new HashMap<>();
Node topicNode = new Node();
- LinkedHashMap<String, Object> stringType = new LinkedHashMap();
+ Map<String, Object> stringType = new LinkedHashMap();
stringType.put("type", "string");
topicNode.setType(Constants.TOPIC);
* * org.onap.dcae
* * ================================================================================
* * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved.
+ * * Copyright (c) 2021 Nokia. 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.
public void addPgaasNodesAndInputs(
OnapComponentSpec onapComponentSpec,
Map<String, Node> nodeTemplate,
- Map<String, LinkedHashMap<String, Object>> inputs) {
+ Map<String, Map<String, Object>> inputs) {
Map<String, String> databases = onapComponentSpec.getAuxilary().getDatabases();
if (databases != null) {
for (Map.Entry<String, String> database : databases.entrySet()) {
}
private void addPgaasInputs(
- Map.Entry<String, String> database, Map<String, LinkedHashMap<String, Object>> inputs) {
+ Map.Entry<String, String> database, Map<String, Map<String, Object>> inputs) {
inputs.put(
database.getKey() + Constants.NAME_POSTFIX,
blueprintHelperService.createStringInput("db name", ""));
* * org.onap.dcae
* * ================================================================================
* * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved.
+ * * Copyright (c) 2021 Nokia. 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.
public void addPolicyNodesAndInputs(
OnapComponentSpec onapComponentSpec,
Map<String, Node> nodeTemplate,
- Map<String, LinkedHashMap<String, Object>> inputs) {
+ Map<String, Map<String, Object>> inputs) {
List<TypePolicy> policyList = onapComponentSpec.getPolicyInfo().getTypePolicyList();
for (TypePolicy policy : policyList) {
addPolicyNodesToNodeTemplate(policy, nodeTemplate);
}
private void addPolicyInputs(
- TypePolicy policy, Map<String, LinkedHashMap<String, Object>> inputs) {
+ TypePolicy policy, Map<String, Map<String, Object>> inputs) {
String defaultValue = policy.getPolicy_id();
defaultValue = defaultValue != null ? defaultValue : "";
inputs.put(
* @return
*/
public Map<String, Object> createOnapProperties(
- Map<String, LinkedHashMap<String, Object>> inputs,
+ Map<String, Map<String, Object>> inputs,
OnapComponentSpec onapComponentSpec,
String override) {
Map<String, Object> response = new HashMap<>();
replica.setBpInputName("replicas");
properties.setReplicas(replica);
- LinkedHashMap<String, Object> replicas =
+ Map<String, Object> replicas =
blueprintHelperService.createIntegerInput("number of instances", 1);
inputs.put("replicas", replicas);
Map<String, Object> appConfigResponse =
appConfigService.createAppconfig(inputs, onapComponentSpec, false);
- inputs = (Map<String, LinkedHashMap<String, Object>>) appConfigResponse.get("inputs");
+ inputs = (Map<String, Map<String, Object>>) appConfigResponse.get("inputs");
properties.setApplication_config((Appconfig) appConfigResponse.get("appconfig"));
GetInput always_pull_image = new GetInput();
properties.setAlways_pull_image(always_pull_image);
- LinkedHashMap<String, Object> inputAlwaysPullImage =
+ Map<String, Object> inputAlwaysPullImage =
blueprintHelperService.createBooleanInput(
"Set to true if the image should always be pulled", true);
inputs.put("always_pull_image", inputAlwaysPullImage);
Map<String, Object> resourceConfigResponse =
resourceConfigService
.createResourceConfig(inputs, onapComponentSpec.getSelf().getName());
- inputs = (Map<String, LinkedHashMap<String, Object>>) resourceConfigResponse.get("inputs");
+ inputs = (Map<String, Map<String, Object>>) resourceConfigResponse.get("inputs");
properties
.setResource_config((ResourceConfig) resourceConfigResponse.get("resourceConfig"));
* @return
*/
public Map<String, Object> createDmaapProperties(
- Map<String, LinkedHashMap<String, Object>> inputs,
+ Map<String, Map<String, Object>> inputs,
OnapComponentSpec onapComponentSpec,
String override) {
Map<String, Object> response = new HashMap<>();
image.setBpInputName("tag_version");
properties.setImage(image);
- LinkedHashMap<String, Object> img = new LinkedHashMap<>();
+ Map<String, Object> img = new LinkedHashMap<>();
inputs.put(
"tag_version",
blueprintHelperService.createStringInput(onapComponentSpec.getArtifacts()[0].getUri()));
location.setBpInputName("location_id");
properties.setLocation_id(location);
- LinkedHashMap<String, Object> locMap = new LinkedHashMap();
+ Map<String, Object> locMap = new LinkedHashMap();
inputs.put("location_id", blueprintHelperService.createStringInput(Constants.EMPTY_VALUE));
properties.setLog_info(onapComponentSpec.getAuxilary().getLog_info());
replica.setBpInputName("replicas");
properties.setReplicas(replica);
- LinkedHashMap<String, Object> rep =
+ Map<String, Object> rep =
blueprintHelperService.createIntegerInput("number of instances", 1);
inputs.put("replicas", rep);
Map<String, Object> appConfigResponse =
appConfigService.createAppconfig(inputs, onapComponentSpec, true);
- inputs = (Map<String, LinkedHashMap<String, Object>>) appConfigResponse.get("inputs");
+ inputs = (Map<String, Map<String, Object>>) appConfigResponse.get("inputs");
properties.setApplication_config((Appconfig) appConfigResponse.get("appconfig"));
List<Streams> pubStreams = new ArrayList();
if (onapComponentSpec.getStreams().getPublishes() != null) {
for (Publishes publishes : onapComponentSpec.getStreams().getPublishes()) {
if (blueprintHelperService.isMessageRouterType(publishes.getType())) {
- String topic = publishes.getConfig_key() + Constants._TOPIC;
+ String topic = publishes.getConfig_key() + Constants.A_TOPIC;
Map<String, Object> streamsMessageRouterResponse =
streamsService.createStreams(
inputs,
publishes.getRoute(),
'p');
inputs =
- (Map<String, LinkedHashMap<String, Object>>)
+ (Map<String, Map<String, Object>>)
streamsMessageRouterResponse.get("inputs");
pubStreams.add((Streams) streamsMessageRouterResponse.get("streams"));
} else if (blueprintHelperService.isDataRouterType(publishes.getType())) {
- String feed = publishes.getConfig_key() + Constants._FEED;
+ String feed = publishes.getConfig_key() + Constants.A_FEED;
Map<String, Object> streamsDataRouterResponse =
streamsService.createStreams(
inputs,
publishes.getRoute(),
'p');
inputs =
- (Map<String, LinkedHashMap<String, Object>>)
+ (Map<String, Map<String, Object>>)
streamsDataRouterResponse.get("inputs");
pubStreams.add((Streams) streamsDataRouterResponse.get("streams"));
}
if (onapComponentSpec.getStreams().getSubscribes() != null) {
for (Subscribes subscribes : onapComponentSpec.getStreams().getSubscribes()) {
if (blueprintHelperService.isMessageRouterType(subscribes.getType())) {
- String topic = subscribes.getConfig_key() + Constants._TOPIC;
+ String topic = subscribes.getConfig_key() + Constants.A_TOPIC;
Map<String, Object> streamsMessageRouterResponse =
streamsService.createStreams(
inputs,
subscribes.getRoute(),
's');
inputs =
- (Map<String, LinkedHashMap<String, Object>>)
+ (Map<String, Map<String, Object>>)
streamsMessageRouterResponse.get("inputs");
subStreams.add((Streams) streamsMessageRouterResponse.get("streams"));
} else if (blueprintHelperService.isDataRouterType(subscribes.getType())) {
- String feed = subscribes.getConfig_key() + Constants._FEED;
+ String feed = subscribes.getConfig_key() + Constants.A_FEED;
Map<String, Object> streamsDataRouterResponse =
streamsService.createStreams(
inputs,
subscribes.getRoute(),
's');
inputs =
- (Map<String, LinkedHashMap<String, Object>>)
+ (Map<String, Map<String, Object>>)
streamsDataRouterResponse.get("inputs");
subStreams.add((Streams) streamsDataRouterResponse.get("streams"));
}
Map<String, Object> resourceConfigResponse =
resourceConfigService
.createResourceConfig(inputs, onapComponentSpec.getSelf().getName());
- inputs = (Map<String, LinkedHashMap<String, Object>>) resourceConfigResponse.get("inputs");
+ inputs = (Map<String, Map<String, Object>>) resourceConfigResponse.get("inputs");
properties
.setResource_config((ResourceConfig) resourceConfigResponse.get("resourceConfig"));
return response;
}
- private LinkedHashMap<String, Object> addServiceComponentNameOverride(String override, Properties properties) {
+ private Map<String, Object> addServiceComponentNameOverride(String override, Properties properties) {
GetInput overrideGetInput = new GetInput();
overrideGetInput.setBpInputName(Constants.SERVICE_COMPONENT_NAME_OVERRIDE);
properties.setService_component_name_override(overrideGetInput);
private void addTlsInfo(
OnapComponentSpec onapComponentSpec,
- Map<String, LinkedHashMap<String, Object>> inputs,
+ Map<String, Map<String, Object>> inputs,
Properties properties) {
TlsInfo tlsInfo = new TlsInfo();
tlsInfo.setCertDirectory(
useTLSFlag.setBpInputName("use_tls");
tlsInfo.setUseTls(useTLSFlag);
properties.setTls_info(tlsInfo);
- LinkedHashMap<String, Object> useTlsFlagInput =
+ Map<String, Object> useTlsFlagInput =
blueprintHelperService.createBooleanInput(
"flag to indicate tls enable/disable",
onapComponentSpec.getAuxilary().getTls_info().get("use_tls"));
inputs.put("use_tls", useTlsFlagInput);
}
- private Map<String, LinkedHashMap<String, Object>> addExternalTlsInfo(
+ private Map<String, Map<String, Object>> addExternalTlsInfo(
OnapComponentSpec onapComponentSpec, Properties properties) {
properties.setExternal_cert(
externalTlsInfoFactoryService.createFromComponentSpec(onapComponentSpec));
* * org.onap.dcae
* * ================================================================================
* * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved.
+ * * Copyright (c) 2021 Nokia. 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.
package org.onap.blueprintgenerator.service.common;
+import java.util.Map;
import org.onap.blueprintgenerator.model.common.OnapBlueprint;
import org.springframework.stereotype.Service;
-import java.util.LinkedHashMap;
-
/**
* @author : Ravi Mantena
* @date 10/16/2020 Application: ONAP - Blueprint Generator Common ONAP Service to set Quotations of
*/
public OnapBlueprint setQuotations(OnapBlueprint bp) {
for (String s : bp.getInputs().keySet()) {
- LinkedHashMap<String, Object> temp = bp.getInputs().get(s);
+ Map<String, Object> temp = bp.getInputs().get(s);
if (temp.get("type") == "string") {
String def = (String) temp.get("default");
if (def != null) {
import org.springframework.stereotype.Service;
import java.util.HashMap;
-import java.util.LinkedHashMap;
import java.util.Map;
import java.util.TreeMap;
* @return
*/
public Map<String, Object> createResourceConfig(
- Map<String, LinkedHashMap<String, Object>> inputs, String name) {
+ Map<String, Map<String, Object>> inputs, String name) {
Map<String, Object> response = new HashMap<>();
ResourceConfig resourceConfig = new ResourceConfig();
- LinkedHashMap<String, Object> memoryLimit =
+ Map<String, Object> memoryLimit =
blueprintHelperService.createStringInput(defaultMemoryLimit);
- LinkedHashMap<String, Object> cpuLimit =
+ Map<String, Object> cpuLimit =
blueprintHelperService.createStringInput(defaultCpuLimit);
name = blueprintHelperService.getNamePrefix(name);
* * org.onap.dcae
* * ================================================================================
* * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved.
+ * * Copyright (c) 2021 Nokia. 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.
* @return
*/
public Map<String, Object> createStartInputs(
- Map<String, LinkedHashMap<String, Object>> inputs, OnapComponentSpec onapComponentSpec) {
+ Map<String, Map<String, Object>> inputs, OnapComponentSpec onapComponentSpec) {
Map<String, Object> response = new HashMap<>();
StartInputs startInputs = new StartInputs();
String.format("concat: [\"%s:\", {get_input: external_port_%d}]", ports[0],
count));
- LinkedHashMap<String, Object> portType = new LinkedHashMap();
+ Map<String, Object> portType = new LinkedHashMap();
portType.put("type", "string");
portType.put("default", ports[1]);
inputs.put("external_port_" + count, portType);
startInputs.setPorts(portList);
- LinkedHashMap<String, Object> envMap = new LinkedHashMap();
+ Map<String, Object> envMap = new LinkedHashMap();
if (onapComponentSpec.getAuxilary().getDatabases() != null) {
Map<String, Object> envVars =
pgaasNodeService.getEnvVariables(onapComponentSpec.getAuxilary().getDatabases());
* * org.onap.dcae
* * ================================================================================
* * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved.
+ * * Copyright (c) 2021 Nokia. 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.
import org.springframework.stereotype.Service;
import java.util.HashMap;
-import java.util.LinkedHashMap;
import java.util.Map;
/**
* @return
*/
public Map<String, Object> createStart(
- Map<String, LinkedHashMap<String, Object>> inputs, OnapComponentSpec onapComponentSpec) {
+ Map<String, Map<String, Object>> inputs, OnapComponentSpec onapComponentSpec) {
Map<String, Object> response = new HashMap<>();
Start start = new Start();
Map<String, Object> startInputsResponse =
startInputsService.createStartInputs(inputs, onapComponentSpec);
- inputs = (Map<String, LinkedHashMap<String, Object>>) startInputsResponse.get("inputs");
+ inputs = (Map<String,Map<String, Object>>) startInputsResponse.get("inputs");
start.setInputs((StartInputs) startInputsResponse.get("startInputs"));
response.put("start", start);
OnapComponentSpec onapComponentSpec,
BlueprintHelperService blueprintHelperService,
DmaapService dmaapService,
- Map<String, LinkedHashMap<String, Object>> inputs,
+ Map<String, Map<String, Object>> inputs,
boolean isDmaap) {
Map<String, BaseStream> streamPublishes = new TreeMap<>();
for (Publishes publishes : onapComponentSpec.getStreams().getPublishes()) {
if (blueprintHelperService.isDataRouterType(publishes.getType())) {
String config = publishes.getConfig_key();
- String name = config + Constants._FEED;
+ String name = config + Constants.A_FEED;
Map<String, Object> dmaapDataRouterResponse =
dmaapService.createDmaapDataRouter(inputs, config, name, isDmaap);
inputs =
- (Map<String, LinkedHashMap<String, Object>>) dmaapDataRouterResponse
+ (Map<String, Map<String, Object>>) dmaapDataRouterResponse
.get("inputs");
Dmaap dmaap = (Dmaap) dmaapDataRouterResponse.get("dmaap");
dmaap.setType(publishes.getType());
streamPublishes.put(config, dmaap);
} else if (blueprintHelperService.isMessageRouterType(publishes.getType())) {
String config = publishes.getConfig_key();
- String name = config + Constants._TOPIC;
+ String name = config + Constants.A_TOPIC;
Map<String, Object> dmaapDataRouterResponse =
dmaapService
.createDmaapMessageRouter(inputs, config, 'p', name, name, isDmaap);
inputs =
- (Map<String, LinkedHashMap<String, Object>>) dmaapDataRouterResponse
+ (Map<String, Map<String, Object>>) dmaapDataRouterResponse
.get("inputs");
Dmaap dmaap = (Dmaap) dmaapDataRouterResponse.get("dmaap");
dmaap.setType(publishes.getType());
OnapComponentSpec onapComponentSpec,
BlueprintHelperService blueprintHelperService,
DmaapService dmaapService,
- Map<String, LinkedHashMap<String, Object>> inputs,
+ Map<String, Map<String, Object>> inputs,
boolean isDmaap) {
Map<String, BaseStream> streamSubscribes = new TreeMap<>();
for (Subscribes subscribes : onapComponentSpec.getStreams().getSubscribes()) {
if (blueprintHelperService.isDataRouterType(subscribes.getType())) {
String config = subscribes.getConfig_key();
- String name = config + Constants._FEED;
+ String name = config + Constants.A_FEED;
Map<String, Object> dmaapDataRouterResponse =
dmaapService.createDmaapDataRouter(inputs, config, name, isDmaap);
inputs =
- (Map<String, LinkedHashMap<String, Object>>) dmaapDataRouterResponse
+ (Map<String, Map<String, Object>>) dmaapDataRouterResponse
.get("inputs");
Dmaap dmaap = (Dmaap) dmaapDataRouterResponse.get("dmaap");
dmaap.setType(subscribes.getType());
streamSubscribes.put(config, dmaap);
} else if (blueprintHelperService.isMessageRouterType(subscribes.getType())) {
String config = subscribes.getConfig_key();
- String name = config + Constants._TOPIC;
+ String name = config + Constants.A_TOPIC;
Map<String, Object> dmaapDataRouterResponse =
dmaapService
.createDmaapMessageRouter(inputs, config, 's', name, name, isDmaap);
inputs =
- (Map<String, LinkedHashMap<String, Object>>) dmaapDataRouterResponse
+ (Map<String, Map<String, Object>>) dmaapDataRouterResponse
.get("inputs");
Dmaap dmaap = (Dmaap) dmaapDataRouterResponse.get("dmaap");
dmaap.setType(subscribes.getType());
* @param streamName Stream name
* @return
*/
- public Map<String, LinkedHashMap<String, Object>> createStreamPublishInputs(String streamName) {
+ public Map<String, Map<String, Object>> createStreamPublishInputs(String streamName) {
return createStreamInputs(streamName + PUBLISH_URL_SUFFIX);
}
* @param streamName Stream name
* @return
*/
- public Map<String, LinkedHashMap<String, Object>> createStreamSubscribeInputs(String streamName) {
+ public Map<String, Map<String, Object>> createStreamSubscribeInputs(String streamName) {
return createStreamInputs(streamName + SUBSCRIBE_URL_SUFFIX);
}
*/
public Map<String, KafkaStream> createAppPropertiesPublish(String streamName) {
- LinkedHashMap<String, KafkaStream> kafkaStreamMap = new LinkedHashMap<>();
+ Map<String, KafkaStream> kafkaStreamMap = new LinkedHashMap<>();
KafkaStream kafkaStream = createAppProperties(streamName, PUBLISH_URL_SUFFIX);
kafkaStreamMap.put(streamName, kafkaStream);
*/
public Map<String, KafkaStream> createAppPropertiesSubscribe(String streamName) {
- LinkedHashMap<String, KafkaStream> kafkaStreamMap = new LinkedHashMap<>();
+ Map<String, KafkaStream> kafkaStreamMap = new LinkedHashMap<>();
KafkaStream kafkaStream = createAppProperties(streamName, SUBSCRIBE_URL_SUFFIX);
kafkaStreamMap.put(streamName, kafkaStream);
return new KafkaStream(topicName);
}
- private Map<String, LinkedHashMap<String, Object>> createStreamInputs(String streamName) {
- LinkedHashMap<String, LinkedHashMap<String, Object>> streamInputs = createBaseInputs();
- LinkedHashMap<String, Object> stream =
+ private Map<String, Map<String, Object>> createStreamInputs(String streamName) {
+ Map<String, Map<String, Object>> streamInputs = createBaseInputs();
+ Map<String, Object> stream =
blueprintHelperService.createStringInput(DEFAULT_STREAM_URL);
streamInputs.put(streamName, stream);
return streamInputs;
}
- private LinkedHashMap<String, LinkedHashMap<String, Object>> createBaseInputs() {
- LinkedHashMap<String, LinkedHashMap<String, Object>> baseInputs = new LinkedHashMap<>();
+ private Map<String, Map<String, Object>> createBaseInputs() {
+ Map<String, Map<String, Object>> baseInputs = new LinkedHashMap<>();
- LinkedHashMap<String, Object> kafka_message_router = blueprintHelperService
+ Map<String, Object> kafka_message_router = blueprintHelperService
.createStringInput(DEFAULT_BOOTSTRAP_SERVER);
baseInputs.put(KAFKA_INFO_BOOTSTRAP_SERVERS_INPUT_NAME, kafka_message_router);
- LinkedHashMap<String, Object> kafka_username = blueprintHelperService.createStringInput(DEFAULT_AAF_USER);
+ Map<String, Object> kafka_username = blueprintHelperService.createStringInput(DEFAULT_AAF_USER);
baseInputs.put(AFF_KAFKA_USER_INPUT_NAME, kafka_username);
- LinkedHashMap<String, Object> kafka_password = blueprintHelperService.createStringInput(DEFAULT_AAF_PASSWORD);
+ Map<String, Object> kafka_password = blueprintHelperService.createStringInput(DEFAULT_AAF_PASSWORD);
baseInputs.put(AAF_KAFKA_PASSWORD_INPUT_NAME, kafka_password);
return baseInputs;
* * org.onap.dcae
* * ================================================================================
* * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved.
- * * Copyright (c) 2020 Nokia. All rights reserved.
+ * * Copyright (c) 2020-2021 Nokia. 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.
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;
-import java.util.LinkedHashMap;
import java.util.Map;
import java.util.TreeMap;
blueprint.setTosca_definitions_version(Constants.TOSCA_DEF_VERSION);
blueprint.setDescription(onapComponentSpec.getSelf().getDescription());
- Map<String, LinkedHashMap<String, Object>> inputs = new TreeMap<>();
+ Map<String, Map<String, Object>> inputs = new TreeMap<>();
- // if (!"".equals(input.getImportPath()))
if (!StringUtils.isEmpty(input.getImportPath())) {
blueprint.setImports(importsService.createImportsFromFile(input.getImportPath()));
} else {
Map<String, Object> dmaapNodeResponse =
nodeService
.createDmaapNode(onapComponentSpec, inputs, input.getServiceNameOverride());
- inputs = (Map<String, LinkedHashMap<String, Object>>) dmaapNodeResponse.get("inputs");
+ inputs = (Map<String, Map<String, Object>>) dmaapNodeResponse.get("inputs");
nodeTemplate.put(
onapComponentSpec.getSelf().getName(), (Node) dmaapNodeResponse.get("dmaapNode"));
if (onapComponentSpec.getStreams().getPublishes() != null) {
for (Publishes publishes : onapComponentSpec.getStreams().getPublishes()) {
if (blueprintHelperService.isMessageRouterType(publishes.getType())) {
- String topic = publishes.getConfig_key() + Constants._TOPIC;
+ String topic = publishes.getConfig_key() + Constants.A_TOPIC;
Map<String, Object> topicNodeResponse = nodeService
.createTopicNode(inputs, topic);
- inputs = (Map<String, LinkedHashMap<String, Object>>) topicNodeResponse
+ inputs = (Map<String, Map<String, Object>>) topicNodeResponse
.get("inputs");
nodeTemplate.put(topic, (Node) topicNodeResponse.get("topicNode"));
} else if (blueprintHelperService.isDataRouterType(publishes.getType())) {
- String feed = publishes.getConfig_key() + Constants._FEED;
+ String feed = publishes.getConfig_key() + Constants.A_FEED;
Map<String, Object> feedNodeResponse = nodeService
.createFeedNode(inputs, feed);
- inputs = (Map<String, LinkedHashMap<String, Object>>) feedNodeResponse
+ inputs = (Map<String, Map<String, Object>>) feedNodeResponse
.get("inputs");
nodeTemplate.put(feed, (Node) feedNodeResponse.get("feedNode"));
}
if (onapComponentSpec.getStreams().getSubscribes() != null) {
for (Subscribes s : onapComponentSpec.getStreams().getSubscribes()) {
if (blueprintHelperService.isMessageRouterType(s.getType())) {
- String topic = s.getConfig_key() + Constants._TOPIC;
+ String topic = s.getConfig_key() + Constants.A_TOPIC;
Map<String, Object> topicNodeResponse = nodeService
.createTopicNode(inputs, topic);
- inputs = (Map<String, LinkedHashMap<String, Object>>) topicNodeResponse
+ inputs = (Map<String, Map<String, Object>>) topicNodeResponse
.get("inputs");
nodeTemplate.put(topic, (Node) topicNodeResponse.get("topicNode"));
} else if (blueprintHelperService.isDataRouterType(s.getType())) {
- String feed = s.getConfig_key() + Constants._FEED;
+ String feed = s.getConfig_key() + Constants.A_FEED;
Map<String, Object> feedNodeResponse = nodeService
.createFeedNode(inputs, feed);
- inputs = (Map<String, LinkedHashMap<String, Object>>) feedNodeResponse
+ inputs = (Map<String, Map<String, Object>>) feedNodeResponse
.get("inputs");
nodeTemplate.put(feed, (Node) feedNodeResponse.get("feedNode"));
}
* * org.onap.dcae
* * ================================================================================
* * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved.
+ * * Copyright (c) 2021 Nokia. 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.
* @return
*/
public Map<String, Object> createStreams(
- Map<String, LinkedHashMap<String, Object>> inputs,
+ Map<String, Map<String, Object>> inputs,
String name,
String type,
String key,
Map<String, Object> response = new HashMap<>();
Streams streams = new Streams();
- LinkedHashMap<String, Object> stringType = new LinkedHashMap();
+ Map<String, Object> stringType = new LinkedHashMap();
stringType.put("type", "string");
streams.setName(name);
* * org.onap.dcae
* * ================================================================================
* * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved.
- * * Copyright (c) 2020 Nokia. All rights reserved.
+ * * Copyright (c) 2020-2021 Nokia. 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.
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;
-import java.util.LinkedHashMap;
import java.util.Map;
import java.util.TreeMap;
OnapBlueprint blueprint = new OnapBlueprint();
blueprint.setTosca_definitions_version(Constants.TOSCA_DEF_VERSION);
- // if (!"".equals(input.getImportPath()))
if (!StringUtils.isEmpty(input.getImportPath())) {
blueprint.setImports(importsService.createImportsFromFile(input.getImportPath()));
} else {
Map<String, Node> nodeTemplate = new TreeMap<>();
String nodeName = onapComponentSpec.getSelf().getName();
- Map<String, LinkedHashMap<String, Object>> inputs = new TreeMap<>();
+ Map<String, Map<String, Object>> inputs = new TreeMap<>();
Map<String, Object> onapNodeResponse =
nodeService
.createOnapNode(inputs, onapComponentSpec, input.getServiceNameOverride());
- inputs = (Map<String, LinkedHashMap<String, Object>>) onapNodeResponse.get("inputs");
+ inputs = (Map<String, Map<String, Object>>) onapNodeResponse.get("inputs");
nodeTemplate.put(nodeName, (Node) onapNodeResponse.get("onapNode"));
blueprint.setNode_templates(nodeTemplate);
import static org.mockito.Mockito.when;
import java.util.HashMap;
-import java.util.LinkedHashMap;
import java.util.Map;
import org.junit.Before;
import org.junit.Test;
public void shouldCreateStringInputForStringParameter() {
mockParameters(PARAMETERS_TYPE_STRING, TEST_STRING_VALUE);
- Map<String, LinkedHashMap<String, Object>> inputs = new HashMap<>();
+ Map<String, Map<String, Object>> inputs = new HashMap<>();
Map<String, Object> appConfig = appConfigService.createAppconfig(inputs, componentSpec, false);
Map<String, Object> createdInputs = (Map<String, Object>) appConfig.get(INPUTS);
public void shouldCreateStringInputForUnknownParameter() {
mockParameters(UNKNOWN_TYPE, TEST_STRING_VALUE);
- Map<String, LinkedHashMap<String, Object>> inputs = new HashMap<>();
+ Map<String, Map<String, Object>> inputs = new HashMap<>();
Map<String, Object> appConfig = appConfigService.createAppconfig(inputs, componentSpec, false);
Map<String, Object> createdInputs = (Map<String, Object>) appConfig.get(INPUTS);
public void shouldCreateBooleanInputForBooleanParameter() {
mockParameters(PARAMETERS_TYPE_BOOLEAN, BOOLEAN_TEST_VALUE);
- Map<String, LinkedHashMap<String, Object>> inputs = new HashMap<>();
+ Map<String, Map<String, Object>> inputs = new HashMap<>();
Map<String, Object> appConfig = appConfigService.createAppconfig(inputs, componentSpec, false);
Map<String, Object> createdInputs = (Map<String, Object>) appConfig.get(INPUTS);
public void shouldCreateIntegerInputForIntegerParameter() {
mockParameters(PARAMETERS_TYPE_INTEGER, 123);
- Map<String, LinkedHashMap<String, Object>> inputs = new HashMap<>();
+ Map<String, Map<String, Object>> inputs = new HashMap<>();
Map<String, Object> appConfig = appConfigService.createAppconfig(inputs, componentSpec, false);
Map<String, Object> createdInputs = (Map<String, Object>) appConfig.get(INPUTS);
public void shouldCreateIntegerInputForNumberParameter() {
mockParameters(PARAMETERS_TYPE_NUMBER, 123);
- Map<String, LinkedHashMap<String, Object>> inputs = new HashMap<>();
+ Map<String, Map<String, Object>> inputs = new HashMap<>();
Map<String, Object> appConfig = appConfigService.createAppconfig(inputs, componentSpec, false);
Map<String, Object> createdInputs = (Map<String, Object>) appConfig.get(INPUTS);
OnapComponentSpec onapComponentSpec = getOnapComponentSpecWithStreamsPublishes();
Publishes publishes = onapComponentSpec.getStreams().getPublishes()[0];
when(blueprintHelperService.isMessageRouterType(eq(publishes.getType()))).thenReturn(true);
- when(streamsService.createStreams(any(), eq(publishes.getConfig_key() + Constants._TOPIC),
+ when(streamsService.createStreams(any(), eq(publishes.getConfig_key() + Constants.A_TOPIC),
eq(publishes.getType()),
eq(publishes.getConfig_key()),
eq(publishes.getRoute()),
OnapComponentSpec onapComponentSpec = getOnapComponentSpecWithStreamsPublishes();
Publishes publishes = onapComponentSpec.getStreams().getPublishes()[0];
when(blueprintHelperService.isDataRouterType(eq(publishes.getType()))).thenReturn(true);
- when(streamsService.createStreams(any(), eq(publishes.getConfig_key() + Constants._FEED),
+ when(streamsService.createStreams(any(), eq(publishes.getConfig_key() + Constants.A_FEED),
eq(publishes.getType()),
eq(publishes.getConfig_key()),
eq(publishes.getRoute()),
OnapComponentSpec onapComponentSpec = getOnapComponentSpecWithStreamsSubscribes();
Subscribes subscribes = onapComponentSpec.getStreams().getSubscribes()[0];
when(blueprintHelperService.isMessageRouterType(eq(subscribes.getType()))).thenReturn(true);
- when(streamsService.createStreams(any(), eq(subscribes.getConfig_key() + Constants._TOPIC),
+ when(streamsService.createStreams(any(), eq(subscribes.getConfig_key() + Constants.A_TOPIC),
eq(subscribes.getType()),
eq(subscribes.getConfig_key()),
eq(subscribes.getRoute()),
OnapComponentSpec onapComponentSpec = getOnapComponentSpecWithStreamsSubscribes();
Subscribes subscribes = onapComponentSpec.getStreams().getSubscribes()[0];
when(blueprintHelperService.isDataRouterType(eq(subscribes.getType()))).thenReturn(true);
- when(streamsService.createStreams(any(), eq(subscribes.getConfig_key() + Constants._FEED),
+ when(streamsService.createStreams(any(), eq(subscribes.getConfig_key() + Constants.A_FEED),
eq(subscribes.getType()),
eq(subscribes.getConfig_key()),
eq(subscribes.getRoute()),
return subscribes;
}
- private Map<String, LinkedHashMap<String, Object>> createInputs() {
- LinkedHashMap<String, Object> map = new LinkedHashMap<>();
+ private Map<String, Map<String, Object>> createInputs() {
+ Map<String, Object> map = new LinkedHashMap<>();
map.put("key-1", "obj-1");
- Map<String, LinkedHashMap<String, Object>> mapsMap = new HashMap<>();
+ Map<String, Map<String, Object>> mapsMap = new HashMap<>();
mapsMap.put("inputs", map);
return mapsMap;
}
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
-import java.util.LinkedHashMap;
import java.util.Map;
import org.junit.Test;
@Test
public void createCorrectStreamCommonInputs() {
- Map<String, LinkedHashMap<String, Object>> publishInputs = kafkaStreamService
+ Map<String, Map<String, Object>> publishInputs = kafkaStreamService
.createStreamPublishInputs("test_stream_name");
- LinkedHashMap<String, Object> kafka_bootstrap_servers = publishInputs.get("kafka_bootstrap_servers");
- LinkedHashMap<String, Object> kafka_username = publishInputs.get("kafka_username");
- LinkedHashMap<String, Object> kafka_password = publishInputs.get("kafka_password");
+ Map<String, Object> kafka_bootstrap_servers = publishInputs.get("kafka_bootstrap_servers");
+ Map<String, Object> kafka_username = publishInputs.get("kafka_username");
+ Map<String, Object> kafka_password = publishInputs.get("kafka_password");
assertNotNull(kafka_bootstrap_servers);
assertNotNull(kafka_username);
@Test
public void createCorrectStreamPublishInput() {
- Map<String, LinkedHashMap<String, Object>> publishInputs = kafkaStreamService
+ Map<String, Map<String, Object>> publishInputs = kafkaStreamService
.createStreamPublishInputs(TEST_STREAM_NAME);
- LinkedHashMap<String, Object> kafka_stream_name = publishInputs.get(TEST_STREAM_NAME + PUBLISH_URL_SUFFIX);
+ Map<String, Object> kafka_stream_name = publishInputs.get(TEST_STREAM_NAME + PUBLISH_URL_SUFFIX);
assertNotNull(kafka_stream_name);
@Test
public void createCorrectStreamSubscribeInput() {
- Map<String, LinkedHashMap<String, Object>> publishInputs = kafkaStreamService
+ Map<String, Map<String, Object>> publishInputs = kafkaStreamService
.createStreamSubscribeInputs(TEST_STREAM_NAME);
- LinkedHashMap<String, Object> kafka_stream_name = publishInputs.get(TEST_STREAM_NAME + SUBSCRIBE_URL_SUFFIX);
+ Map<String, Object> kafka_stream_name = publishInputs.get(TEST_STREAM_NAME + SUBSCRIBE_URL_SUFFIX);
assertNotNull(kafka_stream_name);
/*============LICENSE_START=======================================================
org.onap.dcae
================================================================================
-Copyright (c) 2020 Nokia Intellectual Property. All rights reserved.
+Copyright (c) 2020-2021 Nokia Intellectual Property. All rights reserved.
Copyright (c) 2020 AT&T Intellectual Property. All rights reserved.
================================================================================
Licensed under the Apache License, Version 2.0 (the "License");
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
-import java.util.LinkedHashMap;
import java.util.Map;
import static org.junit.Assert.assertEquals;
@Test
public void shouldCreateCorrectInputListWithDefaultValuesTakenFromComponentSpec() {
- Map<String, LinkedHashMap<String, Object>> result =
+ Map<String, Map<String, Object>> result =
externalCertificateParametersFactoryService.createInputList();
assertEquals(
Constants.DEFAULT_COMMON_NAME, result.get(PREFIXED_COMMON_NAME_FIELD).get(DEFAULT));
* * org.onap.dcae
* * ================================================================================
* * Copyright (c) 2020 AT&T Intellectual Property. All rights reserved.
- * * Copyright (c) 2020 Nokia. All rights reserved.
+ * * Copyright (c) 2020-2021 Nokia. 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.
import java.io.IOException;
import java.nio.file.Paths;
-import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import org.junit.Test;
"Service Name Override K8s", onapBlueprint, Constants.TOSCA_DEF_VERSION);
onapTestUtils.verifyBpImports("Service Name Override K8s", onapBlueprint, false);
- Map<String, LinkedHashMap<String, Object>> k8sBpInputs = onapBlueprint.getInputs();
+ Map<String, Map<String, Object>> k8sBpInputs = onapBlueprint.getInputs();
assertNotNull("Service Name Override K8s Blueprint Inputs Section is NULL", k8sBpInputs);
assertTrue(
"Service Name Override K8s Blueprint Inputs Section is Empty", k8sBpInputs.size() > 0);
+ Constants.ONAP_INPUT_CPU_LIMIT
+ " Default is not matching",
k8sBpInputs.get(Constants.ONAP_INPUT_CPU_LIMIT).get("default"),
- Constants.ONAP_DEFAULT250m);
+ Constants.ONAP_DEFAULT250M);
assertEquals(
"Service Name Override K8s Blueprint:Inputs "
+ Constants.SERVICE_COMPONENT_NAME_OVERRIDE
"Service Name Override K8s Blueprint Node Templates:Properties Section is NULL",
k8sBpNodeTemplateProperties);
- Map<String, LinkedHashMap<String, Object>> bpInputs = onapBlueprint.getInputs();
+ Map<String, Map<String, Object>> bpInputs = onapBlueprint.getInputs();
onapTestUtils
.verifyArtifacts("Service Name Override K8s", onapComponentSpec, bpInputs, "o");
onapTestUtils.verifyBpImportsFromFile(
"Service Name Override with Import File K8s", onapBlueprint, input.getImportPath());
- Map<String, LinkedHashMap<String, Object>> k8sBpInputs = onapBlueprint.getInputs();
+ Map<String, Map<String, Object>> k8sBpInputs = onapBlueprint.getInputs();
assertNotNull(
"Service Name Override with Import File K8s Blueprint Inputs Section is NULL",
k8sBpInputs);
+ Constants.ONAP_INPUT_CPU_LIMIT
+ " Default is not matching",
k8sBpInputs.get(Constants.ONAP_INPUT_CPU_LIMIT).get("default"),
- Constants.ONAP_DEFAULT250m);
+ Constants.ONAP_DEFAULT250M);
assertEquals(
"Service Name Override with Import File K8s Blueprint:Inputs "
+ Constants.SERVICE_COMPONENT_NAME_OVERRIDE
"Service Name Override with Import File K8s Blueprint Node Templates:Properties Section is NULL",
k8sBpNodeTemplateProperties);
- Map<String, LinkedHashMap<String, Object>> bpInputs = onapBlueprint.getInputs();
+ Map<String, Map<String, Object>> bpInputs = onapBlueprint.getInputs();
onapTestUtils.verifyArtifacts(
"Service Name Override with Import File K8s", onapComponentSpec, bpInputs, "o");
onapTestUtils
.verifyToscaDefVersion("DMAAP K8s", onapBlueprint, Constants.TOSCA_DEF_VERSION);
- Map<String, LinkedHashMap<String, Object>> k8sBpInputs = onapBlueprint.getInputs();
+ Map<String, Map<String, Object>> k8sBpInputs = onapBlueprint.getInputs();
assertNotNull("DMAAP K8s Blueprint Inputs Section is NULL", k8sBpInputs);
assertTrue("DMAAP K8s Blueprint Inputs Section is Empty", k8sBpInputs.size() > 0);
"DMAAP K8s Blueprint:Inputs " + Constants.ONAP_INPUT_CPU_LIMIT
+ " Default is not matching",
k8sBpInputs.get(Constants.ONAP_INPUT_CPU_LIMIT).get("default"),
- Constants.ONAP_DEFAULT250m);
+ Constants.ONAP_DEFAULT250M);
assertEquals(
"DMAAP K8s Blueprint:Inputs "
+ Constants.SERVICE_COMPONENT_NAME_OVERRIDE
onapTestUtils.verifyBpImportsFromFile(
"DMAAP with Import File K8s", onapBlueprint, input.getImportPath());
- Map<String, LinkedHashMap<String, Object>> k8sBpInputs = onapBlueprint.getInputs();
+ Map<String, Map<String, Object>> k8sBpInputs = onapBlueprint.getInputs();
assertNotNull("DMAAP with Import File K8s Blueprint Inputs Section is NULL", k8sBpInputs);
assertTrue(
"DMAAP with Import File K8s Blueprint Inputs Section is Empty", k8sBpInputs.size() > 0);
+ Constants.ONAP_INPUT_CPU_LIMIT
+ " Default is not matching",
k8sBpInputs.get(Constants.ONAP_INPUT_CPU_LIMIT).get("default"),
- Constants.ONAP_DEFAULT250m);
+ Constants.ONAP_DEFAULT250M);
assertEquals(
"DMAAP with Import File K8s Blueprint:Inputs "
+ Constants.SERVICE_COMPONENT_NAME_OVERRIDE
import java.io.File;
import java.io.IOException;
import java.util.Arrays;
-import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
public void verifyArtifacts(
String type,
OnapComponentSpec onapComponentSpec,
- Map<String, LinkedHashMap<String, Object>> inputs,
+ Map<String, Map<String, Object>> inputs,
String bptype) {
Artifacts[] csArtifacts = onapComponentSpec.getArtifacts();
assertNotNull(type + " ComponentSpec Artifacts Section is NULL", csArtifacts);
/*============LICENSE_START=======================================================
org.onap.dcae
================================================================================
-Copyright (c) 2020 Nokia. All rights reserved.
+Copyright (c) 2020-2021 Nokia. All rights reserved.
Copyright (c) 2020 AT&T. All rights reserved.
================================================================================
Licensed under the Apache License, Version 2.0 (the "License");
package org.onap.blueprintgenerator.test;
+import java.util.Map;
import org.junit.Test;
import org.junit.runners.Parameterized;
import org.onap.blueprintgenerator.model.common.Input;
import java.nio.file.Paths;
import java.util.Arrays;
-import java.util.LinkedHashMap;
import java.util.List;
import static org.junit.Assert.assertEquals;
* Test Case for Tls Info
*
*/
-// @RunWith(Parameterized.class)
public class TlsInfoTest extends BlueprintGeneratorTests {
@Parameterized.Parameter
private void assertContainsInputWithDefault(
OnapBlueprint bp, String inputName, Object defaultValue) {
- LinkedHashMap<String, Object> input = bp.getInputs().get(inputName);
+ Map<String, Object> input = bp.getInputs().get(inputName);
assertNotNull(input);
assertEquals(defaultValue, input.get("default"));
}
<groupId>org.onap.dcaegen2.platform.mod</groupId>
<artifactId>blueprint-generator</artifactId>
- <version>1.7.3-SNAPSHOT</version>
+ <version>1.8.0-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
<sonar.coverage.exclusions>coverage/**</sonar.coverage.exclusions>
<sonar.coverage.jacoco.xmlReportPaths>${project.basedir}/../coverage/target/site/jacoco-aggregate/jacoco.xml
</sonar.coverage.jacoco.xmlReportPaths>
+ <org.slf4j.version>1.7.30</org.slf4j.version>
</properties>
<dependencies>
major=1
-minor=7
-patch=3
+minor=8
+patch=0
base_version=${major}.${minor}.${patch}
release_version=${base_version}
snapshot_version=${base_version}-SNAPSHOT