diff options
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-translator-lib/att-sdc-translator-impl')
3 files changed, 12 insertions, 5 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/att-sdc-translator-impl/src/main/java/com/att/sdc/tosca/datatypes/AttToscaPolicyType.java b/openecomp-be/lib/openecomp-sdc-translator-lib/att-sdc-translator-impl/src/main/java/com/att/sdc/tosca/datatypes/AttToscaPolicyType.java index 8881ec5e40..fd893730c4 100644 --- a/openecomp-be/lib/openecomp-sdc-translator-lib/att-sdc-translator-impl/src/main/java/com/att/sdc/tosca/datatypes/AttToscaPolicyType.java +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/att-sdc-translator-impl/src/main/java/com/att/sdc/tosca/datatypes/AttToscaPolicyType.java @@ -10,12 +10,14 @@ import org.openecomp.sdc.tosca.services.ConfigConstants; public class AttToscaPolicyType { private static Configuration config = ConfigurationManager.lookup(); - public static String POLICY_TYPE_PREFIX = + public static final String POLICY_TYPE_PREFIX = config.getAsString(ConfigConstants.NAMESPACE, ConfigConstants.PREFIX_POLICY_TYPE); - public static String PLACEMENT_VALET_AFFINITY = POLICY_TYPE_PREFIX + "placement.valet.Affinity"; - public static String PLACEMENT_VALET_EXCLUSIVITY = + public static final String PLACEMENT_VALET_AFFINITY = POLICY_TYPE_PREFIX + "placement.valet" + + ".Affinity"; + public static final String PLACEMENT_VALET_EXCLUSIVITY = POLICY_TYPE_PREFIX + "placement.valet.Exclusivity"; - public static String PLACEMENT_VALET_DIVERSITY = POLICY_TYPE_PREFIX + "placement.valet.Diversity"; + public static final String PLACEMENT_VALET_DIVERSITY = POLICY_TYPE_PREFIX + "placement.valet" + + ".Diversity"; } diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/att-sdc-translator-impl/src/main/java/com/att/sdc/translator/services/heattotosca/impl/resourcetranslation/ResourceTranslationValetGroupAssignmentImpl.java b/openecomp-be/lib/openecomp-sdc-translator-lib/att-sdc-translator-impl/src/main/java/com/att/sdc/translator/services/heattotosca/impl/resourcetranslation/ResourceTranslationValetGroupAssignmentImpl.java index e303276538..176c7c5e65 100644 --- a/openecomp-be/lib/openecomp-sdc-translator-lib/att-sdc-translator-impl/src/main/java/com/att/sdc/translator/services/heattotosca/impl/resourcetranslation/ResourceTranslationValetGroupAssignmentImpl.java +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/att-sdc-translator-impl/src/main/java/com/att/sdc/translator/services/heattotosca/impl/resourcetranslation/ResourceTranslationValetGroupAssignmentImpl.java @@ -289,7 +289,7 @@ public class ResourceTranslationValetGroupAssignmentImpl extends ResourceTransla groupName = (String) groupNameProperty; } - if (!Strings.isNullOrEmpty(groupName)) { + if (groupName != null && !Strings.isNullOrEmpty(groupName)) { groupName = groupName.replace(" ", "_"); resourceId += "_" + groupName; diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/att-sdc-translator-impl/src/test/java/com/att/sdc/translator/services/heattotosca/impl/resourcetranslation/BaseResourceTranslationTest.java b/openecomp-be/lib/openecomp-sdc-translator-lib/att-sdc-translator-impl/src/test/java/com/att/sdc/translator/services/heattotosca/impl/resourcetranslation/BaseResourceTranslationTest.java index e8fddc3108..05bc7cb5f1 100644 --- a/openecomp-be/lib/openecomp-sdc-translator-lib/att-sdc-translator-impl/src/test/java/com/att/sdc/translator/services/heattotosca/impl/resourcetranslation/BaseResourceTranslationTest.java +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/att-sdc-translator-impl/src/test/java/com/att/sdc/translator/services/heattotosca/impl/resourcetranslation/BaseResourceTranslationTest.java @@ -36,6 +36,8 @@ import org.openecomp.sdc.datatypes.error.ErrorMessage; 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.logging.api.Logger; +import org.openecomp.sdc.logging.api.LoggerFactory; import org.openecomp.sdc.logging.context.impl.MdcDataErrorMessage; import org.openecomp.sdc.logging.types.LoggerConstants; import org.openecomp.sdc.logging.types.LoggerErrorCode; @@ -86,6 +88,8 @@ public class BaseResourceTranslationTest { private final String MANIFEST_NAME = SdcCommon.MANIFEST_NAME; private String validationFilename = "validationOutput.json"; + private final Logger log = (Logger) LoggerFactory.getLogger(this.getClass().getName()); + @Before public void setUp() throws IOException { initTranslatorAndTranslate(); @@ -286,6 +290,7 @@ public class BaseResourceTranslationTest { } } catch (Exception e) { + log.debug("",e); Assert.fail(e.getMessage()); } return serviceTemplateMap; |