aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoreleonorali <eleonoral@amdocs.com>2018-06-12 13:08:38 +0300
committerAvi Gaffa <avi.gaffa@amdocs.com>2018-06-13 09:03:30 +0000
commitaf561a8c58022cd211fa5ff020b72307bdde1ac6 (patch)
tree49b497d25c93e07cc69c377631c32024b2565c76
parent67e400cc929314f1d66accb2f2f47d489f6b0c4f (diff)
Remove Toggle
Remove Toggle for SIROV and VLAN_TAGGING Change-Id: Ia8b883c1f85de24f5c2000654a0926141cc269e8 Issue-ID: SDC-1418 Signed-off-by: eleonorali <eleonoral@amdocs.com>
-rw-r--r--openecomp-be/lib/openecomp-common-lib/src/main/java/org/openecomp/sdc/common/togglz/ToggleableFeature.java6
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/HeatToToscaUtil.java9
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/UnifiedCompositionService.java3
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/ResourceTranslationContrailV2VmInterfaceImpl.java3
-rw-r--r--openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/mapping/TranslatorHeatToToscaParameterConverter.java2
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/heatresource/VirtualMachineInterfaceValidator.java3
-rw-r--r--openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/namingconvention/VirtualMachineInterfaceGuidelineValidator.java4
7 files changed, 2 insertions, 28 deletions
diff --git a/openecomp-be/lib/openecomp-common-lib/src/main/java/org/openecomp/sdc/common/togglz/ToggleableFeature.java b/openecomp-be/lib/openecomp-common-lib/src/main/java/org/openecomp/sdc/common/togglz/ToggleableFeature.java
index 5080e00ea3..74623d5d04 100644
--- a/openecomp-be/lib/openecomp-common-lib/src/main/java/org/openecomp/sdc/common/togglz/ToggleableFeature.java
+++ b/openecomp-be/lib/openecomp-common-lib/src/main/java/org/openecomp/sdc/common/togglz/ToggleableFeature.java
@@ -6,12 +6,6 @@ import org.togglz.core.context.FeatureContext;
public enum ToggleableFeature implements Feature {
- @Label ("VLAN Tagging")
- VLAN_TAGGING,
-
- @Label ("Annotations")
- ANNOTATIONS,
-
@Label("Archive Item")
ARCHIVE_ITEM,
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/HeatToToscaUtil.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/HeatToToscaUtil.java
index d8e81422a3..dd23e2ddbb 100644
--- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/HeatToToscaUtil.java
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/HeatToToscaUtil.java
@@ -59,7 +59,6 @@ import org.openecomp.core.utilities.file.FileUtils;
import org.openecomp.core.utilities.orchestration.OnboardingTypesEnum;
import org.openecomp.core.validation.util.MessageContainerUtil;
import org.openecomp.sdc.common.errors.CoreException;
-import org.openecomp.sdc.common.togglz.ToggleableFeature;
import org.openecomp.sdc.common.utils.SdcCommon;
import org.openecomp.sdc.datatypes.error.ErrorLevel;
import org.openecomp.sdc.datatypes.error.ErrorMessage;
@@ -541,10 +540,6 @@ public class HeatToToscaUtil {
* @return true if the resource is of sub interface type and false otherwise
*/
public static boolean isSubInterfaceResource(Resource resource, TranslationContext context) {
- if (!ToggleableFeature.VLAN_TAGGING.isActive()) {
- //Remove this once feature is stable and moved to production
- return false;
- }
//Check if resource group is a nested resource
if (!isNestedResource(resource)) {
return false;
@@ -1231,10 +1226,6 @@ public class HeatToToscaUtil {
}
}
- public static boolean shouldAnnotationsToBeAdded() {
- return ToggleableFeature.ANNOTATIONS.isActive();
- }
-
private static void addCapabilityToSubMapping(String templateName,
Map.Entry<String, CapabilityDefinition> capabilityNodeEntry,
Map<String, CapabilityDefinition> nodeTypeCapabilitiesDefinition,
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/UnifiedCompositionService.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/UnifiedCompositionService.java
index 253b864301..e0d12e7f79 100644
--- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/UnifiedCompositionService.java
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/UnifiedCompositionService.java
@@ -80,7 +80,6 @@ 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.core.utilities.CommonMethods;
-import org.openecomp.sdc.common.togglz.ToggleableFeature;
import org.openecomp.sdc.datatypes.configuration.ImplementationConfiguration;
import org.openecomp.sdc.heat.services.HeatConstants;
import org.openecomp.sdc.tosca.datatypes.ToscaFunctions;
@@ -2147,10 +2146,8 @@ public class UnifiedCompositionService {
private void addPortSubInterfaceIndicatorProperty(Map<String, Object> properties,
EntityConsolidationData entityConsolidationData) {
- if (ToggleableFeature.VLAN_TAGGING.isActive()) {
properties.put(SUB_INTERFACE_INDICATOR_PROPERTY,
((PortTemplateConsolidationData) entityConsolidationData).isPortBoundToSubInterface());
- }
}
private void handleNodeTemplateProperties(UnifiedCompositionTo unifiedCompositionTo,
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/ResourceTranslationContrailV2VmInterfaceImpl.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/ResourceTranslationContrailV2VmInterfaceImpl.java
index 30a6c051af..3cb67d1285 100644
--- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/ResourceTranslationContrailV2VmInterfaceImpl.java
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/impl/resourcetranslation/ResourceTranslationContrailV2VmInterfaceImpl.java
@@ -20,7 +20,6 @@ import java.util.List;
import java.util.Map;
import org.onap.sdc.tosca.datatypes.model.NodeTemplate;
-import org.openecomp.sdc.common.togglz.ToggleableFeature;
import org.openecomp.sdc.heat.services.HeatConstants;
import org.openecomp.sdc.tosca.datatypes.ToscaNodeType;
import org.openecomp.sdc.tosca.services.DataModelUtil;
@@ -38,7 +37,7 @@ public class ResourceTranslationContrailV2VmInterfaceImpl extends ResourceTransl
protected boolean isEssentialRequirementsValid(TranslateTo translateTo) {
if (contrailV2VirtualMachineInterfaceHelper
.isVlanSubInterfaceResource(translateTo.getResource())) {
- return ToggleableFeature.VLAN_TAGGING.isActive() && contrailV2VirtualMachineInterfaceHelper
+ return contrailV2VirtualMachineInterfaceHelper
.isVlanSubInterfaceConnectedToPortIndirectly(translateTo);
}
return true;
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/mapping/TranslatorHeatToToscaParameterConverter.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/mapping/TranslatorHeatToToscaParameterConverter.java
index eb95ea9c0b..eee7bf9859 100644
--- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/mapping/TranslatorHeatToToscaParameterConverter.java
+++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/services/heattotosca/mapping/TranslatorHeatToToscaParameterConverter.java
@@ -174,7 +174,7 @@ public class TranslatorHeatToToscaParameterConverter {
}
private static boolean isAnnotationRequired(TranslationContext context, String heatFileName){
- return HeatToToscaUtil.shouldAnnotationsToBeAdded() && !isNestedServiceTemplate(context, heatFileName);
+ return !isNestedServiceTemplate(context, heatFileName);
}
private static boolean isNestedServiceTemplate(TranslationContext context, String heatFileName) {
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/heatresource/VirtualMachineInterfaceValidator.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/heatresource/VirtualMachineInterfaceValidator.java
index fc817c467d..016b911c81 100644
--- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/heatresource/VirtualMachineInterfaceValidator.java
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/heatresource/VirtualMachineInterfaceValidator.java
@@ -19,7 +19,6 @@ package org.openecomp.sdc.validation.impl.validators.heatresource;
import org.openecomp.core.validation.ErrorMessageCode;
import org.openecomp.core.validation.errors.ErrorMessagesFormatBuilder;
import org.openecomp.core.validation.types.GlobalValidationContext;
-import org.openecomp.sdc.common.togglz.ToggleableFeature;
import org.openecomp.sdc.datatypes.error.ErrorLevel;
import org.openecomp.sdc.heat.datatypes.model.Resource;
import org.openecomp.sdc.heat.services.HeatConstants;
@@ -40,7 +39,6 @@ public class VirtualMachineInterfaceValidator implements ResourceValidator {
@Override
public void validate(String fileName, Map.Entry<String, Resource> resourceEntry,
GlobalValidationContext globalContext, ValidationContext validationContext) {
- if (ToggleableFeature.VLAN_TAGGING.isActive()) {
HeatResourceValidationContext heatResourceValidationContext =
(HeatResourceValidationContext) validationContext;
final ValidityStatus status = calculateValidityStatus(resourceEntry.getValue());
@@ -77,7 +75,6 @@ public class VirtualMachineInterfaceValidator implements ResourceValidator {
throw new IllegalArgumentException("Received a value for which no handling is " +
"available " + status);
}
- }
}
private ValidityStatus calculateValidityStatus(Resource resource) {
diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/namingconvention/VirtualMachineInterfaceGuidelineValidator.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/namingconvention/VirtualMachineInterfaceGuidelineValidator.java
index 1b7a68a054..de4dc79207 100644
--- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/namingconvention/VirtualMachineInterfaceGuidelineValidator.java
+++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/namingconvention/VirtualMachineInterfaceGuidelineValidator.java
@@ -3,7 +3,6 @@ package org.openecomp.sdc.validation.impl.validators.namingconvention;
import org.openecomp.core.validation.ErrorMessageCode;
import org.openecomp.core.validation.errors.ErrorMessagesFormatBuilder;
import org.openecomp.core.validation.types.GlobalValidationContext;
-import org.openecomp.sdc.common.togglz.ToggleableFeature;
import org.openecomp.sdc.datatypes.error.ErrorLevel;
import org.openecomp.sdc.heat.datatypes.DefinedHeatParameterTypes;
import org.openecomp.sdc.heat.datatypes.model.Resource;
@@ -45,7 +44,6 @@ public class VirtualMachineInterfaceGuidelineValidator implements ResourceValida
@Override
public void validate(String fileName, Map.Entry<String, Resource> resourceEntry,
GlobalValidationContext globalContext, ValidationContext validationContext) {
- if (ToggleableFeature.VLAN_TAGGING.isActive()) {
NamingConventionValidationContext namingConventionValidationContext =
(NamingConventionValidationContext) validationContext;
Optional<Object> tagPropertyValue = getVlanTagPropertyValue(resourceEntry.getValue());
@@ -58,10 +56,8 @@ public class VirtualMachineInterfaceGuidelineValidator implements ResourceValida
validateNamingConvention(fileName, resourceEntry, globalContext
);
}
- }
}
-
private void validateModeledByResourceGroup(String fileName,
Map.Entry<String, Resource> resourceEntry,
GlobalValidationContext globalContext,