summaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-sdc-tosca-generator-lib
diff options
context:
space:
mode:
authoramitjai <amitjai@amdocs.com>2018-04-27 13:28:57 +0530
committerOren Kleks <orenkle@amdocs.com>2018-04-30 06:05:27 +0000
commit42c920baf4dbb9fe8775843a6d4c9f70fa29f064 (patch)
treeac2aff977e2b129e61d2166c4832842676e4f5c3 /openecomp-be/lib/openecomp-sdc-tosca-generator-lib
parentf487427a32f410ab5c97a4092865d32beb88ee27 (diff)
Rename packages from openecomp to onap.
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>
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-tosca-generator-lib')
-rw-r--r--openecomp-be/lib/openecomp-sdc-tosca-generator-lib/openecomp-sdc-tosca-generator-api/pom.xml8
-rw-r--r--openecomp-be/lib/openecomp-sdc-tosca-generator-lib/openecomp-sdc-tosca-generator-core/pom.xml4
-rw-r--r--openecomp-be/lib/openecomp-sdc-tosca-generator-lib/openecomp-sdc-tosca-generator-core/src/main/java/org/openecomp/sdc/generator/core/services/ManualVspToscaGenerationService.java65
-rw-r--r--openecomp-be/lib/openecomp-sdc-tosca-generator-lib/openecomp-sdc-tosca-generator-core/src/main/java/org/openecomp/sdc/generator/core/utils/GeneratorUtils.java14
4 files changed, 38 insertions, 53 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-tosca-generator-lib/openecomp-sdc-tosca-generator-api/pom.xml b/openecomp-be/lib/openecomp-sdc-tosca-generator-lib/openecomp-sdc-tosca-generator-api/pom.xml
index 287957a2bc..cbdac92cfd 100644
--- a/openecomp-be/lib/openecomp-sdc-tosca-generator-lib/openecomp-sdc-tosca-generator-api/pom.xml
+++ b/openecomp-be/lib/openecomp-sdc-tosca-generator-lib/openecomp-sdc-tosca-generator-api/pom.xml
@@ -42,8 +42,8 @@
<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>
@@ -54,8 +54,8 @@
</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>
diff --git a/openecomp-be/lib/openecomp-sdc-tosca-generator-lib/openecomp-sdc-tosca-generator-core/pom.xml b/openecomp-be/lib/openecomp-sdc-tosca-generator-lib/openecomp-sdc-tosca-generator-core/pom.xml
index 6aef2ede47..4888fa8f73 100644
--- a/openecomp-be/lib/openecomp-sdc-tosca-generator-lib/openecomp-sdc-tosca-generator-core/pom.xml
+++ b/openecomp-be/lib/openecomp-sdc-tosca-generator-lib/openecomp-sdc-tosca-generator-core/pom.xml
@@ -16,8 +16,8 @@
<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>
diff --git a/openecomp-be/lib/openecomp-sdc-tosca-generator-lib/openecomp-sdc-tosca-generator-core/src/main/java/org/openecomp/sdc/generator/core/services/ManualVspToscaGenerationService.java b/openecomp-be/lib/openecomp-sdc-tosca-generator-lib/openecomp-sdc-tosca-generator-core/src/main/java/org/openecomp/sdc/generator/core/services/ManualVspToscaGenerationService.java
index ab5750684d..76717f37e3 100644
--- a/openecomp-be/lib/openecomp-sdc-tosca-generator-lib/openecomp-sdc-tosca-generator-core/src/main/java/org/openecomp/sdc/generator/core/services/ManualVspToscaGenerationService.java
+++ b/openecomp-be/lib/openecomp-sdc-tosca-generator-lib/openecomp-sdc-tosca-generator-core/src/main/java/org/openecomp/sdc/generator/core/services/ManualVspToscaGenerationService.java
@@ -18,19 +18,20 @@ package org.openecomp.sdc.generator.core.services;
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;
@@ -49,22 +50,6 @@ import java.util.Map;
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.
*/
@@ -89,7 +74,7 @@ public class ManualVspToscaGenerationService {
.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()) {
@@ -150,10 +135,10 @@ public class ManualVspToscaGenerationService {
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);
}
@@ -175,7 +160,7 @@ public class ManualVspToscaGenerationService {
//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
@@ -194,14 +179,14 @@ public class ManualVspToscaGenerationService {
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) {
@@ -217,7 +202,7 @@ public class ManualVspToscaGenerationService {
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);
@@ -302,11 +287,11 @@ public class ManualVspToscaGenerationService {
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();
}
@@ -403,23 +388,23 @@ public class ManualVspToscaGenerationService {
//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;
}
diff --git a/openecomp-be/lib/openecomp-sdc-tosca-generator-lib/openecomp-sdc-tosca-generator-core/src/main/java/org/openecomp/sdc/generator/core/utils/GeneratorUtils.java b/openecomp-be/lib/openecomp-sdc-tosca-generator-lib/openecomp-sdc-tosca-generator-core/src/main/java/org/openecomp/sdc/generator/core/utils/GeneratorUtils.java
index 168cc1ff30..9ea8ba752a 100644
--- a/openecomp-be/lib/openecomp-sdc-tosca-generator-lib/openecomp-sdc-tosca-generator-core/src/main/java/org/openecomp/sdc/generator/core/utils/GeneratorUtils.java
+++ b/openecomp-be/lib/openecomp-sdc-tosca-generator-lib/openecomp-sdc-tosca-generator-core/src/main/java/org/openecomp/sdc/generator/core/utils/GeneratorUtils.java
@@ -2,15 +2,15 @@ package org.openecomp.sdc.generator.core.utils;
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;