diff options
author | ojasdubey <ojas.dubey@amdocs.com> | 2018-02-05 18:39:44 +0530 |
---|---|---|
committer | Avi Gaffa <avi.gaffa@amdocs.com> | 2018-02-08 08:41:37 +0000 |
commit | 20074c4e75e926977b25d57bebf841f44ada12a0 (patch) | |
tree | 7dcf74806e951e4c84b35b94e2fc92a15b92a5a2 /openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp | |
parent | 98d6b70321da75fb5322c146aa7be4442fc2b633 (diff) |
VLAN tagging - Enable first stage translation
1. Added toggle for vlan tagging feature
2. Enabled existing translation of feature with toggle
3. Enabled unit tests for the same
4. Deleted unused test data
5. Updated license text
6. Updated code based on review comments
Change-Id: I755df4889f18a32061e9d4d1ebec09162b2d8b83
Issue-ID: SDC-998
Signed-off-by: ojasdubey <ojas.dubey@amdocs.com>
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp')
1 files changed, 10 insertions, 17 deletions
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 313d98ad56..7d96bd0b40 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 @@ -1,28 +1,23 @@ -/*- - * ============LICENSE_START======================================================= - * SDC - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ +/* + * Copyright © 2016-2017 European Support Limited + * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - * ============LICENSE_END========================================================= */ package org.openecomp.sdc.translator.services.heattotosca.impl.resourcetranslation; +import org.openecomp.sdc.common.togglz.ToggleableFeature; import org.openecomp.sdc.heat.services.HeatConstants; -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.services.DataModelUtil; @@ -36,17 +31,15 @@ import java.util.Map; public class ResourceTranslationContrailV2VmInterfaceImpl extends ResourceTranslationBase { - protected static Logger logger = - (Logger) LoggerFactory.getLogger(ResourceTranslationContrailV2VmInterfaceImpl.class); @Override protected String generateTranslatedId(TranslateTo translateTo) { - if (new ContrailV2VirtualMachineInterfaceHelper().isVlanSubInterfaceResource(translateTo - .getResource())) { - return null; - } else { + if (!(new ContrailV2VirtualMachineInterfaceHelper().isVlanSubInterfaceResource(translateTo + .getResource())) || ToggleableFeature.VLAN_TAGGING.isActive()) { return super.generateTranslatedId(translateTo); } + + return null; } @Override |