This task is all about package name space change also make changes to pom for common module
Change-Id: Ie9bda0f958a9a05826c0374830cc9cb7d6d196b6
Issue-ID: SDC-1272
Signed-off-by: amitjai <amitjai@amdocs.com>
</exclusion>
<exclusion>
- <groupId>org.openecomp.sdc.common</groupId>
- <artifactId>openecomp-sdc-artifact-generator-api</artifactId>
+ <groupId>org.onap.sdc.common</groupId>
+ <artifactId>onap-sdc-artifact-generator-api</artifactId>
</exclusion>
<exclusion>
- <groupId>org.openecomp.sdc.common</groupId>
- <artifactId>openecomp-sdc-artifact-generator-core</artifactId>
+ <groupId>org.onap.sdc.common</groupId>
+ <artifactId>onap-sdc-artifact-generator-core</artifactId>
</exclusion>
<exclusion>
- <groupId>org.openecomp.sdc.common</groupId>
- <artifactId>openecomp-common-lib</artifactId>
+ <groupId>org.onap.sdc.common</groupId>
+ <artifactId>onap-common-lib</artifactId>
</exclusion>
<exclusion>
<!--Artifact Generator-->
<dependency>
- <groupId>org.openecomp.sdc.common</groupId>
- <artifactId>openecomp-sdc-artifact-generator-api</artifactId>
+ <groupId>org.onap.sdc.common</groupId>
+ <artifactId>onap-sdc-artifact-generator-api</artifactId>
<version>${artifact-generator-api.version}</version>
<scope>compile</scope>
<exclusions>
</dependency>
<dependency>
- <groupId>org.openecomp.sdc.common</groupId>
- <artifactId>openecomp-sdc-artifact-generator-core</artifactId>
+ <groupId>org.onap.sdc.common</groupId>
+ <artifactId>onap-sdc-artifact-generator-core</artifactId>
<version>${artifact-generator-core.version}</version>
<scope>compile</scope>
<exclusions>
</dependency>
<dependency>
- <groupId>org.openecomp.sdc.common</groupId>
- <artifactId>openecomp-common-lib</artifactId>
+ <groupId>org.onap.sdc.common</groupId>
+ <artifactId>onap-common-lib</artifactId>
<version>${dox-common-lib.version}</version>
<type>pom</type>
<exclusions>
<!--Artifact Generator-->
<dependency>
- <groupId>org.openecomp.sdc.common</groupId>
- <artifactId>openecomp-sdc-artifact-generator-api</artifactId>
+ <groupId>org.onap.sdc.common</groupId>
+ <artifactId>onap-sdc-artifact-generator-api</artifactId>
<version>${artifact-generator-api.version}</version>
<scope>compile</scope>
<exclusions>
</dependency>
<dependency>
- <groupId>org.openecomp.sdc.common</groupId>
- <artifactId>openecomp-sdc-artifact-generator-core</artifactId>
+ <groupId>org.onap.sdc.common</groupId>
+ <artifactId>onap-sdc-artifact-generator-core</artifactId>
<version>${artifact-generator-core.version}</version>
<scope>compile</scope>
<exclusions>
</dependency>
<dependency>
- <groupId>org.openecomp.sdc.common</groupId>
- <artifactId>openecomp-common-lib</artifactId>
+ <groupId>org.onap.sdc.common</groupId>
+ <artifactId>onap-common-lib</artifactId>
<version>${dox-common-lib.version}</version>
<type>pom</type>
<exclusions>
package org.openecomp.sdc.be.tosca;
-import org.openecomp.sdc.generator.data.ArtifactType;
+import org.onap.sdc.generator.data.ArtifactType;
import java.util.List;
import org.openecomp.sdc.common.util.GeneralUtility;
import org.openecomp.sdc.common.util.ValidationUtils;
import org.openecomp.sdc.exception.ResponseFormat;
-import org.openecomp.sdc.generator.data.AdditionalParams;
-import org.openecomp.sdc.generator.data.Artifact;
-import org.openecomp.sdc.generator.data.ArtifactType;
-import org.openecomp.sdc.generator.data.GenerationData;
-import org.openecomp.sdc.generator.impl.ArtifactGenerationServiceImpl;
+import org.onap.sdc.generator.data.AdditionalParams;
+import org.onap.sdc.generator.data.Artifact;
+import org.onap.sdc.generator.data.ArtifactType;
+import org.onap.sdc.generator.data.GenerationData;
+import org.onap.sdc.generator.impl.ArtifactGenerationServiceImpl;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.List;
import org.junit.Test;
-import org.openecomp.sdc.generator.data.ArtifactType;
+import org.onap.sdc.generator.data.ArtifactType;
public class ArtifactTypesTest {
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
- <name>openecomp-configuration-management-api</name>
- <artifactId>openecomp-configuration-management-api</artifactId>
+ <name>onap-configuration-management-api</name>
+ <artifactId>onap-configuration-management-api</artifactId>
<parent>
- <artifactId>openecomp-common-configuration-management</artifactId>
- <groupId>org.openecomp.sdc.common</groupId>
+ <artifactId>onap-common-configuration-management</artifactId>
+ <groupId>org.onap.sdc.common</groupId>
<version>1.2.0-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
-package org.openecomp.config.api;
+package org.onap.config.api;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
-package org.openecomp.config.api;
+package org.onap.config.api;
import java.util.Arrays;
import java.util.List;
-package org.openecomp.config.api;
+package org.onap.config.api;
public interface ConfigurationChangeListener {
-package org.openecomp.config.api;
+package org.onap.config.api;
import java.lang.reflect.InvocationTargetException;
-package org.openecomp.config.api;
+package org.onap.config.api;
import java.util.Arrays;
import java.util.List;
-package org.openecomp.config.api;
+package org.onap.config.api;
public enum Hint {
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
- <groupId>org.openecomp.sdc.common</groupId>
- <name>openecomp-configuration-management-cli</name>
- <artifactId>openecomp-configuration-management-cli</artifactId>
+ <groupId>org.onap.sdc.common</groupId>
+ <name>onap-configuration-management-cli</name>
+ <artifactId>onap-configuration-management-cli</artifactId>
<parent>
- <artifactId>openecomp-common-configuration-management</artifactId>
- <groupId>org.openecomp.sdc.common</groupId>
+ <artifactId>onap-common-configuration-management</artifactId>
+ <groupId>org.onap.sdc.common</groupId>
<version>1.2.0-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<dependencies>
<dependency>
- <groupId>org.openecomp.sdc.common</groupId>
- <artifactId>openecomp-configuration-management-api</artifactId>
+ <groupId>org.onap.sdc.common</groupId>
+ <artifactId>onap-configuration-management-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<configuration>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
- <mainClass>org.openecomp.config.gui.app.Configuration</mainClass>
+ <mainClass>org.onap.config.gui.app.Configuration</mainClass>
</transformer>
</transformers>
</configuration>
-package org.openecomp.config.cli.app;
+package org.onap.config.cli.app;
-import org.openecomp.config.api.ConfigurationChangeListener;
-import org.openecomp.config.api.ConfigurationManager;
+import org.onap.config.api.ConfigurationChangeListener;
+import org.onap.config.api.ConfigurationManager;
import java.util.HashMap;
import java.util.Map;
boolean isUpdate = isKeyPresent("update", args);
Map<String, Object> input = new HashMap<>();
- input.put("ImplClass", isUpdate ? "org.openecomp.config.type.ConfigurationUpdate"
- : "org.openecomp.config.type.ConfigurationQuery");
+ input.put("ImplClass", isUpdate ? "org.onap.config.type.ConfigurationUpdate"
+ : "org.onap.config.type.ConfigurationQuery");
input.put("externalLookup", isKeyPresent("lookup", args));
input.put("nodeOverride", isKeyPresent("nodeOverride", args));
input.put("nodeSpecific", isKeyPresent("nodeSpecific", args));
MBeanServerConnection mbsc = jmxc.getMBeanServerConnection();
ObjectName mbeanName = new ObjectName("org.openecomp.jmx:name=SystemConfig");
- org.openecomp.config.api.ConfigurationManager conf =
- JMX.newMBeanProxy(mbsc, mbeanName, org.openecomp.config.api.ConfigurationManager.class,
+ org.onap.config.api.ConfigurationManager conf =
+ JMX.newMBeanProxy(mbsc, mbeanName, org.onap.config.api.ConfigurationManager.class,
true);
boolean isGet = isKeyPresent("get", args);
-package org.openecomp.config.gui.app;
+package org.onap.config.gui.app;
import com.sun.tools.attach.VirtualMachine;
import com.sun.tools.attach.VirtualMachineDescriptor;
-import org.openecomp.config.api.ConfigurationManager;
+import org.onap.config.api.ConfigurationManager;
import java.awt.BorderLayout;
import java.awt.Button;
Button button = null;
bottom.add(button = new Button("GET"));
button.addActionListener((actionListener) -> value.setText(manager
- .getConfigurationValue(buildMap("org.openecomp.config.type.ConfigurationQuery", value))));
+ .getConfigurationValue(buildMap("org.onap.config.type.ConfigurationQuery", value))));
bottom.add(new Label());
bottom.add(button = new Button("CLOSE"));
bottom.add(new Label());
bottom.add(button = new Button("UPDATE"));
button.addActionListener((actionListener) -> {
manager
- .updateConfigurationValue(buildMap("org.openecomp.config.type.ConfigurationUpdate", value));
+ .updateConfigurationValue(buildMap("org.onap.config.type.ConfigurationUpdate", value));
message("Info", "Success");
});
bottom.add(new Label());
Button button = null;
bottom.add(button = new Button("List"));
button.addActionListener((actionListener) -> populateKeyValue(
- manager.listConfiguration(buildMap("org.openecomp.config.type.ConfigurationQuery", null))));
+ manager.listConfiguration(buildMap("org.onap.config.type.ConfigurationQuery", null))));
bottom.add(new Label());
bottom.add(button = new Button("CLOSE"));
bottom.add(new Label());
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
- <name>openecomp-configuration-management-core</name>
- <groupId>org.openecomp.sdc.common</groupId>
- <artifactId>openecomp-configuration-management-core</artifactId>
+ <name>onap-configuration-management-core</name>
+ <groupId>org.onap.sdc.common</groupId>
+ <artifactId>onap-configuration-management-core</artifactId>
<parent>
- <artifactId>openecomp-common-configuration-management</artifactId>
- <groupId>org.openecomp.sdc.common</groupId>
+ <artifactId>onap-common-configuration-management</artifactId>
+ <groupId>org.onap.sdc.common</groupId>
<version>1.2.0-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<version>${slf4j.version}</version>
</dependency>
<dependency>
- <groupId>org.openecomp.sdc.common</groupId>
- <artifactId>openecomp-configuration-management-api</artifactId>
+ <groupId>org.onap.sdc.common</groupId>
+ <artifactId>onap-configuration-management-api</artifactId>
<version>1.2.0-SNAPSHOT</version>
</dependency>
<dependency>
-package org.openecomp.config;
+package org.onap.config;
import com.google.common.collect.ImmutableMap;
import com.virtlink.commons.configuration2.jackson.JsonConfiguration;
import org.apache.commons.configuration2.convert.DefaultListDelimiterHandler;
import org.apache.commons.configuration2.ex.ConfigurationException;
import org.apache.commons.io.IOUtils;
-import org.openecomp.config.api.ConfigurationManager;
-import org.openecomp.config.impl.AgglomerateConfiguration;
-import org.openecomp.config.impl.ConfigurationDataSource;
-import org.openecomp.config.impl.ConfigurationRepository;
-import org.openecomp.config.impl.YamlConfiguration;
-import org.openecomp.config.type.ConfigurationMode;
-import org.openecomp.config.type.ConfigurationType;
+import org.onap.config.api.Config;
+import org.onap.config.api.ConfigurationManager;
+import org.onap.config.impl.ConfigurationRepository;
+import org.onap.config.impl.YamlConfiguration;
+import org.onap.config.impl.AgglomerateConfiguration;
+import org.onap.config.impl.ConfigurationDataSource;
+import org.onap.config.type.ConfigurationMode;
+import org.onap.config.type.ConfigurationType;
import javax.sql.DataSource;
import java.io.File;
import java.util.stream.Stream;
import static com.google.common.collect.ImmutableMap.builder;
-import static org.openecomp.config.api.Hint.EXTERNAL_LOOKUP;
-import static org.openecomp.config.api.Hint.LATEST_LOOKUP;
-import static org.openecomp.config.api.Hint.NODE_SPECIFIC;
+import static org.onap.config.api.Hint.EXTERNAL_LOOKUP;
+import static org.onap.config.api.Hint.LATEST_LOOKUP;
+import static org.onap.config.api.Hint.NODE_SPECIFIC;
/**
* The type Configuration utils.
*/
public static <T> T read(Configuration config, Class<T> clazz, String keyPrefix)
throws Exception {
- org.openecomp.config.api.Config confAnnot =
- clazz.getAnnotation(org.openecomp.config.api.Config.class);
+ Config confAnnot =
+ clazz.getAnnotation(Config.class);
if (confAnnot != null) {
keyPrefix += (confAnnot.key() + ".");
}
T objToReturn = clazz.newInstance();
for (Field field : clazz.getDeclaredFields()) {
- org.openecomp.config.api.Config fieldConfAnnot =
- field.getAnnotation(org.openecomp.config.api.Config.class);
+ Config fieldConfAnnot =
+ field.getAnnotation(Config.class);
if (fieldConfAnnot != null) {
field.setAccessible(true);
field.set(objToReturn, config.getProperty(keyPrefix + fieldConfAnnot.key()));
- } else if (field.getType().getAnnotation(org.openecomp.config.api.Config.class) != null) {
+ } else if (field.getType().getAnnotation(Config.class) != null) {
field.set(objToReturn, read(config, field.getType(), keyPrefix));
}
}
-package org.openecomp.config;
+package org.onap.config;
public class Constants {
-package org.openecomp.config;
+package org.onap.config;
import java.io.File;
import java.net.URL;
-package org.openecomp.config.impl;
+package org.onap.config.impl;
import org.apache.commons.configuration2.DatabaseConfiguration;
-package org.openecomp.config.impl;
+package org.onap.config.impl;
import org.apache.commons.configuration2.CombinedConfiguration;
import org.apache.commons.configuration2.Configuration;
import org.apache.commons.configuration2.tree.MergeCombiner;
import org.apache.commons.configuration2.tree.OverrideCombiner;
import org.apache.commons.configuration2.tree.UnionCombiner;
-import static org.openecomp.config.Constants.LOAD_ORDER_KEY;
-import org.openecomp.config.ConfigurationUtils;
-import org.openecomp.config.type.ConfigurationMode;
+import static org.onap.config.Constants.LOAD_ORDER_KEY;
+import org.onap.config.ConfigurationUtils;
+import org.onap.config.type.ConfigurationMode;
import java.io.File;
import java.net.URL;
-package org.openecomp.config.impl;
+package org.onap.config.impl;
-import static org.openecomp.config.Constants.DB_NAMESPACE;
-import static org.openecomp.config.Constants.DEFAULT_NAMESPACE;
-import static org.openecomp.config.Constants.DEFAULT_TENANT;
-import static org.openecomp.config.Constants.KEY_ELEMENTS_DELEMETER;
-import static org.openecomp.config.Constants.LOAD_ORDER_KEY;
-import static org.openecomp.config.Constants.MBEAN_NAME;
-import static org.openecomp.config.Constants.MODE_KEY;
-import static org.openecomp.config.Constants.NAMESPACE_KEY;
+import static org.onap.config.Constants.DB_NAMESPACE;
+import static org.onap.config.Constants.DEFAULT_NAMESPACE;
+import static org.onap.config.Constants.DEFAULT_TENANT;
+import static org.onap.config.Constants.KEY_ELEMENTS_DELEMETER;
+import static org.onap.config.Constants.LOAD_ORDER_KEY;
+import static org.onap.config.Constants.MBEAN_NAME;
+import static org.onap.config.Constants.MODE_KEY;
+import static org.onap.config.Constants.NAMESPACE_KEY;
import org.apache.commons.configuration2.CombinedConfiguration;
import org.apache.commons.configuration2.CompositeConfiguration;
import org.apache.commons.configuration2.Configuration;
import org.apache.commons.configuration2.FileBasedConfiguration;
import org.apache.commons.configuration2.PropertiesConfiguration;
-import org.openecomp.config.ConfigurationUtils;
-import org.openecomp.config.Constants;
-import org.openecomp.config.api.ConfigurationManager;
-import org.openecomp.config.api.Hint;
-import org.openecomp.config.type.ConfigurationQuery;
-import org.openecomp.config.type.ConfigurationUpdate;
+import org.onap.config.type.ConfigurationQuery;
+import org.onap.config.ConfigurationUtils;
+import org.onap.config.Constants;
+import org.onap.config.api.ConfigurationManager;
+import org.onap.config.api.Hint;
+import org.onap.config.type.ConfigurationUpdate;
import java.io.File;
import java.io.PrintWriter;
-package org.openecomp.config.impl;
+package org.onap.config.impl;
-import static org.openecomp.config.ConfigurationUtils.isArray;
-
-import org.openecomp.config.ConfigurationUtils;
-import org.openecomp.config.Constants;
-import org.openecomp.config.api.ConfigurationChangeListener;
-import org.openecomp.config.api.ConfigurationManager;
-import org.openecomp.config.api.Hint;
+import org.onap.config.ConfigurationUtils;
+import org.onap.config.Constants;
+import org.onap.config.api.ConfigurationChangeListener;
+import org.onap.config.api.ConfigurationManager;
+import org.onap.config.api.Hint;
import java.io.File;
import java.io.IOException;
MBeanServerConnection mbsc = ManagementFactory.getPlatformMBeanServer();
ObjectName mbeanName = new ObjectName(Constants.MBEAN_NAME);
ConfigurationManager conf =
- JMX.newMBeanProxy(mbsc, mbeanName, org.openecomp.config.api.ConfigurationManager.class,
+ JMX.newMBeanProxy(mbsc, mbeanName, ConfigurationManager.class,
true);
conf.updateConfigurationValues(tenant, namespace, map);
}
.containsKey(key)) {
throw new RuntimeException("Key[" + key + "] not found.");
}
- isArray = isArray(tenant, component, key, Hint.DEFAULT.value());
+ isArray = ConfigurationUtils.isArray(tenant, component, key, Hint.DEFAULT.value());
if (isArray) {
currentValue = ConfigurationManager.lookup().getAsStringValues(tenant, component, key);
} else {
} catch (Exception exception) {
exception.printStackTrace();
} finally {
- isArray = isArray(tenant, namespace, key, Hint.DEFAULT.value());
+ isArray = ConfigurationUtils.isArray(tenant, namespace, key, Hint.DEFAULT.value());
if (isArray) {
currentValue = ConfigurationManager.lookup().getAsStringValues(tenant, namespace, key);
} else {
-package org.openecomp.config.impl;
+package org.onap.config.impl;
import org.apache.commons.configuration2.ImmutableConfiguration;
import org.apache.commons.dbcp2.BasicDataSource;
import org.apache.commons.lang3.StringUtils;
-import org.openecomp.config.ConfigurationUtils;
-import org.openecomp.config.Constants;
+import org.onap.config.ConfigurationUtils;
+import org.onap.config.Constants;
import java.sql.Driver;
import java.util.Arrays;
-package org.openecomp.config.impl;
+package org.onap.config.impl;
-import org.openecomp.config.Constants;
-import org.openecomp.config.api.Configuration;
+import org.onap.config.Constants;
+import org.onap.config.api.Configuration;
import java.io.IOException;
import javax.servlet.Filter;
-package org.openecomp.config.impl;
+package org.onap.config.impl;
-import static org.openecomp.config.ConfigurationUtils.getConfigurationRepositoryKey;
-import static org.openecomp.config.ConfigurationUtils.getProperty;
-import static org.openecomp.config.ConfigurationUtils.isExternalLookup;
-import static org.openecomp.config.ConfigurationUtils.isWrapperClass;
-import static org.openecomp.config.ConfigurationUtils.isZeroLengthArray;
-
-import static org.openecomp.config.Constants.DB_NAMESPACE;
-import static org.openecomp.config.Constants.DEFAULT_NAMESPACE;
-import static org.openecomp.config.Constants.DEFAULT_TENANT;
-import static org.openecomp.config.Constants.KEY_ELEMENTS_DELEMETER;
+import static org.onap.config.ConfigurationUtils.getConfigurationRepositoryKey;
import org.apache.commons.configuration2.Configuration;
import org.apache.commons.configuration2.DatabaseConfiguration;
-import org.openecomp.config.ConfigurationUtils;
-import org.openecomp.config.Constants;
-import org.openecomp.config.NonConfigResource;
-import org.openecomp.config.api.Config;
-import org.openecomp.config.api.ConfigurationChangeListener;
-import org.openecomp.config.api.Hint;
+import org.onap.config.ConfigurationUtils;
+import org.onap.config.Constants;
+import org.onap.config.NonConfigResource;
+import org.onap.config.api.Config;
+import org.onap.config.api.ConfigurationChangeListener;
+import org.onap.config.api.Hint;
import java.io.File;
import java.lang.reflect.Constructor;
/**
* The type Configuration.
*/
-public class ConfigurationImpl implements org.openecomp.config.api.Configuration {
+public class ConfigurationImpl implements org.onap.config.api.Configuration {
private static ThreadLocal<String> tenant = new ThreadLocal<String>() {
protected String initialValue() {
Predicate<URL> predicate = ConfigurationUtils::isConfig;
for (URL url : classpathResources) {
if (predicate.test(url)) {
- String moduleName = getConfigurationRepositoryKey(url);
+ String moduleName = ConfigurationUtils.getConfigurationRepositoryKey(url);
AggregateConfiguration moduleConfig = moduleConfigStore.get(moduleName);
if (moduleConfig == null) {
moduleConfig = new AggregateConfiguration();
Predicate<File> filePredicate = ConfigurationUtils::isConfig;
for (File file : filesystemResources) {
if (filePredicate.test(file)) {
- String moduleName = getConfigurationRepositoryKey(file);
+ String moduleName = ConfigurationUtils.getConfigurationRepositoryKey(file);
AggregateConfiguration moduleConfig = moduleConfigStore.get(moduleName);
if (moduleConfig == null) {
moduleConfig = new AggregateConfiguration();
String moduleName = ConfigurationUtils.getNamespace(file);
for (File tenanatFileRoot : tenantsRoot) {
if (file.getAbsolutePath().startsWith(tenanatFileRoot.getAbsolutePath())) {
- moduleName = getConfigurationRepositoryKey(
+ moduleName = ConfigurationUtils.getConfigurationRepositoryKey(
(tenanatFileRoot.getName().toUpperCase() + Constants.TENANT_NAMESPACE_SAPERATOR
+ moduleName).split(Constants.TENANT_NAMESPACE_SAPERATOR));
}
for (File file : filesystemResources) {
if (filePredicate.test(file)) {
ConfigurationRepository.lookup().populateOverrideConfigurtaion(
- getConfigurationRepositoryKey(ConfigurationUtils.getNamespace(file)
+ ConfigurationUtils.getConfigurationRepositoryKey(ConfigurationUtils.getNamespace(file)
.split(Constants.TENANT_NAMESPACE_SAPERATOR)), file);
}
}
clazz.isPrimitive() ? getWrapperClass(clazz) : clazz,
hints == null || hints.length == 0 ? new Hint[]{Hint.EXTERNAL_LOOKUP, Hint.NODE_SPECIFIC}
: hints);
- if ((returnValue == null || isZeroLengthArray(clazz, returnValue))
+ if ((returnValue == null || ConfigurationUtils.isZeroLengthArray(clazz, returnValue))
&& !Constants.DEFAULT_TENANT.equals(tenant)) {
returnValue = (T) getInternal(Constants.DEFAULT_TENANT, namespace, key,
clazz.isPrimitive() ? getWrapperClass(clazz) : clazz,
hints == null || hints.length == 0 ? new Hint[]{Hint.EXTERNAL_LOOKUP, Hint.NODE_SPECIFIC}
: hints);
}
- if ((returnValue == null || isZeroLengthArray(clazz, returnValue))
+ if ((returnValue == null || ConfigurationUtils.isZeroLengthArray(clazz, returnValue))
&& !Constants.DEFAULT_NAMESPACE.equals(namespace)) {
returnValue = (T) getInternal(tenant, Constants.DEFAULT_NAMESPACE, key,
clazz.isPrimitive() ? getWrapperClass(clazz) : clazz,
hints == null || hints.length == 0 ? new Hint[]{Hint.EXTERNAL_LOOKUP, Hint.NODE_SPECIFIC}
: hints);
}
- if ((returnValue == null ||isZeroLengthArray(clazz, returnValue))
+ if ((returnValue == null || ConfigurationUtils.isZeroLengthArray(clazz, returnValue))
&& !Constants.DEFAULT_NAMESPACE.equals(namespace)
&& !Constants.DEFAULT_TENANT.equals(tenant)) {
returnValue = (T) getInternal(Constants.DEFAULT_TENANT, Constants.DEFAULT_NAMESPACE, key,
clazz = getWrapperClass(clazz);
}
try {
- if (isWrapperClass(clazz) || clazz.isPrimitive()) {
+ if (ConfigurationUtils.isWrapperClass(clazz) || clazz.isPrimitive()) {
Object obj =
- getProperty(ConfigurationRepository.lookup().getConfigurationFor(tenant, namespace),
+ ConfigurationUtils
+ .getProperty(ConfigurationRepository.lookup().getConfigurationFor(tenant, namespace),
key, processingHints);
if (obj != null) {
if (ConfigurationUtils.isCollection(obj.toString())) {
return null;
}
} else if (clazz.isArray()
- && (clazz.getComponentType().isPrimitive() || isWrapperClass(clazz.getComponentType()))) {
+ && (clazz.getComponentType().isPrimitive() || ConfigurationUtils.isWrapperClass(clazz.getComponentType()))) {
Object obj =
- getProperty(ConfigurationRepository.lookup().getConfigurationFor(tenant, namespace),
+ ConfigurationUtils
+ .getProperty(ConfigurationRepository.lookup().getConfigurationFor(tenant, namespace),
key, processingHints);
if (obj != null) {
Class componentClass = clazz.getComponentType();
private <T> T read(String tenant, String namespace, Class<T> clazz, String keyPrefix,
Hint... hints) throws Exception {
- org.openecomp.config.api.Config confAnnot =
- clazz.getAnnotation(org.openecomp.config.api.Config.class);
+ Config confAnnot =
+ clazz.getAnnotation(Config.class);
if (confAnnot != null && confAnnot.key().length()>0 && !keyPrefix.endsWith(".")) {
keyPrefix += (confAnnot.key() + ".");
}
T objToReturn = constructor.newInstance();
for (Field field : clazz.getDeclaredFields()) {
field.setAccessible(true);
- org.openecomp.config.api.Config fieldConfAnnot =
- field.getAnnotation(org.openecomp.config.api.Config.class);
+ Config fieldConfAnnot =
+ field.getAnnotation(Config.class);
if (fieldConfAnnot != null) {
- if (field.getType().isPrimitive() || isWrapperClass(field.getType())
+ if (field.getType().isPrimitive() || ConfigurationUtils.isWrapperClass(field.getType())
|| (field.getType().isArray() && (field.getType().getComponentType().isPrimitive()
- || isWrapperClass(field.getType().getComponentType())))
- || field.getType().getAnnotation(org.openecomp.config.api.Config.class) != null) {
+ || ConfigurationUtils.isWrapperClass(field.getType().getComponentType())))
+ || field.getType().getAnnotation(Config.class) != null) {
field.set(objToReturn,
get(tenant, namespace, keyPrefix + fieldConfAnnot.key(), field.getType(), hints));
} else if (Collection.class.isAssignableFrom(field.getType())) {
obj = obj.toString().trim();
}
if (String.class.equals(clazz)) {
- if (obj.toString().startsWith("@") && isExternalLookup(processingHint)) {
+ if (obj.toString().startsWith("@") && ConfigurationUtils.isExternalLookup(processingHint)) {
String contents = ConfigurationUtils
.getFileContents(NonConfigResource.locate(obj.toString().substring(1).trim()));
if (contents == null) {
tenantId = tenantId.toUpperCase();
}
if (namespace==null || namespace.trim().length()==0){
- namespace = DEFAULT_NAMESPACE;
+ namespace = Constants.DEFAULT_NAMESPACE;
}else{
namespace = namespace.toUpperCase();
}
Iterator<String> keys ;
try {
if (ConfigurationRepository.lookup().isDBAccessible()){
- keys = ConfigurationUtils.executeSelectSql(ConfigurationRepository.lookup().getConfigurationFor(DEFAULT_TENANT, DB_NAMESPACE).getString("fetchkeysql"), new String[]{tenantId+KEY_ELEMENTS_DELEMETER+namespace}).iterator();
+ keys = ConfigurationUtils.executeSelectSql(ConfigurationRepository.lookup().getConfigurationFor(
+ Constants.DEFAULT_TENANT, Constants.DB_NAMESPACE).getString("fetchkeysql"), new String[]{tenantId+ Constants.KEY_ELEMENTS_DELEMETER+namespace}).iterator();
}else{
keys = ConfigurationRepository.lookup().getConfigurationFor(tenantId, namespace).getKeys(key);
}
tenantId = tenantId.toUpperCase();
}
if (namespace==null || namespace.trim().length()==0){
- namespace = DEFAULT_NAMESPACE;
+ namespace = Constants.DEFAULT_NAMESPACE;
}else{
namespace = namespace.toUpperCase();
}
Iterator<String> keys ;
try {
if (ConfigurationRepository.lookup().isDBAccessible()){
- keys = ConfigurationUtils.executeSelectSql(ConfigurationRepository.lookup().getConfigurationFor(DEFAULT_TENANT, DB_NAMESPACE).getString("fetchkeysql"), new String[]{tenantId+KEY_ELEMENTS_DELEMETER+namespace}).iterator();
+ keys = ConfigurationUtils.executeSelectSql(ConfigurationRepository.lookup().getConfigurationFor(
+ Constants.DEFAULT_TENANT, Constants.DB_NAMESPACE).getString("fetchkeysql"), new String[]{tenantId+ Constants.KEY_ELEMENTS_DELEMETER+namespace}).iterator();
}else{
if (key==null || key.trim().length()==0){
keys = ConfigurationRepository.lookup().getConfigurationFor(tenantId, namespace).getKeys();
-package org.openecomp.config.impl;
+package org.onap.config.impl;
import org.apache.commons.configuration2.CombinedConfiguration;
import org.apache.commons.configuration2.CompositeConfiguration;
import org.apache.commons.configuration2.builder.BasicConfigurationBuilder;
import org.apache.commons.configuration2.builder.FileBasedConfigurationBuilder;
import org.apache.commons.configuration2.ex.ConfigurationException;
-import org.openecomp.config.ConfigurationUtils;
-import org.openecomp.config.Constants;
+import org.onap.config.ConfigurationUtils;
+import org.onap.config.Constants;
import java.io.File;
import java.sql.Timestamp;
-package org.openecomp.config.impl;
+package org.onap.config.impl;
-import static org.openecomp.config.Constants.MBEAN_NAME;
+import static org.onap.config.Constants.MBEAN_NAME;
import java.lang.management.ManagementFactory;
import javax.management.ObjectName;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.annotation.WebListener;
-import org.openecomp.config.api.ConfigurationManager;
+import org.onap.config.api.ConfigurationManager;
@WebListener
public class ContextListener implements ServletContextListener {
-package org.openecomp.config.impl;
+package org.onap.config.impl;
import com.fasterxml.jackson.dataformat.yaml.YAMLFactory;
import com.virtlink.commons.configuration2.jackson.JacksonConfiguration;
-package org.openecomp.config.type;
+package org.onap.config.type;
public enum ConfigurationMode {
OVERRIDE, UNION, MERGE
-package org.openecomp.config.type;
+package org.onap.config.type;
-import org.openecomp.config.Constants;
+import org.onap.config.Constants;
public class ConfigurationQuery {
-package org.openecomp.config.type;
+package org.onap.config.type;
public enum ConfigurationType {
PROPERTIES, XML, JSON, YAML
-package org.openecomp.config.type;
+package org.onap.config.type;
public class ConfigurationUpdate extends ConfigurationQuery {
private String value;
--- /dev/null
+org.onap.config.impl.CliConfigurationImpl
\ No newline at end of file
-package org.openecomp.config;
+package org.onap.config;
import org.junit.Test;
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
- <name>openecomp-configuration-management-test</name>
- <groupId>org.openecomp.sdc.common</groupId>
- <artifactId>openecomp-configuration-management-test</artifactId>
+ <name>onap-configuration-management-test</name>
+ <groupId>org.onap.sdc.common</groupId>
+ <artifactId>onap-configuration-management-test</artifactId>
<parent>
- <artifactId>openecomp-common-configuration-management</artifactId>
- <groupId>org.openecomp.sdc.common</groupId>
+ <artifactId>onap-common-configuration-management</artifactId>
+ <groupId>org.onap.sdc.common</groupId>
<version>1.2.0-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<dependencies>
<dependency>
- <groupId>org.openecomp.sdc.common</groupId>
- <artifactId>openecomp-configuration-management-core</artifactId>
+ <groupId>org.onap.sdc.common</groupId>
+ <artifactId>onap-configuration-management-core</artifactId>
<version>${project.version}</version>
</dependency>
-package org.openecomp.config;
+package org.onap.config;
-import org.openecomp.config.api.Configuration;
-import org.openecomp.config.api.ConfigurationManager;
-import org.openecomp.config.test.*;
+import org.onap.config.test.CLIFallbackAndLookupTest;
+import org.onap.config.test.CLITest;
+import org.onap.config.test.ConfigSourceLocationTest;
+import org.onap.config.test.DynamicConfigurationTest;
+import org.onap.config.test.FallbackConfigTest;
+import org.onap.config.test.FallbackToGlobalNSTest;
+import org.onap.config.test.GlobalAndNSConfigTest;
+import org.onap.config.test.JAVAPropertiesConfigTest;
+import org.onap.config.test.JSONConfigTest;
+import org.onap.config.test.LoadOrderMergeAndOverrideTest;
+import org.onap.config.test.ModeAsConfigPropTest;
+import org.onap.config.test.MultiTenancyConfigTest;
+import org.onap.config.test.NodeSpecificCLITest;
+import org.onap.config.test.NotificationForNodeConfigTest;
+import org.onap.config.test.NotificationOnPropValTest;
+import org.onap.config.test.ResourceChangeNotificationTest;
+import org.onap.config.test.UnregisterNotificationTest;
+import org.onap.config.test.ValidateDefaultModeTest;
+import org.onap.config.test.ValidateNodeConfigTest;
+import org.onap.config.test.XMLConfigTest;
+import org.onap.config.test.YAMLConfigTest;
+import org.onap.config.test.*;
import org.junit.AfterClass;
-import org.junit.BeforeClass;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
-package org.openecomp.config.test;
+package org.onap.config.test;
-import org.openecomp.config.Constants;
-import org.openecomp.config.api.ConfigurationManager;
-import org.openecomp.config.util.ConfigTestConstant;
-import org.openecomp.config.util.TestUtil;
+import org.onap.config.util.ConfigTestConstant;
+import org.onap.config.Constants;
+import org.onap.config.api.ConfigurationManager;
+import org.onap.config.util.TestUtil;
import org.junit.Assert;
import org.junit.After;
import org.junit.Before;
MBeanServerConnection mbsc = ManagementFactory.getPlatformMBeanServer();
ObjectName mbeanName = new ObjectName(Constants.MBEAN_NAME);
- ConfigurationManager conf = JMX.newMBeanProxy(mbsc, mbeanName, org.openecomp.config.api.ConfigurationManager.class, true);
+ ConfigurationManager conf = JMX.newMBeanProxy(mbsc, mbeanName, ConfigurationManager.class, true);
String maxSizeWithNoFallback = conf.getConfigurationValue(input);
Assert.assertEquals("",maxSizeWithNoFallback);
-package org.openecomp.config.test;
+package org.onap.config.test;
-import org.openecomp.config.Constants;
-import org.openecomp.config.api.ConfigurationChangeListener;
-import org.openecomp.config.api.ConfigurationManager;
-import org.openecomp.config.util.ConfigTestConstant;
-import org.openecomp.config.util.TestUtil;
+import org.onap.config.util.ConfigTestConstant;
+import org.onap.config.Constants;
+import org.onap.config.api.ConfigurationChangeListener;
+import org.onap.config.api.ConfigurationManager;
+import org.onap.config.util.TestUtil;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import java.util.HashMap;
import java.util.Map;
-import static org.openecomp.config.util.ConfigTestConstant.*;
-
/**
* Created by sheetalm on 10/18/2016.
* Scenario 17
MBeanServerConnection mbsc = ManagementFactory.getPlatformMBeanServer();
ObjectName mbeanName = new ObjectName(Constants.MBEAN_NAME);
- ConfigurationManager conf = JMX.newMBeanProxy(mbsc, mbeanName, org.openecomp.config.api.ConfigurationManager.class, true);
+ ConfigurationManager conf = JMX.newMBeanProxy(mbsc, mbeanName, ConfigurationManager.class, true);
String maxLength = conf.getConfigurationValue(input);
Assert.assertEquals("14",maxLength);
private void validateCLIListConfig(Map<String, String> outputMap ) {
- Assert.assertEquals("@"+System.getProperty("user.home")+"/TestResources/GeneratorsList.json" , outputMap.get(ARTIFACT_JSON_SCHEMA));
- Assert.assertEquals("appc,catalog", outputMap.get(ARTIFACT_CONSUMER));
- Assert.assertEquals("6", outputMap.get(ARTIFACT_NAME_MINLENGTH));
- Assert.assertEquals("true", outputMap.get(ARTIFACT_ENCODED));
- Assert.assertEquals("24", outputMap.get(ARTIFACT_NAME_MAXLENGTH));
- Assert.assertEquals("pdf,zip,xml,pdf,tgz,xls", outputMap.get(ARTIFACT_EXT));
- Assert.assertEquals("Base64,MD5", outputMap.get(ARTIFACT_ENC));
- Assert.assertEquals("@"+System.getenv("Path")+"/myschema.json", outputMap.get(ARTIFACT_XML_SCHEMA));
- Assert.assertEquals("a-zA-Z_0-9", outputMap.get(ARTIFACT_NAME_UPPER));
- Assert.assertEquals("/opt/spool,"+System.getProperty("user.home")+"/asdc", outputMap.get(ARTIFACT_LOC));
- Assert.assertEquals("deleted,Deleted", outputMap.get(ARTIFACT_STATUS));
+ Assert.assertEquals("@"+System.getProperty("user.home")+"/TestResources/GeneratorsList.json" , outputMap.get(
+ ConfigTestConstant.ARTIFACT_JSON_SCHEMA));
+ Assert.assertEquals("appc,catalog", outputMap.get(ConfigTestConstant.ARTIFACT_CONSUMER));
+ Assert.assertEquals("6", outputMap.get(ConfigTestConstant.ARTIFACT_NAME_MINLENGTH));
+ Assert.assertEquals("true", outputMap.get(ConfigTestConstant.ARTIFACT_ENCODED));
+ Assert.assertEquals("24", outputMap.get(ConfigTestConstant.ARTIFACT_NAME_MAXLENGTH));
+ Assert.assertEquals("pdf,zip,xml,pdf,tgz,xls", outputMap.get(ConfigTestConstant.ARTIFACT_EXT));
+ Assert.assertEquals("Base64,MD5", outputMap.get(ConfigTestConstant.ARTIFACT_ENC));
+ Assert.assertEquals("@"+System.getenv("Path")+"/myschema.json", outputMap.get(
+ ConfigTestConstant.ARTIFACT_XML_SCHEMA));
+ Assert.assertEquals("a-zA-Z_0-9", outputMap.get(ConfigTestConstant.ARTIFACT_NAME_UPPER));
+ Assert.assertEquals("/opt/spool,"+System.getProperty("user.home")+"/asdc", outputMap.get(
+ ConfigTestConstant.ARTIFACT_LOC));
+ Assert.assertEquals("deleted,Deleted", outputMap.get(ConfigTestConstant.ARTIFACT_STATUS));
}
@After
-package org.openecomp.config.test;
+package org.onap.config.test;
-import org.openecomp.config.api.Configuration;
-import org.openecomp.config.api.ConfigurationManager;
-import org.openecomp.config.util.ConfigTestConstant;
-import org.openecomp.config.util.TestUtil;
+import org.onap.config.api.Configuration;
+import org.onap.config.api.ConfigurationManager;
+import org.onap.config.util.ConfigTestConstant;
+import org.onap.config.util.TestUtil;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-package org.openecomp.config.test;
+package org.onap.config.test;
-import org.openecomp.config.api.Configuration;
-import org.openecomp.config.api.ConfigurationManager;
-import org.openecomp.config.api.DynamicConfiguration;
-import org.openecomp.config.util.ConfigTestConstant;
-import org.openecomp.config.util.TestUtil;
+import org.onap.config.api.Configuration;
+import org.onap.config.api.ConfigurationManager;
+import org.onap.config.api.DynamicConfiguration;
+import org.onap.config.util.ConfigTestConstant;
+import org.onap.config.util.TestUtil;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
-package org.openecomp.config.test;
+package org.onap.config.test;
-import org.openecomp.config.ConfigurationUtils;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import java.io.IOException;
-import static org.openecomp.config.util.TestUtil.validateConfiguraton;
-import static org.openecomp.config.util.TestUtil.writeFile;
+import static org.onap.config.util.TestUtil.validateConfiguraton;
+import static org.onap.config.util.TestUtil.writeFile;
/**
* Created by ARR on 10/14/2016.
-package org.openecomp.config.test;
+package org.onap.config.test;
-import org.openecomp.config.api.Configuration;
-import org.openecomp.config.api.ConfigurationManager;
-import org.openecomp.config.util.ConfigTestConstant;
-import org.openecomp.config.util.TestUtil;
+import org.onap.config.api.Configuration;
+import org.onap.config.api.ConfigurationManager;
+import org.onap.config.util.ConfigTestConstant;
+import org.onap.config.util.TestUtil;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-package org.openecomp.config.test;
+package org.onap.config.test;
-import org.openecomp.config.api.Configuration;
-import org.openecomp.config.api.ConfigurationManager;
-import org.openecomp.config.util.ConfigTestConstant;
-import org.openecomp.config.util.TestUtil;
+import org.onap.config.api.Configuration;
+import org.onap.config.api.ConfigurationManager;
+import org.onap.config.util.ConfigTestConstant;
+import org.onap.config.util.TestUtil;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
/**
* Created by sheetalm on 10/13/2016.
-package org.openecomp.config.test;
+package org.onap.config.test;
-import org.openecomp.config.util.TestUtil;
+import org.onap.config.util.TestUtil;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import java.io.IOException;
-import static org.openecomp.config.util.TestUtil.validateConfiguraton;
-import static org.openecomp.config.util.TestUtil.writeFile;
+import static org.onap.config.util.TestUtil.validateConfiguraton;
+import static org.onap.config.util.TestUtil.writeFile;
/**
* Created by ARR on 10/13/2016.
-package org.openecomp.config.test;
+package org.onap.config.test;
-import org.openecomp.config.ConfigurationUtils;
-import org.openecomp.config.util.TestUtil;
+import org.onap.config.util.TestUtil;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import java.io.IOException;
-import static org.openecomp.config.util.TestUtil.validateConfiguraton;
-import static org.openecomp.config.util.TestUtil.writeFile;
+import static org.onap.config.util.TestUtil.validateConfiguraton;
+import static org.onap.config.util.TestUtil.writeFile;
/**
* Created by ARR on 10/14/2016.
-package org.openecomp.config.test;
+package org.onap.config.test;
-import static org.openecomp.config.util.ConfigTestConstant.ARTIFACT_NAME_MAXLENGTH;
-import static org.openecomp.config.util.TestUtil.validateConfiguraton;
-import static org.openecomp.config.util.TestUtil.writeFile;
+import static org.onap.config.util.TestUtil.writeFile;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
-import org.openecomp.config.api.Configuration;
-import org.openecomp.config.api.ConfigurationManager;
-import org.openecomp.config.util.TestUtil;
+import org.onap.config.api.Configuration;
+import org.onap.config.api.ConfigurationManager;
+import org.onap.config.util.ConfigTestConstant;
+import org.onap.config.util.TestUtil;
import java.io.IOException;
public void testConfigurationWithPropertiesFileFormat(){
Configuration config = ConfigurationManager.lookup();
- Assert.assertEquals(config.getAsString(NAMESPACE, ARTIFACT_NAME_MAXLENGTH ), "14");
+ Assert.assertEquals(config.getAsString(NAMESPACE, ConfigTestConstant.ARTIFACT_NAME_MAXLENGTH ), "14");
Assert.assertEquals("5", config.getAsString(NAMESPACE, "artifact.length"));
Assert.assertEquals("56", config.getAsString(NAMESPACE, "artifact.size"));
}
-package org.openecomp.config.test;
+package org.onap.config.test;
-import org.openecomp.config.ConfigurationUtils;
-import org.openecomp.config.api.Configuration;
-import org.openecomp.config.api.ConfigurationManager;
-import org.openecomp.config.util.ConfigTestConstant;
-import org.openecomp.config.util.TestUtil;
+import org.onap.config.api.Configuration;
+import org.onap.config.api.ConfigurationManager;
+import org.onap.config.util.ConfigTestConstant;
+import org.onap.config.util.TestUtil;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
-package org.openecomp.config.test;
+package org.onap.config.test;
-import org.openecomp.config.ConfigurationUtils;
-import org.openecomp.config.api.Configuration;
-import org.openecomp.config.api.ConfigurationManager;
-import org.openecomp.config.util.ConfigTestConstant;
-import org.openecomp.config.util.TestUtil;
+import org.onap.config.api.Configuration;
+import org.onap.config.api.ConfigurationManager;
+import org.onap.config.util.ConfigTestConstant;
+import org.onap.config.util.TestUtil;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-import static org.openecomp.config.util.ConfigTestConstant.*;
-import static org.openecomp.config.util.ConfigTestConstant.ARTIFACT_ENCODED;
-import static org.openecomp.config.util.ConfigTestConstant.ARTIFACT_MANDATORY_NAME;
-import static org.openecomp.config.util.TestUtil.validateConfiguraton;
-import static org.openecomp.config.util.TestUtil.writeFile;
/**
* Created by ARR on 10/14/2016.
@Before
public void setUp() throws IOException {
String data = "{name:\"SCM\"}";
- writeFile(data);
+ TestUtil.writeFile(data);
}
@Test
public void testConfigurationWithMultiTenancyFileFormat(){
Configuration config = ConfigurationManager.lookup();
- Assert.assertEquals(config.getAsString("OPENECOMP",NAMESPACE, ARTIFACT_NAME_MAXLENGTH ), "20");
+ Assert.assertEquals(config.getAsString("OPENECOMP",NAMESPACE, ConfigTestConstant.ARTIFACT_NAME_MAXLENGTH ), "20");
- Assert.assertEquals(config.getAsString("Telefonica",NAMESPACE, ARTIFACT_STATUS ), "Deleted");
+ Assert.assertEquals(config.getAsString("Telefonica",NAMESPACE, ConfigTestConstant.ARTIFACT_STATUS ), "Deleted");
- Assert.assertEquals(config.getAsString("TID",NAMESPACE, ARTIFACT_NAME_MAXLENGTH ), "14");
+ Assert.assertEquals(config.getAsString("TID",NAMESPACE, ConfigTestConstant.ARTIFACT_NAME_MAXLENGTH ), "14");
}
-package org.openecomp.config.test;
+package org.onap.config.test;
-import org.openecomp.config.Constants;
-import org.openecomp.config.api.ConfigurationChangeListener;
-import org.openecomp.config.api.ConfigurationManager;
-import org.openecomp.config.util.ConfigTestConstant;
-import org.openecomp.config.util.TestUtil;
+import org.onap.config.util.ConfigTestConstant;
+import org.onap.config.Constants;
+import org.onap.config.api.ConfigurationChangeListener;
+import org.onap.config.api.ConfigurationManager;
+import org.onap.config.util.TestUtil;
import org.junit.AfterClass;
import org.junit.Assert;
import org.junit.Test;
MBeanServerConnection mbsc = ManagementFactory.getPlatformMBeanServer();
ObjectName mbeanName = new ObjectName(Constants.MBEAN_NAME);
- ConfigurationManager conf = JMX.newMBeanProxy(mbsc, mbeanName, org.openecomp.config.api.ConfigurationManager.class, true);
+ ConfigurationManager conf = JMX.newMBeanProxy(mbsc, mbeanName, ConfigurationManager.class, true);
String maxLength = conf.getConfigurationValue(input);
//Verify Property from Namespace configurations
-package org.openecomp.config.test;
+package org.onap.config.test;
-import org.openecomp.config.api.Configuration;
-import org.openecomp.config.api.ConfigurationChangeListener;
-import org.openecomp.config.api.ConfigurationManager;
-import org.openecomp.config.util.ConfigTestConstant;
-import org.openecomp.config.util.TestUtil;
+import org.onap.config.api.Configuration;
+import org.onap.config.api.ConfigurationChangeListener;
+import org.onap.config.api.ConfigurationManager;
+import org.onap.config.util.ConfigTestConstant;
+import org.onap.config.util.TestUtil;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
-package org.openecomp.config.test;
+package org.onap.config.test;
-import org.openecomp.config.api.Configuration;
-import org.openecomp.config.api.ConfigurationChangeListener;
-import org.openecomp.config.api.ConfigurationManager;
-import org.openecomp.config.util.ConfigTestConstant;
-import org.openecomp.config.util.TestUtil;
+import org.onap.config.api.Configuration;
+import org.onap.config.api.ConfigurationChangeListener;
+import org.onap.config.api.ConfigurationManager;
+import org.onap.config.util.ConfigTestConstant;
+import org.onap.config.util.TestUtil;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-package org.openecomp.config.test;
+package org.onap.config.test;
-import java.io.File;
-import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
-import org.openecomp.config.ConfigurationUtils;
-import org.openecomp.config.util.ConfigTestConstant;
+import org.onap.config.util.ConfigTestConstant;
-import org.openecomp.config.util.TestUtil;
+import org.onap.config.util.TestUtil;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
-import org.openecomp.config.api.Configuration;
-import org.openecomp.config.api.ConfigurationChangeListener;
-import org.openecomp.config.api.ConfigurationManager;
+import org.onap.config.api.Configuration;
+import org.onap.config.api.ConfigurationChangeListener;
+import org.onap.config.api.ConfigurationManager;
/**
* Scenario 7
-package org.openecomp.config.test;
+package org.onap.config.test;
-import org.openecomp.config.api.Configuration;
-import org.openecomp.config.api.ConfigurationChangeListener;
-import org.openecomp.config.api.ConfigurationManager;
-import org.openecomp.config.util.ConfigTestConstant;
-import org.openecomp.config.util.TestUtil;
+import org.onap.config.api.Configuration;
+import org.onap.config.api.ConfigurationChangeListener;
+import org.onap.config.api.ConfigurationManager;
+import org.onap.config.util.ConfigTestConstant;
+import org.onap.config.util.TestUtil;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
-package org.openecomp.config.test;
+package org.onap.config.test;
-import org.openecomp.config.ConfigurationUtils;
-import org.openecomp.config.api.Configuration;
-import org.openecomp.config.api.ConfigurationManager;
-import org.openecomp.config.util.ConfigTestConstant;
+import org.onap.config.api.Configuration;
+import org.onap.config.api.ConfigurationManager;
+import org.onap.config.util.ConfigTestConstant;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import java.util.ArrayList;
import java.util.List;
-import static org.openecomp.config.util.ConfigTestConstant.*;
-import static org.openecomp.config.util.TestUtil.writeFile;
+import static org.onap.config.util.TestUtil.writeFile;
/**
* Created by ARR on 10/17/2016.
public void testConfigurationWithValidateDefaultMode(){
Configuration config = ConfigurationManager.lookup();
- Assert.assertEquals(config.getAsString(NAMESPACE, ARTIFACT_NAME_MAXLENGTH ), "14");
+ Assert.assertEquals(config.getAsString(NAMESPACE, ConfigTestConstant.ARTIFACT_NAME_MAXLENGTH ), "14");
- Assert.assertEquals(config.getAsString(NAMESPACE, ARTIFACT_MAXSIZE ), "1048");
+ Assert.assertEquals(config.getAsString(NAMESPACE, ConfigTestConstant.ARTIFACT_MAXSIZE ), "1048");
List<String> expectedExtList = new ArrayList<String>();
expectedExtList.add("pdf");
List<String> extList = config.getAsStringValues(NAMESPACE, ConfigTestConstant.ARTIFACT_EXT);
Assert.assertEquals(expectedExtList, extList);
- Assert.assertEquals(config.getAsString(NAMESPACE, ARTIFACT_NAME_MINLENGTH ), "6");
+ Assert.assertEquals(config.getAsString(NAMESPACE, ConfigTestConstant.ARTIFACT_NAME_MINLENGTH ), "6");
}
-package org.openecomp.config.test;
+package org.onap.config.test;
-import org.openecomp.config.api.Configuration;
-import org.openecomp.config.api.ConfigurationManager;
-import org.openecomp.config.util.ConfigTestConstant;
-import org.openecomp.config.util.TestUtil;
+import org.onap.config.api.Configuration;
+import org.onap.config.api.ConfigurationManager;
+import org.onap.config.util.ConfigTestConstant;
+import org.onap.config.util.TestUtil;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-package org.openecomp.config.test;
+package org.onap.config.test;
-import org.openecomp.config.ConfigurationUtils;
-import org.openecomp.config.util.TestUtil;
+import org.onap.config.util.TestUtil;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import java.io.IOException;
-import static org.openecomp.config.util.TestUtil.validateConfiguraton;
-import static org.openecomp.config.util.TestUtil.writeFile;
+import static org.onap.config.util.TestUtil.validateConfiguraton;
+import static org.onap.config.util.TestUtil.writeFile;
/**
* Created by ARR on 10/14/2016.
-package org.openecomp.config.test;
+package org.onap.config.test;
-import org.openecomp.config.ConfigurationUtils;
-import org.openecomp.config.util.TestUtil;
+import org.onap.config.util.TestUtil;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import java.io.IOException;
-import static org.openecomp.config.util.TestUtil.validateConfiguraton;
-import static org.openecomp.config.util.TestUtil.writeFile;
+import static org.onap.config.util.TestUtil.validateConfiguraton;
+import static org.onap.config.util.TestUtil.writeFile;
/**
* Created by ARR on 10/14/2016.
-package org.openecomp.config.util;
+package org.onap.config.util;
public class ConfigTestConstant {
-package org.openecomp.config.util;
+package org.onap.config.util;
-import org.openecomp.config.ConfigurationUtils;
-import org.openecomp.config.api.Configuration;
-import org.openecomp.config.api.ConfigurationManager;
+import org.onap.config.ConfigurationUtils;
+import org.onap.config.api.Configuration;
+import org.onap.config.api.ConfigurationManager;
import org.junit.Assert;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
-import static org.openecomp.config.util.ConfigTestConstant.*;
-import static org.openecomp.config.util.ConfigTestConstant.ARTIFACT_ENCODED;
-import static org.openecomp.config.util.ConfigTestConstant.ARTIFACT_MANDATORY_NAME;
-
/**
* Created by sheetalm on 10/13/2016.
*/
public static void validateConfiguraton(String nameSpace) {
Configuration config = ConfigurationManager.lookup();
- Assert.assertEquals(config.getAsString(nameSpace, ARTIFACT_NAME_MAXLENGTH ), "14");
+ Assert.assertEquals(config.getAsString(nameSpace, ConfigTestConstant.ARTIFACT_NAME_MAXLENGTH ), "14");
// First value from list is picked from Merge properties
- Assert.assertEquals(config.getAsString(nameSpace, ARTIFACT_MAXSIZE ), "1048576");
+ Assert.assertEquals(config.getAsString(nameSpace, ConfigTestConstant.ARTIFACT_MAXSIZE ), "1048576");
List<String> expectedExtList = new ArrayList<String>();
expectedExtList.add("pdf");
List<String> encList = config.getAsStringValues(nameSpace, ConfigTestConstant.ARTIFACT_ENC);
Assert.assertEquals(expectedEncList, encList);
- Assert.assertEquals(config.getAsString(nameSpace, ARTIFACT_NAME_UPPER ), "a-zA-Z_0-9");
- Assert.assertEquals(config.getAsString(nameSpace, ARTIFACT_NAME_LOWER ), "a-zA-Z");
- Assert.assertEquals(config.getAsString(nameSpace, ARTIFACT_STATUS ), "deleted");
+ Assert.assertEquals(config.getAsString(nameSpace, ConfigTestConstant.ARTIFACT_NAME_UPPER ), "a-zA-Z_0-9");
+ Assert.assertEquals(config.getAsString(nameSpace, ConfigTestConstant.ARTIFACT_NAME_LOWER ), "a-zA-Z");
+ Assert.assertEquals(config.getAsString(nameSpace, ConfigTestConstant.ARTIFACT_STATUS ), "deleted");
List<String> expectedLocList = new ArrayList<String>();
expectedLocList.add("/opt/spool");
List<String> locList = config.getAsStringValues(nameSpace, ConfigTestConstant.ARTIFACT_LOC);
Assert.assertEquals(expectedLocList, locList);
- Assert.assertEquals(config.getAsString(nameSpace, ARTIFACT_JSON_SCHEMA ), "@GeneratorList.json");
+ Assert.assertEquals(config.getAsString(nameSpace, ConfigTestConstant.ARTIFACT_JSON_SCHEMA ), "@GeneratorList.json");
Assert.assertEquals("@"+System.getenv("Path")+"/myschema.json",config.getAsString(nameSpace, ConfigTestConstant.ARTIFACT_XML_SCHEMA));
List<String> artifactConsumer = config.getAsStringValues(nameSpace, ConfigTestConstant.ARTIFACT_CONSUMER );
Assert.assertEquals(config.getAsStringValues(nameSpace, ConfigTestConstant.ARTIFACT_CONSUMER_APPC ), artifactConsumer);
- Assert.assertEquals(config.getAsString(nameSpace, ARTIFACT_NAME_MINLENGTH ), "6");
- Assert.assertEquals(config.getAsString(nameSpace, ARTIFACT_MANDATORY_NAME ), "true");
- Assert.assertEquals(config.getAsString(nameSpace, ARTIFACT_ENCODED ), "true");
+ Assert.assertEquals(config.getAsString(nameSpace, ConfigTestConstant.ARTIFACT_NAME_MINLENGTH ), "6");
+ Assert.assertEquals(config.getAsString(nameSpace, ConfigTestConstant.ARTIFACT_MANDATORY_NAME ), "true");
+ Assert.assertEquals(config.getAsString(nameSpace, ConfigTestConstant.ARTIFACT_ENCODED ), "true");
}
}
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
- <name>openecomp-common-configuration-management</name>
- <groupId>org.openecomp.sdc.common</groupId>
- <artifactId>openecomp-common-configuration-management</artifactId>
+ <name>onap-common-configuration-management</name>
+ <groupId>org.onap.sdc.common</groupId>
+ <artifactId>onap-common-configuration-management</artifactId>
<packaging>pom</packaging>
<parent>
- <groupId>org.openecomp.sdc.common</groupId>
- <artifactId>openecomp-common-lib</artifactId>
+ <groupId>org.onap.sdc.common</groupId>
+ <artifactId>onap-common-lib</artifactId>
<version>1.2.0-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<modules>
- <module>openecomp-configuration-management-api</module>
- <module>openecomp-configuration-management-core</module>
- <module>openecomp-configuration-management-test</module>
+ <module>onap-configuration-management-api</module>
+ <module>onap-configuration-management-core</module>
+ <module>onap-configuration-management-test</module>
</modules>
<repositories>
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
- <name>openecomp-sdc-artifact-generator-api</name>
- <artifactId>openecomp-sdc-artifact-generator-api</artifactId>
+ <name>onap-sdc-artifact-generator-api</name>
+ <artifactId>onap-sdc-artifact-generator-api</artifactId>
<parent>
- <artifactId>openecomp-common-lib</artifactId>
- <groupId>org.openecomp.sdc.common</groupId>
+ <artifactId>onap-common-lib</artifactId>
+ <groupId>org.onap.sdc.common</groupId>
<version>1.2.0-SNAPSHOT</version>
<relativePath>../../</relativePath>
</parent>
<artifactId>reflections</artifactId>
<version>${org.reflections.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <scope>test</scope>
+ <version>6.8.5</version>
+ <exclusions>
+ <exclusion>
+ <artifactId>snakeyaml</artifactId>
+ <groupId>org.yaml</groupId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ <version>${junit.version}</version>
+ </dependency>
</dependencies>
<build>
</executions>
<configuration>
<schemaDirectory>src/main/resources</schemaDirectory>
- <generatePackage>org.openecomp.sdc.generator.aai.xml</generatePackage>
+ <generatePackage>org.onap.sdc.generator.aai.xml</generatePackage>
<generateDirectory>target/generated-sources/custom/aai/xml</generateDirectory>
<removeOldOutput>false</removeOldOutput>
<cleanPackageDirectories>true</cleanPackageDirectories>
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.generator.aai;
+package org.onap.sdc.generator.aai;
-import static org.openecomp.sdc.generator.data.GeneratorConstants.ERROR_CATEGORY;
-import static org.openecomp.sdc.generator.data.GeneratorConstants.ERROR_CODE;
-import static org.openecomp.sdc.generator.data.GeneratorConstants.ERROR_DESCRIPTION;
-import static org.openecomp.sdc.generator.data.GeneratorConstants.GENERATOR_ERROR_CODE;
-import static org.openecomp.sdc.generator.data.GeneratorConstants.GENERATOR_ERROR_SERVICE_INSTANTIATION_FAILED;
-import static org.openecomp.sdc.generator.data.GeneratorConstants.GENERATOR_PARTNER_NAME;
-import static org.openecomp.sdc.generator.data.GeneratorConstants.PARTNER_NAME;
-
-import org.openecomp.sdc.generator.aai.model.Resource;
-import org.openecomp.sdc.generator.aai.model.Service;
-import org.openecomp.sdc.generator.logging.CategoryLogLevel;
+import org.onap.sdc.generator.data.GeneratorConstants;
+import org.onap.sdc.generator.aai.model.Resource;
+import org.onap.sdc.generator.aai.model.Service;
+import org.onap.sdc.generator.logging.CategoryLogLevel;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.slf4j.MDC;
Logger log = LoggerFactory.getLogger(AaiModelGenerator.class.getName());
try {
return AaiModelGenerator.class.cast(
- Class.forName("org.openecomp.sdc.generator.aai.AaiModelGeneratorImpl").newInstance());
+ Class.forName("org.onap.sdc.generator.aai.AaiModelGeneratorImpl").newInstance());
} catch (Exception exception) {
- MDC.put(PARTNER_NAME, GENERATOR_PARTNER_NAME);
- MDC.put(ERROR_CATEGORY, CategoryLogLevel.ERROR.name());
- MDC.put(ERROR_CODE, GENERATOR_ERROR_CODE);
- MDC.put(ERROR_DESCRIPTION, GENERATOR_ERROR_SERVICE_INSTANTIATION_FAILED);
+ MDC.put(GeneratorConstants.PARTNER_NAME, GeneratorConstants.GENERATOR_PARTNER_NAME);
+ MDC.put(GeneratorConstants.ERROR_CATEGORY, CategoryLogLevel.ERROR.name());
+ MDC.put(GeneratorConstants.ERROR_CODE, GeneratorConstants.GENERATOR_ERROR_CODE);
+ MDC.put(
+ GeneratorConstants.ERROR_DESCRIPTION, GeneratorConstants.GENERATOR_ERROR_SERVICE_INSTANTIATION_FAILED);
StringWriter sw = new StringWriter();
log.error(sw.toString(), exception);
}
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.generator.aai.model;
+package org.onap.sdc.generator.aai.model;
-import org.openecomp.sdc.generator.aai.types.Cardinality;
-import org.openecomp.sdc.generator.aai.types.Model;
+import org.onap.sdc.generator.aai.types.Cardinality;
+import org.onap.sdc.generator.aai.types.Model;
@Model(widget = Widget.Type.ALLOTTED_RESOURCE, cardinality = Cardinality.UNBOUNDED,
dataDeleteFlag = true)
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.generator.aai.model;
+package org.onap.sdc.generator.aai.model;
-import org.openecomp.sdc.generator.aai.types.Cardinality;
-import org.openecomp.sdc.generator.aai.types.ModelType;
-import org.openecomp.sdc.generator.aai.types.ModelWidget;
+import org.onap.sdc.generator.aai.types.Cardinality;
+import org.onap.sdc.generator.aai.types.Model;
+import org.onap.sdc.generator.aai.types.ModelType;
+import org.onap.sdc.generator.aai.types.ModelWidget;
-@org.openecomp.sdc.generator.aai.types.Model(widget = Widget.Type.ALLOTTED_RESOURCE, cardinality
+@Model(widget = Widget.Type.ALLOTTED_RESOURCE, cardinality
= Cardinality.UNBOUNDED, dataDeleteFlag = true)
@ModelWidget(type = ModelType.WIDGET, name = "allotted-resource")
public class AllotedResourceWidget extends ResourceWidget {
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.generator.aai.model;
+package org.onap.sdc.generator.aai.model;
-import org.openecomp.sdc.generator.aai.types.Cardinality;
-import org.openecomp.sdc.generator.aai.types.Model;
-import org.openecomp.sdc.generator.aai.types.ModelType;
-import org.openecomp.sdc.generator.aai.types.ModelWidget;
+import org.onap.sdc.generator.aai.types.Cardinality;
+import org.onap.sdc.generator.aai.types.ModelType;
+import org.onap.sdc.generator.aai.types.Model;
+import org.onap.sdc.generator.aai.types.ModelWidget;
@Model(widget = Widget.Type.FLAVOR, cardinality = Cardinality.UNBOUNDED, dataDeleteFlag = false)
@ModelWidget(type = ModelType.WIDGET, name = "flavor")
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.generator.aai.model;
+package org.onap.sdc.generator.aai.model;
-import org.openecomp.sdc.generator.aai.types.Cardinality;
-import org.openecomp.sdc.generator.aai.types.Model;
-import org.openecomp.sdc.generator.aai.types.ModelType;
-import org.openecomp.sdc.generator.aai.types.ModelWidget;
+import org.onap.sdc.generator.aai.types.Cardinality;
+import org.onap.sdc.generator.aai.types.ModelType;
+import org.onap.sdc.generator.aai.types.Model;
+import org.onap.sdc.generator.aai.types.ModelWidget;
@Model(widget = Widget.Type.IMAGE, cardinality = Cardinality.UNBOUNDED, dataDeleteFlag = false)
@ModelWidget(type = ModelType.WIDGET, name = "image")
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.generator.aai.model;
+package org.onap.sdc.generator.aai.model;
-import org.openecomp.sdc.generator.aai.types.Cardinality;
-import org.openecomp.sdc.generator.aai.types.Model;
+import org.onap.sdc.generator.aai.types.Cardinality;
+import org.onap.sdc.generator.aai.types.Model;
-@org.openecomp.sdc.generator.aai.types.Model(widget = Widget.Type.L3_NET, cardinality = Cardinality
+@Model(widget = Widget.Type.L3_NET, cardinality = Cardinality
.UNBOUNDED, dataDeleteFlag = false)
public class L3Network extends Resource{
}
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.generator.aai.model;
+package org.onap.sdc.generator.aai.model;
-import org.openecomp.sdc.generator.aai.types.Cardinality;
-import org.openecomp.sdc.generator.aai.types.ModelType;
-import org.openecomp.sdc.generator.aai.types.ModelWidget;
+import org.onap.sdc.generator.aai.types.Cardinality;
+import org.onap.sdc.generator.aai.types.Model;
+import org.onap.sdc.generator.aai.types.ModelType;
+import org.onap.sdc.generator.aai.types.ModelWidget;
-@org.openecomp.sdc.generator.aai.types.Model(widget = Widget.Type.L3_NET,
+@Model(widget = Widget.Type.L3_NET,
cardinality = Cardinality.UNBOUNDED, dataDeleteFlag = true)
@ModelWidget(type = ModelType.WIDGET, name = "l3-network")
public class L3NetworkWidget extends Widget {
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.generator.aai.model;
+package org.onap.sdc.generator.aai.model;
-import org.openecomp.sdc.generator.aai.types.Cardinality;
-import org.openecomp.sdc.generator.aai.types.Model;
-import org.openecomp.sdc.generator.aai.types.ModelType;
-import org.openecomp.sdc.generator.aai.types.ModelWidget;
+import org.onap.sdc.generator.aai.types.Cardinality;
+import org.onap.sdc.generator.aai.types.ModelType;
+import org.onap.sdc.generator.aai.types.Model;
+import org.onap.sdc.generator.aai.types.ModelWidget;
@Model(widget = Widget.Type.LINT, cardinality = Cardinality.UNBOUNDED, dataDeleteFlag = true)
@ModelWidget(type = ModelType.WIDGET, name = "l-interface")
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.generator.aai.model;
+package org.onap.sdc.generator.aai.model;
-import org.openecomp.sdc.generator.aai.types.Cardinality;
-import org.openecomp.sdc.generator.aai.types.ModelType;
-import org.openecomp.sdc.generator.data.GeneratorConstants;
-import org.openecomp.sdc.generator.error.IllegalAccessException;
+import org.onap.sdc.generator.aai.types.Cardinality;
+import org.onap.sdc.generator.aai.types.ModelType;
+import org.onap.sdc.generator.data.GeneratorConstants;
+import org.onap.sdc.generator.error.IllegalAccessException;
import java.util.HashSet;
import java.util.Iterator;
* @return the widget version id
*/
public String getWidgetId() {
- org.openecomp.sdc.generator.aai.types.Model model =
- this.getClass().getAnnotation(org.openecomp.sdc.generator.aai.types.Model.class);
+ org.onap.sdc.generator.aai.types.Model model =
+ this.getClass().getAnnotation(org.onap.sdc.generator.aai.types.Model.class);
return Widget.getWidget(model.widget()).getId();
}
* @return the invariant id
*/
public String getWidgetInvariantId() {
- org.openecomp.sdc.generator.aai.types.Model model =
- this.getClass().getAnnotation(org.openecomp.sdc.generator.aai.types.Model.class);
+ org.onap.sdc.generator.aai.types.Model model =
+ this.getClass().getAnnotation(org.onap.sdc.generator.aai.types.Model.class);
return Widget.getWidget(model.widget()).getWidgetId();
}
* @return the delete flag
*/
public boolean getDeleteFlag() {
- org.openecomp.sdc.generator.aai.types.Model model =
- this.getClass().getAnnotation(org.openecomp.sdc.generator.aai.types.Model.class);
+ org.onap.sdc.generator.aai.types.Model model =
+ this.getClass().getAnnotation(org.onap.sdc.generator.aai.types.Model.class);
return model.dataDeleteFlag();
}
* @return the cardinality
*/
public Cardinality getCardinality() {
- org.openecomp.sdc.generator.aai.types.Model model =
- this.getClass().getAnnotation(org.openecomp.sdc.generator.aai.types.Model.class);
+ org.onap.sdc.generator.aai.types.Model model =
+ this.getClass().getAnnotation(org.onap.sdc.generator.aai.types.Model.class);
return model.cardinality();
}
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.generator.aai.model;
+package org.onap.sdc.generator.aai.model;
-import org.openecomp.sdc.generator.aai.types.Cardinality;
-import org.openecomp.sdc.generator.aai.types.Model;
-import org.openecomp.sdc.generator.aai.types.ModelType;
-import org.openecomp.sdc.generator.aai.types.ModelWidget;
+import org.onap.sdc.generator.aai.types.Cardinality;
+import org.onap.sdc.generator.aai.types.ModelType;
+import org.onap.sdc.generator.aai.types.ModelWidget;
+import org.onap.sdc.generator.aai.types.Model;
@Model(widget = Widget.Type.L3_NET, cardinality = Cardinality.UNBOUNDED, dataDeleteFlag = true)
@ModelWidget(type = ModelType.WIDGET, name = "oam-network")
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.generator.aai.model;
+package org.onap.sdc.generator.aai.model;
-import org.openecomp.sdc.generator.aai.types.Cardinality;
+import org.onap.sdc.generator.aai.types.Cardinality;
+import org.onap.sdc.generator.aai.types.Model;
-@org.openecomp.sdc.generator.aai.types.Model(widget = Widget.Type.ALLOTTED_RESOURCE, cardinality = Cardinality
+@Model(widget = Widget.Type.ALLOTTED_RESOURCE, cardinality = Cardinality
.UNBOUNDED,
dataDeleteFlag = false)
public class ProvidingService extends Resource {
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.generator.aai.model;
+package org.onap.sdc.generator.aai.model;
public class Resource extends Model {
@Override
public Widget.Type getWidgetType() {
- org.openecomp.sdc.generator.aai.types.Model model =
- this.getClass().getAnnotation(org.openecomp.sdc.generator.aai.types.Model.class);
+ org.onap.sdc.generator.aai.types.Model model =
+ this.getClass().getAnnotation(org.onap.sdc.generator.aai.types.Model.class);
return model.widget();
}
}
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.generator.aai.model;
+package org.onap.sdc.generator.aai.model;
public class ResourceWidget extends Widget {
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.generator.aai.model;
+package org.onap.sdc.generator.aai.model;
-import org.openecomp.sdc.generator.aai.types.Cardinality;
+import org.onap.sdc.generator.aai.types.Cardinality;
-@org.openecomp.sdc.generator.aai.types.Model(widget = Widget.Type.SERVICE,
+@org.onap.sdc.generator.aai.types.Model(widget = Widget.Type.SERVICE,
cardinality = Cardinality.UNBOUNDED, dataDeleteFlag = true)
public class Service extends Model {
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.generator.aai.model;
+package org.onap.sdc.generator.aai.model;
-import org.openecomp.sdc.generator.aai.types.ModelType;
-import org.openecomp.sdc.generator.aai.types.ModelWidget;
+import org.onap.sdc.generator.aai.types.ModelType;
+import org.onap.sdc.generator.aai.types.ModelWidget;
@ModelWidget(type = ModelType.WIDGET, name = "service-instance")
public class ServiceWidget extends Widget {
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.generator.aai.model;
+package org.onap.sdc.generator.aai.model;
-import org.openecomp.sdc.generator.aai.types.Cardinality;
-import org.openecomp.sdc.generator.aai.types.Model;
-import org.openecomp.sdc.generator.aai.types.ModelType;
-import org.openecomp.sdc.generator.aai.types.ModelWidget;
+import org.onap.sdc.generator.aai.types.Cardinality;
+import org.onap.sdc.generator.aai.types.ModelType;
+import org.onap.sdc.generator.aai.types.Model;
+import org.onap.sdc.generator.aai.types.ModelWidget;
@Model(widget = Widget.Type.TENANT, cardinality = Cardinality.UNBOUNDED, dataDeleteFlag = false)
@ModelWidget(type = ModelType.WIDGET, name = "tenant")
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.generator.aai.model;
+package org.onap.sdc.generator.aai.model;
-import org.openecomp.sdc.generator.aai.types.Cardinality;
-import org.openecomp.sdc.generator.aai.types.ModelType;
-import org.openecomp.sdc.generator.aai.types.ModelWidget;
+import org.onap.sdc.generator.aai.types.Cardinality;
+import org.onap.sdc.generator.aai.types.Model;
+import org.onap.sdc.generator.aai.types.ModelType;
+import org.onap.sdc.generator.aai.types.ModelWidget;
-@org.openecomp.sdc.generator.aai.types.Model(widget = Widget.Type.TUNNEL_XCONNECT,
+@Model(widget = Widget.Type.TUNNEL_XCONNECT,
cardinality = Cardinality.UNBOUNDED, dataDeleteFlag = true)
@ModelWidget(type = ModelType.WIDGET, name = "tunnel-xconnect")
public class TunnelXconnectWidget extends Widget {
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.generator.aai.model;
+package org.onap.sdc.generator.aai.model;
-import org.openecomp.sdc.generator.aai.types.Cardinality;
-import org.openecomp.sdc.generator.aai.types.Model;
-import org.openecomp.sdc.generator.aai.types.ModelType;
-import org.openecomp.sdc.generator.aai.types.ModelWidget;
+import org.onap.sdc.generator.aai.types.Cardinality;
+import org.onap.sdc.generator.aai.types.ModelType;
+import org.onap.sdc.generator.aai.types.Model;
+import org.onap.sdc.generator.aai.types.ModelWidget;
@Model(widget = Widget.Type.VSERVER, cardinality = Cardinality.UNBOUNDED, dataDeleteFlag = true)
@ModelWidget(type = ModelType.WIDGET, name = "vserver")
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.generator.aai.model;
+package org.onap.sdc.generator.aai.model;
-import org.openecomp.sdc.generator.aai.types.Cardinality;
-import org.openecomp.sdc.generator.aai.types.Model;
+import org.onap.sdc.generator.aai.types.Cardinality;
+import org.onap.sdc.generator.aai.types.Model;
import java.util.List;
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.generator.aai.model;
+package org.onap.sdc.generator.aai.model;
-import org.openecomp.sdc.generator.aai.types.Cardinality;
-import org.openecomp.sdc.generator.aai.types.ModelType;
-import org.openecomp.sdc.generator.aai.types.ModelWidget;
+import org.onap.sdc.generator.aai.types.Model;
+import org.onap.sdc.generator.aai.types.ModelType;
+import org.onap.sdc.generator.aai.types.Cardinality;
+import org.onap.sdc.generator.aai.types.ModelWidget;
-@org.openecomp.sdc.generator.aai.types.Model(widget = Widget.Type.VFMODULE,
+@Model(widget = Widget.Type.VFMODULE,
cardinality = Cardinality.UNBOUNDED, dataDeleteFlag = true)
@ModelWidget(type = ModelType.WIDGET, name = "vf-module")
public class VfModuleWidget extends Widget {
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.generator.aai.model;
+package org.onap.sdc.generator.aai.model;
-import org.openecomp.sdc.generator.aai.types.Cardinality;
-import org.openecomp.sdc.generator.aai.types.ModelType;
-import org.openecomp.sdc.generator.aai.types.ModelWidget;
+import org.onap.sdc.generator.aai.types.Cardinality;
+import org.onap.sdc.generator.aai.types.Model;
+import org.onap.sdc.generator.aai.types.ModelType;
+import org.onap.sdc.generator.aai.types.ModelWidget;
-@org.openecomp.sdc.generator.aai.types.Model(widget = Widget.Type.VF,
+@Model(widget = Widget.Type.VF,
cardinality = Cardinality.UNBOUNDED, dataDeleteFlag = true)
@ModelWidget(type = ModelType.WIDGET, name = "generic-vnf")
public class VfWidget extends ResourceWidget {
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.generator.aai.model;
+package org.onap.sdc.generator.aai.model;
-import org.openecomp.sdc.generator.aai.types.Cardinality;
-import org.openecomp.sdc.generator.aai.types.ModelType;
-import org.openecomp.sdc.generator.aai.types.ModelWidget;
+import org.onap.sdc.generator.aai.types.Cardinality;
+import org.onap.sdc.generator.aai.types.Model;
+import org.onap.sdc.generator.aai.types.ModelType;
+import org.onap.sdc.generator.aai.types.ModelWidget;
-@org.openecomp.sdc.generator.aai.types.Model(widget = Widget.Type.VFC,
+@Model(widget = Widget.Type.VFC,
cardinality = Cardinality.UNBOUNDED, dataDeleteFlag = true)
@ModelWidget(type = ModelType.WIDGET, name = "vnfc")
public class VfcWidget extends ResourceWidget {
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.generator.aai.model;
+package org.onap.sdc.generator.aai.model;
-import org.openecomp.sdc.generator.aai.types.Cardinality;
-import org.openecomp.sdc.generator.aai.types.Model;
+import org.onap.sdc.generator.aai.types.Cardinality;
+import org.onap.sdc.generator.aai.types.Model;
@Model(widget = Widget.Type.VF, cardinality = Cardinality.UNBOUNDED, dataDeleteFlag = true)
public class VirtualFunction extends Resource {
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.generator.aai.model;
+package org.onap.sdc.generator.aai.model;
-import org.openecomp.sdc.generator.aai.types.Cardinality;
-import org.openecomp.sdc.generator.aai.types.ModelType;
-import org.openecomp.sdc.generator.aai.types.ModelWidget;
+import org.onap.sdc.generator.aai.types.Cardinality;
+import org.onap.sdc.generator.aai.types.Model;
+import org.onap.sdc.generator.aai.types.ModelType;
+import org.onap.sdc.generator.aai.types.ModelWidget;
-@org.openecomp.sdc.generator.aai.types.Model(widget = Widget.Type.VOLUME_GROUP,
+@Model(widget = Widget.Type.VOLUME_GROUP,
cardinality = Cardinality.UNBOUNDED, dataDeleteFlag = true)
@ModelWidget(type = ModelType.WIDGET, name = "volume-group")
public class VolumeGroupWidget extends Widget {
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.generator.aai.model;
+package org.onap.sdc.generator.aai.model;
-import org.openecomp.sdc.generator.aai.types.Cardinality;
-import org.openecomp.sdc.generator.aai.types.Model;
-import org.openecomp.sdc.generator.aai.types.ModelType;
-import org.openecomp.sdc.generator.aai.types.ModelWidget;
+import org.onap.sdc.generator.aai.types.Cardinality;
+import org.onap.sdc.generator.aai.types.Model;
+import org.onap.sdc.generator.aai.types.ModelType;
+import org.onap.sdc.generator.aai.types.ModelWidget;
@Model(widget = Widget.Type.VOLUME, cardinality = Cardinality.UNBOUNDED, dataDeleteFlag = true)
@ModelWidget(type = ModelType.WIDGET, name = "volume")
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.generator.aai.model;
+package org.onap.sdc.generator.aai.model;
-import static org.openecomp.sdc.generator.data.GeneratorConstants.GENERATOR_AAI_CONFIGLPROP_NOT_FOUND;
-
-import org.openecomp.sdc.generator.aai.types.ModelType;
-import org.openecomp.sdc.generator.aai.types.ModelWidget;
-import org.openecomp.sdc.generator.data.ArtifactType;
-import org.openecomp.sdc.generator.data.GeneratorConstants;
-import org.openecomp.sdc.generator.data.WidgetConfigurationUtil;
-import org.openecomp.sdc.generator.error.IllegalAccessException;
+import org.onap.sdc.generator.aai.types.ModelType;
+import org.onap.sdc.generator.data.ArtifactType;
+import org.onap.sdc.generator.data.GeneratorConstants;
+import org.onap.sdc.generator.aai.types.ModelWidget;
+import org.onap.sdc.generator.data.WidgetConfigurationUtil;
+import org.onap.sdc.generator.error.IllegalAccessException;
import java.util.Collections;
import java.util.HashSet;
Properties properties = WidgetConfigurationUtil.getConfig();
String id = properties.getProperty(ArtifactType.AAI.name() + ".model-version-id." + getName());
if (id == null) {
- throw new IllegalArgumentException(String.format(GENERATOR_AAI_CONFIGLPROP_NOT_FOUND,
+ throw new IllegalArgumentException(String.format(
+ GeneratorConstants.GENERATOR_AAI_CONFIGLPROP_NOT_FOUND,
ArtifactType.AAI.name() + ".model-version-id." + getName()));
}
return id;
String id = properties.getProperty(ArtifactType.AAI.name() + ".model-invariant-id."
+ getName());
if (id == null) {
- throw new IllegalArgumentException(String.format(GENERATOR_AAI_CONFIGLPROP_NOT_FOUND,
+ throw new IllegalArgumentException(String.format(
+ GeneratorConstants.GENERATOR_AAI_CONFIGLPROP_NOT_FOUND,
ArtifactType.AAI.name() + ".model-invariant-id." + getName()));
}
return id;
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.generator.aai.tosca;
+package org.onap.sdc.generator.aai.tosca;
import java.util.Map;
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.generator.aai.tosca;
+package org.onap.sdc.generator.aai.tosca;
import java.util.List;
import java.util.Map;
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.generator.aai.tosca;
+package org.onap.sdc.generator.aai.tosca;
import java.util.List;
import java.util.Map;
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.generator.aai.tosca;
+package org.onap.sdc.generator.aai.tosca;
public class RequirementAssignment {
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.generator.aai.tosca;
+package org.onap.sdc.generator.aai.tosca;
import java.util.HashMap;
import java.util.Map;
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.generator.aai.tosca;
+package org.onap.sdc.generator.aai.tosca;
import java.util.Map;
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.generator.aai.types;
+package org.onap.sdc.generator.aai.types;
public enum Cardinality {
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.generator.aai.types;
+package org.onap.sdc.generator.aai.types;
-import org.openecomp.sdc.generator.aai.model.Widget;
+import org.onap.sdc.generator.aai.model.Widget.Type;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
*
* @return the widget . type
*/
- public Widget.Type widget();
+ public Type widget();
/**
* Data delete flag boolean.
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.generator.aai.types;
+package org.onap.sdc.generator.aai.types;
public enum ModelType {
SERVICE, RESOURCE, WIDGET;
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.generator.aai.types;
+package org.onap.sdc.generator.aai.types;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.generator.data;
+package org.onap.sdc.generator.data;
public enum AdditionalParams {
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.generator.data;
+package org.onap.sdc.generator.data;
public class Artifact {
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.generator.data;
+package org.onap.sdc.generator.data;
public enum ArtifactType {
OTHER,
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.generator.data;
+package org.onap.sdc.generator.data;
import java.util.ArrayList;
import java.util.HashMap;
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.generator.data;
+package org.onap.sdc.generator.data;
import java.util.List;
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.generator.data;
+package org.onap.sdc.generator.data;
public class GeneratorConstants {
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.generator.data;
+package org.onap.sdc.generator.data;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.generator.data;
+package org.onap.sdc.generator.data;
public enum GroupType {
DEPLOYMENT,
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.generator.data;
+package org.onap.sdc.generator.data;
import java.util.Properties;
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.generator.error;
+package org.onap.sdc.generator.error;
public class IllegalAccessException extends RuntimeException {
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.generator.intf;
+package org.onap.sdc.generator.intf;
-import org.openecomp.sdc.generator.data.Artifact;
-import org.openecomp.sdc.generator.data.GenerationData;
+import org.onap.sdc.generator.data.GenerationData;
+import org.onap.sdc.generator.data.Artifact;
import java.util.List;
import java.util.Map;
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.generator.intf;
+package org.onap.sdc.generator.intf;
-import org.openecomp.sdc.generator.data.ArtifactType;
+import org.onap.sdc.generator.data.ArtifactType;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.generator.logging;
+package org.onap.sdc.generator.logging;
import java.util.HashMap;
import java.util.Map;
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.generator.logging;
+package org.onap.sdc.generator.logging;
public enum CategoryLogLevel {
INFO,
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.generator.logging;
+package org.onap.sdc.generator.logging;
public enum StatusCode {
COMPLETE,
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.generator.logging.annotations;
+package org.onap.sdc.generator.logging.annotations;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.generator.logging.annotations;
+package org.onap.sdc.generator.logging.annotations;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.generator.service;
-
-import static org.openecomp.sdc.generator.data.GeneratorConstants.ERROR_CATEGORY;
-import static org.openecomp.sdc.generator.data.GeneratorConstants.ERROR_CODE;
-import static org.openecomp.sdc.generator.data.GeneratorConstants.ERROR_DESCRIPTION;
-import static org.openecomp.sdc.generator.data.GeneratorConstants.GENERATOR_ERROR_CODE;
-import static org.openecomp.sdc.generator.data.GeneratorConstants.GENERATOR_ERROR_SERVICE_INSTANTIATION_FAILED;
-import static org.openecomp.sdc.generator.data.GeneratorConstants.GENERATOR_PARTNER_NAME;
-import static org.openecomp.sdc.generator.data.GeneratorConstants.PARTNER_NAME;
+package org.onap.sdc.generator.service;
+import org.onap.sdc.generator.data.GenerationData;
+import org.onap.sdc.generator.data.GeneratorConstants;
import org.openecomp.sdc.logging.api.Logger;
import org.openecomp.sdc.logging.api.LoggerFactory;
-import org.openecomp.sdc.generator.data.Artifact;
-import org.openecomp.sdc.generator.data.GenerationData;
-import org.openecomp.sdc.generator.logging.CategoryLogLevel;
+import org.onap.sdc.generator.data.Artifact;
+import org.onap.sdc.generator.logging.CategoryLogLevel;
import org.slf4j.MDC;
-import java.io.PrintWriter;
-import java.io.StringWriter;
import java.util.List;
import java.util.Map;
Class.forName("org.openecomp.sdc.generator.impl.ArtifactGenerationServiceImpl")
.newInstance());
} catch (Exception exception) {
- MDC.put(PARTNER_NAME, GENERATOR_PARTNER_NAME);
- MDC.put(ERROR_CATEGORY, CategoryLogLevel.ERROR.name());
- MDC.put(ERROR_CODE, GENERATOR_ERROR_CODE);
- MDC.put(ERROR_DESCRIPTION, GENERATOR_ERROR_SERVICE_INSTANTIATION_FAILED);
- log.error(GENERATOR_ERROR_SERVICE_INSTANTIATION_FAILED, exception);
+ MDC.put(GeneratorConstants.PARTNER_NAME, GeneratorConstants.GENERATOR_PARTNER_NAME);
+ MDC.put(GeneratorConstants.ERROR_CATEGORY, CategoryLogLevel.ERROR.name());
+ MDC.put(GeneratorConstants.ERROR_CODE, GeneratorConstants.GENERATOR_ERROR_CODE);
+ MDC.put(
+ GeneratorConstants.ERROR_DESCRIPTION, GeneratorConstants.GENERATOR_ERROR_SERVICE_INSTANTIATION_FAILED);
+ log.error(GeneratorConstants.GENERATOR_ERROR_SERVICE_INSTANTIATION_FAILED, exception);
}
- log.debug(GENERATOR_ERROR_SERVICE_INSTANTIATION_FAILED);
+ log.debug(GeneratorConstants.GENERATOR_ERROR_SERVICE_INSTANTIATION_FAILED);
return null;
}
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
- <name>openecomp-sdc-artifact-generator-core</name>
- <artifactId>openecomp-sdc-artifact-generator-core</artifactId>
+ <name>onap-sdc-artifact-generator-core</name>
+ <artifactId>onap-sdc-artifact-generator-core</artifactId>
<parent>
- <artifactId>openecomp-common-lib</artifactId>
- <groupId>org.openecomp.sdc.common</groupId>
+ <artifactId>onap-common-lib</artifactId>
+ <groupId>org.onap.sdc.common</groupId>
<version>1.2.0-SNAPSHOT</version>
<relativePath>../../</relativePath>
</parent>
<scope>runtime</scope>
</dependency>
<dependency>
- <groupId>org.openecomp.sdc.common</groupId>
- <artifactId>openecomp-sdc-artifact-generator-api</artifactId>
+ <groupId>org.onap.sdc.common</groupId>
+ <artifactId>onap-sdc-artifact-generator-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.generator;
+package org.onap.sdc.generator;
-import static org.openecomp.sdc.generator.data.GeneratorConstants.GENERATOR_ERROR_INVALID_CLIENT_CONFIGURATION;
-import static org.openecomp.sdc.generator.util.ArtifactGeneratorUtil.logError;
+import static org.onap.sdc.generator.util.ArtifactGeneratorUtil.logError;
import com.fasterxml.jackson.databind.ObjectMapper;
+import org.onap.sdc.generator.data.ArtifactType;
+import org.onap.sdc.generator.data.GeneratorConfiguration;
+import org.onap.sdc.generator.data.GeneratorConstants;
+import org.onap.sdc.generator.intf.ArtifactGenerator;
+import org.onap.sdc.generator.intf.Generator;
+import org.onap.sdc.generator.util.ArtifactGeneratorUtil;
import org.openecomp.sdc.logging.api.Logger;
import org.openecomp.sdc.logging.api.LoggerFactory;
-import org.openecomp.sdc.generator.data.ArtifactType;
-import org.openecomp.sdc.generator.data.GeneratorConfiguration;
-import org.openecomp.sdc.generator.intf.ArtifactGenerator;
-import org.openecomp.sdc.generator.intf.Generator;
import org.reflections.Reflections;
import java.util.ArrayList;
if (generators.isEmpty()) {
log.debug("Getting list of active generators");
- Reflections reflections = new Reflections("org.openecomp.sdc.generator");
+ Reflections reflections = new Reflections("org.onap.sdc.generator");
Set<Class<?>> annotated = reflections.getTypesAnnotatedWith(Generator.class);
for (Class<?> clazz : annotated) {
Generator generator = clazz.getAnnotation(Generator.class);
try {
return new ObjectMapper().readValue(jsonConfiguration, GeneratorConfiguration.class);
} catch (Exception exception) {
- logError(GENERATOR_ERROR_INVALID_CLIENT_CONFIGURATION, exception);
+ ArtifactGeneratorUtil
+ .logError(GeneratorConstants.GENERATOR_ERROR_INVALID_CLIENT_CONFIGURATION, exception);
throw new IllegalArgumentException(
- GENERATOR_ERROR_INVALID_CLIENT_CONFIGURATION, exception);
+ GeneratorConstants.GENERATOR_ERROR_INVALID_CLIENT_CONFIGURATION, exception);
}
}
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.generator;
+package org.onap.sdc.generator;
+import org.onap.sdc.generator.data.Artifact;
+import org.onap.sdc.generator.data.GenerationData;
+import org.onap.sdc.generator.intf.ArtifactGenerator;
import org.openecomp.sdc.logging.api.Logger;
import org.openecomp.sdc.logging.api.LoggerFactory;
-import org.openecomp.sdc.generator.data.Artifact;
-import org.openecomp.sdc.generator.data.GenerationData;
-import org.openecomp.sdc.generator.intf.ArtifactGenerator;
import java.util.LinkedList;
import java.util.List;
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.generator;
+package org.onap.sdc.generator;
-import org.openecomp.sdc.generator.data.Artifact;
-import org.openecomp.sdc.generator.data.ArtifactType;
-import org.openecomp.sdc.generator.data.GenerationData;
-import org.openecomp.sdc.generator.data.GeneratorUtil;
-import org.openecomp.sdc.generator.data.GroupType;
-import org.openecomp.sdc.generator.intf.ArtifactGenerator;
-import org.openecomp.sdc.generator.intf.Generator;
+import org.onap.sdc.generator.data.GenerationData;
+import org.onap.sdc.generator.intf.ArtifactGenerator;
+import org.onap.sdc.generator.data.Artifact;
+import org.onap.sdc.generator.data.ArtifactType;
+import org.onap.sdc.generator.data.GeneratorUtil;
+import org.onap.sdc.generator.data.GroupType;
+import org.onap.sdc.generator.intf.Generator;
import java.util.Date;
import java.util.List;
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.generator.aai;
-
-import static org.openecomp.sdc.generator.data.GeneratorConstants.ARTIFACT_MODEL_INFO;
-import static org.openecomp.sdc.generator.data.GeneratorConstants.GENERATOR_AAI_CONFIGFILE_NOT_FOUND;
-import static org.openecomp.sdc.generator.data.GeneratorConstants.GENERATOR_AAI_CONFIGLOCATION_NOT_FOUND;
-import static org.openecomp.sdc.generator.data.GeneratorConstants.GENERATOR_AAI_PROVIDING_SERVICE_METADATA_MISSING;
-import static org.openecomp.sdc.generator.data.GeneratorConstants.GENERATOR_AAI_PROVIDING_SERVICE_MISSING;
-import static org.openecomp.sdc.generator.data.GeneratorConstants.ID_LENGTH;
-import static org.openecomp.sdc.generator.util.ArtifactGeneratorUtil.logError;
-
+package org.onap.sdc.generator.aai;
+
+import static org.onap.sdc.generator.util.ArtifactGeneratorUtil.logError;
+
+import org.onap.sdc.generator.aai.model.AllotedResource;
+import org.onap.sdc.generator.aai.model.ProvidingService;
+import org.onap.sdc.generator.aai.model.Resource;
+import org.onap.sdc.generator.aai.model.Service;
+import org.onap.sdc.generator.aai.model.Widget;
+import org.onap.sdc.generator.aai.tosca.GroupDefinition;
+import org.onap.sdc.generator.aai.types.ModelType;
+import org.onap.sdc.generator.data.AdditionalParams;
+import org.onap.sdc.generator.data.ArtifactType;
+import org.onap.sdc.generator.data.GenerationData;
+import org.onap.sdc.generator.data.GeneratorConstants;
+import org.onap.sdc.generator.data.GroupType;
+import org.onap.sdc.generator.data.WidgetConfigurationUtil;
+import org.onap.sdc.generator.intf.ArtifactGenerator;
+import org.onap.sdc.generator.intf.Generator;
+import org.onap.sdc.generator.util.ArtifactGeneratorUtil;
import org.openecomp.sdc.logging.api.Logger;
import org.openecomp.sdc.logging.api.LoggerFactory;
-import org.openecomp.sdc.generator.aai.model.AllotedResource;
-import org.openecomp.sdc.generator.aai.model.ProvidingService;
-import org.openecomp.sdc.generator.aai.model.L3NetworkWidget;
-import org.openecomp.sdc.generator.aai.model.Model;
-import org.openecomp.sdc.generator.aai.model.Resource;
-import org.openecomp.sdc.generator.aai.model.Service;
-import org.openecomp.sdc.generator.aai.model.TunnelXconnectWidget;
-import org.openecomp.sdc.generator.aai.model.VfModule;
-import org.openecomp.sdc.generator.aai.model.Widget;
-import org.openecomp.sdc.generator.aai.tosca.GroupDefinition;
-import org.openecomp.sdc.generator.aai.tosca.NodeTemplate;
-import org.openecomp.sdc.generator.aai.tosca.ToscaTemplate;
-import org.openecomp.sdc.generator.aai.types.ModelType;
-import org.openecomp.sdc.generator.data.AdditionalParams;
-import org.openecomp.sdc.generator.data.Artifact;
-import org.openecomp.sdc.generator.data.ArtifactType;
-import org.openecomp.sdc.generator.data.GenerationData;
-import org.openecomp.sdc.generator.data.GeneratorConstants;
-import org.openecomp.sdc.generator.data.GeneratorUtil;
-import org.openecomp.sdc.generator.data.GroupType;
-import org.openecomp.sdc.generator.data.WidgetConfigurationUtil;
-import org.openecomp.sdc.generator.intf.ArtifactGenerator;
-import org.openecomp.sdc.generator.intf.Generator;
-import org.openecomp.sdc.generator.logging.annotations.Audit;
-import org.openecomp.sdc.generator.util.ArtifactGeneratorUtil;
+import org.onap.sdc.generator.aai.model.L3NetworkWidget;
+import org.onap.sdc.generator.aai.model.Model;
+import org.onap.sdc.generator.aai.model.TunnelXconnectWidget;
+import org.onap.sdc.generator.aai.model.VfModule;
+import org.onap.sdc.generator.aai.tosca.NodeTemplate;
+import org.onap.sdc.generator.aai.tosca.ToscaTemplate;
+import org.onap.sdc.generator.data.Artifact;
+import org.onap.sdc.generator.data.GeneratorUtil;
+import org.onap.sdc.generator.logging.annotations.Audit;
import org.slf4j.MDC;
import java.io.File;
initWidgetConfiguration();
return generateArtifactInternal(input, additionalParams);
} catch (Exception exception) {
- logError(exception.getMessage(), exception);
+ ArtifactGeneratorUtil.logError(exception.getMessage(), exception);
GenerationData generationData = new GenerationData();
generationData.add(ArtifactType.AAI.name(), exception.getMessage());
return generationData;
AaiModelGenerator modelGenerator = AaiModelGenerator.getInstance();
//Generate AAI XML service model
- MDC.put(ARTIFACT_MODEL_INFO , service.getModelName() + "," + getArtifactLabel(service));
+ MDC.put(GeneratorConstants.ARTIFACT_MODEL_INFO , service.getModelName() + "," + getArtifactLabel(service));
String aaiServiceModel = modelGenerator.generateModelFor(service);
generationData.add(getServiceArtifact(service, aaiServiceModel));
//Generate AAI XML resource model
for (Resource res : resources) {
- MDC.put(ARTIFACT_MODEL_INFO , res.getModelName() + "," + getArtifactLabel(res));
+ MDC.put(GeneratorConstants.ARTIFACT_MODEL_INFO , res.getModelName() + "," + getArtifactLabel(res));
String aaiResourceModel = modelGenerator.generateModelFor(res);
generationData.add(getResourceArtifact(res, aaiResourceModel));
}
if (nodeProperties.get("providing_service_uuid") == null || nodeProperties.get(
"providing_service_invariant_uuid") == null) {
throw new IllegalArgumentException(String.format(
- GENERATOR_AAI_PROVIDING_SERVICE_METADATA_MISSING
+ GeneratorConstants.GENERATOR_AAI_PROVIDING_SERVICE_METADATA_MISSING
, model.getModelId()));
}
for (String key1 : nodeProperties.keySet()) {
}
if(model instanceof AllotedResource){
if(!flag) {
- throw new IllegalArgumentException(String.format(GENERATOR_AAI_PROVIDING_SERVICE_MISSING,
+ throw new IllegalArgumentException(String.format(
+ GeneratorConstants.GENERATOR_AAI_PROVIDING_SERVICE_MISSING,
model.getModelId()));
}
}
.format(GeneratorConstants.GENERATOR_AAI_ERROR_MANDATORY_METADATA_DEFINITION,
"invariantUUID",
input.getName()));
- } else if (tosca.getMetadata().get("invariantUUID").length() != ID_LENGTH) {
+ } else if (tosca.getMetadata().get("invariantUUID").length() != GeneratorConstants.ID_LENGTH) {
throw new IllegalArgumentException(String.format(
GeneratorConstants.GENERATOR_AAI_ERROR_INVALID_ID, "invariantUUID", input.getName()));
}
throw new IllegalArgumentException(String
.format(GeneratorConstants.GENERATOR_AAI_ERROR_MANDATORY_METADATA_DEFINITION, "UUID",
input.getName()));
- } else if (tosca.getMetadata().get("UUID").length() != ID_LENGTH) {
+ } else if (tosca.getMetadata().get("UUID").length() != GeneratorConstants.ID_LENGTH) {
throw new IllegalArgumentException(String
.format(GeneratorConstants.GENERATOR_AAI_ERROR_INVALID_ID, "UUID", input.getName()));
}
throw new IllegalArgumentException(String
.format(GeneratorConstants.GENERATOR_AAI_ERROR_MANDATORY_METADATA_DEFINITION,
"vfModuleModelInvariantUUID", input.getName()));
- } else if (gd.getMetadata().get("vfModuleModelInvariantUUID").length() != ID_LENGTH) {
+ } else if (gd.getMetadata().get("vfModuleModelInvariantUUID").length() != GeneratorConstants.ID_LENGTH) {
throw new IllegalArgumentException(String.format(
GeneratorConstants.GENERATOR_AAI_ERROR_INVALID_ID, "vfModuleModelInvariantUUID",
input.getName()));
.format(GeneratorConstants.GENERATOR_AAI_ERROR_MANDATORY_METADATA_DEFINITION,
"vfModuleModelUUID",
input.getName()));
- } else if (gd.getMetadata().get("vfModuleModelUUID").length() != ID_LENGTH) {
+ } else if (gd.getMetadata().get("vfModuleModelUUID").length() != GeneratorConstants.ID_LENGTH) {
throw new IllegalArgumentException(String.format(
GeneratorConstants.GENERATOR_AAI_ERROR_INVALID_ID, "vfModuleModelUUID",
input.getName()));
properties.load(new FileInputStream(file));
WidgetConfigurationUtil.setConfig(properties);
} else {
- throw new IllegalArgumentException(String.format(GENERATOR_AAI_CONFIGFILE_NOT_FOUND,
+ throw new IllegalArgumentException(String.format(
+ GeneratorConstants.GENERATOR_AAI_CONFIGFILE_NOT_FOUND,
configLocation));
}
} else {
- throw new IllegalArgumentException(GENERATOR_AAI_CONFIGLOCATION_NOT_FOUND);
+ throw new IllegalArgumentException(GeneratorConstants.GENERATOR_AAI_CONFIGLOCATION_NOT_FOUND);
}
}
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.generator.aai;
+package org.onap.sdc.generator.aai;
import org.openecomp.sdc.logging.api.Logger;
import org.openecomp.sdc.logging.api.LoggerFactory;
-import org.openecomp.sdc.generator.aai.model.Resource;
-import org.openecomp.sdc.generator.aai.model.Service;
-import org.openecomp.sdc.generator.aai.model.Widget;
-import org.openecomp.sdc.generator.aai.xml.Model;
-import org.openecomp.sdc.generator.aai.xml.ModelElement;
-import org.openecomp.sdc.generator.aai.xml.ModelElements;
-import org.openecomp.sdc.generator.aai.xml.ModelVer;
-import org.openecomp.sdc.generator.aai.xml.ModelVers;
-import org.openecomp.sdc.generator.aai.xml.Relationship;
-import org.openecomp.sdc.generator.aai.xml.RelationshipData;
-import org.openecomp.sdc.generator.aai.xml.RelationshipList;
-import org.openecomp.sdc.generator.logging.annotations.Metrics;
+import org.onap.sdc.generator.aai.model.Resource;
+import org.onap.sdc.generator.aai.model.Service;
+import org.onap.sdc.generator.aai.model.Widget;
+import org.onap.sdc.generator.aai.xml.Model;
+import org.onap.sdc.generator.aai.xml.ModelElement;
+import org.onap.sdc.generator.aai.xml.ModelElements;
+import org.onap.sdc.generator.aai.xml.ModelVer;
+import org.onap.sdc.generator.aai.xml.ModelVers;
+import org.onap.sdc.generator.aai.xml.Relationship;
+import org.onap.sdc.generator.aai.xml.RelationshipData;
+import org.onap.sdc.generator.aai.xml.RelationshipList;
+import org.onap.sdc.generator.logging.annotations.Metrics;
import org.w3c.dom.DOMException;
import java.io.StringWriter;
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.generator.impl;
+package org.onap.sdc.generator.impl;
-import static org.openecomp.sdc.generator.data.GeneratorConstants.GENERATOR_ERROR_ARTIFACT_GENERATION_FAILED;
-import static org.openecomp.sdc.generator.data.GeneratorConstants.GENERATOR_INVOCATION_ERROR_CODE;
-import static org.openecomp.sdc.generator.util.ArtifactGeneratorUtil.logError;
+import static org.onap.sdc.generator.util.ArtifactGeneratorUtil.logError;
+import org.onap.sdc.generator.data.GeneratorConstants;
+import org.onap.sdc.generator.util.ArtifactGeneratorUtil;
import org.openecomp.sdc.logging.api.Logger;
import org.openecomp.sdc.logging.api.LoggerFactory;
-import org.openecomp.sdc.generator.GeneratorManager;
-import org.openecomp.sdc.generator.GeneratorTask;
-import org.openecomp.sdc.generator.data.Artifact;
-import org.openecomp.sdc.generator.data.GenerationData;
-import org.openecomp.sdc.generator.intf.ArtifactGenerator;
-import org.openecomp.sdc.generator.service.ArtifactGenerationService;
-import org.openecomp.sdc.generator.util.ArtifactGeneratorUtil;
+import org.onap.sdc.generator.GeneratorManager;
+import org.onap.sdc.generator.GeneratorTask;
+import org.onap.sdc.generator.data.Artifact;
+import org.onap.sdc.generator.data.GenerationData;
+import org.onap.sdc.generator.intf.ArtifactGenerator;
+import org.onap.sdc.generator.service.ArtifactGenerationService;
import java.util.List;
import java.util.Map;
}
} catch (IllegalArgumentException iae) {
//Invalid client configuration
- logError(GENERATOR_ERROR_ARTIFACT_GENERATION_FAILED, iae);
+ ArtifactGeneratorUtil
+ .logError(GeneratorConstants.GENERATOR_ERROR_ARTIFACT_GENERATION_FAILED, iae);
GenerationData errorData = new GenerationData();
- errorData.add(GENERATOR_INVOCATION_ERROR_CODE, iae.getMessage());
+ errorData.add(GeneratorConstants.GENERATOR_INVOCATION_ERROR_CODE, iae.getMessage());
return errorData;
} catch (Exception ex) {
- logError(GENERATOR_ERROR_ARTIFACT_GENERATION_FAILED, ex);
+ ArtifactGeneratorUtil
+ .logError(GeneratorConstants.GENERATOR_ERROR_ARTIFACT_GENERATION_FAILED, ex);
GenerationData errorData = new GenerationData();
- errorData.add(GENERATOR_INVOCATION_ERROR_CODE,
- GENERATOR_ERROR_ARTIFACT_GENERATION_FAILED);
+ errorData.add(GeneratorConstants.GENERATOR_INVOCATION_ERROR_CODE,
+ GeneratorConstants.GENERATOR_ERROR_ARTIFACT_GENERATION_FAILED);
return errorData;
}
}
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.generator.util;
+package org.onap.sdc.generator.util;
-import static org.openecomp.sdc.generator.data.GeneratorConstants.BEGIN_TIMESTAMP;
-import static org.openecomp.sdc.generator.data.GeneratorConstants.BE_FQDN;
-import static org.openecomp.sdc.generator.data.GeneratorConstants.CATEGORY_LOG_LEVEL;
-import static org.openecomp.sdc.generator.data.GeneratorConstants.CLIENT_IP;
-import static org.openecomp.sdc.generator.data.GeneratorConstants.ELAPSED_TIME;
-import static org.openecomp.sdc.generator.data.GeneratorConstants.END_TIMESTAMP;
-import static org.openecomp.sdc.generator.data.GeneratorConstants.ERROR_CATEGORY;
-import static org.openecomp.sdc.generator.data.GeneratorConstants.ERROR_CODE;
-import static org.openecomp.sdc.generator.data.GeneratorConstants.ERROR_DESCRIPTION;
-import static org.openecomp.sdc.generator.data.GeneratorConstants.GENERATOR_AAI_CONFIGFILE_NOT_FOUND;
-import static org.openecomp.sdc.generator.data.GeneratorConstants.GENERATOR_AAI_CONFIGLOCATION_NOT_FOUND;
-import static org.openecomp.sdc.generator.data.GeneratorConstants.GENERATOR_AAI_CONFIGLPROP_NOT_FOUND;
-import static org.openecomp.sdc.generator.data.GeneratorConstants.GENERATOR_AAI_PROVIDING_SERVICE_METADATA_MISSING;
-import static org.openecomp.sdc.generator.data.GeneratorConstants.GENERATOR_AAI_PROVIDING_SERVICE_MISSING;
-import static org.openecomp.sdc.generator.data.GeneratorConstants.GENERATOR_AAI_ERROR_INVALID_ID;
-import static org.openecomp.sdc.generator.data.GeneratorConstants.GENERATOR_AAI_ERROR_INVALID_RESOURCE_VERSION_IN_SERVICE_TOSCA;
-import static org.openecomp.sdc.generator.data.GeneratorConstants.GENERATOR_AAI_ERROR_INVALID_TOSCA_MSG;
-import static org.openecomp.sdc.generator.data.GeneratorConstants.GENERATOR_AAI_ERROR_MANDATORY_METADATA_DEFINITION_MSG;
-import static org.openecomp.sdc.generator.data.GeneratorConstants.GENERATOR_AAI_ERROR_MISSING_RESOURCE_TOSCA;
-import static org.openecomp.sdc.generator.data.GeneratorConstants.GENERATOR_AAI_ERROR_MISSING_SERVICE_TOSCA_MSG;
-import static org.openecomp.sdc.generator.data.GeneratorConstants.GENERATOR_AAI_ERROR_MISSING_SERVICE_VERSION;
-import static org.openecomp.sdc.generator.data.GeneratorConstants.GENERATOR_AAI_ERROR_NULL_RESOURCE_VERSION_IN_SERVICE_TOSCA;
-import static org.openecomp.sdc.generator.data.GeneratorConstants.GENERATOR_AAI_INVALID_SERVICE_VERSION;
-import static org.openecomp.sdc.generator.data.GeneratorConstants.GENERATOR_ERROR_ARTIFACT_GENERATION_FAILED_MSG;
-import static org.openecomp.sdc.generator.data.GeneratorConstants.GENERATOR_ERROR_INVALID_CLIENT_CONFIGURATION_MSG;
-import static org.openecomp.sdc.generator.data.GeneratorConstants.GENERATOR_PARTNER_NAME;
-import static org.openecomp.sdc.generator.data.GeneratorConstants.INSTANCE_UUID;
-import static org.openecomp.sdc.generator.data.GeneratorConstants.LOCAL_ADDR;
-import static org.openecomp.sdc.generator.data.GeneratorConstants.MDC_SDC_INSTANCE_UUID;
-import static org.openecomp.sdc.generator.data.GeneratorConstants.PARTNER_NAME;
-import static org.openecomp.sdc.generator.data.GeneratorConstants.REMOTE_HOST;
-import static org.openecomp.sdc.generator.data.GeneratorConstants.REQUEST_ID;
-import static org.openecomp.sdc.generator.data.GeneratorConstants.RESPONSE_CODE;
-import static org.openecomp.sdc.generator.data.GeneratorConstants.RESPONSE_DESCRIPTION;
-import static org.openecomp.sdc.generator.data.GeneratorConstants.SERVICE_INSTANCE_ID;
-import static org.openecomp.sdc.generator.data.GeneratorConstants.SERVICE_METRIC_BEGIN_TIMESTAMP;
-import static org.openecomp.sdc.generator.data.GeneratorConstants.SERVICE_NAME;
-import static org.openecomp.sdc.generator.data.GeneratorConstants.STATUS_CODE;
-import static org.openecomp.sdc.generator.data.GeneratorConstants.TARGET_ENTITY;
-import static org.openecomp.sdc.generator.data.GeneratorConstants.TARGET_SERVICE_NAME;
-import static org.openecomp.sdc.generator.logging.ArtifactGeneratorLogResponseCode.INTERNAL_SERVER_ERROR;
-import static org.openecomp.sdc.generator.logging.ArtifactGeneratorLogResponseCode.INVALID_CLIENT_CONFIGURATION;
-import static org.openecomp.sdc.generator.logging.ArtifactGeneratorLogResponseCode.INVALID_ID_VALUE;
-import static org.openecomp.sdc.generator.logging.ArtifactGeneratorLogResponseCode.INVALID_RESOURCE_VERSION;
-import static org.openecomp.sdc.generator.logging.ArtifactGeneratorLogResponseCode.INVALID_SERVICE_VERSION;
-import static org.openecomp.sdc.generator.logging.ArtifactGeneratorLogResponseCode.INVALID_TOSCA_YAML;
-import static org.openecomp.sdc.generator.logging.ArtifactGeneratorLogResponseCode.MANDATORY_ATTRIBUTE_MISSING;
-import static org.openecomp.sdc.generator.logging.ArtifactGeneratorLogResponseCode.MISSING_CONFIG_PROPERTIES_FILE;
-import static org.openecomp.sdc.generator.logging.ArtifactGeneratorLogResponseCode.MISSING_PRO_SERVICE;
-import static org.openecomp.sdc.generator.logging.ArtifactGeneratorLogResponseCode.MISSING_PRO_SERVICE_METADATA;
-import static org.openecomp.sdc.generator.logging.ArtifactGeneratorLogResponseCode.MISSING_RESOURCE_VERSION;
-import static org.openecomp.sdc.generator.logging.ArtifactGeneratorLogResponseCode.MISSING_SERVICE_VERSION;
-import static org.openecomp.sdc.generator.logging.ArtifactGeneratorLogResponseCode.MISSING_SYSTME_PROPERY_CONFIGURATION;
-import static org.openecomp.sdc.generator.logging.ArtifactGeneratorLogResponseCode.MISSING_WIDGET_CONFIGURATION;
-import static org.openecomp.sdc.generator.logging.ArtifactGeneratorLogResponseCode.RESOURCE_TOSCA_MISSING;
-import static org.openecomp.sdc.generator.logging.ArtifactGeneratorLogResponseCode.SERVICE_TOSCA_MISSING;
-import static org.openecomp.sdc.generator.logging.ArtifactGeneratorLogResponseCode.UNABLE_TO_GENERATE_ARTIFACT;
+import static org.onap.sdc.generator.data.GeneratorConstants.BEGIN_TIMESTAMP;
+import static org.onap.sdc.generator.data.GeneratorConstants.BE_FQDN;
+import static org.onap.sdc.generator.data.GeneratorConstants.CATEGORY_LOG_LEVEL;
+import static org.onap.sdc.generator.data.GeneratorConstants.CLIENT_IP;
+import static org.onap.sdc.generator.data.GeneratorConstants.ELAPSED_TIME;
+import static org.onap.sdc.generator.data.GeneratorConstants.END_TIMESTAMP;
+import static org.onap.sdc.generator.data.GeneratorConstants.ERROR_CATEGORY;
+import static org.onap.sdc.generator.data.GeneratorConstants.ERROR_CODE;
+import static org.onap.sdc.generator.data.GeneratorConstants.ERROR_DESCRIPTION;
+import static org.onap.sdc.generator.data.GeneratorConstants.GENERATOR_AAI_CONFIGFILE_NOT_FOUND;
+import static org.onap.sdc.generator.data.GeneratorConstants.GENERATOR_AAI_CONFIGLOCATION_NOT_FOUND;
+import static org.onap.sdc.generator.data.GeneratorConstants.GENERATOR_AAI_CONFIGLPROP_NOT_FOUND;
+import static org.onap.sdc.generator.data.GeneratorConstants.GENERATOR_AAI_PROVIDING_SERVICE_METADATA_MISSING;
+import static org.onap.sdc.generator.data.GeneratorConstants.GENERATOR_AAI_PROVIDING_SERVICE_MISSING;
+import static org.onap.sdc.generator.data.GeneratorConstants.GENERATOR_AAI_ERROR_INVALID_ID;
+import static org.onap.sdc.generator.data.GeneratorConstants.GENERATOR_AAI_ERROR_INVALID_RESOURCE_VERSION_IN_SERVICE_TOSCA;
+import static org.onap.sdc.generator.data.GeneratorConstants.GENERATOR_AAI_ERROR_INVALID_TOSCA_MSG;
+import static org.onap.sdc.generator.data.GeneratorConstants.GENERATOR_AAI_ERROR_MANDATORY_METADATA_DEFINITION_MSG;
+import static org.onap.sdc.generator.data.GeneratorConstants.GENERATOR_AAI_ERROR_MISSING_RESOURCE_TOSCA;
+import static org.onap.sdc.generator.data.GeneratorConstants.GENERATOR_AAI_ERROR_MISSING_SERVICE_TOSCA_MSG;
+import static org.onap.sdc.generator.data.GeneratorConstants.GENERATOR_AAI_ERROR_MISSING_SERVICE_VERSION;
+import static org.onap.sdc.generator.data.GeneratorConstants.GENERATOR_AAI_ERROR_NULL_RESOURCE_VERSION_IN_SERVICE_TOSCA;
+import static org.onap.sdc.generator.data.GeneratorConstants.GENERATOR_AAI_INVALID_SERVICE_VERSION;
+import static org.onap.sdc.generator.data.GeneratorConstants.GENERATOR_ERROR_ARTIFACT_GENERATION_FAILED_MSG;
+import static org.onap.sdc.generator.data.GeneratorConstants.GENERATOR_ERROR_INVALID_CLIENT_CONFIGURATION_MSG;
+import static org.onap.sdc.generator.data.GeneratorConstants.GENERATOR_PARTNER_NAME;
+import static org.onap.sdc.generator.data.GeneratorConstants.INSTANCE_UUID;
+import static org.onap.sdc.generator.data.GeneratorConstants.LOCAL_ADDR;
+import static org.onap.sdc.generator.data.GeneratorConstants.MDC_SDC_INSTANCE_UUID;
+import static org.onap.sdc.generator.data.GeneratorConstants.PARTNER_NAME;
+import static org.onap.sdc.generator.data.GeneratorConstants.REMOTE_HOST;
+import static org.onap.sdc.generator.data.GeneratorConstants.REQUEST_ID;
+import static org.onap.sdc.generator.data.GeneratorConstants.RESPONSE_CODE;
+import static org.onap.sdc.generator.data.GeneratorConstants.RESPONSE_DESCRIPTION;
+import static org.onap.sdc.generator.data.GeneratorConstants.SERVICE_INSTANCE_ID;
+import static org.onap.sdc.generator.data.GeneratorConstants.SERVICE_METRIC_BEGIN_TIMESTAMP;
+import static org.onap.sdc.generator.data.GeneratorConstants.SERVICE_NAME;
+import static org.onap.sdc.generator.data.GeneratorConstants.STATUS_CODE;
+import static org.onap.sdc.generator.data.GeneratorConstants.TARGET_ENTITY;
+import static org.onap.sdc.generator.data.GeneratorConstants.TARGET_SERVICE_NAME;
+import static org.onap.sdc.generator.logging.ArtifactGeneratorLogResponseCode.INTERNAL_SERVER_ERROR;
+import static org.onap.sdc.generator.logging.ArtifactGeneratorLogResponseCode.INVALID_CLIENT_CONFIGURATION;
+import static org.onap.sdc.generator.logging.ArtifactGeneratorLogResponseCode.INVALID_ID_VALUE;
+import static org.onap.sdc.generator.logging.ArtifactGeneratorLogResponseCode.INVALID_RESOURCE_VERSION;
+import static org.onap.sdc.generator.logging.ArtifactGeneratorLogResponseCode.INVALID_SERVICE_VERSION;
+import static org.onap.sdc.generator.logging.ArtifactGeneratorLogResponseCode.INVALID_TOSCA_YAML;
+import static org.onap.sdc.generator.logging.ArtifactGeneratorLogResponseCode.MANDATORY_ATTRIBUTE_MISSING;
+import static org.onap.sdc.generator.logging.ArtifactGeneratorLogResponseCode.MISSING_CONFIG_PROPERTIES_FILE;
+import static org.onap.sdc.generator.logging.ArtifactGeneratorLogResponseCode.MISSING_PRO_SERVICE;
+import static org.onap.sdc.generator.logging.ArtifactGeneratorLogResponseCode.MISSING_PRO_SERVICE_METADATA;
+import static org.onap.sdc.generator.logging.ArtifactGeneratorLogResponseCode.MISSING_RESOURCE_VERSION;
+import static org.onap.sdc.generator.logging.ArtifactGeneratorLogResponseCode.MISSING_SERVICE_VERSION;
+import static org.onap.sdc.generator.logging.ArtifactGeneratorLogResponseCode.MISSING_SYSTME_PROPERY_CONFIGURATION;
+import static org.onap.sdc.generator.logging.ArtifactGeneratorLogResponseCode.MISSING_WIDGET_CONFIGURATION;
+import static org.onap.sdc.generator.logging.ArtifactGeneratorLogResponseCode.RESOURCE_TOSCA_MISSING;
+import static org.onap.sdc.generator.logging.ArtifactGeneratorLogResponseCode.SERVICE_TOSCA_MISSING;
+import static org.onap.sdc.generator.logging.ArtifactGeneratorLogResponseCode.UNABLE_TO_GENERATE_ARTIFACT;
import org.openecomp.sdc.logging.api.Logger;
import org.openecomp.sdc.logging.api.LoggerFactory;
-import org.openecomp.sdc.generator.data.Artifact;
-import org.openecomp.sdc.generator.logging.ArtifactGeneratorLogResponseCode;
-import org.openecomp.sdc.generator.logging.CategoryLogLevel;
-import org.openecomp.sdc.generator.logging.StatusCode;
+import org.onap.sdc.generator.data.Artifact;
+import org.onap.sdc.generator.logging.ArtifactGeneratorLogResponseCode;
+import org.onap.sdc.generator.logging.CategoryLogLevel;
+import org.onap.sdc.generator.logging.StatusCode;
import org.slf4j.MDC;
import java.io.PrintWriter;
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.generator;
-
-import static org.openecomp.sdc.generator.data.GeneratorConstants.GENERATOR_AAI_CONFIGFILE_NOT_FOUND;
-import static org.openecomp.sdc.generator.data.GeneratorConstants.GENERATOR_AAI_CONFIGLOCATION_NOT_FOUND;
-import static org.openecomp.sdc.generator.data.GeneratorConstants.GENERATOR_AAI_CONFIGLPROP_NOT_FOUND;
-import static org.openecomp.sdc.generator.data.GeneratorConstants.GENERATOR_AAI_PROVIDING_SERVICE_METADATA_MISSING;
-import static org.openecomp.sdc.generator.data.GeneratorConstants.GENERATOR_AAI_PROVIDING_SERVICE_MISSING;
-import static org.openecomp.sdc.generator.data.GeneratorConstants.GENERATOR_AAI_ERROR_INVALID_ID;
-import static org.openecomp.sdc.generator.data.GeneratorConstants.GENERATOR_AAI_ERROR_MISSING_SERVICE_VERSION;
-import static org.openecomp.sdc.generator.data.GeneratorConstants.GENERATOR_AAI_INVALID_SERVICE_VERSION;
+package org.onap.sdc.generator;
import org.apache.commons.io.FileUtils;
-import org.openecomp.sdc.generator.aai.model.Resource;
-import org.openecomp.sdc.generator.aai.model.Service;
-import org.openecomp.sdc.generator.aai.model.Widget;
-import org.openecomp.sdc.generator.aai.tosca.GroupDefinition;
-import org.openecomp.sdc.generator.aai.tosca.NodeTemplate;
-import org.openecomp.sdc.generator.aai.tosca.ToscaTemplate;
-import org.openecomp.sdc.generator.data.AdditionalParams;
-import org.openecomp.sdc.generator.aai.xml.Model;
-import org.openecomp.sdc.generator.aai.xml.ModelElement;
-import org.openecomp.sdc.generator.aai.xml.ModelElements;
-import org.openecomp.sdc.generator.aai.xml.ModelVer;
-import org.openecomp.sdc.generator.aai.xml.Relationship;
-import org.openecomp.sdc.generator.aai.xml.RelationshipData;
-import org.openecomp.sdc.generator.data.Artifact;
-import org.openecomp.sdc.generator.data.ArtifactType;
-import org.openecomp.sdc.generator.data.GenerationData;
-import org.openecomp.sdc.generator.data.GeneratorConstants;
-import org.openecomp.sdc.generator.data.GeneratorUtil;
-import org.openecomp.sdc.generator.data.GroupType;
-import org.openecomp.sdc.generator.impl.ArtifactGenerationServiceImpl;
+import org.onap.sdc.generator.aai.tosca.GroupDefinition;
+import org.onap.sdc.generator.data.AdditionalParams;
+import org.onap.sdc.generator.data.GenerationData;
+import org.onap.sdc.generator.data.GeneratorConstants;
+import org.onap.sdc.generator.impl.ArtifactGenerationServiceImpl;
+import org.onap.sdc.generator.aai.model.Resource;
+import org.onap.sdc.generator.aai.model.Service;
+import org.onap.sdc.generator.aai.model.Widget;
+import org.onap.sdc.generator.aai.tosca.NodeTemplate;
+import org.onap.sdc.generator.aai.tosca.ToscaTemplate;
+import org.onap.sdc.generator.aai.xml.Model;
+import org.onap.sdc.generator.aai.xml.ModelElement;
+import org.onap.sdc.generator.aai.xml.ModelElements;
+import org.onap.sdc.generator.aai.xml.ModelVer;
+import org.onap.sdc.generator.aai.xml.Relationship;
+import org.onap.sdc.generator.aai.xml.RelationshipData;
+import org.onap.sdc.generator.data.Artifact;
+import org.onap.sdc.generator.data.ArtifactType;
+import org.onap.sdc.generator.data.GeneratorUtil;
+import org.onap.sdc.generator.data.GroupType;
import org.testng.Assert;
import org.testng.annotations.BeforeSuite;
import org.testng.annotations.Test;
ArtifactGenerationServiceImpl obj = new ArtifactGenerationServiceImpl();
GenerationData data = obj.generateArtifact(inputArtifacts, generatorConfig, additionalParams);
Assert.assertEquals(
- data.getErrorData().get("AAI").get(0),String.format(GENERATOR_AAI_ERROR_INVALID_ID,
+ data.getErrorData().get("AAI").get(0),String.format(
+ GeneratorConstants.GENERATOR_AAI_ERROR_INVALID_ID,
"invariantUUID",inputArtifacts.get(0).getName()));
} catch (Exception e) {
ArtifactGenerationServiceImpl obj = new ArtifactGenerationServiceImpl();
GenerationData data = obj.generateArtifact(inputArtifacts, generatorConfig, additionalParams);
Assert.assertEquals(
- data.getErrorData().get("AAI").get(0),String.format(GENERATOR_AAI_ERROR_INVALID_ID,
+ data.getErrorData().get("AAI").get(0),String.format(
+ GeneratorConstants.GENERATOR_AAI_ERROR_INVALID_ID,
"UUID",inputArtifacts.get(0).getName()));
} catch (Exception e) {
ArtifactGenerationServiceImpl obj = new ArtifactGenerationServiceImpl();
GenerationData data = obj.generateArtifact(inputArtifacts, generatorConfig, additionalParams);
Assert.assertEquals(
- data.getErrorData().get("AAI").get(0),String.format(GENERATOR_AAI_ERROR_INVALID_ID,
+ data.getErrorData().get("AAI").get(0),String.format(
+ GeneratorConstants.GENERATOR_AAI_ERROR_INVALID_ID,
"vfModuleModelInvariantUUID", inputArtifacts.get(1).getName() ));
} catch (Exception e) {
ArtifactGenerationServiceImpl obj = new ArtifactGenerationServiceImpl();
GenerationData data = obj.generateArtifact(inputArtifacts, generatorConfig, additionalParams);
Assert.assertEquals(
- data.getErrorData().get("AAI").get(0),String.format(GENERATOR_AAI_ERROR_INVALID_ID,
+ data.getErrorData().get("AAI").get(0),String.format(
+ GeneratorConstants.GENERATOR_AAI_ERROR_INVALID_ID,
"vfModuleModelUUID", inputArtifacts.get(1).getName() ));
} catch (Exception e) {
GenerationData data = obj.generateArtifact(inputArtifacts, generatorConfig, additionalParams);
Assert.assertEquals(false,data.getErrorData().isEmpty());
Assert.assertEquals(data.getErrorData().
- get("AAI").get(0),GENERATOR_AAI_CONFIGLOCATION_NOT_FOUND);
+ get("AAI").get(0), GeneratorConstants.GENERATOR_AAI_CONFIGLOCATION_NOT_FOUND);
} catch (Exception e) {
Assert.fail(e.getMessage());
}
List<Artifact> inputArtifacts = init(aaiResourceBasePaths);
GenerationData data = obj.generateArtifact(inputArtifacts, generatorConfig, additionalParams);
Assert.assertEquals(false,data.getErrorData().isEmpty());
- String errMsg = String.format(GENERATOR_AAI_CONFIGLPROP_NOT_FOUND,assertMsg);
+ String errMsg = String.format(GeneratorConstants.GENERATOR_AAI_CONFIGLPROP_NOT_FOUND,assertMsg);
Assert.assertEquals(data.getErrorData().get("AAI").get(0),errMsg);
} catch (Exception e) {
Assert.fail(e.getMessage());
List<Artifact> inputArtifacts = init(aaiResourceBasePaths);
GenerationData data = obj.generateArtifact(inputArtifacts, generatorConfig, additionalParams);
Assert.assertEquals(data.getErrorData().isEmpty(),false);
- Assert.assertEquals(data.getErrorData().get("AAI").get(0),String.format(GENERATOR_AAI_CONFIGFILE_NOT_FOUND,System.getProperty
+ Assert.assertEquals(data.getErrorData().get("AAI").get(0),String.format(
+ GeneratorConstants.GENERATOR_AAI_CONFIGFILE_NOT_FOUND,System.getProperty
("artifactgenerator.config")));
} catch (Exception e) {
Assert.fail(e.getMessage());
GenerationData data = obj.generateArtifact(inputArtifacts, generatorConfig, additionalParams);
Assert.assertEquals(data.getErrorData().isEmpty(),false);
Assert.assertEquals(data.getErrorData().get("AAI").get(0),
- GENERATOR_AAI_ERROR_MISSING_SERVICE_VERSION);
+ GeneratorConstants.GENERATOR_AAI_ERROR_MISSING_SERVICE_VERSION);
} catch (Exception e) {
Assert.fail(e.getMessage());
}
GenerationData data = obj.generateArtifact(inputArtifacts, generatorConfig, additionalParams);
Assert.assertEquals(data.getErrorData().isEmpty(),false);
Assert.assertEquals(data.getErrorData().get("AAI").get(0),
- GENERATOR_AAI_INVALID_SERVICE_VERSION);
+ GeneratorConstants.GENERATOR_AAI_INVALID_SERVICE_VERSION);
additionalParams.put(AdditionalParams.ServiceVersion.getName(),"0.1");
data = obj.generateArtifact(inputArtifacts, generatorConfig, additionalParams);
Assert.assertEquals(data.getErrorData().isEmpty(),false);
Assert.assertEquals(data.getErrorData().get("AAI").get(0),
- GENERATOR_AAI_INVALID_SERVICE_VERSION);
+ GeneratorConstants.GENERATOR_AAI_INVALID_SERVICE_VERSION);
additionalParams.put(AdditionalParams.ServiceVersion.getName(),"0.0");
data = obj.generateArtifact(inputArtifacts, generatorConfig, additionalParams);
Assert.assertEquals(data.getErrorData().isEmpty(),false);
Assert.assertEquals(data.getErrorData().get("AAI").get(0),
- GENERATOR_AAI_INVALID_SERVICE_VERSION);
+ GeneratorConstants.GENERATOR_AAI_INVALID_SERVICE_VERSION);
} catch (Exception e) {
Assert.fail(e.getMessage());
GenerationData data = obj.generateArtifact(inputArtifacts, generatorConfig, additionalParams);
Assert.assertEquals(data.getErrorData().isEmpty(),false);
Assert.assertEquals(data.getErrorData().get("AAI").get(0),String.format
- (GENERATOR_AAI_PROVIDING_SERVICE_METADATA_MISSING, "707b2850-e830-4b00-9902-879f44ac05a4"));
+ (GeneratorConstants.GENERATOR_AAI_PROVIDING_SERVICE_METADATA_MISSING, "707b2850-e830-4b00-9902-879f44ac05a4"));
} catch (Exception e) {
Assert.fail(e.getMessage());
}
GenerationData data = obj.generateArtifact(inputArtifacts, generatorConfig, additionalParams);
Assert.assertEquals(data.getErrorData().isEmpty(),false);
Assert.assertEquals(data.getErrorData().get("AAI").get(0),String.format
- (GENERATOR_AAI_PROVIDING_SERVICE_MISSING, "a54a5235-b69d-4f8a-838b-d011e6783fa5"));
+ (GeneratorConstants.GENERATOR_AAI_PROVIDING_SERVICE_MISSING, "a54a5235-b69d-4f8a-838b-d011e6783fa5"));
} catch (Exception e) {
Assert.fail(e.getMessage());
}
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
- <artifactId>openecomp-sdc-artifact-generator-test</artifactId>
+ <artifactId>onap-sdc-artifact-generator-test</artifactId>
<parent>
- <artifactId>openecomp-common-lib</artifactId>
- <groupId>org.openecomp.sdc.common</groupId>
+ <artifactId>onap-common-lib</artifactId>
+ <groupId>org.onap.sdc.common</groupId>
<version>1.2.0-SNAPSHOT</version>
<relativePath>../../</relativePath>
</parent>
<version>4.11</version>
</dependency>
<dependency>
- <groupId>org.openecomp.sdc.common</groupId>
- <artifactId>openecomp-sdc-artifact-generator-api</artifactId>
+ <groupId>org.onap.sdc.common</groupId>
+ <artifactId>onap-sdc-artifact-generator-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
- <groupId>org.openecomp.sdc.common</groupId>
- <artifactId>openecomp-sdc-artifact-generator-core</artifactId>
+ <groupId>org.onap.sdc.common</groupId>
+ <artifactId>onap-sdc-artifact-generator-core</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.generator;
-
-import org.openecomp.sdc.generator.aai.model.*;
-import org.openecomp.sdc.generator.aai.model.Service;
-import org.openecomp.sdc.generator.aai.tosca.GroupDefinition;
-import org.openecomp.sdc.generator.aai.tosca.NodeTemplate;
-import org.openecomp.sdc.generator.aai.tosca.ToscaTemplate;
-import org.openecomp.sdc.generator.aai.xml.*;
-import org.openecomp.sdc.generator.aai.xml.Model;
-import org.openecomp.sdc.generator.data.*;
+package org.onap.sdc.generator;
+
+import org.onap.sdc.generator.aai.model.*;
+import org.onap.sdc.generator.aai.model.Service;
+import org.onap.sdc.generator.aai.tosca.GroupDefinition;
+import org.onap.sdc.generator.aai.tosca.NodeTemplate;
+import org.onap.sdc.generator.aai.tosca.ToscaTemplate;
+import org.onap.sdc.generator.aai.xml.*;
+import org.onap.sdc.generator.aai.xml.Model;
+import org.onap.sdc.generator.data.*;
import org.junit.Assert;
import javax.xml.bind.JAXBContext;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-import static org.openecomp.sdc.generator.SampleJUnitTest.additionalParams;
-
@SuppressWarnings("Duplicates")
public class ArtifactGenerationServiceTest {
if (serviceTosca == null) {
org.testng.Assert.fail("Service Tosca not found");
}
- serviceTosca.getMetadata().put("version", additionalParams.get(AdditionalParams
+ serviceTosca.getMetadata().put("version", SampleJUnitTest.additionalParams.get(
+ AdditionalParams
.ServiceVersion.getName()));
Service service = new Service();
service.populateModelIdentificationInformation(serviceTosca.getMetadata());
private static void validateWidgetIds(List<ModelElement> matchedServiceBaseWidgetElements,
String widgetName, String widgetInvUuId) {
org.testng.Assert.assertEquals(matchedServiceBaseWidgetElements.get(0).getRelationshipList().getRelationship().get(0)
- .getRelationshipData().get(0).getRelationshipValue(), properties.getProperty(ArtifactType.AAI.name()
+ .getRelationshipData().get(0).getRelationshipValue(), properties.getProperty(
+ ArtifactType.AAI.name()
+ ".model-version-id."+ widgetName));
org.testng.Assert.assertEquals(matchedServiceBaseWidgetElements.get(0).getRelationshipList().getRelationship().get(0)
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.generator;
-
-import org.openecomp.sdc.generator.aai.model.Widget;
-import org.openecomp.sdc.generator.aai.tosca.ToscaTemplate;
-import org.openecomp.sdc.generator.aai.xml.Model;
-import org.openecomp.sdc.generator.data.*;
-import org.openecomp.sdc.generator.impl.ArtifactGenerationServiceImpl;
+package org.onap.sdc.generator;
+
+import org.onap.sdc.generator.data.AdditionalParams;
+import org.onap.sdc.generator.data.Artifact;
+import org.onap.sdc.generator.data.ArtifactType;
+import org.onap.sdc.generator.data.GenerationData;
+import org.onap.sdc.generator.data.GeneratorConstants;
+import org.onap.sdc.generator.data.GeneratorUtil;
+import org.onap.sdc.generator.data.GroupType;
+import org.onap.sdc.generator.impl.ArtifactGenerationServiceImpl;
+import org.onap.sdc.generator.aai.model.Widget;
+import org.onap.sdc.generator.aai.tosca.ToscaTemplate;
+import org.onap.sdc.generator.aai.xml.Model;
+import org.onap.sdc.generator.data.*;
import junit.framework.TestCase;
import org.junit.Assert;
import java.io.*;
import java.util.*;
-import static org.openecomp.sdc.generator.ArtifactGenerationServiceTest.*;
-import static org.openecomp.sdc.generator.data.GeneratorConstants.*;
+import static org.onap.sdc.generator.ArtifactGenerationServiceTest.*;
public class SampleJUnitTest extends TestCase {
GenerationData data = obj.generateArtifact(inputArtifacts, GENERATOR_CONFIG, new HashMap<String, String>());
Assert.assertEquals(data.getErrorData().isEmpty(),false);
- Assert.assertEquals(data.getErrorData().get("AAI").get(0),GENERATOR_AAI_ERROR_MISSING_SERVICE_VERSION);
+ Assert.assertEquals(data.getErrorData().get("AAI").get(0),
+ GeneratorConstants.GENERATOR_AAI_ERROR_MISSING_SERVICE_VERSION);
} catch (Exception e) {
Assert.fail(e.getMessage());
}
additionalParams.put(AdditionalParams.ServiceVersion.getName(),"1");
GenerationData data = obj.generateArtifact(inputArtifacts, GENERATOR_CONFIG, additionalParams);
Assert.assertEquals(data.getErrorData().isEmpty(),false);
- Assert.assertEquals(data.getErrorData().get("AAI").get(0),GENERATOR_AAI_INVALID_SERVICE_VERSION);
+ Assert.assertEquals(data.getErrorData().get("AAI").get(0),
+ GeneratorConstants.GENERATOR_AAI_INVALID_SERVICE_VERSION);
additionalParams.put(AdditionalParams.ServiceVersion.getName(),"0.1");
GenerationData data2 = obj.generateArtifact(inputArtifacts, GENERATOR_CONFIG,
additionalParams);
Assert.assertEquals(data2.getErrorData().isEmpty(),false);
Assert.assertEquals(data2.getErrorData().get("AAI").get(0),
- GENERATOR_AAI_INVALID_SERVICE_VERSION);
+ GeneratorConstants.GENERATOR_AAI_INVALID_SERVICE_VERSION);
additionalParams.put(AdditionalParams.ServiceVersion.getName(),"0.0");
GenerationData data3 = obj.generateArtifact(inputArtifacts, GENERATOR_CONFIG,
additionalParams);
Assert.assertEquals(data3.getErrorData().isEmpty(),false);
Assert.assertEquals(data3.getErrorData().get("AAI").get(0),
- GENERATOR_AAI_INVALID_SERVICE_VERSION);
+ GeneratorConstants.GENERATOR_AAI_INVALID_SERVICE_VERSION);
} catch (Exception e) {
Assert.fail(e.getMessage());
} finally{
GenerationData data = obj.generateArtifact(inputArtifacts, GENERATOR_CONFIG, additionalParams);
Assert.assertEquals(data.getErrorData().isEmpty(),false);
Assert.assertEquals(data.getErrorData().get("AAI").get(0),
- String.format(GENERATOR_AAI_ERROR_INVALID_RESOURCE_VERSION_IN_SERVICE_TOSCA,
+ String.format(
+ GeneratorConstants.GENERATOR_AAI_ERROR_INVALID_RESOURCE_VERSION_IN_SERVICE_TOSCA,
toscas.get(0).getMetadata().get("UUID")));
inputArtifacts.remove(1);
additionalParams);
Assert.assertEquals(data2.getErrorData().isEmpty(),false);
Assert.assertEquals(data2.getErrorData().get("AAI").get(0),
- String.format(GENERATOR_AAI_ERROR_INVALID_RESOURCE_VERSION_IN_SERVICE_TOSCA,
+ String.format(
+ GeneratorConstants.GENERATOR_AAI_ERROR_INVALID_RESOURCE_VERSION_IN_SERVICE_TOSCA,
toscas.get(0).getMetadata().get("UUID")));
} catch (Exception e) {
GenerationData data = obj.generateArtifact(inputArtifacts, GENERATOR_CONFIG, additionalParams);
Assert.assertEquals(data.getErrorData().isEmpty(),false);
- Assert.assertEquals(data.getErrorData().get("AAI").get(0),String.format(GENERATOR_AAI_ERROR_NULL_RESOURCE_VERSION_IN_SERVICE_TOSCA,toscas.get(0).getMetadata().get("UUID")));
+ Assert.assertEquals(data.getErrorData().get("AAI").get(0),String.format(
+ GeneratorConstants.GENERATOR_AAI_ERROR_NULL_RESOURCE_VERSION_IN_SERVICE_TOSCA,toscas.get(0).getMetadata().get("UUID")));
} catch (Exception e) {
Assert.fail(e.getMessage());
}
Assert.assertEquals(data.getErrorData().isEmpty(),false);
Assert.assertEquals(data.getErrorData().get("AAI").get(0),String.format
- (GENERATOR_AAI_PROVIDING_SERVICE_MISSING, toscas.get(1).getModelId()));
+ (GeneratorConstants.GENERATOR_AAI_PROVIDING_SERVICE_MISSING, toscas.get(1).getModelId()));
} catch (Exception e) {
Assert.fail(e.getMessage());
GenerationData data = obj.generateArtifact(inputArtifacts, GENERATOR_CONFIG, additionalParams);
Assert.assertEquals(data.getErrorData().isEmpty(),false);
Assert.assertEquals(data.getErrorData().get("AAI").get(0),String.format
- (GENERATOR_AAI_PROVIDING_SERVICE_METADATA_MISSING, toscas.get(2).getModelId()));
+ (GeneratorConstants.GENERATOR_AAI_PROVIDING_SERVICE_METADATA_MISSING, toscas.get(2).getModelId()));
} catch (Exception e) {
Assert.fail(e.getMessage());
}
try {
return GeneratorUtil.translateTosca(new String(decodedInput), ToscaTemplate.class);
} catch (Exception e) {
- throw new IllegalArgumentException(String.format(GENERATOR_AAI_ERROR_INVALID_TOSCA, input.getName()));
+ throw new IllegalArgumentException(String.format(
+ GeneratorConstants.GENERATOR_AAI_ERROR_INVALID_TOSCA, input.getName()));
}
} else {
- throw new SecurityException(String.format(GENERATOR_AAI_ERROR_CHECKSUM_MISMATCH, input.getName()));
+ throw new SecurityException(String.format(
+ GeneratorConstants.GENERATOR_AAI_ERROR_CHECKSUM_MISMATCH, input.getName()));
}
}
--- /dev/null
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <name>onap-sdc-artifact-generator-lib</name>
+ <groupId>org.onap.sdc.common</groupId>
+ <artifactId>onap-sdc-artifact-generator-lib</artifactId>
+ <packaging>pom</packaging>
+
+ <parent>
+ <groupId>org.onap.sdc.common</groupId>
+ <artifactId>onap-common-lib</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ <relativePath>..</relativePath>
+ </parent>
+
+
+ <modules>
+ <module>onap-sdc-artifact-generator-api</module>
+ <module>onap-sdc-artifact-generator-core</module>
+ <module>onap-sdc-artifact-generator-test</module>
+ </modules>
+
+</project>
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
- <groupId>org.openecomp.sdc.common</groupId>
- <artifactId>openecomp-tosca-datatype</artifactId>
+ <groupId>org.onap.sdc.common</groupId>
+ <artifactId>onap-tosca-datatype</artifactId>
<parent>
- <artifactId>openecomp-common-lib</artifactId>
- <groupId>org.openecomp.sdc.common</groupId>
+ <artifactId>onap-common-lib</artifactId>
+ <groupId>org.onap.sdc.common</groupId>
<version>1.2.0-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
-package org.openecomp.sdc.tosca.datatypes.model;
+package org.onap.sdc.tosca.datatypes.model;
public class ActivityDefinition {
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.tosca.datatypes.model;
+package org.onap.sdc.tosca.datatypes.model;
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.tosca.datatypes.model;
+package org.onap.sdc.tosca.datatypes.model;
import java.util.List;
import java.util.Map;
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.tosca.datatypes.model;
+package org.onap.sdc.tosca.datatypes.model;
import java.util.Objects;
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.tosca.datatypes.model;
+package org.onap.sdc.tosca.datatypes.model;
import java.util.Map;
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.tosca.datatypes.model;
+package org.onap.sdc.tosca.datatypes.model;
-import org.openecomp.sdc.tosca.services.DataModelCloneUtil;
+import org.onap.sdc.tosca.services.DataModelCloneUtil;
import java.util.List;
import java.util.Map;
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.tosca.datatypes.model;
+package org.onap.sdc.tosca.datatypes.model;
import java.util.List;
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.tosca.datatypes.model;
+package org.onap.sdc.tosca.datatypes.model;
import java.util.List;
import java.util.Map;
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.tosca.datatypes.model;
+package org.onap.sdc.tosca.datatypes.model;
import java.util.ArrayList;
import java.util.List;
-package org.openecomp.sdc.tosca.datatypes.model;
+package org.onap.sdc.tosca.datatypes.model;
import java.util.Map;
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.tosca.datatypes.model;
+package org.onap.sdc.tosca.datatypes.model;
import java.util.List;
import java.util.Map;
* limitations under the License.
*/
-package org.openecomp.sdc.tosca.datatypes.model;
+package org.onap.sdc.tosca.datatypes.model;
import java.util.List;
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.tosca.datatypes.model;
+package org.onap.sdc.tosca.datatypes.model;
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.tosca.datatypes.model;
+package org.onap.sdc.tosca.datatypes.model;
-import org.openecomp.sdc.tosca.services.DataModelCloneUtil;
+import org.onap.sdc.tosca.services.DataModelCloneUtil;
import java.util.List;
-package org.openecomp.sdc.tosca.datatypes.model;
+package org.onap.sdc.tosca.datatypes.model;
public class EventFilter {
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.tosca.datatypes.model;
+package org.onap.sdc.tosca.datatypes.model;
import java.util.List;
import java.util.Map;
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.tosca.datatypes.model;
+package org.onap.sdc.tosca.datatypes.model;
import java.util.List;
import java.util.Map;
* limitations under the License.
*/
-package org.openecomp.sdc.tosca.datatypes.model;
+package org.onap.sdc.tosca.datatypes.model;
import java.util.HashSet;
import java.util.List;
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.tosca.datatypes.model;
+package org.onap.sdc.tosca.datatypes.model;
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.openecomp.sdc.tosca.datatypes.model;
+package org.onap.sdc.tosca.datatypes.model;
import java.util.Map;
* limitations under the License.
*/
-package org.openecomp.sdc.tosca.datatypes.model;
+package org.onap.sdc.tosca.datatypes.model;
import org.apache.commons.collections4.MapUtils;
*/
-package org.openecomp.sdc.tosca.datatypes.model;
+package org.onap.sdc.tosca.datatypes.model;
import org.apache.commons.collections4.MapUtils;
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.tosca.datatypes.model;
+package org.onap.sdc.tosca.datatypes.model;
import org.apache.commons.collections4.MapUtils;
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.tosca.datatypes.model;
+package org.onap.sdc.tosca.datatypes.model;
import java.util.List;
import java.util.Map;
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.tosca.datatypes.model;
+package org.onap.sdc.tosca.datatypes.model;
-import org.openecomp.sdc.tosca.services.YamlUtil;
+import org.onap.sdc.tosca.services.YamlUtil;
import java.util.List;
import java.util.Map;
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.tosca.datatypes.model;
+package org.onap.sdc.tosca.datatypes.model;
import java.util.List;
import java.util.Map;
-package org.openecomp.sdc.tosca.datatypes.model;
+package org.onap.sdc.tosca.datatypes.model;
import java.util.Objects;
* limitations under the License.
*/
-package org.openecomp.sdc.tosca.datatypes.model;
+package org.onap.sdc.tosca.datatypes.model;
import java.util.Map;
import java.util.Objects;
* limitations under the License.
*/
-package org.openecomp.sdc.tosca.datatypes.model;
+package org.onap.sdc.tosca.datatypes.model;
import java.util.Map;
import java.util.Objects;
* limitations under the License.
*/
-package org.openecomp.sdc.tosca.datatypes.model;
+package org.onap.sdc.tosca.datatypes.model;
public class ParameterDefinition extends DefinitionOfDataType {
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.tosca.datatypes.model;
+package org.onap.sdc.tosca.datatypes.model;
import java.util.List;
import java.util.Map;
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.tosca.datatypes.model;
+package org.onap.sdc.tosca.datatypes.model;
import java.util.List;
import java.util.Map;
-package org.openecomp.sdc.tosca.datatypes.model;
+package org.onap.sdc.tosca.datatypes.model;
public class PreconditionDefinition {
* limitations under the License.
*/
-package org.openecomp.sdc.tosca.datatypes.model;
+package org.onap.sdc.tosca.datatypes.model;
-import org.openecomp.sdc.tosca.services.DataModelCloneUtil;
+import org.onap.sdc.tosca.services.DataModelCloneUtil;
import java.util.Objects;
* limitations under the License.
*/
-package org.openecomp.sdc.tosca.datatypes.model;
+package org.onap.sdc.tosca.datatypes.model;
import java.util.Collections;
import java.util.HashMap;
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.tosca.datatypes.model;
+package org.onap.sdc.tosca.datatypes.model;
import java.util.Map;
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.tosca.datatypes.model;
+package org.onap.sdc.tosca.datatypes.model;
import java.util.List;
import java.util.Map;
-package org.openecomp.sdc.tosca.datatypes.model;
+package org.onap.sdc.tosca.datatypes.model;
public class Repository {
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.tosca.datatypes.model;
+package org.onap.sdc.tosca.datatypes.model;
-import java.util.Arrays;
-
public class RequirementAssignment {
private String capability;
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.tosca.datatypes.model;
+package org.onap.sdc.tosca.datatypes.model;
public class RequirementDefinition {
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.tosca.datatypes.model;
+package org.onap.sdc.tosca.datatypes.model;
* limitations under the License.
*/
-package org.openecomp.sdc.tosca.datatypes.model;
+package org.onap.sdc.tosca.datatypes.model;
import org.apache.commons.collections4.MapUtils;
-import org.openecomp.sdc.tosca.datatypes.model.heatextend.AnnotationType;
+import org.onap.sdc.tosca.datatypes.model.heatextend.AnnotationType;
import java.util.HashMap;
import java.util.List;
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.tosca.datatypes.model;
+package org.onap.sdc.tosca.datatypes.model;
-package org.openecomp.sdc.tosca.datatypes.model;
+package org.onap.sdc.tosca.datatypes.model;
import java.util.List;
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.tosca.datatypes.model;
+package org.onap.sdc.tosca.datatypes.model;
import java.util.List;
import java.util.Map;
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.tosca.datatypes.model;
+package org.onap.sdc.tosca.datatypes.model;
public interface Template {
}
-package org.openecomp.sdc.tosca.datatypes.model;
+package org.onap.sdc.tosca.datatypes.model;
import java.sql.Timestamp;
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.tosca.datatypes.model;
+package org.onap.sdc.tosca.datatypes.model;
import java.util.HashMap;
import java.util.List;
-package org.openecomp.sdc.tosca.datatypes.model;
-
-import java.sql.Time;
+package org.onap.sdc.tosca.datatypes.model;
public class Trigger {
-package org.openecomp.sdc.tosca.datatypes.model;
+package org.onap.sdc.tosca.datatypes.model;
import java.util.List;
import java.util.Map;
* limitations under the License.
*/
-package org.openecomp.sdc.tosca.datatypes.model.heatextend;
+package org.onap.sdc.tosca.datatypes.model.heatextend;
import java.util.Map;
* limitations under the License.
*/
- package org.openecomp.sdc.tosca.datatypes.model.heatextend;
+ package org.onap.sdc.tosca.datatypes.model.heatextend;
- import org.openecomp.sdc.tosca.datatypes.model.PropertyDefinition;
+ import org.onap.sdc.tosca.datatypes.model.PropertyDefinition;
import java.util.Map;
* limitations under the License.
*/
-package org.openecomp.sdc.tosca.datatypes.model.heatextend;
+package org.onap.sdc.tosca.datatypes.model.heatextend;
-import org.openecomp.sdc.tosca.datatypes.model.ParameterDefinition;
+import org.onap.sdc.tosca.datatypes.model.ParameterDefinition;
import java.util.Map;
public class ParameterDefinitionExt extends ParameterDefinition {
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.tosca.datatypes.model.heatextend;
+package org.onap.sdc.tosca.datatypes.model.heatextend;
import java.util.Collections;
import java.util.HashMap;
* ============LICENSE_END=========================================================
*/
-package org.openecomp.sdc.tosca.services;
+package org.onap.sdc.tosca.services;
-import org.openecomp.sdc.tosca.datatypes.model.AttributeDefinition;
-import org.openecomp.sdc.tosca.datatypes.model.Constraint;
-import org.openecomp.sdc.tosca.datatypes.model.PropertyDefinition;
+import org.onap.sdc.tosca.datatypes.model.AttributeDefinition;
+import org.onap.sdc.tosca.datatypes.model.Constraint;
+import org.onap.sdc.tosca.datatypes.model.PropertyDefinition;
import java.util.HashMap;
import java.util.List;
* limitations under the License.
*/
-package org.openecomp.sdc.tosca.services;
+package org.onap.sdc.tosca.services;
import org.yaml.snakeyaml.constructor.Constructor;
import org.yaml.snakeyaml.introspector.Property;
Class<? extends Object> classType = type;
try {
if (type
- .equals(Class.forName("org.openecomp.sdc.tosca.datatypes.model.ParameterDefinition"))) {
+ .equals(Class.forName("org.onap.sdc.tosca.datatypes.model.ParameterDefinition"))) {
classType = Class
- .forName("org.openecomp.sdc.tosca.datatypes.model.heatextend.ParameterDefinitionExt");
+ .forName("org.onap.sdc.tosca.datatypes.model.heatextend.ParameterDefinitionExt");
}
} catch (ClassNotFoundException ex) {
throw new RuntimeException(ex);
Class type = node.getType();
try {
if (type.equals(
- Class.forName("org.openecomp.sdc.tosca.datatypes.model.ParameterDefinition"))) {
+ Class.forName("org.onap.sdc.tosca.datatypes.model.ParameterDefinition"))) {
Class extendHeatClass = Class.forName(
- "org.openecomp.sdc.tosca.datatypes.model.heatextend.ParameterDefinitionExt");
+ "org.onap.sdc.tosca.datatypes.model.heatextend.ParameterDefinitionExt");
Object extendHeatObject = extendHeatClass.newInstance();
// create JavaBean
return super.constructJavaBean2ndStep(node, extendHeatObject);
* limitations under the License.
*/
-package org.openecomp.sdc.tosca.services;
+package org.onap.sdc.tosca.services;
import org.yaml.snakeyaml.DumperOptions;
import org.yaml.snakeyaml.TypeDescription;
+++ /dev/null
-org.openecomp.config.impl.CliConfigurationImpl
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>\r
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">\r
- <parent>\r
- <artifactId>openecomp-common-lib</artifactId>\r
- <groupId>org.openecomp.sdc.common</groupId>\r
- <version>1.2.0-SNAPSHOT</version>\r
- <relativePath>../../pom.xml</relativePath>\r
- </parent>\r
- <modelVersion>4.0.0</modelVersion>\r
- <artifactId>openecomp-sdc-artifact-generator-test</artifactId>\r
- <build>\r
- <plugins>\r
- <plugin>\r
- <artifactId>maven-shade-plugin</artifactId>\r
- <version>${mvn.shade.version}</version>\r
- <executions>\r
- <execution>\r
- <phase>package</phase>\r
- <goals>\r
- <goal>shade</goal>\r
- </goals>\r
- <configuration>\r
- <artifactSet>\r
- <excludes>\r
- <exclude>com.google.guava:*</exclude>\r
- </excludes>\r
- </artifactSet>\r
- </configuration>\r
- </execution>\r
- </executions>\r
- </plugin>\r
- </plugins>\r
- </build>\r
-</project>\r
-\r
+++ /dev/null
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <name>openecomp-sdc-artifact-generator-lib</name>
- <groupId>org.openecomp.sdc.common</groupId>
- <artifactId>openecomp-sdc-artifact-generator-lib</artifactId>
- <packaging>pom</packaging>
-
- <parent>
- <groupId>org.openecomp.sdc.common</groupId>
- <artifactId>openecomp-common-lib</artifactId>
- <version>1.2.0-SNAPSHOT</version>
- <relativePath>..</relativePath>
- </parent>
-
-
- <modules>
- <module>openecomp-sdc-artifact-generator-api</module>
- <module>openecomp-sdc-artifact-generator-core</module>
- <module>openecomp-sdc-artifact-generator-test</module>
- </modules>
-
-</project>
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
- <groupId>org.openecomp.sdc.common</groupId>
- <name>openecomp-common-lib</name>
- <artifactId>openecomp-common-lib</artifactId>
+ <groupId>org.onap.sdc.common</groupId>
+ <name>onap-common-lib</name>
+ <artifactId>onap-common-lib</artifactId>
<packaging>pom</packaging>
<parent>
</properties>
<modules>
- <module>openecomp-sdc-artifact-generator-lib</module>
- <module>openecomp-common-configuration-management</module>
- <module>openecomp-tosca-datatype</module>
+ <module>onap-sdc-artifact-generator-lib</module>
+ <module>onap-common-configuration-management</module>
+ <module>onap-tosca-datatype</module>
</modules>
<dependencies>
<dependencies>
<dependency>
- <groupId>org.openecomp.sdc.common</groupId>
- <artifactId>openecomp-configuration-management-core</artifactId>
+ <groupId>org.onap.sdc.common</groupId>
+ <artifactId>onap-configuration-management-core</artifactId>
<version>${openecomp.sdc.common.version}</version>
<scope>runtime</scope>
<exclusions>
</exclusions>
</dependency>
<dependency>
- <groupId>org.openecomp.sdc.common</groupId>
- <artifactId>openecomp-tosca-datatype</artifactId>
+ <groupId>org.onap.sdc.common</groupId>
+ <artifactId>onap-tosca-datatype</artifactId>
<version>${openecomp.sdc.common.version}</version>
</dependency>
<dependency>
package org.openecomp.sdc.vendorsoftwareproduct.impl.orchestration;
-import org.openecomp.config.api.Configuration;
-import org.openecomp.config.api.ConfigurationManager;
+import org.onap.config.api.Configuration;
+import org.onap.config.api.ConfigurationManager;
import org.openecomp.core.utilities.CommonMethods;
import org.openecomp.sdc.common.errors.CoreException;
import org.openecomp.sdc.datatypes.configuration.ImplementationConfiguration;
package org.openecomp.sdc.vendorsoftwareproduct.impl.orchestration.process;
-import org.openecomp.config.api.Configuration;
-import org.openecomp.config.api.ConfigurationManager;
+import org.onap.config.api.Configuration;
+import org.onap.config.api.ConfigurationManager;
import org.openecomp.core.utilities.CommonMethods;
import org.openecomp.core.utilities.orchestration.OnboardingTypesEnum;
import org.openecomp.sdc.datatypes.configuration.ImplementationConfiguration;
import org.openecomp.sdc.logging.api.Logger;
import org.openecomp.sdc.logging.api.LoggerFactory;
import org.openecomp.sdc.tosca.datatypes.ToscaServiceModel;
-import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
-import org.openecomp.sdc.tosca.services.ToscaExtensionYamlUtil;
+import org.onap.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.onap.sdc.tosca.services.ToscaExtensionYamlUtil;
import org.openecomp.sdc.tosca.services.ToscaUtil;
import org.openecomp.sdc.vendorsoftwareproduct.types.composition.Component;
import org.openecomp.sdc.vendorsoftwareproduct.types.composition.CompositionData;
<dependencies>
<dependency>
- <groupId>org.openecomp.sdc.common</groupId>
- <artifactId>openecomp-tosca-datatype</artifactId>
+ <groupId>org.onap.sdc.common</groupId>
+ <artifactId>onap-tosca-datatype</artifactId>
<version>${openecomp.sdc.common.version}</version>
</dependency>
<dependency>
import org.openecomp.core.utilities.file.FileUtils;
import org.openecomp.sdc.logging.api.Logger;
import org.openecomp.sdc.logging.api.LoggerFactory;
-import org.openecomp.sdc.tosca.services.YamlUtil;
+import org.onap.sdc.tosca.services.YamlUtil;
import java.io.FileInputStream;
import java.io.IOException;
import org.junit.Before;
import org.junit.Test;
-import org.openecomp.sdc.tosca.services.YamlUtil;
+import org.onap.sdc.tosca.services.YamlUtil;
import testobjects.yaml.YamlFile;
<dependencies>
<dependency>
- <groupId>org.openecomp.sdc.common</groupId>
- <artifactId>openecomp-tosca-datatype</artifactId>
+ <groupId>org.onap.sdc.common</groupId>
+ <artifactId>onap-tosca-datatype</artifactId>
<version>${openecomp.sdc.common.version}</version>
</dependency>
<dependency>
import com.google.gson.JsonObject;
import com.google.gson.JsonParseException;
import com.google.gson.JsonPrimitive;
-import org.openecomp.sdc.tosca.datatypes.model.RequirementDefinition;
+import org.onap.sdc.tosca.datatypes.model.RequirementDefinition;
import java.lang.reflect.Type;
import java.util.Objects;
import org.apache.commons.io.FilenameUtils;
import org.apache.commons.io.IOUtils;
import org.openecomp.core.utilities.json.JsonUtil;
-import org.openecomp.sdc.tosca.services.YamlUtil;
+import org.onap.sdc.tosca.services.YamlUtil;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
-import java.nio.file.Files;
import java.nio.file.Path;
-import java.nio.file.Paths;
import java.util.Collections;
import java.util.Enumeration;
import java.util.HashMap;
import org.openecomp.core.utilities.deserializers.RequirementDefinitionDeserializer;
import org.openecomp.sdc.logging.api.Logger;
import org.openecomp.sdc.logging.api.LoggerFactory;
-import org.openecomp.sdc.tosca.datatypes.model.RequirementDefinition;
+import org.onap.sdc.tosca.datatypes.model.RequirementDefinition;
import java.io.BufferedReader;
import java.io.IOException;
<dependencies>
<dependency>
- <groupId>org.openecomp.sdc.common</groupId>
- <artifactId>openecomp-configuration-management-core</artifactId>
+ <groupId>org.onap.sdc.common</groupId>
+ <artifactId>onap-configuration-management-core</artifactId>
<version>${openecomp.sdc.common.version}</version>
<scope>runtime</scope>
<exclusions>
</exclusions>
</dependency>
<dependency>
- <groupId>org.openecomp.sdc.common</groupId>
- <artifactId>openecomp-configuration-management-api</artifactId>
+ <groupId>org.onap.sdc.common</groupId>
+ <artifactId>onap-configuration-management-api</artifactId>
<version>${openecomp.sdc.common.version}</version>
</dependency>
<dependency>
<dependencies>
<dependency>
- <groupId>org.openecomp.sdc.common</groupId>
- <artifactId>openecomp-configuration-management-core</artifactId>
+ <groupId>org.onap.sdc.common</groupId>
+ <artifactId>onap-configuration-management-core</artifactId>
<version>${openecomp.sdc.common.version}</version>
<scope>runtime</scope>
<exclusions>
</exclusions>
</dependency>
<dependency>
- <groupId>org.openecomp.sdc.common</groupId>
- <artifactId>openecomp-tosca-datatype</artifactId>
+ <groupId>org.onap.sdc.common</groupId>
+ <artifactId>onap-tosca-datatype</artifactId>
<version>${openecomp.sdc.common.version}</version>
</dependency>
<dependency>
import org.openecomp.sdc.heat.datatypes.structure.HeatStructureTree;
import org.openecomp.sdc.logging.api.Logger;
import org.openecomp.sdc.logging.api.LoggerFactory;
-import org.openecomp.sdc.tosca.services.YamlUtil;
+import org.onap.sdc.tosca.services.YamlUtil;
import java.io.InputStream;
import java.util.HashMap;
package org.openecomp.sdc.heat.datatypes.model;
import org.junit.Test;
-import org.openecomp.sdc.tosca.services.YamlUtil;
+import org.onap.sdc.tosca.services.YamlUtil;
import java.io.IOException;
import java.io.InputStream;
import org.junit.Test;
import org.openecomp.sdc.logging.api.Logger;
import org.openecomp.sdc.logging.api.LoggerFactory;
-import org.openecomp.sdc.tosca.services.YamlUtil;
+import org.onap.sdc.tosca.services.YamlUtil;
import java.io.IOException;
import java.io.InputStream;
<version>${commons.lang.version}</version>
</dependency>
<dependency>
- <groupId>org.openecomp.sdc.common</groupId>
- <artifactId>openecomp-configuration-management-api</artifactId>
+ <groupId>org.onap.sdc.common</groupId>
+ <artifactId>onap-configuration-management-api</artifactId>
<version>${openecomp.sdc.common.version}</version>
</dependency>
</dependencies>
package org.openecomp.sdc.datatypes.configuration;
-import org.openecomp.config.api.Config;
+import org.onap.config.api.Config;
import java.util.Map;
<version>${logback.version}</version>
</dependency>
<dependency>
- <groupId>org.openecomp.sdc.common</groupId>
- <artifactId>openecomp-tosca-datatype</artifactId>
+ <groupId>org.onap.sdc.common</groupId>
+ <artifactId>onap-tosca-datatype</artifactId>
<version>${openecomp.sdc.common.version}</version>
</dependency>
<dependency>
import org.openecomp.sdc.logging.api.Logger;
import org.openecomp.sdc.logging.api.LoggerFactory;
import org.openecomp.sdc.tosca.datatypes.ToscaServiceModel;
-import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
-import org.openecomp.sdc.tosca.services.ToscaExtensionYamlUtil;
+import org.onap.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.onap.sdc.tosca.services.ToscaExtensionYamlUtil;
import org.openecomp.sdc.tosca.services.ToscaFileOutputService;
import org.openecomp.sdc.tosca.services.impl.ToscaFileOutputServiceCsarImpl;
import org.testng.Assert;
<version>${logback.version}</version>
</dependency>
<dependency>
- <groupId>org.openecomp.sdc.common</groupId>
- <artifactId>openecomp-tosca-datatype</artifactId>
+ <groupId>org.onap.sdc.common</groupId>
+ <artifactId>onap-tosca-datatype</artifactId>
<version>${openecomp.sdc.common.version}</version>
</dependency>
import org.openecomp.sdc.logging.api.Logger;
import org.openecomp.sdc.logging.api.LoggerFactory;
import org.openecomp.sdc.tosca.datatypes.ToscaServiceModel;
-import org.openecomp.sdc.tosca.datatypes.model.Directive;
-import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.onap.sdc.tosca.datatypes.model.Directive;
+import org.onap.sdc.tosca.datatypes.model.NodeTemplate;
+import org.onap.sdc.tosca.datatypes.model.ServiceTemplate;
import org.openecomp.sdc.tosca.services.DataModelUtil;
import org.openecomp.sdc.vendorsoftwareproduct.dao.ComponentArtifactDao;
import org.openecomp.sdc.vendorsoftwareproduct.dao.ComponentDao;
import org.openecomp.sdc.datatypes.error.ErrorMessage;
import org.openecomp.sdc.tosca.datatypes.ToscaElementTypes;
import org.openecomp.sdc.tosca.datatypes.ToscaServiceModel;
-import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.NodeType;
-import org.openecomp.sdc.tosca.datatypes.model.RequirementAssignment;
-import org.openecomp.sdc.tosca.datatypes.model.RequirementDefinition;
-import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.onap.sdc.tosca.datatypes.model.NodeTemplate;
+import org.onap.sdc.tosca.datatypes.model.NodeType;
+import org.onap.sdc.tosca.datatypes.model.RequirementAssignment;
+import org.onap.sdc.tosca.datatypes.model.RequirementDefinition;
+import org.onap.sdc.tosca.datatypes.model.ServiceTemplate;
import org.openecomp.sdc.tosca.services.DataModelUtil;
import org.openecomp.sdc.tosca.services.ToscaAnalyzerService;
import org.openecomp.sdc.tosca.services.ToscaConstants;
import org.openecomp.sdc.enrichment.impl.tosca.model.PortMirroringConnectionPointDescription;
import org.openecomp.sdc.tosca.datatypes.ToscaNodeType;
import org.openecomp.sdc.tosca.datatypes.ToscaServiceModel;
-import org.openecomp.sdc.tosca.datatypes.model.Import;
-import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.RequirementAssignment;
-import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.onap.sdc.tosca.datatypes.model.Import;
+import org.onap.sdc.tosca.datatypes.model.NodeTemplate;
+import org.onap.sdc.tosca.datatypes.model.RequirementAssignment;
+import org.onap.sdc.tosca.datatypes.model.ServiceTemplate;
import org.openecomp.sdc.tosca.services.DataModelUtil;
import org.openecomp.sdc.tosca.services.ToscaConstants;
import org.openecomp.sdc.tosca.services.ToscaUtil;
import org.openecomp.sdc.enrichment.EnrichmentInfo;
import org.openecomp.sdc.tosca.datatypes.ToscaNodeType;
import org.openecomp.sdc.tosca.datatypes.ToscaServiceModel;
-import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.onap.sdc.tosca.datatypes.model.ServiceTemplate;
import org.openecomp.sdc.tosca.services.DataModelUtil;
import org.openecomp.sdc.tosca.services.ToscaUtil;
-import org.openecomp.sdc.tosca.services.YamlUtil;
+import org.onap.sdc.tosca.services.YamlUtil;
import org.openecomp.sdc.vendorsoftwareproduct.dao.ComponentArtifactDao;
import org.openecomp.sdc.vendorsoftwareproduct.dao.ComponentDao;
import org.openecomp.sdc.vendorsoftwareproduct.dao.type.ComponentEntity;
import org.openecomp.sdc.logging.api.Logger;
import org.openecomp.sdc.logging.api.LoggerFactory;
import org.openecomp.sdc.tosca.datatypes.ToscaServiceModel;
-import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
-import org.openecomp.sdc.tosca.services.ToscaExtensionYamlUtil;
+import org.onap.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.onap.sdc.tosca.services.ToscaExtensionYamlUtil;
import org.openecomp.sdc.tosca.services.ToscaFileOutputService;
import org.openecomp.sdc.tosca.services.ToscaUtil;
import org.openecomp.sdc.tosca.services.impl.ToscaFileOutputServiceCsarImpl;
<version>${logback.version}</version>
</dependency>
<dependency>
- <groupId>org.openecomp.sdc.common</groupId>
- <artifactId>openecomp-tosca-datatype</artifactId>
+ <groupId>org.onap.sdc.common</groupId>
+ <artifactId>onap-tosca-datatype</artifactId>
<version>${openecomp.sdc.common.version}</version>
</dependency>
import org.openecomp.sdc.logging.api.Logger;
import org.openecomp.sdc.logging.api.LoggerFactory;
import org.openecomp.sdc.tosca.datatypes.ToscaServiceModel;
-import org.openecomp.sdc.tosca.datatypes.model.Import;
+import org.onap.sdc.tosca.datatypes.model.Import;
import org.openecomp.sdc.tosca.datatypes.model.Old1610ServiceTemplate;
-import org.openecomp.sdc.tosca.services.ToscaExtensionYamlUtil;
+import org.onap.sdc.tosca.services.ToscaExtensionYamlUtil;
import org.openecomp.sdc.versioning.dao.VersionableDao;
import org.openecomp.sdc.versioning.dao.types.Version;
FileContentHandler artifactFiles = getArtifacts(vspId, version);
- Map<String, org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate> serviceTemplates =
+ Map<String, org.onap.sdc.tosca.datatypes.model.ServiceTemplate> serviceTemplates =
getTemplates(vspId,
version);
String entryDefinitionServiceTemplate = getServiceBase(vspId, version);
ServiceTemplate entityTmp;
String yaml;
- for (Map.Entry<String, org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate>
+ for (Map.Entry<String, org.onap.sdc.tosca.datatypes.model.ServiceTemplate>
entryTemplate : toscaServiceModel.getServiceTemplates().entrySet()) {
entityTmp = new ServiceTemplate();
return templateDao.getBase(vspId, version);
}
- private Map<String, org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate> getTemplates(
+ private Map<String, org.onap.sdc.tosca.datatypes.model.ServiceTemplate> getTemplates(
String vspId,
Version version) {
template -> getServiceTemplate(template.getContent())));
}
- private org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate getServiceTemplate(
+ private org.onap.sdc.tosca.datatypes.model.ServiceTemplate getServiceTemplate(
InputStream content) {
String serviceTemplateContent = new String(FileUtils.toByteArray(content));
try{
return new ToscaExtensionYamlUtil().yamlToObject(serviceTemplateContent,
- org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate.class);
+ org.onap.sdc.tosca.datatypes.model.ServiceTemplate.class);
}catch (Exception e){
log.debug("",e);
System.out.println("Found vsp with old-versioned tosca service template");
}
}
- private static org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate mapOldSTToCurrentST(Old1610ServiceTemplate oldServiceTemplate){
- org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate
- serviceTemplate = new org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate();
+ private static org.onap.sdc.tosca.datatypes.model.ServiceTemplate mapOldSTToCurrentST(Old1610ServiceTemplate oldServiceTemplate){
+ org.onap.sdc.tosca.datatypes.model.ServiceTemplate
+ serviceTemplate = new org.onap.sdc.tosca.datatypes.model.ServiceTemplate();
serviceTemplate.setArtifact_types(oldServiceTemplate.getArtifact_types());
serviceTemplate.setCapability_types(oldServiceTemplate.getCapability_types());
<dependencies>
<dependency>
- <groupId>org.openecomp.sdc.common</groupId>
- <artifactId>openecomp-tosca-datatype</artifactId>
+ <groupId>org.onap.sdc.common</groupId>
+ <artifactId>onap-tosca-datatype</artifactId>
<version>${openecomp.sdc.common.version}</version>
</dependency>
<dependency>
import org.openecomp.sdc.logging.api.Logger;
import org.openecomp.sdc.logging.api.LoggerFactory;
import org.openecomp.sdc.tosca.datatypes.ToscaServiceModel;
-import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
-import org.openecomp.sdc.tosca.services.ToscaExtensionYamlUtil;
+import org.onap.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.onap.sdc.tosca.services.ToscaExtensionYamlUtil;
import org.openecomp.sdc.versioning.dao.types.Version;
import org.openecomp.types.ElementPropertyName;
import org.openecomp.sdc.logging.api.Logger;
import org.openecomp.sdc.logging.api.LoggerFactory;
-import org.openecomp.sdc.tosca.services.YamlUtil;
+import org.onap.sdc.tosca.services.YamlUtil;
import java.io.FileInputStream;
import java.io.IOException;
<version>${project.version}</version>
</dependency>
<dependency>
- <groupId>org.openecomp.sdc.common</groupId>
- <artifactId>openecomp-configuration-management-core</artifactId>
+ <groupId>org.onap.sdc.common</groupId>
+ <artifactId>onap-configuration-management-core</artifactId>
<version>${openecomp.sdc.common.version}</version>
<scope>runtime</scope>
<exclusions>
</exclusions>
</dependency>
<dependency>
- <groupId>org.openecomp.sdc.common</groupId>
- <artifactId>openecomp-configuration-management-api</artifactId>
+ <groupId>org.onap.sdc.common</groupId>
+ <artifactId>onap-configuration-management-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<dependencies>
<dependency>
- <groupId>org.openecomp.sdc.common</groupId>
- <artifactId>openecomp-tosca-datatype</artifactId>
+ <groupId>org.onap.sdc.common</groupId>
+ <artifactId>onap-tosca-datatype</artifactId>
<version>${openecomp.sdc.common.version}</version>
</dependency>
<dependency>
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.collections4.MapUtils;
-import org.openecomp.core.utilities.orchestration.OnboardingTypesEnum;
import org.openecomp.sdc.generator.core.utils.GeneratorUtils;
import org.openecomp.sdc.generator.datatypes.tosca.MultiFlavorVfcImage;
import org.openecomp.sdc.generator.datatypes.tosca.VspModelInfo;
+import org.openecomp.sdc.generator.util.GeneratorConstants;
+import org.openecomp.core.utilities.orchestration.OnboardingTypesEnum;
import org.openecomp.sdc.tosca.datatypes.ToscaNodeType;
import org.openecomp.sdc.tosca.datatypes.ToscaServiceModel;
-import org.openecomp.sdc.tosca.datatypes.model.Import;
-import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.NodeType;
-import org.openecomp.sdc.tosca.datatypes.model.PropertyDefinition;
-import org.openecomp.sdc.tosca.datatypes.model.PropertyType;
-import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.TopologyTemplate;
+import org.onap.sdc.tosca.datatypes.model.Import;
+import org.onap.sdc.tosca.datatypes.model.NodeTemplate;
+import org.onap.sdc.tosca.datatypes.model.NodeType;
+import org.onap.sdc.tosca.datatypes.model.PropertyDefinition;
+import org.onap.sdc.tosca.datatypes.model.PropertyType;
+import org.onap.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.onap.sdc.tosca.datatypes.model.TopologyTemplate;
import org.openecomp.sdc.tosca.services.DataModelUtil;
import org.openecomp.sdc.tosca.services.ToscaAnalyzerService;
import org.openecomp.sdc.tosca.services.ToscaConstants;
import java.util.Objects;
import java.util.Optional;
-import static org.openecomp.sdc.generator.util.GeneratorConstants.ALLOWED_FLAVORS_PROPERTY;
-import static org.openecomp.sdc.generator.util.GeneratorConstants.DISK_SIZE;
-import static org.openecomp.sdc.generator.util.GeneratorConstants.DISK_SIZE_PROP_DESC_PREFIX;
-import static org.openecomp.sdc.generator.util.GeneratorConstants.IMAGES_PROPERTY;
-import static org.openecomp.sdc.generator.util.GeneratorConstants.MEM_SIZE;
-import static org.openecomp.sdc.generator.util.GeneratorConstants.MEM_SIZE_PROP_DESC_PREFIX;
-import static org.openecomp.sdc.generator.util.GeneratorConstants.NUM_CPUS;
-import static org.openecomp.sdc.generator.util.GeneratorConstants.NUM_CPUS_PROP_DESC_PREFIX;
-import static org.openecomp.sdc.generator.util.GeneratorConstants.PORT_NODE_TEMPLATE_ID_SUFFIX;
-import static org.openecomp.sdc.generator.util.GeneratorConstants.PORT_TYPE_EXTERNAL_NODE_TEMPLATE_SUFFIX;
-import static org.openecomp.sdc.generator.util.GeneratorConstants.PORT_TYPE_INTERNAL_NODE_TEMPLATE_SUFFIX;
-import static org.openecomp.sdc.generator.util.GeneratorConstants.RELEASE_VENDOR;
-import static org.openecomp.sdc.generator.util.GeneratorConstants.TOSCA_SERVICE_TEMPLATE_FILE_NAME_SUFFIX;
-import static org.openecomp.sdc.generator.util.GeneratorConstants.VNF_CONFIG_NODE_TEMPLATE_ID_SUFFIX;
-import static org.openecomp.sdc.generator.util.GeneratorConstants.VNF_NODE_TEMPLATE_ID_SUFFIX;
-
/**
* The type Manual vsp tosca generator.
*/
.getGlobalTypesServiceTemplate(OnboardingTypesEnum.MANUAL));
toscaServiceModel.setServiceTemplates(serviceTemplates);
toscaServiceModel.setEntryDefinitionServiceTemplate(Constants.MAIN_TEMPLATE_NAME
- + TOSCA_SERVICE_TEMPLATE_FILE_NAME_SUFFIX);
+ + GeneratorConstants.TOSCA_SERVICE_TEMPLATE_FILE_NAME_SUFFIX);
createToscaFromVspData(vspModelInfo, toscaServiceModel);
for (Map.Entry<String, ServiceTemplate> serviceTemplateEntry :
generatedServiceTemplates.entrySet()) {
vnfConfigurationNodeTemplate.setType(ToscaNodeType.VNF_CONFIG_NODE_TYPE);
if (Objects.nonNull(vspModelInfo.getAllowedFlavors())) {
Map<String, Object> properties = new LinkedHashMap<>();
- properties.put(ALLOWED_FLAVORS_PROPERTY, vspModelInfo.getAllowedFlavors());
+ properties.put(GeneratorConstants.ALLOWED_FLAVORS_PROPERTY, vspModelInfo.getAllowedFlavors());
vnfConfigurationNodeTemplate.setProperties(properties);
}
- String nodeTemplateId = componentName.get() + VNF_CONFIG_NODE_TEMPLATE_ID_SUFFIX;
+ String nodeTemplateId = componentName.get() + GeneratorConstants.VNF_CONFIG_NODE_TEMPLATE_ID_SUFFIX;
DataModelUtil.addNodeTemplate(mainServiceTemplate, nodeTemplateId,
vnfConfigurationNodeTemplate);
}
//Enable below if we need "abstract_" as prefix like we have in Unified model
//String nodeTemplateId =
// Constants.ABSTRACT_NODE_TEMPLATE_ID_PREFIX + componentName + "VNF_NODE_TEMPLATE_ID_SUFFIX";
- String nodeTemplateId = componentName.get() + VNF_NODE_TEMPLATE_ID_SUFFIX;
+ String nodeTemplateId = componentName.get() + GeneratorConstants.VNF_NODE_TEMPLATE_ID_SUFFIX;
DataModelUtil.addNodeTemplate(mainServiceTemplate, nodeTemplateId,
vnfNodeTemplate);
abstractSubstitutionIdTypes.put(componentName.get(), ToscaNodeType
componentImages.stream()
.forEach(multiFlavorVfcImage ->
vfcImages.put(multiFlavorVfcImage.getSoftware_version(), multiFlavorVfcImage));
- properties.put(IMAGES_PROPERTY, vfcImages);
+ properties.put(GeneratorConstants.IMAGES_PROPERTY, vfcImages);
}
}
return properties;
}
private String getSubstitutionServiceTemplateFileName(String componentName) {
- return componentName + TOSCA_SERVICE_TEMPLATE_FILE_NAME_SUFFIX;
+ return componentName + GeneratorConstants.TOSCA_SERVICE_TEMPLATE_FILE_NAME_SUFFIX;
}
private String getNodeTemplateId(String componentName, String idPrefix, String idSuffix) {
Map<String, String> templateMetadata = new HashMap<>();
templateMetadata.put(ToscaConstants.ST_METADATA_TEMPLATE_NAME, Constants.MAIN_TEMPLATE_NAME);
if (Objects.nonNull(releaseVendor)) {
- templateMetadata.put(RELEASE_VENDOR, releaseVendor);
+ templateMetadata.put(GeneratorConstants.RELEASE_VENDOR, releaseVendor);
}
mainServiceTemplate.setTosca_definitions_version(ToscaConstants.TOSCA_DEFINITIONS_VERSION);
mainServiceTemplate.setMetadata(templateMetadata);
StringBuilder builder = new StringBuilder();
builder.append(nicName);
if (nicNetworkType == NetworkType.External) {
- builder.append(PORT_TYPE_EXTERNAL_NODE_TEMPLATE_SUFFIX);
+ builder.append(GeneratorConstants.PORT_TYPE_EXTERNAL_NODE_TEMPLATE_SUFFIX);
} else if (nicNetworkType == NetworkType.Internal) {
- builder.append(PORT_TYPE_INTERNAL_NODE_TEMPLATE_SUFFIX);
+ builder.append(GeneratorConstants.PORT_TYPE_INTERNAL_NODE_TEMPLATE_SUFFIX);
}
- builder.append(PORT_NODE_TEMPLATE_ID_SUFFIX);
+ builder.append(GeneratorConstants.PORT_NODE_TEMPLATE_ID_SUFFIX);
return builder.toString();
}
//Create num_cpus property
PropertyDefinition numCpus = new PropertyDefinition();
numCpus.setType(PropertyType.INTEGER.getDisplayName());
- numCpus.setDescription(NUM_CPUS_PROP_DESC_PREFIX + componentName);
+ numCpus.setDescription(GeneratorConstants.NUM_CPUS_PROP_DESC_PREFIX + componentName);
numCpus.setRequired(true);
//Create disk_size property
PropertyDefinition diskSize = new PropertyDefinition();
diskSize.setType(PropertyType.SCALAR_UNIT_SIZE.getDisplayName());
- diskSize.setDescription(DISK_SIZE_PROP_DESC_PREFIX + componentName);
+ diskSize.setDescription(GeneratorConstants.DISK_SIZE_PROP_DESC_PREFIX + componentName);
diskSize.setRequired(true);
//Create mem_size property
PropertyDefinition memSize = new PropertyDefinition();
memSize.setType(PropertyType.SCALAR_UNIT_SIZE.getDisplayName());
- memSize.setDescription(MEM_SIZE_PROP_DESC_PREFIX + componentName);
+ memSize.setDescription(GeneratorConstants.MEM_SIZE_PROP_DESC_PREFIX + componentName);
memSize.setRequired(true);
Map<String, PropertyDefinition> manualVspProperties = new LinkedHashMap<>();
- manualVspProperties.put(NUM_CPUS, numCpus);
- manualVspProperties.put(DISK_SIZE, diskSize);
- manualVspProperties.put(MEM_SIZE, memSize);
+ manualVspProperties.put(GeneratorConstants.NUM_CPUS, numCpus);
+ manualVspProperties.put(GeneratorConstants.DISK_SIZE, diskSize);
+ manualVspProperties.put(GeneratorConstants.MEM_SIZE, memSize);
return manualVspProperties;
}
import org.openecomp.sdc.tosca.datatypes.ToscaElementTypes;
import org.openecomp.sdc.tosca.datatypes.ToscaServiceModel;
-import org.openecomp.sdc.tosca.datatypes.model.CapabilityDefinition;
-import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.NodeType;
-import org.openecomp.sdc.tosca.datatypes.model.RequirementAssignment;
-import org.openecomp.sdc.tosca.datatypes.model.RequirementDefinition;
-import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.onap.sdc.tosca.datatypes.model.CapabilityDefinition;
+import org.onap.sdc.tosca.datatypes.model.NodeTemplate;
+import org.onap.sdc.tosca.datatypes.model.NodeType;
+import org.onap.sdc.tosca.datatypes.model.RequirementAssignment;
+import org.onap.sdc.tosca.datatypes.model.RequirementDefinition;
+import org.onap.sdc.tosca.datatypes.model.ServiceTemplate;
import org.openecomp.sdc.tosca.services.DataModelUtil;
import org.openecomp.sdc.tosca.services.ToscaAnalyzerService;
-import org.openecomp.sdc.tosca.services.ToscaExtensionYamlUtil;
+import org.onap.sdc.tosca.services.ToscaExtensionYamlUtil;
import org.openecomp.sdc.tosca.services.ToscaUtil;
import org.openecomp.sdc.tosca.services.impl.ToscaAnalyzerServiceImpl;
<version>${project.version}</version>
</dependency>
<dependency>
- <groupId>org.openecomp.sdc.common</groupId>
- <artifactId>openecomp-configuration-management-core</artifactId>
+ <groupId>org.onap.sdc.common</groupId>
+ <artifactId>onap-configuration-management-core</artifactId>
<version>${openecomp.sdc.common.version}</version>
<scope>runtime</scope>
<exclusions>
</exclusions>
</dependency>
<dependency>
- <groupId>org.openecomp.sdc.common</groupId>
- <artifactId>openecomp-configuration-management-api</artifactId>
+ <groupId>org.onap.sdc.common</groupId>
+ <artifactId>onap-configuration-management-api</artifactId>
<version>${openecomp.sdc.common.version}</version>
</dependency>
</dependencies>
<dependencies>
<dependency>
- <groupId>org.openecomp.sdc.common</groupId>
- <artifactId>openecomp-tosca-datatype</artifactId>
+ <groupId>org.onap.sdc.common</groupId>
+ <artifactId>onap-tosca-datatype</artifactId>
<version>${openecomp.sdc.common.version}</version>
</dependency>
<dependency>
import com.google.common.collect.ArrayListMultimap;
import com.google.common.collect.ListMultimap;
import org.apache.commons.collections.MapUtils;
-import org.openecomp.config.api.Configuration;
-import org.openecomp.config.api.ConfigurationManager;
+import org.onap.config.api.Configuration;
+import org.onap.config.api.ConfigurationManager;
import org.openecomp.core.utilities.CommonMethods;
import org.openecomp.core.utilities.file.FileContentHandler;
import org.openecomp.core.utilities.orchestration.OnboardingTypesEnum;
import org.openecomp.sdc.heat.datatypes.manifest.FileData;
import org.openecomp.sdc.heat.datatypes.manifest.ManifestFile;
import org.openecomp.sdc.heat.datatypes.model.Resource;
-import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.onap.sdc.tosca.datatypes.model.NodeTemplate;
+import org.onap.sdc.tosca.datatypes.model.ServiceTemplate;
import org.openecomp.sdc.tosca.services.ToscaUtil;
import org.openecomp.sdc.translator.datatypes.heattotosca.to.TranslatedHeatResource;
import org.openecomp.sdc.translator.datatypes.heattotosca.unifiedmodel.composition.UnifiedCompositionEntity;
import org.openecomp.sdc.heat.datatypes.model.HeatOrchestrationTemplate;
import org.openecomp.sdc.heat.datatypes.model.Resource;
-import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.onap.sdc.tosca.datatypes.model.ServiceTemplate;
import org.openecomp.sdc.translator.datatypes.heattotosca.TranslationContext;
public class TranslateTo {
package org.openecomp.sdc.translator.datatypes.heattotosca.unifiedmodel.composition;
-import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
+import org.onap.sdc.tosca.datatypes.model.NodeTemplate;
/**
* Created by Talio on 4/4/2017.
package org.openecomp.sdc.translator.datatypes.heattotosca.unifiedmodel.composition;
import org.apache.commons.collections4.MapUtils;
-import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
+import org.onap.sdc.tosca.datatypes.model.NodeTemplate;
import java.util.Collection;
import java.util.HashMap;
import static org.openecomp.sdc.translator.services.heattotosca.UnifiedCompositionUtil.getConnectedComputeConsolidationData;
import static org.openecomp.sdc.translator.services.heattotosca.UnifiedCompositionUtil.getNewPortNodeTemplateId;
-import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
+import org.onap.sdc.tosca.datatypes.model.NodeTemplate;
import org.openecomp.sdc.tosca.services.DataModelUtil;
import org.openecomp.sdc.translator.datatypes.heattotosca.unifiedmodel.composition.commands.UnifiedSubstitutionNodeTemplateIdGenerator;
import org.openecomp.sdc.translator.datatypes.heattotosca.unifiedmodel.composition.to.UnifiedCompositionTo;
import static org.openecomp.sdc.translator.services.heattotosca.UnifiedCompositionUtil.getConnectedComputeConsolidationData;
import static org.openecomp.sdc.translator.services.heattotosca.UnifiedCompositionUtil.getNewSubInterfaceNodeTemplateId;
-import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
+import org.onap.sdc.tosca.datatypes.model.NodeTemplate;
import org.openecomp.sdc.tosca.services.DataModelUtil;
import org.openecomp.sdc.translator.datatypes.heattotosca.unifiedmodel.composition.UnifiedCompositionData;
import org.openecomp.sdc.translator.datatypes.heattotosca.unifiedmodel.composition.commands.UnifiedSubstitutionNodeTemplateIdGenerator;
package org.openecomp.sdc.translator.datatypes.heattotosca.unifiedmodel.composition.to;
-import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.onap.sdc.tosca.datatypes.model.NodeTemplate;
+import org.onap.sdc.tosca.datatypes.model.ServiceTemplate;
import org.openecomp.sdc.translator.datatypes.heattotosca.TranslationContext;
import org.openecomp.sdc.translator.datatypes.heattotosca.unifiedmodel.composition.UnifiedCompositionData;
package org.openecomp.sdc.translator.datatypes.heattotosca.unifiedmodel.consolidation;
-import org.openecomp.sdc.tosca.datatypes.model.RequirementAssignment;
+import org.onap.sdc.tosca.datatypes.model.RequirementAssignment;
import java.util.ArrayList;
import java.util.HashMap;
package org.openecomp.sdc.translator.datatypes.heattotosca.unifiedmodel.consolidation;
-import org.openecomp.sdc.tosca.datatypes.model.RequirementAssignment;
+import org.onap.sdc.tosca.datatypes.model.RequirementAssignment;
import java.util.ArrayList;
import java.util.HashMap;
package org.openecomp.sdc.translator.datatypes.heattotosca.unifiedmodel.consolidation;
-import org.openecomp.sdc.tosca.datatypes.model.RequirementAssignment;
+import org.onap.sdc.tosca.datatypes.model.RequirementAssignment;
/**
* The type Requirement assignment data.
package org.openecomp.sdc.translator.datatypes.heattotosca.unifiedmodel.consolidation;
-import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.onap.sdc.tosca.datatypes.model.ServiceTemplate;
import org.openecomp.sdc.tosca.services.ToscaUtil;
import org.openecomp.sdc.translator.datatypes.heattotosca.TranslationContext;
import org.openecomp.sdc.heat.datatypes.model.HeatOrchestrationTemplate;
import org.openecomp.sdc.heat.datatypes.model.HeatResourcesTypes;
import org.openecomp.sdc.heat.datatypes.model.Resource;
-import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.RequirementAssignment;
-import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.onap.sdc.tosca.datatypes.model.NodeTemplate;
+import org.onap.sdc.tosca.datatypes.model.RequirementAssignment;
+import org.onap.sdc.tosca.datatypes.model.ServiceTemplate;
import org.openecomp.sdc.tosca.services.DataModelUtil;
import org.openecomp.sdc.tosca.services.ToscaUtil;
import org.openecomp.sdc.translator.datatypes.heattotosca.TranslationContext;
import org.apache.commons.lang3.StringUtils;
import org.openecomp.sdc.common.errors.CoreException;
import org.openecomp.sdc.tosca.datatypes.ToscaNodeType;
-import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.onap.sdc.tosca.datatypes.model.NodeTemplate;
+import org.onap.sdc.tosca.datatypes.model.ServiceTemplate;
import org.openecomp.sdc.tosca.services.DataModelUtil;
import org.openecomp.sdc.tosca.services.ToscaAnalyzerService;
import org.openecomp.sdc.tosca.services.ToscaConstants;
import org.openecomp.sdc.heat.datatypes.model.HeatOrchestrationTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.Template;
+import org.onap.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.onap.sdc.tosca.datatypes.model.Template;
import org.openecomp.sdc.translator.datatypes.heattotosca.TranslationContext;
package org.openecomp.sdc.translator.services.heattotosca;
-import org.openecomp.config.api.Configuration;
-import org.openecomp.config.api.ConfigurationManager;
+import org.onap.config.api.Configuration;
+import org.onap.config.api.ConfigurationManager;
import org.openecomp.core.utilities.CommonMethods;
import org.openecomp.sdc.datatypes.configuration.ImplementationConfiguration;
import org.openecomp.sdc.tosca.datatypes.ToscaNodeType;
import org.openecomp.sdc.tosca.datatypes.ToscaRelationshipType;
import org.openecomp.sdc.tosca.datatypes.ToscaServiceModel;
-import org.openecomp.sdc.tosca.datatypes.model.AttributeDefinition;
-import org.openecomp.sdc.tosca.datatypes.model.CapabilityDefinition;
-import org.openecomp.sdc.tosca.datatypes.model.Import;
-import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.NodeType;
-import org.openecomp.sdc.tosca.datatypes.model.ParameterDefinition;
-import org.openecomp.sdc.tosca.datatypes.model.PropertyDefinition;
-import org.openecomp.sdc.tosca.datatypes.model.PropertyType;
-import org.openecomp.sdc.tosca.datatypes.model.RequirementAssignment;
-import org.openecomp.sdc.tosca.datatypes.model.RequirementDefinition;
-import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.Template;
-import org.openecomp.sdc.tosca.datatypes.model.TopologyTemplate;
+import org.onap.sdc.tosca.datatypes.model.AttributeDefinition;
+import org.onap.sdc.tosca.datatypes.model.CapabilityDefinition;
+import org.onap.sdc.tosca.datatypes.model.Import;
+import org.onap.sdc.tosca.datatypes.model.NodeTemplate;
+import org.onap.sdc.tosca.datatypes.model.NodeType;
+import org.onap.sdc.tosca.datatypes.model.ParameterDefinition;
+import org.onap.sdc.tosca.datatypes.model.PropertyDefinition;
+import org.onap.sdc.tosca.datatypes.model.PropertyType;
+import org.onap.sdc.tosca.datatypes.model.RequirementAssignment;
+import org.onap.sdc.tosca.datatypes.model.RequirementDefinition;
+import org.onap.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.onap.sdc.tosca.datatypes.model.Template;
+import org.onap.sdc.tosca.datatypes.model.TopologyTemplate;
import org.openecomp.sdc.tosca.services.DataModelUtil;
import org.openecomp.sdc.tosca.services.ToscaAnalyzerService;
import org.openecomp.sdc.tosca.services.ToscaConstants;
-import org.openecomp.sdc.tosca.services.ToscaExtensionYamlUtil;
+import org.onap.sdc.tosca.services.ToscaExtensionYamlUtil;
import org.openecomp.sdc.tosca.services.ToscaUtil;
-import org.openecomp.sdc.tosca.services.YamlUtil;
+import org.onap.sdc.tosca.services.YamlUtil;
import org.openecomp.sdc.tosca.services.impl.ToscaAnalyzerServiceImpl;
import org.openecomp.sdc.translator.datatypes.heattotosca.AttachedPropertyVal;
import org.openecomp.sdc.translator.datatypes.heattotosca.AttachedResourceId;
import org.openecomp.sdc.heat.datatypes.model.HeatOrchestrationTemplate;
import org.openecomp.sdc.heat.datatypes.model.Resource;
-import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.onap.sdc.tosca.datatypes.model.ServiceTemplate;
import org.openecomp.sdc.translator.datatypes.heattotosca.TranslationContext;
import java.util.Optional;
package org.openecomp.sdc.translator.services.heattotosca;
-import org.openecomp.config.api.Configuration;
-import org.openecomp.config.api.ConfigurationManager;
+import org.onap.config.api.Configuration;
+import org.onap.config.api.ConfigurationManager;
import org.openecomp.core.utilities.CommonMethods;
import org.openecomp.sdc.datatypes.configuration.ImplementationConfiguration;
import org.openecomp.sdc.heat.datatypes.model.Resource;
import org.openecomp.sdc.logging.api.LoggerFactory;
import org.openecomp.sdc.tosca.datatypes.ToscaGroupType;
import org.openecomp.sdc.tosca.datatypes.ToscaServiceModel;
-import org.openecomp.sdc.tosca.datatypes.model.GroupDefinition;
-import org.openecomp.sdc.tosca.datatypes.model.ParameterDefinition;
-import org.openecomp.sdc.tosca.datatypes.model.PropertyType;
-import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.TopologyTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.heatextend.ParameterDefinitionExt;
+import org.onap.sdc.tosca.datatypes.model.GroupDefinition;
+import org.onap.sdc.tosca.datatypes.model.ParameterDefinition;
+import org.onap.sdc.tosca.datatypes.model.PropertyType;
+import org.onap.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.onap.sdc.tosca.datatypes.model.TopologyTemplate;
+import org.onap.sdc.tosca.datatypes.model.heatextend.ParameterDefinitionExt;
import org.openecomp.sdc.tosca.services.DataModelUtil;
import org.openecomp.sdc.tosca.services.ToscaConstants;
import org.openecomp.sdc.tosca.services.ToscaFileOutputService;
import org.openecomp.sdc.tosca.services.ToscaUtil;
-import org.openecomp.sdc.tosca.services.YamlUtil;
+import org.onap.sdc.tosca.services.YamlUtil;
import org.openecomp.sdc.tosca.services.impl.ToscaFileOutputServiceCsarImpl;
import org.openecomp.sdc.translator.datatypes.heattotosca.AttachedResourceId;
import org.openecomp.sdc.translator.datatypes.heattotosca.TranslationContext;
import java.util.Objects;
import java.util.Optional;
import java.util.Set;
-import java.util.stream.Collectors;
public class TranslationService {
package org.openecomp.sdc.translator.services.heattotosca;
-import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.onap.sdc.tosca.datatypes.model.ServiceTemplate;
import org.openecomp.sdc.translator.datatypes.heattotosca.TranslationContext;
import org.openecomp.sdc.translator.datatypes.heattotosca.unifiedmodel.composition.UnifiedCompositionData;
package org.openecomp.sdc.translator.services.heattotosca;
import org.openecomp.sdc.tosca.datatypes.ToscaServiceModel;
-import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.onap.sdc.tosca.datatypes.model.NodeTemplate;
+import org.onap.sdc.tosca.datatypes.model.ServiceTemplate;
import org.openecomp.sdc.tosca.services.DataModelUtil;
import org.openecomp.sdc.tosca.services.ToscaAnalyzerService;
import org.openecomp.sdc.tosca.services.ToscaUtil;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.tuple.ImmutablePair;
import org.apache.commons.lang3.tuple.Pair;
-import org.openecomp.config.api.Configuration;
-import org.openecomp.config.api.ConfigurationManager;
+import org.onap.config.api.Configuration;
+import org.onap.config.api.ConfigurationManager;
import org.openecomp.core.utilities.CommonMethods;
import org.openecomp.sdc.common.togglz.ToggleableFeature;
import org.openecomp.sdc.datatypes.configuration.ImplementationConfiguration;
import org.openecomp.sdc.tosca.datatypes.ToscaGroupType;
import org.openecomp.sdc.tosca.datatypes.ToscaNodeType;
import org.openecomp.sdc.tosca.datatypes.ToscaRelationshipType;
-import org.openecomp.sdc.tosca.datatypes.model.AttributeDefinition;
-import org.openecomp.sdc.tosca.datatypes.model.CapabilityDefinition;
-import org.openecomp.sdc.tosca.datatypes.model.Constraint;
-import org.openecomp.sdc.tosca.datatypes.model.EntrySchema;
-import org.openecomp.sdc.tosca.datatypes.model.GroupDefinition;
-import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.NodeType;
-import org.openecomp.sdc.tosca.datatypes.model.ParameterDefinition;
-import org.openecomp.sdc.tosca.datatypes.model.PropertyDefinition;
-import org.openecomp.sdc.tosca.datatypes.model.PropertyType;
-import org.openecomp.sdc.tosca.datatypes.model.RelationshipTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.RequirementAssignment;
-import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.SubstitutionMapping;
-import org.openecomp.sdc.tosca.datatypes.model.heatextend.PropertyTypeExt;
+import org.onap.sdc.tosca.datatypes.model.AttributeDefinition;
+import org.onap.sdc.tosca.datatypes.model.CapabilityDefinition;
+import org.onap.sdc.tosca.datatypes.model.Constraint;
+import org.onap.sdc.tosca.datatypes.model.EntrySchema;
+import org.onap.sdc.tosca.datatypes.model.GroupDefinition;
+import org.onap.sdc.tosca.datatypes.model.NodeTemplate;
+import org.onap.sdc.tosca.datatypes.model.NodeType;
+import org.onap.sdc.tosca.datatypes.model.ParameterDefinition;
+import org.onap.sdc.tosca.datatypes.model.PropertyDefinition;
+import org.onap.sdc.tosca.datatypes.model.PropertyType;
+import org.onap.sdc.tosca.datatypes.model.RelationshipTemplate;
+import org.onap.sdc.tosca.datatypes.model.RequirementAssignment;
+import org.onap.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.onap.sdc.tosca.datatypes.model.SubstitutionMapping;
+import org.onap.sdc.tosca.datatypes.model.heatextend.PropertyTypeExt;
import org.openecomp.sdc.tosca.services.DataModelUtil;
import org.openecomp.sdc.tosca.services.ToscaAnalyzerService;
import org.openecomp.sdc.tosca.services.ToscaConstants;
import com.google.common.collect.ArrayListMultimap;
import com.google.common.collect.ListMultimap;
import org.apache.commons.collections4.MapUtils;
-import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.onap.sdc.tosca.datatypes.model.NodeTemplate;
+import org.onap.sdc.tosca.datatypes.model.ServiceTemplate;
import org.openecomp.sdc.tosca.services.DataModelUtil;
import org.openecomp.sdc.translator.datatypes.heattotosca.TranslationContext;
import org.openecomp.sdc.translator.datatypes.heattotosca.unifiedmodel.composition.UnifiedCompositionData;
package org.openecomp.sdc.translator.services.heattotosca.globaltypes;
import org.openecomp.core.utilities.orchestration.OnboardingTypesEnum;
-import org.openecomp.sdc.tosca.datatypes.model.Import;
-import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.onap.sdc.tosca.datatypes.model.Import;
+import org.onap.sdc.tosca.datatypes.model.ServiceTemplate;
import org.openecomp.sdc.translator.services.heattotosca.HeatToToscaUtil;
import java.util.ArrayList;
import org.openecomp.sdc.common.errors.CoreException;
import org.openecomp.sdc.common.errors.ErrorCategory;
import org.openecomp.sdc.common.errors.ErrorCode;
-import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
-import org.openecomp.sdc.tosca.services.ToscaExtensionYamlUtil;
+import org.onap.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.onap.sdc.tosca.services.ToscaExtensionYamlUtil;
import org.openecomp.sdc.tosca.services.ToscaUtil;
import org.openecomp.sdc.translator.utils.ResourceWalker;
import org.openecomp.sdc.logging.api.Logger;
import org.openecomp.sdc.logging.api.LoggerFactory;
import org.openecomp.sdc.tosca.datatypes.ToscaNodeType;
-import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.RequirementAssignment;
+import org.onap.sdc.tosca.datatypes.model.NodeTemplate;
+import org.onap.sdc.tosca.datatypes.model.RequirementAssignment;
import org.openecomp.sdc.tosca.services.ToscaConstants;
import org.openecomp.sdc.translator.datatypes.heattotosca.AttachedResourceId;
import org.openecomp.sdc.translator.datatypes.heattotosca.TranslationContext;
import org.openecomp.sdc.heat.datatypes.model.Output;
import org.openecomp.sdc.heat.datatypes.model.Resource;
import org.openecomp.sdc.logging.api.Logger;
-import org.openecomp.sdc.tosca.services.YamlUtil;
+import org.onap.sdc.tosca.services.YamlUtil;
import org.openecomp.sdc.translator.datatypes.heattotosca.AttachedResourceId;
import org.openecomp.sdc.translator.datatypes.heattotosca.TranslationContext;
import org.openecomp.sdc.translator.datatypes.heattotosca.to.ResourceFileDataAndIDs;
import org.openecomp.sdc.heat.datatypes.model.Resource;
import org.openecomp.sdc.heat.services.HeatConstants;
import org.openecomp.sdc.tosca.datatypes.ToscaFunctions;
-import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.Template;
-import org.openecomp.sdc.tosca.services.YamlUtil;
+import org.onap.sdc.tosca.datatypes.model.NodeTemplate;
+import org.onap.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.onap.sdc.tosca.datatypes.model.Template;
+import org.onap.sdc.tosca.services.YamlUtil;
import org.openecomp.sdc.translator.datatypes.heattotosca.TranslationContext;
import org.openecomp.sdc.translator.datatypes.heattotosca.to.TranslateTo;
import org.openecomp.sdc.translator.datatypes.heattotosca.unifiedmodel.consolidation.EntityConsolidationData;
import org.openecomp.sdc.heat.datatypes.model.HeatOrchestrationTemplate;
import org.openecomp.sdc.tosca.datatypes.ToscaArtifactType;
import org.openecomp.sdc.tosca.datatypes.ToscaFunctions;
-import org.openecomp.sdc.tosca.datatypes.model.ArtifactDefinition;
-import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.Template;
+import org.onap.sdc.tosca.datatypes.model.ArtifactDefinition;
+import org.onap.sdc.tosca.datatypes.model.NodeTemplate;
+import org.onap.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.onap.sdc.tosca.datatypes.model.Template;
import org.openecomp.sdc.tosca.services.ToscaConstants;
import org.openecomp.sdc.tosca.services.ToscaFileOutputService;
import org.openecomp.sdc.tosca.services.impl.ToscaFileOutputServiceCsarImpl;
import org.openecomp.sdc.heat.datatypes.model.HeatOrchestrationTemplate;
import org.openecomp.sdc.heat.datatypes.model.HeatPseudoParameters;
import org.openecomp.sdc.tosca.datatypes.ToscaFunctions;
-import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.Template;
+import org.onap.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.onap.sdc.tosca.datatypes.model.Template;
import org.openecomp.sdc.translator.datatypes.heattotosca.TranslationContext;
import org.openecomp.sdc.translator.services.heattotosca.FunctionTranslation;
import org.openecomp.sdc.translator.services.heattotosca.FunctionTranslationFactory;
package org.openecomp.sdc.translator.services.heattotosca.impl.functiontranslation;
import org.openecomp.sdc.heat.datatypes.model.HeatOrchestrationTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.Template;
+import org.onap.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.onap.sdc.tosca.datatypes.model.Template;
import org.openecomp.sdc.translator.datatypes.heattotosca.TranslationContext;
import org.openecomp.sdc.translator.services.heattotosca.FunctionTranslation;
import org.openecomp.sdc.translator.services.heattotosca.helper.FunctionTranslationHelper;
import org.openecomp.sdc.heat.datatypes.model.Resource;
import org.openecomp.sdc.logging.api.Logger;
import org.openecomp.sdc.logging.api.LoggerFactory;
-import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.NodeType;
-import org.openecomp.sdc.tosca.datatypes.model.RequirementAssignment;
-import org.openecomp.sdc.tosca.datatypes.model.RequirementDefinition;
-import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.onap.sdc.tosca.datatypes.model.NodeTemplate;
+import org.onap.sdc.tosca.datatypes.model.NodeType;
+import org.onap.sdc.tosca.datatypes.model.RequirementAssignment;
+import org.onap.sdc.tosca.datatypes.model.RequirementDefinition;
+import org.onap.sdc.tosca.datatypes.model.ServiceTemplate;
import org.openecomp.sdc.tosca.services.DataModelUtil;
import org.openecomp.sdc.tosca.services.ToscaAnalyzerService;
-import org.openecomp.sdc.tosca.services.YamlUtil;
+import org.onap.sdc.tosca.services.YamlUtil;
import org.openecomp.sdc.tosca.services.impl.ToscaAnalyzerServiceImpl;
import org.openecomp.sdc.translator.datatypes.heattotosca.AttachedResourceId;
import org.openecomp.sdc.translator.datatypes.heattotosca.to.TranslateTo;
import org.openecomp.sdc.tosca.datatypes.ToscaNodeType;
import org.openecomp.sdc.tosca.datatypes.ToscaRelationshipType;
import org.openecomp.sdc.tosca.datatypes.ToscaServiceModel;
-import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.NodeType;
-import org.openecomp.sdc.tosca.datatypes.model.RequirementDefinition;
+import org.onap.sdc.tosca.datatypes.model.NodeTemplate;
+import org.onap.sdc.tosca.datatypes.model.NodeType;
+import org.onap.sdc.tosca.datatypes.model.RequirementDefinition;
import org.openecomp.sdc.tosca.services.ToscaAnalyzerService;
import org.openecomp.sdc.tosca.services.impl.ToscaAnalyzerServiceImpl;
import org.openecomp.sdc.translator.datatypes.heattotosca.AttachedResourceId;
import org.openecomp.sdc.tosca.datatypes.ToscaCapabilityType;
import org.openecomp.sdc.tosca.datatypes.ToscaNodeType;
import org.openecomp.sdc.tosca.datatypes.ToscaRelationshipType;
-import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.NodeType;
-import org.openecomp.sdc.tosca.datatypes.model.RequirementDefinition;
+import org.onap.sdc.tosca.datatypes.model.NodeTemplate;
+import org.onap.sdc.tosca.datatypes.model.NodeType;
+import org.onap.sdc.tosca.datatypes.model.RequirementDefinition;
import org.openecomp.sdc.translator.datatypes.heattotosca.AttachedResourceId;
import org.openecomp.sdc.translator.datatypes.heattotosca.to.TranslateTo;
import org.openecomp.sdc.translator.services.heattotosca.HeatToToscaUtil;
import org.openecomp.sdc.tosca.datatypes.ToscaCapabilityType;
import org.openecomp.sdc.tosca.datatypes.ToscaNodeType;
import org.openecomp.sdc.tosca.datatypes.ToscaRelationshipType;
-import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.NodeType;
-import org.openecomp.sdc.tosca.datatypes.model.RequirementDefinition;
+import org.onap.sdc.tosca.datatypes.model.NodeTemplate;
+import org.onap.sdc.tosca.datatypes.model.NodeType;
+import org.onap.sdc.tosca.datatypes.model.RequirementDefinition;
import org.openecomp.sdc.translator.datatypes.heattotosca.AttachedResourceId;
import org.openecomp.sdc.translator.datatypes.heattotosca.to.TranslateTo;
import org.openecomp.sdc.translator.services.heattotosca.HeatToToscaUtil;
import org.openecomp.sdc.tosca.datatypes.ToscaNodeType;
import org.openecomp.sdc.tosca.datatypes.ToscaRelationshipType;
import org.openecomp.sdc.tosca.datatypes.ToscaServiceModel;
-import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.NodeType;
-import org.openecomp.sdc.tosca.datatypes.model.RequirementDefinition;
+import org.onap.sdc.tosca.datatypes.model.NodeTemplate;
+import org.onap.sdc.tosca.datatypes.model.NodeType;
+import org.onap.sdc.tosca.datatypes.model.RequirementDefinition;
import org.openecomp.sdc.tosca.services.ToscaAnalyzerService;
import org.openecomp.sdc.tosca.services.impl.ToscaAnalyzerServiceImpl;
import org.openecomp.sdc.translator.datatypes.heattotosca.AttachedResourceId;
import org.openecomp.sdc.tosca.datatypes.ToscaCapabilityType;
import org.openecomp.sdc.tosca.datatypes.ToscaNodeType;
import org.openecomp.sdc.tosca.datatypes.ToscaRelationshipType;
-import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.NodeType;
-import org.openecomp.sdc.tosca.datatypes.model.RequirementDefinition;
+import org.onap.sdc.tosca.datatypes.model.NodeTemplate;
+import org.onap.sdc.tosca.datatypes.model.NodeType;
+import org.onap.sdc.tosca.datatypes.model.RequirementDefinition;
import org.openecomp.sdc.translator.datatypes.heattotosca.AttachedResourceId;
import org.openecomp.sdc.translator.datatypes.heattotosca.to.TranslateTo;
import org.openecomp.sdc.translator.services.heattotosca.HeatToToscaUtil;
import org.openecomp.sdc.heat.datatypes.manifest.FileData;
import org.openecomp.sdc.heat.datatypes.model.Resource;
-import org.openecomp.sdc.tosca.datatypes.model.CapabilityDefinition;
-import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.NodeType;
-import org.openecomp.sdc.tosca.datatypes.model.RequirementAssignment;
-import org.openecomp.sdc.tosca.datatypes.model.RequirementDefinition;
-import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.onap.sdc.tosca.datatypes.model.CapabilityDefinition;
+import org.onap.sdc.tosca.datatypes.model.NodeTemplate;
+import org.onap.sdc.tosca.datatypes.model.NodeType;
+import org.onap.sdc.tosca.datatypes.model.RequirementAssignment;
+import org.onap.sdc.tosca.datatypes.model.RequirementDefinition;
+import org.onap.sdc.tosca.datatypes.model.ServiceTemplate;
import org.openecomp.sdc.tosca.services.DataModelUtil;
import org.openecomp.sdc.translator.datatypes.heattotosca.to.TranslateTo;
import org.openecomp.sdc.translator.datatypes.heattotosca.to.TranslatedHeatResource;
package org.openecomp.sdc.translator.services.heattotosca.impl.resourcetranslation;
import org.openecomp.sdc.heat.datatypes.manifest.FileData;
-import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.NodeType;
-import org.openecomp.sdc.tosca.datatypes.model.RequirementDefinition;
-import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.onap.sdc.tosca.datatypes.model.NodeTemplate;
+import org.onap.sdc.tosca.datatypes.model.NodeType;
+import org.onap.sdc.tosca.datatypes.model.RequirementDefinition;
+import org.onap.sdc.tosca.datatypes.model.ServiceTemplate;
import org.openecomp.sdc.tosca.services.DataModelUtil;
import org.openecomp.sdc.translator.datatypes.heattotosca.to.TranslateTo;
import org.openecomp.sdc.tosca.datatypes.ToscaCapabilityType;
import org.openecomp.sdc.tosca.datatypes.ToscaRelationshipType;
import org.openecomp.sdc.tosca.datatypes.ToscaTopologyTemplateElements;
-import org.openecomp.sdc.tosca.datatypes.model.RequirementAssignment;
-import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.onap.sdc.tosca.datatypes.model.RequirementAssignment;
+import org.onap.sdc.tosca.datatypes.model.ServiceTemplate;
import org.openecomp.sdc.tosca.services.DataModelUtil;
import org.openecomp.sdc.tosca.services.ToscaConstants;
import org.openecomp.sdc.translator.datatypes.heattotosca.TranslationContext;
import org.openecomp.sdc.logging.api.LoggerFactory;
import org.openecomp.sdc.tosca.datatypes.ToscaRelationshipType;
import org.openecomp.sdc.tosca.datatypes.ToscaTopologyTemplateElements;
-import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.RelationshipTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.RequirementAssignment;
+import org.onap.sdc.tosca.datatypes.model.NodeTemplate;
+import org.onap.sdc.tosca.datatypes.model.RelationshipTemplate;
+import org.onap.sdc.tosca.datatypes.model.RequirementAssignment;
import org.openecomp.sdc.tosca.services.DataModelUtil;
import org.openecomp.sdc.tosca.services.ToscaConstants;
import org.openecomp.sdc.translator.datatypes.heattotosca.AttachedResourceId;
import org.openecomp.sdc.heat.datatypes.HeatBoolean;
import org.openecomp.sdc.heat.services.HeatConstants;
import org.openecomp.sdc.tosca.datatypes.ToscaNodeType;
-import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
+import org.onap.sdc.tosca.datatypes.model.NodeTemplate;
import org.openecomp.sdc.tosca.services.DataModelUtil;
import org.openecomp.sdc.translator.datatypes.heattotosca.to.TranslateTo;
import org.openecomp.sdc.translator.services.heattotosca.HeatToToscaUtil;
import org.openecomp.sdc.tosca.datatypes.ToscaCapabilityType;
import org.openecomp.sdc.tosca.datatypes.ToscaRelationshipType;
import org.openecomp.sdc.tosca.datatypes.ToscaTopologyTemplateElements;
-import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.RequirementAssignment;
+import org.onap.sdc.tosca.datatypes.model.NodeTemplate;
+import org.onap.sdc.tosca.datatypes.model.RequirementAssignment;
import org.openecomp.sdc.tosca.services.DataModelUtil;
import org.openecomp.sdc.tosca.services.ToscaConstants;
import org.openecomp.sdc.translator.datatypes.heattotosca.AttachedResourceId;
import org.openecomp.sdc.logging.api.Logger;
import org.openecomp.sdc.logging.api.LoggerFactory;
import org.openecomp.sdc.tosca.datatypes.ToscaNodeType;
-import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
+import org.onap.sdc.tosca.datatypes.model.NodeTemplate;
import org.openecomp.sdc.tosca.services.DataModelUtil;
import org.openecomp.sdc.translator.datatypes.heattotosca.to.TranslateTo;
import org.openecomp.sdc.translator.services.heattotosca.mapping.TranslatorHeatToToscaPropertyConverter;
import org.openecomp.sdc.tosca.datatypes.ToscaGroupType;
import org.openecomp.sdc.tosca.datatypes.ToscaNodeType;
import org.openecomp.sdc.tosca.datatypes.ToscaRelationshipType;
-import org.openecomp.sdc.tosca.datatypes.model.AttributeDefinition;
-import org.openecomp.sdc.tosca.datatypes.model.GroupDefinition;
-import org.openecomp.sdc.tosca.datatypes.model.Import;
-import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.NodeType;
-import org.openecomp.sdc.tosca.datatypes.model.ParameterDefinition;
-import org.openecomp.sdc.tosca.datatypes.model.PropertyDefinition;
-import org.openecomp.sdc.tosca.datatypes.model.RequirementAssignment;
-import org.openecomp.sdc.tosca.datatypes.model.RequirementDefinition;
-import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.SubstitutionMapping;
-import org.openecomp.sdc.tosca.datatypes.model.TopologyTemplate;
+import org.onap.sdc.tosca.datatypes.model.AttributeDefinition;
+import org.onap.sdc.tosca.datatypes.model.GroupDefinition;
+import org.onap.sdc.tosca.datatypes.model.Import;
+import org.onap.sdc.tosca.datatypes.model.NodeTemplate;
+import org.onap.sdc.tosca.datatypes.model.NodeType;
+import org.onap.sdc.tosca.datatypes.model.ParameterDefinition;
+import org.onap.sdc.tosca.datatypes.model.PropertyDefinition;
+import org.onap.sdc.tosca.datatypes.model.RequirementAssignment;
+import org.onap.sdc.tosca.datatypes.model.RequirementDefinition;
+import org.onap.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.onap.sdc.tosca.datatypes.model.SubstitutionMapping;
+import org.onap.sdc.tosca.datatypes.model.TopologyTemplate;
import org.openecomp.sdc.tosca.services.DataModelUtil;
import org.openecomp.sdc.tosca.services.ToscaAnalyzerService;
import org.openecomp.sdc.tosca.services.ToscaConstants;
import org.openecomp.sdc.common.errors.CoreException;
import org.openecomp.sdc.tosca.datatypes.ToscaNodeType;
import org.openecomp.sdc.tosca.datatypes.ToscaTopologyTemplateElements;
-import org.openecomp.sdc.tosca.datatypes.model.NodeType;
-import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.onap.sdc.tosca.datatypes.model.NodeType;
+import org.onap.sdc.tosca.datatypes.model.ServiceTemplate;
import org.openecomp.sdc.tosca.services.DataModelUtil;
import org.openecomp.sdc.tosca.services.ToscaConstants;
import org.openecomp.sdc.translator.datatypes.heattotosca.TranslationContext;
import org.openecomp.sdc.logging.api.Logger;
import org.openecomp.sdc.logging.api.LoggerFactory;
import org.openecomp.sdc.tosca.datatypes.ToscaNodeType;
-import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
+import org.onap.sdc.tosca.datatypes.model.NodeTemplate;
import org.openecomp.sdc.tosca.services.DataModelUtil;
import org.openecomp.sdc.translator.datatypes.heattotosca.to.TranslateTo;
import org.openecomp.sdc.translator.services.heattotosca.mapping.TranslatorHeatToToscaPropertyConverter;
import org.openecomp.sdc.tosca.datatypes.ToscaCapabilityType;
import org.openecomp.sdc.tosca.datatypes.ToscaNodeType;
import org.openecomp.sdc.tosca.datatypes.ToscaRelationshipType;
-import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.RequirementAssignment;
+import org.onap.sdc.tosca.datatypes.model.NodeTemplate;
+import org.onap.sdc.tosca.datatypes.model.RequirementAssignment;
import org.openecomp.sdc.tosca.services.DataModelUtil;
import org.openecomp.sdc.tosca.services.ToscaConstants;
import org.openecomp.sdc.translator.datatypes.heattotosca.AttachedResourceId;
import org.openecomp.sdc.logging.api.Logger;
import org.openecomp.sdc.logging.api.LoggerFactory;
import org.openecomp.sdc.tosca.datatypes.ToscaNodeType;
-import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
+import org.onap.sdc.tosca.datatypes.model.NodeTemplate;
import org.openecomp.sdc.tosca.services.DataModelUtil;
import org.openecomp.sdc.translator.datatypes.heattotosca.to.TranslateTo;
import org.openecomp.sdc.translator.services.heattotosca.HeatToToscaUtil;
import org.openecomp.sdc.logging.api.Logger;
import org.openecomp.sdc.logging.api.LoggerFactory;
import org.openecomp.sdc.tosca.datatypes.ToscaNodeType;
-import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
+import org.onap.sdc.tosca.datatypes.model.NodeTemplate;
import org.openecomp.sdc.tosca.services.DataModelUtil;
import org.openecomp.sdc.translator.datatypes.heattotosca.to.TranslateTo;
import org.openecomp.sdc.translator.services.heattotosca.HeatToToscaUtil;
package org.openecomp.sdc.translator.services.heattotosca.impl.resourcetranslation;
import org.openecomp.sdc.tosca.datatypes.ToscaNodeType;
-import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
+import org.onap.sdc.tosca.datatypes.model.NodeTemplate;
import org.openecomp.sdc.tosca.services.DataModelUtil;
import org.openecomp.sdc.translator.datatypes.heattotosca.to.TranslateTo;
import org.openecomp.sdc.translator.services.heattotosca.mapping.TranslatorHeatToToscaPropertyConverter;
import org.openecomp.sdc.logging.api.LoggerFactory;
import org.openecomp.sdc.tosca.datatypes.ToscaCapabilityType;
import org.openecomp.sdc.tosca.datatypes.ToscaNodeType;
-import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.NodeType;
-import org.openecomp.sdc.tosca.datatypes.model.RequirementAssignment;
-import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.onap.sdc.tosca.datatypes.model.NodeTemplate;
+import org.onap.sdc.tosca.datatypes.model.NodeType;
+import org.onap.sdc.tosca.datatypes.model.RequirementAssignment;
+import org.onap.sdc.tosca.datatypes.model.ServiceTemplate;
import org.openecomp.sdc.tosca.services.DataModelUtil;
import org.openecomp.sdc.tosca.services.ToscaUtil;
import org.openecomp.sdc.tosca.services.impl.ToscaAnalyzerServiceImpl;
import org.openecomp.sdc.heat.services.HeatConstants;
import org.openecomp.sdc.tosca.datatypes.ToscaNodeType;
-import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
+import org.onap.sdc.tosca.datatypes.model.NodeTemplate;
import org.openecomp.sdc.tosca.services.DataModelUtil;
import org.openecomp.sdc.translator.datatypes.heattotosca.to.TranslateTo;
import org.openecomp.sdc.translator.services.heattotosca.HeatToToscaUtil;
import org.openecomp.sdc.tosca.datatypes.ToscaCapabilityType;
import org.openecomp.sdc.tosca.datatypes.ToscaNodeType;
import org.openecomp.sdc.tosca.datatypes.ToscaRelationshipType;
-import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.RequirementAssignment;
+import org.onap.sdc.tosca.datatypes.model.NodeTemplate;
+import org.onap.sdc.tosca.datatypes.model.RequirementAssignment;
import org.openecomp.sdc.tosca.services.DataModelUtil;
import org.openecomp.sdc.tosca.services.ToscaConstants;
import org.openecomp.sdc.translator.datatypes.heattotosca.AttachedResourceId;
package org.openecomp.sdc.translator.services.heattotosca.impl.resourcetranslation;
import org.openecomp.sdc.tosca.datatypes.ToscaNodeType;
-import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
+import org.onap.sdc.tosca.datatypes.model.NodeTemplate;
import org.openecomp.sdc.tosca.services.DataModelUtil;
import org.openecomp.sdc.translator.datatypes.heattotosca.to.TranslateTo;
import org.openecomp.sdc.translator.services.heattotosca.mapping.TranslatorHeatToToscaPropertyConverter;
import org.openecomp.sdc.logging.api.Logger;
import org.openecomp.sdc.logging.api.LoggerFactory;
import org.openecomp.sdc.tosca.datatypes.ToscaFunctions;
-import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.ParameterDefinition;
-import org.openecomp.sdc.tosca.datatypes.model.PropertyType;
+import org.onap.sdc.tosca.datatypes.model.NodeTemplate;
+import org.onap.sdc.tosca.datatypes.model.ParameterDefinition;
+import org.onap.sdc.tosca.datatypes.model.PropertyType;
import org.openecomp.sdc.tosca.services.DataModelUtil;
import org.openecomp.sdc.tosca.services.ToscaConstants;
import org.openecomp.sdc.translator.datatypes.heattotosca.AttachedResourceId;
import org.openecomp.sdc.tosca.datatypes.ToscaGroupType;
import org.openecomp.sdc.tosca.datatypes.ToscaPolicyType;
import org.openecomp.sdc.tosca.datatypes.ToscaTopologyTemplateElements;
-import org.openecomp.sdc.tosca.datatypes.model.GroupDefinition;
-import org.openecomp.sdc.tosca.datatypes.model.PolicyDefinition;
+import org.onap.sdc.tosca.datatypes.model.GroupDefinition;
+import org.onap.sdc.tosca.datatypes.model.PolicyDefinition;
import org.openecomp.sdc.tosca.services.DataModelUtil;
import org.openecomp.sdc.translator.datatypes.heattotosca.to.TranslateTo;
import org.openecomp.sdc.translator.services.heattotosca.mapping.TranslatorHeatToToscaPropertyConverter;
import org.openecomp.sdc.tosca.datatypes.ToscaCapabilityType;
import org.openecomp.sdc.tosca.datatypes.ToscaNodeType;
import org.openecomp.sdc.tosca.datatypes.ToscaRelationshipType;
-import org.openecomp.sdc.tosca.datatypes.model.GroupDefinition;
-import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.NodeType;
-import org.openecomp.sdc.tosca.datatypes.model.RelationshipTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.RequirementAssignment;
-import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.onap.sdc.tosca.datatypes.model.GroupDefinition;
+import org.onap.sdc.tosca.datatypes.model.NodeTemplate;
+import org.onap.sdc.tosca.datatypes.model.NodeType;
+import org.onap.sdc.tosca.datatypes.model.RelationshipTemplate;
+import org.onap.sdc.tosca.datatypes.model.RequirementAssignment;
+import org.onap.sdc.tosca.datatypes.model.ServiceTemplate;
import org.openecomp.sdc.tosca.services.DataModelUtil;
import org.openecomp.sdc.tosca.services.ToscaConstants;
import org.openecomp.sdc.translator.datatypes.heattotosca.AttachedResourceId;
import org.openecomp.sdc.heat.datatypes.model.Resource;
import org.openecomp.sdc.heat.services.HeatConstants;
import org.openecomp.sdc.tosca.datatypes.ToscaFunctions;
-import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
+import org.onap.sdc.tosca.datatypes.model.NodeTemplate;
import org.openecomp.sdc.tosca.services.DataModelUtil;
import org.openecomp.sdc.tosca.services.ToscaConstants;
import org.openecomp.sdc.tosca.services.ToscaUtil;
import org.openecomp.sdc.tosca.datatypes.ToscaCapabilityType;
import org.openecomp.sdc.tosca.datatypes.ToscaNodeType;
import org.openecomp.sdc.tosca.datatypes.ToscaRelationshipType;
-import org.openecomp.sdc.tosca.datatypes.model.CapabilityDefinition;
-import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.NodeType;
-import org.openecomp.sdc.tosca.datatypes.model.RequirementDefinition;
+import org.onap.sdc.tosca.datatypes.model.CapabilityDefinition;
+import org.onap.sdc.tosca.datatypes.model.NodeTemplate;
+import org.onap.sdc.tosca.datatypes.model.NodeType;
+import org.onap.sdc.tosca.datatypes.model.RequirementDefinition;
import org.openecomp.sdc.tosca.services.ToscaConstants;
import org.openecomp.sdc.translator.datatypes.heattotosca.AttachedResourceId;
import org.openecomp.sdc.translator.datatypes.heattotosca.to.TranslateTo;
package org.openecomp.sdc.translator.services.heattotosca.impl.unifiedcomposition;
-import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.onap.sdc.tosca.datatypes.model.ServiceTemplate;
import org.openecomp.sdc.translator.datatypes.heattotosca.TranslationContext;
import org.openecomp.sdc.translator.datatypes.heattotosca.unifiedmodel.composition.UnifiedCompositionData;
import org.openecomp.sdc.translator.services.heattotosca.UnifiedComposition;
package org.openecomp.sdc.translator.services.heattotosca.impl.unifiedcomposition;
import org.apache.commons.collections4.CollectionUtils;
-import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.onap.sdc.tosca.datatypes.model.ServiceTemplate;
import org.openecomp.sdc.translator.datatypes.heattotosca.TranslationContext;
import org.openecomp.sdc.translator.datatypes.heattotosca.unifiedmodel.composition.UnifiedCompositionData;
import org.openecomp.sdc.translator.datatypes.heattotosca.unifiedmodel.composition.to.UnifiedCompositionTo;
package org.openecomp.sdc.translator.services.heattotosca.impl.unifiedcomposition;
import org.apache.commons.collections4.CollectionUtils;
-import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.onap.sdc.tosca.datatypes.model.ServiceTemplate;
import org.openecomp.sdc.translator.datatypes.heattotosca.TranslationContext;
import org.openecomp.sdc.translator.datatypes.heattotosca.unifiedmodel.composition.UnifiedCompositionData;
import org.openecomp.sdc.translator.services.heattotosca.UnifiedComposition;
package org.openecomp.sdc.translator.services.heattotosca.impl.unifiedcomposition;
import org.apache.commons.collections4.CollectionUtils;
-import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.onap.sdc.tosca.datatypes.model.ServiceTemplate;
import org.openecomp.sdc.translator.datatypes.heattotosca.TranslationContext;
import org.openecomp.sdc.translator.datatypes.heattotosca.unifiedmodel.composition.UnifiedCompositionData;
import org.openecomp.sdc.translator.services.heattotosca.UnifiedComposition;
package org.openecomp.sdc.translator.services.heattotosca.mapping;
import org.apache.commons.collections4.MapUtils;
+import org.onap.sdc.tosca.datatypes.model.Constraint;
+import org.onap.sdc.tosca.datatypes.model.EntrySchema;
+import org.onap.sdc.tosca.datatypes.model.ParameterDefinition;
+import org.onap.sdc.tosca.datatypes.model.ServiceTemplate;
import org.openecomp.core.utilities.file.FileUtils;
import org.openecomp.sdc.heat.datatypes.model.HeatOrchestrationTemplate;
import org.openecomp.sdc.heat.datatypes.model.Output;
import org.openecomp.sdc.heat.datatypes.model.Parameter;
import org.openecomp.sdc.tosca.datatypes.extend.ToscaAnnotationType;
-import org.openecomp.sdc.tosca.datatypes.model.*;
-import org.openecomp.sdc.tosca.datatypes.model.heatextend.AnnotationDefinition;
-import org.openecomp.sdc.tosca.datatypes.model.heatextend.ParameterDefinitionExt;
+import org.onap.sdc.tosca.datatypes.model.*;
+import org.onap.sdc.tosca.datatypes.model.heatextend.AnnotationDefinition;
+import org.onap.sdc.tosca.datatypes.model.heatextend.ParameterDefinitionExt;
import org.openecomp.sdc.tosca.services.ToscaConstants;
import org.openecomp.sdc.tosca.services.ToscaUtil;
import org.openecomp.sdc.translator.datatypes.heattotosca.TranslationContext;
package org.openecomp.sdc.translator.services.heattotosca.mapping;
import org.openecomp.sdc.heat.datatypes.model.HeatOrchestrationTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.Template;
+import org.onap.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.onap.sdc.tosca.datatypes.model.Template;
import org.openecomp.sdc.translator.datatypes.heattotosca.TranslationContext;
import org.openecomp.sdc.translator.services.heattotosca.ConfigConstants;
import org.openecomp.sdc.translator.services.heattotosca.Constants;
import org.openecomp.sdc.logging.api.Logger;
import org.openecomp.sdc.logging.api.LoggerFactory;
import org.openecomp.sdc.tosca.datatypes.ToscaServiceModel;
-import org.openecomp.sdc.tosca.datatypes.model.GroupDefinition;
-import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.RequirementAssignment;
-import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.TopologyTemplate;
+import org.onap.sdc.tosca.datatypes.model.GroupDefinition;
+import org.onap.sdc.tosca.datatypes.model.NodeTemplate;
+import org.onap.sdc.tosca.datatypes.model.RequirementAssignment;
+import org.onap.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.onap.sdc.tosca.datatypes.model.TopologyTemplate;
import org.openecomp.sdc.tosca.services.DataModelUtil;
import org.openecomp.sdc.tosca.services.ToscaConstants;
-import org.openecomp.sdc.tosca.services.ToscaExtensionYamlUtil;
+import org.onap.sdc.tosca.services.ToscaExtensionYamlUtil;
import org.openecomp.sdc.translator.datatypes.heattotosca.unifiedmodel.consolidation.ComputeConsolidationData;
import org.openecomp.sdc.translator.datatypes.heattotosca.unifiedmodel.consolidation.ComputeTemplateConsolidationData;
import org.openecomp.sdc.translator.datatypes.heattotosca.unifiedmodel.consolidation.ConsolidationData;
import org.mockito.MockitoAnnotations;
import org.mockito.Spy;
import org.openecomp.sdc.tosca.datatypes.ToscaServiceModel;
-import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.onap.sdc.tosca.datatypes.model.ServiceTemplate;
import org.openecomp.sdc.tosca.services.ToscaConstants;
import org.openecomp.sdc.translator.SubInterfaceConsolidationDataTestInfo;
import org.openecomp.sdc.translator.TestUtils;
import org.apache.commons.lang3.tuple.ImmutablePair;
import org.apache.commons.lang3.tuple.Pair;
import org.junit.Before;
-import org.junit.Ignore;
import org.junit.Test;
import org.mockito.InjectMocks;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
import org.mockito.Spy;
-import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.onap.sdc.tosca.datatypes.model.NodeTemplate;
+import org.onap.sdc.tosca.datatypes.model.ServiceTemplate;
import org.openecomp.sdc.tosca.services.DataModelUtil;
-import org.openecomp.sdc.tosca.services.ToscaExtensionYamlUtil;
-import org.openecomp.sdc.tosca.services.YamlUtil;
+import org.onap.sdc.tosca.services.ToscaExtensionYamlUtil;
+import org.onap.sdc.tosca.services.YamlUtil;
import org.openecomp.sdc.translator.TestUtils;
import org.openecomp.sdc.translator.datatypes.heattotosca.TranslationContext;
import org.openecomp.sdc.translator.datatypes.heattotosca.unifiedmodel.composition.UnifiedCompositionData;
import org.openecomp.sdc.tosca.datatypes.ToscaCapabilityType;
import org.openecomp.sdc.tosca.datatypes.ToscaNodeType;
import org.openecomp.sdc.tosca.datatypes.ToscaRelationshipType;
-import org.openecomp.sdc.tosca.datatypes.model.GroupDefinition;
-import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.NodeType;
-import org.openecomp.sdc.tosca.datatypes.model.RequirementAssignment;
-import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.onap.sdc.tosca.datatypes.model.GroupDefinition;
+import org.onap.sdc.tosca.datatypes.model.NodeTemplate;
+import org.onap.sdc.tosca.datatypes.model.NodeType;
+import org.onap.sdc.tosca.datatypes.model.RequirementAssignment;
+import org.onap.sdc.tosca.datatypes.model.ServiceTemplate;
import org.openecomp.sdc.tosca.services.DataModelUtil;
import org.openecomp.sdc.tosca.services.ToscaConstants;
import org.openecomp.sdc.tosca.services.impl.ToscaAnalyzerServiceImpl;
\r
import org.openecomp.core.utilities.orchestration.OnboardingTypesEnum;\r
import org.openecomp.sdc.common.errors.CoreException;\r
-import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;\r
+import org.onap.sdc.tosca.datatypes.model.ServiceTemplate;\r
import org.junit.Assert;\r
import org.junit.Test;\r
\r
import org.junit.Test;
import org.openecomp.core.utilities.file.FileUtils;
import org.openecomp.sdc.heat.datatypes.model.HeatOrchestrationTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
+import org.onap.sdc.tosca.datatypes.model.NodeTemplate;
import org.openecomp.sdc.tosca.services.ToscaConstants;
import org.openecomp.sdc.tosca.services.ToscaFileOutputService;
import org.openecomp.sdc.tosca.services.impl.ToscaFileOutputServiceCsarImpl;
import org.openecomp.sdc.heat.datatypes.manifest.FileData;
import org.openecomp.sdc.heat.datatypes.manifest.ManifestContent;
import org.openecomp.sdc.heat.datatypes.manifest.ManifestFile;
-import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.onap.sdc.tosca.datatypes.model.ServiceTemplate;
import org.openecomp.sdc.tosca.services.impl.ToscaFileOutputServiceCsarImpl;
import org.openecomp.sdc.translator.TestUtils;
import org.openecomp.sdc.translator.datatypes.heattotosca.TranslationContext;
import static org.openecomp.sdc.translator.TestUtils.createInitServiceTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.TopologyTemplate;
+import org.onap.sdc.tosca.datatypes.model.NodeTemplate;
+import org.onap.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.onap.sdc.tosca.datatypes.model.TopologyTemplate;
import org.openecomp.sdc.translator.datatypes.heattotosca.unifiedmodel.composition.commands.UnifiedSubstitutionNodeTemplateIdGenerator;
import org.openecomp.sdc.translator.datatypes.heattotosca.unifiedmodel.composition.commands.impl.ComputeNewNodeTemplateIdGenerator;
import org.openecomp.sdc.translator.datatypes.heattotosca.unifiedmodel.composition.to.UnifiedCompositionTo;
-import org.openecomp.sdc.translator.services.heattotosca.impl.resourcetranslation.BaseResourceTranslationTest;
import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
import org.openecomp.sdc.tosca.datatypes.ToscaCapabilityType;
import org.openecomp.sdc.tosca.datatypes.ToscaNodeType;
import org.openecomp.sdc.tosca.datatypes.ToscaRelationshipType;
-import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.RequirementAssignment;
-import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.TopologyTemplate;
+import org.onap.sdc.tosca.datatypes.model.NodeTemplate;
+import org.onap.sdc.tosca.datatypes.model.RequirementAssignment;
+import org.onap.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.onap.sdc.tosca.datatypes.model.TopologyTemplate;
import org.openecomp.sdc.tosca.services.ToscaConstants;
import org.openecomp.sdc.translator.datatypes.heattotosca.unifiedmodel.composition.UnifiedCompositionData;
import org.openecomp.sdc.translator.datatypes.heattotosca.unifiedmodel.composition.commands.UnifiedSubstitutionNodeTemplateIdGenerator;
import org.openecomp.sdc.translator.datatypes.heattotosca.unifiedmodel.composition.commands.impl.PortNewNodeTemplateIdGenerator;
import org.openecomp.sdc.translator.datatypes.heattotosca.unifiedmodel.composition.to.UnifiedCompositionTo;
import org.openecomp.sdc.translator.datatypes.heattotosca.unifiedmodel.consolidation.ComputeTemplateConsolidationData;
-import org.openecomp.sdc.translator.services.heattotosca.impl.resourcetranslation.BaseResourceTranslationTest;
import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
package org.openecomp.sdc.translator.services.heattotosca.unifiedmodel.commands;
import org.openecomp.sdc.tosca.datatypes.ToscaServiceModel;
-import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.onap.sdc.tosca.datatypes.model.ServiceTemplate;
import org.openecomp.sdc.translator.TestUtils;
import org.openecomp.sdc.translator.datatypes.heattotosca.TranslationContext;
import org.openecomp.sdc.translator.datatypes.heattotosca.unifiedmodel.composition.UnifiedCompositionData;
import org.openecomp.sdc.translator.datatypes.heattotosca.unifiedmodel.consolidation.FilePortConsolidationData;
import org.openecomp.sdc.translator.datatypes.heattotosca.unifiedmodel.consolidation.PortTemplateConsolidationData;
import org.openecomp.sdc.translator.datatypes.heattotosca.unifiedmodel.consolidation.SubInterfaceTemplateConsolidationData;
-import org.openecomp.sdc.translator.services.heattotosca.impl.resourcetranslation.BaseResourceTranslationTest;
import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
<version>${mockito.all.version}</version>
</dependency>
<dependency>
- <groupId>org.openecomp.sdc.common</groupId>
- <artifactId>openecomp-configuration-management-core</artifactId>
+ <groupId>org.onap.sdc.common</groupId>
+ <artifactId>onap-configuration-management-core</artifactId>
<version>${openecomp.sdc.common.version}</version>
<scope>runtime</scope>
<exclusions>
package org.openecomp.sdc.validation.services;
import org.apache.commons.collections4.CollectionUtils;
-import org.openecomp.config.api.Configuration;
-import org.openecomp.config.api.ConfigurationManager;
+import org.onap.config.api.Configuration;
+import org.onap.config.api.ConfigurationManager;
import org.openecomp.core.utilities.CommonMethods;
import org.openecomp.sdc.datatypes.configuration.ImplementationConfiguration;
import org.openecomp.sdc.logging.api.Logger;
import org.openecomp.sdc.heat.services.HeatStructureUtil;
import org.openecomp.sdc.logging.api.Logger;
import org.openecomp.sdc.logging.api.LoggerFactory;
-import org.openecomp.sdc.tosca.services.YamlUtil;
+import org.onap.sdc.tosca.services.YamlUtil;
import org.openecomp.sdc.validation.impl.validators.HeatValidator;
import org.openecomp.sdc.validation.type.HeatResourceValidationContext;
import org.openecomp.sdc.heat.services.manifest.ManifestUtil;
import org.openecomp.sdc.logging.api.Logger;
import org.openecomp.sdc.logging.api.LoggerFactory;
-import org.openecomp.sdc.tosca.services.YamlUtil;
+import org.onap.sdc.tosca.services.YamlUtil;
import org.openecomp.sdc.validation.Validator;
import org.openecomp.sdc.validation.tos.ContrailResourcesMappingTo;
import org.openecomp.sdc.validation.util.ValidationUtil;
import org.openecomp.sdc.heat.services.manifest.ManifestUtil;
import org.openecomp.sdc.logging.api.Logger;
import org.openecomp.sdc.logging.api.LoggerFactory;
-import org.openecomp.sdc.tosca.services.YamlUtil;
+import org.onap.sdc.tosca.services.YamlUtil;
import org.openecomp.sdc.validation.Validator;
import org.openecomp.sdc.validation.impl.util.HeatValidationService;
import org.openecomp.sdc.validation.util.ValidationUtil;
import org.openecomp.core.validation.types.GlobalValidationContext;
import org.openecomp.sdc.common.errors.Messages;
import org.openecomp.sdc.datatypes.error.ErrorLevel;
-import org.openecomp.sdc.tosca.services.YamlUtil;
+import org.onap.sdc.tosca.services.YamlUtil;
import org.openecomp.sdc.validation.Validator;
import org.openecomp.sdc.validation.impl.util.YamlValidatorUtil;
import org.openecomp.sdc.heat.services.HeatStructureUtil;
import org.openecomp.sdc.logging.api.Logger;
import org.openecomp.sdc.logging.api.LoggerFactory;
-import org.openecomp.sdc.tosca.services.YamlUtil;
+import org.onap.sdc.tosca.services.YamlUtil;
import java.io.InputStream;
import java.util.Map;
<dependencies>
<dependency>
- <groupId>org.openecomp.sdc.common</groupId>
- <artifactId>openecomp-tosca-datatype</artifactId>
+ <groupId>org.onap.sdc.common</groupId>
+ <artifactId>onap-tosca-datatype</artifactId>
<version>${openecomp.sdc.common.version}</version>
</dependency>
<dependency>
<scope>test</scope>
</dependency>
<dependency>
- <groupId>org.openecomp.sdc.common</groupId>
- <artifactId>openecomp-configuration-management-core</artifactId>
+ <groupId>org.onap.sdc.common</groupId>
+ <artifactId>onap-configuration-management-core</artifactId>
<version>${openecomp.sdc.common.version}</version>
<scope>runtime</scope>
<exclusions>
</exclusions>
</dependency>
<dependency>
- <groupId>org.openecomp.sdc.common</groupId>
- <artifactId>openecomp-configuration-management-api</artifactId>
+ <groupId>org.onap.sdc.common</groupId>
+ <artifactId>onap-configuration-management-api</artifactId>
<version>${openecomp.sdc.common.version}</version>
</dependency>
<dependency>
import org.openecomp.sdc.tosca.datatypes.ToscaNodeType;
import org.openecomp.sdc.tosca.datatypes.ToscaRelationshipType;
import org.openecomp.sdc.tosca.datatypes.ToscaServiceModel;
-import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.ParameterDefinition;
-import org.openecomp.sdc.tosca.datatypes.model.RequirementAssignment;
-import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.onap.sdc.tosca.datatypes.model.NodeTemplate;
+import org.onap.sdc.tosca.datatypes.model.ParameterDefinition;
+import org.onap.sdc.tosca.datatypes.model.RequirementAssignment;
+import org.onap.sdc.tosca.datatypes.model.ServiceTemplate;
import org.openecomp.sdc.tosca.errors.ToscaInvalidEntryNotFoundErrorBuilder;
import org.openecomp.sdc.tosca.errors.ToscaInvalidSubstituteNodeTemplateErrorBuilder;
import org.openecomp.sdc.tosca.errors.ToscaMissingSubstitutionMappingForReqCapErrorBuilder;
import org.openecomp.sdc.tosca.services.ToscaAnalyzerService;
import org.openecomp.sdc.tosca.services.ToscaConstants;
-import org.openecomp.sdc.tosca.services.ToscaExtensionYamlUtil;
+import org.onap.sdc.tosca.services.ToscaExtensionYamlUtil;
import org.openecomp.sdc.tosca.services.impl.ToscaAnalyzerServiceImpl;
import org.openecomp.sdc.vendorsoftwareproduct.services.composition.CompositionDataExtractor;
import org.openecomp.sdc.vendorsoftwareproduct.types.composition.Component;
import org.openecomp.sdc.datatypes.model.ElementType;
import org.openecomp.sdc.model.impl.zusammen.ServiceModelDaoZusammenImpl;
import org.openecomp.sdc.tosca.datatypes.ToscaServiceModel;
-import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
-import org.openecomp.sdc.tosca.services.YamlUtil;
+import org.onap.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.onap.sdc.tosca.services.YamlUtil;
import org.openecomp.sdc.versioning.dao.types.Version;
import org.testng.Assert;
import org.testng.annotations.AfterMethod;
<modelVersion>4.0.0</modelVersion>
<dependencies>
<dependency>
- <groupId>org.openecomp.sdc.common</groupId>
- <artifactId>openecomp-tosca-datatype</artifactId>
+ <groupId>org.onap.sdc.common</groupId>
+ <artifactId>onap-tosca-datatype</artifactId>
<version>1.2.0-SNAPSHOT</version>
</dependency>
<dependency>
import org.openecomp.core.utilities.orchestration.OnboardingTypesEnum;
import org.openecomp.sdc.logging.api.Logger;
import org.openecomp.sdc.logging.api.LoggerFactory;
-import org.openecomp.sdc.tosca.datatypes.model.Import;
-import org.openecomp.sdc.tosca.datatypes.model.NodeType;
-import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.onap.sdc.tosca.datatypes.model.Import;
+import org.onap.sdc.tosca.datatypes.model.NodeType;
+import org.onap.sdc.tosca.datatypes.model.ServiceTemplate;
import org.openecomp.sdc.translator.services.heattotosca.globaltypes.GlobalTypesGenerator;
import java.util.ArrayList;
import static org.openecomp.core.converter.datatypes.Constants.globalSubstitution;
import static org.openecomp.core.converter.datatypes.Constants.inputs;
import static org.openecomp.core.converter.datatypes.Constants.mainStName;
-import static org.openecomp.core.converter.datatypes.Constants.manifestFileName;
import static org.openecomp.core.converter.datatypes.Constants.metadataFile;
import static org.openecomp.core.converter.datatypes.Constants.nodeType;
import static org.openecomp.core.converter.datatypes.Constants.openecompHeatIndex;
import org.openecomp.sdc.common.errors.ErrorCategory;
import org.openecomp.sdc.common.errors.ErrorCode;
import org.openecomp.sdc.tosca.datatypes.ToscaServiceModel;
-import org.openecomp.sdc.tosca.datatypes.model.ArtifactDefinition;
-import org.openecomp.sdc.tosca.datatypes.model.CapabilityAssignment;
-import org.openecomp.sdc.tosca.datatypes.model.Import;
-import org.openecomp.sdc.tosca.datatypes.model.NodeFilter;
-import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.NodeType;
-import org.openecomp.sdc.tosca.datatypes.model.ParameterDefinition;
-import org.openecomp.sdc.tosca.datatypes.model.RequirementAssignment;
-import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.SubstitutionMapping;
+import org.onap.sdc.tosca.datatypes.model.ArtifactDefinition;
+import org.onap.sdc.tosca.datatypes.model.CapabilityAssignment;
+import org.onap.sdc.tosca.datatypes.model.Import;
+import org.onap.sdc.tosca.datatypes.model.NodeFilter;
+import org.onap.sdc.tosca.datatypes.model.NodeTemplate;
+import org.onap.sdc.tosca.datatypes.model.NodeType;
+import org.onap.sdc.tosca.datatypes.model.ParameterDefinition;
+import org.onap.sdc.tosca.datatypes.model.RequirementAssignment;
+import org.onap.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.onap.sdc.tosca.datatypes.model.SubstitutionMapping;
import org.openecomp.sdc.tosca.services.DataModelUtil;
import org.openecomp.sdc.tosca.services.ToscaUtil;
import org.openecomp.sdc.translator.services.heattotosca.globaltypes.GlobalTypesGenerator;
import org.yaml.snakeyaml.error.YAMLException;
import java.io.File;
-import java.io.IOException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
package org.openecomp.core.impl.services;
import org.openecomp.core.converter.ServiceTemplateReaderService;
-import org.openecomp.sdc.tosca.services.YamlUtil;
+import org.onap.sdc.tosca.services.YamlUtil;
import java.util.HashMap;
import java.util.Map;
import org.openecomp.core.utilities.file.FileUtils;
import org.openecomp.core.utilities.json.JsonUtil;
import org.openecomp.sdc.tosca.datatypes.ToscaServiceModel;
-import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.NodeType;
-import org.openecomp.sdc.tosca.datatypes.model.RequirementAssignment;
-import org.openecomp.sdc.tosca.datatypes.model.RequirementDefinition;
-import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
-import org.openecomp.sdc.tosca.services.ToscaExtensionYamlUtil;
-import org.openecomp.sdc.tosca.services.YamlUtil;
+import org.onap.sdc.tosca.datatypes.model.NodeTemplate;
+import org.onap.sdc.tosca.datatypes.model.NodeType;
+import org.onap.sdc.tosca.datatypes.model.RequirementAssignment;
+import org.onap.sdc.tosca.datatypes.model.RequirementDefinition;
+import org.onap.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.onap.sdc.tosca.services.ToscaExtensionYamlUtil;
+import org.onap.sdc.tosca.services.YamlUtil;
import java.io.File;
import java.io.FileInputStream;
import org.openecomp.core.utilities.file.FileContentHandler;
import org.openecomp.core.utilities.orchestration.OnboardingTypesEnum;
import org.openecomp.sdc.tosca.datatypes.ToscaServiceModel;
-import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.onap.sdc.tosca.datatypes.model.ServiceTemplate;
import java.net.URL;
import java.util.Map;
<dependencies>
<dependency>
- <groupId>org.openecomp.sdc.common</groupId>
- <artifactId>openecomp-tosca-datatype</artifactId>
+ <groupId>org.onap.sdc.common</groupId>
+ <artifactId>onap-tosca-datatype</artifactId>
<version>${openecomp.sdc.common.version}</version>
</dependency>
<dependency>
<scope>runtime</scope>
</dependency>
<dependency>
- <groupId>org.openecomp.sdc.common</groupId>
- <artifactId>openecomp-configuration-management-core</artifactId>
+ <groupId>org.onap.sdc.common</groupId>
+ <artifactId>onap-configuration-management-core</artifactId>
<version>${openecomp.sdc.common.version}</version>
<scope>runtime</scope>
<exclusions>
</exclusions>
</dependency>
<dependency>
- <groupId>org.openecomp.sdc.common</groupId>
- <artifactId>openecomp-configuration-management-api</artifactId>
+ <groupId>org.onap.sdc.common</groupId>
+ <artifactId>onap-configuration-management-api</artifactId>
<version>${openecomp.sdc.common.version}</version>
</dependency>
<dependency>
package org.openecomp.sdc.tosca.datatypes;
-import org.openecomp.config.api.Configuration;
-import org.openecomp.config.api.ConfigurationManager;
+import org.onap.config.api.Configuration;
+import org.onap.config.api.ConfigurationManager;
import org.openecomp.sdc.tosca.services.ConfigConstants;
public class ToscaArtifactType {
package org.openecomp.sdc.tosca.datatypes;
-import org.openecomp.config.api.Configuration;
-import org.openecomp.config.api.ConfigurationManager;
+import org.onap.config.api.Configuration;
+import org.onap.config.api.ConfigurationManager;
import org.openecomp.sdc.tosca.services.ConfigConstants;
public class ToscaCapabilityType {
package org.openecomp.sdc.tosca.datatypes;
-import org.openecomp.config.api.Configuration;
-import org.openecomp.config.api.ConfigurationManager;
+import org.onap.config.api.Configuration;
+import org.onap.config.api.ConfigurationManager;
import org.openecomp.sdc.tosca.services.ConfigConstants;
public class ToscaDataType {
package org.openecomp.sdc.tosca.datatypes;
-import org.openecomp.config.api.Configuration;
-import org.openecomp.config.api.ConfigurationManager;
+import org.onap.config.api.Configuration;
+import org.onap.config.api.ConfigurationManager;
import org.openecomp.sdc.tosca.services.ConfigConstants;
public class ToscaGroupType {
package org.openecomp.sdc.tosca.datatypes;
-import org.openecomp.config.api.Configuration;
-import org.openecomp.config.api.ConfigurationManager;
+import org.onap.config.api.Configuration;
+import org.onap.config.api.ConfigurationManager;
public class ToscaInterfaceType {
package org.openecomp.sdc.tosca.datatypes;
-import org.openecomp.config.api.Configuration;
-import org.openecomp.config.api.ConfigurationManager;
+import org.onap.config.api.Configuration;
+import org.onap.config.api.ConfigurationManager;
import org.openecomp.sdc.tosca.services.ConfigConstants;
package org.openecomp.sdc.tosca.datatypes;
-import org.openecomp.config.api.Configuration;
-import org.openecomp.config.api.ConfigurationManager;
+import org.onap.config.api.Configuration;
+import org.onap.config.api.ConfigurationManager;
import org.openecomp.sdc.tosca.services.ConfigConstants;
public class ToscaPolicyType {
package org.openecomp.sdc.tosca.datatypes;
-import org.openecomp.config.api.Configuration;
-import org.openecomp.config.api.ConfigurationManager;
+import org.onap.config.api.Configuration;
+import org.onap.config.api.ConfigurationManager;
import org.openecomp.sdc.tosca.services.ConfigConstants;
public class ToscaRelationshipType {
import org.apache.commons.collections.MapUtils;
import org.openecomp.core.utilities.file.FileContentHandler;
import org.openecomp.sdc.datatypes.model.AsdcModel;
-import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.onap.sdc.tosca.datatypes.model.ServiceTemplate;
import org.openecomp.sdc.tosca.services.DataModelUtil;
import java.util.Collections;
package org.openecomp.sdc.tosca.datatypes.extend;
-import org.openecomp.config.api.Configuration;
-import org.openecomp.config.api.ConfigurationManager;
+import org.onap.config.api.Configuration;
+import org.onap.config.api.ConfigurationManager;
import org.openecomp.sdc.tosca.services.ConfigConstants;
package org.openecomp.sdc.tosca.datatypes.model;
import java.util.Map;
+import org.onap.sdc.tosca.datatypes.model.ArtifactType;
+import org.onap.sdc.tosca.datatypes.model.CapabilityType;
+import org.onap.sdc.tosca.datatypes.model.DataType;
+import org.onap.sdc.tosca.datatypes.model.GroupType;
+import org.onap.sdc.tosca.datatypes.model.Import;
+import org.onap.sdc.tosca.datatypes.model.NodeType;
+import org.onap.sdc.tosca.datatypes.model.PolicyType;
+import org.onap.sdc.tosca.datatypes.model.RelationshipType;
+import org.onap.sdc.tosca.datatypes.model.TopologyTemplate;
/**
* Created by Talio on 3/30/2017.
import com.fasterxml.jackson.databind.SerializationFeature;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.collections4.MapUtils;
+import org.onap.sdc.tosca.services.ToscaExtensionYamlUtil;
+import org.onap.sdc.tosca.services.YamlUtil;
import org.openecomp.core.utilities.CommonMethods;
import org.openecomp.sdc.common.errors.CoreException;
import org.openecomp.sdc.common.utils.CommonUtil;
import org.openecomp.sdc.tosca.datatypes.ToscaCapabilityType;
import org.openecomp.sdc.tosca.datatypes.ToscaFunctions;
import org.openecomp.sdc.tosca.datatypes.ToscaRelationshipType;
-import org.openecomp.sdc.tosca.datatypes.model.AttributeDefinition;
-import org.openecomp.sdc.tosca.datatypes.model.CapabilityAssignment;
-import org.openecomp.sdc.tosca.datatypes.model.CapabilityDefinition;
-import org.openecomp.sdc.tosca.datatypes.model.Constraint;
-import org.openecomp.sdc.tosca.datatypes.model.EntrySchema;
-import org.openecomp.sdc.tosca.datatypes.model.GroupDefinition;
-import org.openecomp.sdc.tosca.datatypes.model.Import;
-import org.openecomp.sdc.tosca.datatypes.model.InterfaceDefinition;
-import org.openecomp.sdc.tosca.datatypes.model.InterfaceDefinitionTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.InterfaceDefinitionType;
-import org.openecomp.sdc.tosca.datatypes.model.InterfaceType;
-import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.NodeType;
-import org.openecomp.sdc.tosca.datatypes.model.OperationDefinition;
-import org.openecomp.sdc.tosca.datatypes.model.OperationDefinitionTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.OperationDefinitionType;
-import org.openecomp.sdc.tosca.datatypes.model.ParameterDefinition;
-import org.openecomp.sdc.tosca.datatypes.model.PolicyDefinition;
-import org.openecomp.sdc.tosca.datatypes.model.PropertyDefinition;
-import org.openecomp.sdc.tosca.datatypes.model.RelationshipTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.RequirementAssignment;
-import org.openecomp.sdc.tosca.datatypes.model.RequirementDefinition;
-import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.Status;
-import org.openecomp.sdc.tosca.datatypes.model.SubstitutionMapping;
-import org.openecomp.sdc.tosca.datatypes.model.TopologyTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.heatextend.ParameterDefinitionExt;
+import org.onap.sdc.tosca.datatypes.model.AttributeDefinition;
+import org.onap.sdc.tosca.datatypes.model.CapabilityAssignment;
+import org.onap.sdc.tosca.datatypes.model.CapabilityDefinition;
+import org.onap.sdc.tosca.datatypes.model.Constraint;
+import org.onap.sdc.tosca.datatypes.model.EntrySchema;
+import org.onap.sdc.tosca.datatypes.model.GroupDefinition;
+import org.onap.sdc.tosca.datatypes.model.Import;
+import org.onap.sdc.tosca.datatypes.model.InterfaceDefinition;
+import org.onap.sdc.tosca.datatypes.model.InterfaceDefinitionTemplate;
+import org.onap.sdc.tosca.datatypes.model.InterfaceDefinitionType;
+import org.onap.sdc.tosca.datatypes.model.InterfaceType;
+import org.onap.sdc.tosca.datatypes.model.NodeTemplate;
+import org.onap.sdc.tosca.datatypes.model.NodeType;
+import org.onap.sdc.tosca.datatypes.model.OperationDefinition;
+import org.onap.sdc.tosca.datatypes.model.OperationDefinitionTemplate;
+import org.onap.sdc.tosca.datatypes.model.OperationDefinitionType;
+import org.onap.sdc.tosca.datatypes.model.ParameterDefinition;
+import org.onap.sdc.tosca.datatypes.model.PolicyDefinition;
+import org.onap.sdc.tosca.datatypes.model.PropertyDefinition;
+import org.onap.sdc.tosca.datatypes.model.RelationshipTemplate;
+import org.onap.sdc.tosca.datatypes.model.RequirementAssignment;
+import org.onap.sdc.tosca.datatypes.model.RequirementDefinition;
+import org.onap.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.onap.sdc.tosca.datatypes.model.Status;
+import org.onap.sdc.tosca.datatypes.model.SubstitutionMapping;
+import org.onap.sdc.tosca.datatypes.model.TopologyTemplate;
+import org.onap.sdc.tosca.datatypes.model.heatextend.ParameterDefinitionExt;
import org.openecomp.sdc.tosca.errors.CreateInterfaceObjectErrorBuilder;
import org.openecomp.sdc.tosca.errors.CreateInterfaceOperationObjectErrorBuilder;
import org.openecomp.sdc.tosca.errors.InvalidAddActionNullEntityErrorBuilder;
import org.openecomp.sdc.tosca.datatypes.ToscaElementTypes;
import org.openecomp.sdc.tosca.datatypes.ToscaServiceModel;
-import org.openecomp.sdc.tosca.datatypes.model.CapabilityDefinition;
-import org.openecomp.sdc.tosca.datatypes.model.DefinitionOfDataType;
-import org.openecomp.sdc.tosca.datatypes.model.InterfaceDefinitionType;
-import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.NodeType;
-import org.openecomp.sdc.tosca.datatypes.model.PropertyDefinition;
-import org.openecomp.sdc.tosca.datatypes.model.RequirementAssignment;
-import org.openecomp.sdc.tosca.datatypes.model.RequirementDefinition;
-import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.onap.sdc.tosca.datatypes.model.CapabilityDefinition;
+import org.onap.sdc.tosca.datatypes.model.DefinitionOfDataType;
+import org.onap.sdc.tosca.datatypes.model.InterfaceDefinitionType;
+import org.onap.sdc.tosca.datatypes.model.NodeTemplate;
+import org.onap.sdc.tosca.datatypes.model.NodeType;
+import org.onap.sdc.tosca.datatypes.model.PropertyDefinition;
+import org.onap.sdc.tosca.datatypes.model.RequirementAssignment;
+import org.onap.sdc.tosca.datatypes.model.RequirementDefinition;
+import org.onap.sdc.tosca.datatypes.model.ServiceTemplate;
import java.util.Collection;
import java.util.List;
import org.apache.commons.collections4.MapUtils;
import org.openecomp.core.utilities.file.FileUtils;
-import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.onap.sdc.tosca.datatypes.model.NodeTemplate;
+import org.onap.sdc.tosca.datatypes.model.ServiceTemplate;
import java.util.Collections;
import java.util.HashMap;
import org.openecomp.sdc.common.errors.CoreException;
import org.openecomp.sdc.tosca.datatypes.ToscaElementTypes;
import org.openecomp.sdc.tosca.datatypes.ToscaServiceModel;
-import org.openecomp.sdc.tosca.datatypes.model.AttributeDefinition;
-import org.openecomp.sdc.tosca.datatypes.model.CapabilityDefinition;
-import org.openecomp.sdc.tosca.datatypes.model.CapabilityType;
-import org.openecomp.sdc.tosca.datatypes.model.DefinitionOfDataType;
-import org.openecomp.sdc.tosca.datatypes.model.DataType;
-import org.openecomp.sdc.tosca.datatypes.model.Import;
-import org.openecomp.sdc.tosca.datatypes.model.InterfaceDefinitionType;
-import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.NodeType;
-import org.openecomp.sdc.tosca.datatypes.model.ParameterDefinition;
-import org.openecomp.sdc.tosca.datatypes.model.PropertyDefinition;
-import org.openecomp.sdc.tosca.datatypes.model.PropertyType;
-import org.openecomp.sdc.tosca.datatypes.model.RequirementAssignment;
-import org.openecomp.sdc.tosca.datatypes.model.RequirementDefinition;
-import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.onap.sdc.tosca.datatypes.model.AttributeDefinition;
+import org.onap.sdc.tosca.datatypes.model.CapabilityDefinition;
+import org.onap.sdc.tosca.datatypes.model.CapabilityType;
+import org.onap.sdc.tosca.datatypes.model.DefinitionOfDataType;
+import org.onap.sdc.tosca.datatypes.model.DataType;
+import org.onap.sdc.tosca.datatypes.model.Import;
+import org.onap.sdc.tosca.datatypes.model.InterfaceDefinitionType;
+import org.onap.sdc.tosca.datatypes.model.NodeTemplate;
+import org.onap.sdc.tosca.datatypes.model.NodeType;
+import org.onap.sdc.tosca.datatypes.model.ParameterDefinition;
+import org.onap.sdc.tosca.datatypes.model.PropertyDefinition;
+import org.onap.sdc.tosca.datatypes.model.PropertyType;
+import org.onap.sdc.tosca.datatypes.model.RequirementAssignment;
+import org.onap.sdc.tosca.datatypes.model.RequirementDefinition;
+import org.onap.sdc.tosca.datatypes.model.ServiceTemplate;
import org.openecomp.sdc.tosca.errors.ToscaElementTypeNotFoundErrorBuilder;
import org.openecomp.sdc.tosca.errors.ToscaInvalidEntryNotFoundErrorBuilder;
import org.openecomp.sdc.tosca.errors.ToscaInvalidSubstituteNodeTemplatePropertiesErrorBuilder;
import org.openecomp.sdc.tosca.services.DataModelUtil;
import org.openecomp.sdc.tosca.services.ToscaAnalyzerService;
import org.openecomp.sdc.tosca.services.ToscaConstants;
-import org.openecomp.sdc.tosca.services.ToscaExtensionYamlUtil;
+import org.onap.sdc.tosca.services.ToscaExtensionYamlUtil;
import org.openecomp.sdc.tosca.services.ToscaUtil;
import java.lang.reflect.InvocationTargetException;
import org.openecomp.sdc.logging.api.Logger;
import org.openecomp.sdc.logging.api.LoggerFactory;
import org.openecomp.sdc.tosca.datatypes.ToscaServiceModel;
-import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.onap.sdc.tosca.datatypes.model.ServiceTemplate;
import org.openecomp.sdc.tosca.exceptions.CsarCreationErrorBuilder;
import org.openecomp.sdc.tosca.exceptions.CsarMissingEntryPointErrorBuilder;
import org.openecomp.sdc.tosca.services.ToscaFileOutputService;
import org.openecomp.sdc.logging.api.Logger;
import org.openecomp.sdc.logging.api.LoggerFactory;
import org.openecomp.sdc.tosca.datatypes.ToscaServiceModel;
-import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.RequirementAssignment;
-import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
-import org.openecomp.sdc.tosca.services.ToscaExtensionYamlUtil;
+import org.onap.sdc.tosca.datatypes.model.NodeTemplate;
+import org.onap.sdc.tosca.datatypes.model.RequirementAssignment;
+import org.onap.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.onap.sdc.tosca.services.ToscaExtensionYamlUtil;
import java.io.File;
import java.io.FileInputStream;
import org.junit.Assert;
import org.junit.Test;
-import org.openecomp.sdc.tosca.datatypes.model.PropertyType;
+import org.onap.sdc.tosca.datatypes.model.PropertyType;
public class PropertyTypeTest {
@Test
import org.junit.Assert;
import org.junit.Test;
-import org.openecomp.sdc.tosca.datatypes.model.ArtifactType;
-import org.openecomp.sdc.tosca.datatypes.model.AttributeDefinition;
-import org.openecomp.sdc.tosca.datatypes.model.CapabilityAssignment;
-import org.openecomp.sdc.tosca.datatypes.model.CapabilityDefinition;
-import org.openecomp.sdc.tosca.datatypes.model.Constraint;
-import org.openecomp.sdc.tosca.datatypes.model.Directive;
-import org.openecomp.sdc.tosca.datatypes.model.Implementation;
-import org.openecomp.sdc.tosca.datatypes.model.Import;
-import org.openecomp.sdc.tosca.datatypes.model.InterfaceDefinition;
-import org.openecomp.sdc.tosca.datatypes.model.InterfaceDefinitionTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.InterfaceDefinitionType;
-import org.openecomp.sdc.tosca.datatypes.model.InterfaceType;
-import org.openecomp.sdc.tosca.datatypes.model.NodeFilter;
-import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.NodeType;
-import org.openecomp.sdc.tosca.datatypes.model.OperationDefinition;
-import org.openecomp.sdc.tosca.datatypes.model.OperationDefinitionTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.OperationDefinitionType;
-import org.openecomp.sdc.tosca.datatypes.model.ParameterDefinition;
-import org.openecomp.sdc.tosca.datatypes.model.PropertyDefinition;
-import org.openecomp.sdc.tosca.datatypes.model.PropertyType;
-import org.openecomp.sdc.tosca.datatypes.model.RequirementAssignment;
-import org.openecomp.sdc.tosca.datatypes.model.RequirementDefinition;
-import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.SubstitutionMapping;
-import org.openecomp.sdc.tosca.datatypes.model.TopologyTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.heatextend.ParameterDefinitionExt;
+import org.onap.sdc.tosca.datatypes.model.ArtifactType;
+import org.onap.sdc.tosca.datatypes.model.AttributeDefinition;
+import org.onap.sdc.tosca.datatypes.model.CapabilityAssignment;
+import org.onap.sdc.tosca.datatypes.model.CapabilityDefinition;
+import org.onap.sdc.tosca.datatypes.model.Constraint;
+import org.onap.sdc.tosca.datatypes.model.Directive;
+import org.onap.sdc.tosca.datatypes.model.Implementation;
+import org.onap.sdc.tosca.datatypes.model.Import;
+import org.onap.sdc.tosca.datatypes.model.InterfaceDefinition;
+import org.onap.sdc.tosca.datatypes.model.InterfaceDefinitionTemplate;
+import org.onap.sdc.tosca.datatypes.model.InterfaceDefinitionType;
+import org.onap.sdc.tosca.datatypes.model.InterfaceType;
+import org.onap.sdc.tosca.datatypes.model.NodeFilter;
+import org.onap.sdc.tosca.datatypes.model.NodeTemplate;
+import org.onap.sdc.tosca.datatypes.model.NodeType;
+import org.onap.sdc.tosca.datatypes.model.OperationDefinition;
+import org.onap.sdc.tosca.datatypes.model.OperationDefinitionTemplate;
+import org.onap.sdc.tosca.datatypes.model.OperationDefinitionType;
+import org.onap.sdc.tosca.datatypes.model.ParameterDefinition;
+import org.onap.sdc.tosca.datatypes.model.PropertyDefinition;
+import org.onap.sdc.tosca.datatypes.model.PropertyType;
+import org.onap.sdc.tosca.datatypes.model.RequirementAssignment;
+import org.onap.sdc.tosca.datatypes.model.RequirementDefinition;
+import org.onap.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.onap.sdc.tosca.datatypes.model.SubstitutionMapping;
+import org.onap.sdc.tosca.datatypes.model.TopologyTemplate;
+import org.onap.sdc.tosca.datatypes.model.heatextend.ParameterDefinitionExt;
import org.openecomp.sdc.tosca.services.DataModelUtil;
import org.openecomp.sdc.tosca.services.ToscaConstants;
-import org.openecomp.sdc.tosca.services.ToscaExtensionYamlUtil;
-import org.openecomp.sdc.tosca.services.YamlUtil;
+import org.onap.sdc.tosca.services.ToscaExtensionYamlUtil;
+import org.onap.sdc.tosca.services.YamlUtil;
import java.io.IOException;
import java.io.InputStream;
import org.junit.Assert;
import org.junit.Test;
+import org.onap.sdc.tosca.datatypes.model.ArtifactDefinition;
+import org.onap.sdc.tosca.datatypes.model.AttributeDefinition;
+import org.onap.sdc.tosca.datatypes.model.CapabilityDefinition;
+import org.onap.sdc.tosca.datatypes.model.Constraint;
+import org.onap.sdc.tosca.datatypes.model.EntrySchema;
+import org.onap.sdc.tosca.datatypes.model.NodeType;
+import org.onap.sdc.tosca.datatypes.model.PropertyDefinition;
+import org.onap.sdc.tosca.datatypes.model.Status;
import org.openecomp.sdc.tosca.services.ToscaConstants;
-import org.openecomp.sdc.tosca.services.YamlUtil;
+import org.onap.sdc.tosca.services.YamlUtil;
import java.util.ArrayList;
import java.util.HashMap;
import org.junit.Assert;
import org.junit.Test;
-import org.openecomp.sdc.tosca.services.YamlUtil;
+import org.onap.sdc.tosca.datatypes.model.NodeType;
+import org.onap.sdc.tosca.datatypes.model.RequirementDefinition;
+import org.onap.sdc.tosca.services.YamlUtil;
import java.util.ArrayList;
import java.util.HashMap;
import org.junit.runner.RunWith;
import org.mockito.runners.MockitoJUnitRunner;
import org.openecomp.sdc.common.errors.CoreException;
-import org.openecomp.sdc.tosca.datatypes.model.GroupDefinition;
-import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.NodeType;
-import org.openecomp.sdc.tosca.datatypes.model.PolicyDefinition;
-import org.openecomp.sdc.tosca.datatypes.model.RelationshipTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.RequirementAssignment;
-import org.openecomp.sdc.tosca.datatypes.model.SubstitutionMapping;
+import org.onap.sdc.tosca.datatypes.model.GroupDefinition;
+import org.onap.sdc.tosca.datatypes.model.NodeTemplate;
+import org.onap.sdc.tosca.datatypes.model.NodeType;
+import org.onap.sdc.tosca.datatypes.model.PolicyDefinition;
+import org.onap.sdc.tosca.datatypes.model.RelationshipTemplate;
+import org.onap.sdc.tosca.datatypes.model.RequirementAssignment;
+import org.onap.sdc.tosca.datatypes.model.SubstitutionMapping;
import java.util.ArrayList;
import org.openecomp.sdc.tosca.datatypes.ToscaElementTypes;
import org.openecomp.sdc.tosca.datatypes.ToscaNodeType;
import org.openecomp.sdc.tosca.datatypes.ToscaServiceModel;
-import org.openecomp.sdc.tosca.datatypes.model.CapabilityDefinition;
-import org.openecomp.sdc.tosca.datatypes.model.DataType;
-import org.openecomp.sdc.tosca.datatypes.model.DefinitionOfDataType;
-import org.openecomp.sdc.tosca.datatypes.model.DataType;
-import org.openecomp.sdc.tosca.datatypes.model.Import;
-import org.openecomp.sdc.tosca.datatypes.model.InterfaceDefinitionType;
-import org.openecomp.sdc.tosca.datatypes.model.InterfaceType;
-import org.openecomp.sdc.tosca.datatypes.model.NodeTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.NodeType;
-import org.openecomp.sdc.tosca.datatypes.model.ParameterDefinition;
-import org.openecomp.sdc.tosca.datatypes.model.PropertyDefinition;
-import org.openecomp.sdc.tosca.datatypes.model.RequirementAssignment;
-import org.openecomp.sdc.tosca.datatypes.model.RequirementDefinition;
-import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
-import org.openecomp.sdc.tosca.datatypes.model.SubstitutionMapping;
-import org.openecomp.sdc.tosca.datatypes.model.TopologyTemplate;
+import org.onap.sdc.tosca.datatypes.model.CapabilityDefinition;
+import org.onap.sdc.tosca.datatypes.model.DataType;
+import org.onap.sdc.tosca.datatypes.model.DefinitionOfDataType;
+import org.onap.sdc.tosca.datatypes.model.DataType;
+import org.onap.sdc.tosca.datatypes.model.Import;
+import org.onap.sdc.tosca.datatypes.model.InterfaceDefinitionType;
+import org.onap.sdc.tosca.datatypes.model.InterfaceType;
+import org.onap.sdc.tosca.datatypes.model.NodeTemplate;
+import org.onap.sdc.tosca.datatypes.model.NodeType;
+import org.onap.sdc.tosca.datatypes.model.ParameterDefinition;
+import org.onap.sdc.tosca.datatypes.model.PropertyDefinition;
+import org.onap.sdc.tosca.datatypes.model.RequirementAssignment;
+import org.onap.sdc.tosca.datatypes.model.RequirementDefinition;
+import org.onap.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.onap.sdc.tosca.datatypes.model.SubstitutionMapping;
+import org.onap.sdc.tosca.datatypes.model.TopologyTemplate;
import org.openecomp.sdc.tosca.services.ToscaAnalyzerService;
import org.openecomp.sdc.tosca.services.ToscaConstants;
-import org.openecomp.sdc.tosca.services.ToscaExtensionYamlUtil;
+import org.onap.sdc.tosca.services.ToscaExtensionYamlUtil;
import java.io.IOException;
import java.io.InputStream;
import org.junit.Test;
import org.openecomp.core.utilities.file.FileContentHandler;
import org.openecomp.sdc.tosca.datatypes.ToscaServiceModel;
-import org.openecomp.sdc.tosca.datatypes.model.ServiceTemplate;
+import org.onap.sdc.tosca.datatypes.model.ServiceTemplate;
import org.openecomp.sdc.tosca.services.ToscaConstants;
import org.openecomp.sdc.tosca.services.ToscaUtil;