summaryrefslogtreecommitdiffstats
path: root/openecomp-be
diff options
context:
space:
mode:
Diffstat (limited to 'openecomp-be')
-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.java20
-rw-r--r--openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/impl/VersionCalculatorImpl.java78
2 files changed, 0 insertions, 98 deletions
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 76717f37e3..24a344ae92 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
@@ -189,14 +189,6 @@ public class ManualVspToscaGenerationService {
return componentName + GeneratorConstants.TOSCA_SERVICE_TEMPLATE_FILE_NAME_SUFFIX;
}
- private String getNodeTemplateId(String componentName, String idPrefix, String idSuffix) {
- StringBuilder builder = new StringBuilder();
- //builder.append(idPrefix);
- builder.append(componentName);
- builder.append(idSuffix);
- return builder.toString();
- }
-
private ServiceTemplate createInitMainServiceTemplate(String releaseVendor) {
ServiceTemplate mainServiceTemplate = new ServiceTemplate();
Map<String, String> templateMetadata = new HashMap<>();
@@ -349,18 +341,6 @@ public class ManualVspToscaGenerationService {
//*************** CREATE GLOBAL SUBSTITUTION SERVICE TEMPLATE **********************
- private ServiceTemplate createGlobalSubstitutionServiceTemplate(ServiceTemplate
- substitutionServiceTemplate,
- String componentName) {
- ServiceTemplate globalSubstitutionServiceTemplate = fetchGlobalSubstitutionServiceTemplate();
- NodeType substitutionNodeType =
- createGlobalSubstitutionNodeType(substitutionServiceTemplate, componentName);
- String substitutionNodeTypeId = getSubstitutionNodeTypeId(componentName);
- DataModelUtil.addNodeType(globalSubstitutionServiceTemplate, substitutionNodeTypeId,
- substitutionNodeType);
- return globalSubstitutionServiceTemplate;
- }
-
private ServiceTemplate createInitGlobalSubstitutionServiceTemplate() {
ServiceTemplate globalSubstitutionServiceTemplate = new ServiceTemplate();
Map<String, String> templateMetadata = new HashMap<>();
diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/impl/VersionCalculatorImpl.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/impl/VersionCalculatorImpl.java
index b7008de867..df52cdd076 100644
--- a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/impl/VersionCalculatorImpl.java
+++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/impl/VersionCalculatorImpl.java
@@ -54,75 +54,6 @@ public class VersionCalculatorImpl implements VersionCalculator {
return CommonMethods.arrayToSeparatedString(versionLevels, '.');
}
-
- // version calculator when there are no version restrictions
- /* @Override
- public String calculate(String baseVersion, VersionCreationMethod creationMethod) {
-
- return calculate(baseVersion,creationMethod,2);
- }
-
- private String calculate(String baseVersion, VersionCreationMethod creationMethod,int
- maxVersionLevels) {
- if (baseVersion == null) {
- return INITIAL_VERSION;
- }
-
- String[] versionLevels = baseVersion.split("\\.");
- if (versionLevels.length > maxVersionLevels) {
- throw new IllegalArgumentException(VERSION_STRING_VIOLATION_MSG);
- }
-
- int index;
- int versionLevel = calcVersionLevel(versionLevels);
- if (versionLevel == -1) {
- throw new IllegalArgumentException(
- VERSION_STRING_VIOLATION_MSG + " given version:" + baseVersion);
- }
- int requiredVersionLevelIncrease;
- switch (creationMethod) {
- case parent_level:
- if (versionLevel == 0) {
- throw new IllegalArgumentException(
- PARENT_LEVEL_VERSION_CANNOT_BE_CREATED_FROM_TOP_LEVEL + " version:" + baseVersion);
-
- }
- requiredVersionLevelIncrease = versionLevel - 1;
- versionLevels[versionLevel] = "0";
- index = Integer.getInteger(versionLevels[requiredVersionLevelIncrease]);
- index++;
- versionLevels[requiredVersionLevelIncrease] = Integer.toString(index);
- break;
- case same_level:
- requiredVersionLevelIncrease = versionLevel;
- index = Integer.valueOf(versionLevels[requiredVersionLevelIncrease]);
- index++;
- versionLevels[requiredVersionLevelIncrease] = Integer.toString(index);
- break;
- case sub_level:
- if (versionLevel == versionLevels.length - 1) {
- throw new IllegalArgumentException(
- SUB_LEVEL_VERSION_CANNOT_BE_CREATED_FROM_LOWEST_LEVEL + " version:" + baseVersion);
- }
- requiredVersionLevelIncrease = versionLevel + 1;
- if(requiredVersionLevelIncrease>maxVersionLevels){
- throw new IllegalArgumentException(INVALID_CREATION_METHOD_MSG+" max " +
- "levels:"+maxVersionLevels + "requested level:"+requiredVersionLevelIncrease);
- }
- String newVersion = baseVersion + ".1";
- versionLevels = newVersion.split("\\.");
-
- break;
- default:
- throw new IllegalArgumentException(VERSION_CALCULATION_ERROR_MSG + " base " +
- "version:" + baseVersion + " creation method:" + creationMethod);
-
- }
-
- return CommonMethods.arrayToSeparatedString(versionLevels, '.');
- }*/
-
-
@Override
public void injectAdditionalInfo(Version version, Set<String> existingVersions) {
String optionalVersion;
@@ -143,13 +74,4 @@ public class VersionCalculatorImpl implements VersionCalculator {
}
-
- private int calcVersionLevel(String[] versionLevels) {
- for (int i = versionLevels.length - 1; i >= 0; i--) {
- if (!versionLevels[i].equals("0")) {
- return i;
- }
- }
- return -1;
- }
}