From 3042f71ec5761450e46a3f22c3eb46a117771145 Mon Sep 17 00:00:00 2001 From: "Ben David, Elad (eb7504)" Date: Wed, 6 Nov 2019 17:45:27 +0200 Subject: Align Sdc warnings with VNF Requirements Change-Id: Ic133faed7f8b612279de0eb836e88e9ea6b694d7 Issue-ID: SDC-2647 Signed-off-by: Ben David, Elad (eb7504) --- .../NovaServerNamingConventionGuideLineValidator.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl') diff --git a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/namingconvention/NovaServerNamingConventionGuideLineValidator.java b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/namingconvention/NovaServerNamingConventionGuideLineValidator.java index b1a8fe254d..e9f6257a88 100644 --- a/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/namingconvention/NovaServerNamingConventionGuideLineValidator.java +++ b/openecomp-be/lib/openecomp-sdc-validation-lib/openecomp-sdc-validation-impl/src/main/java/org/openecomp/sdc/validation/impl/validators/namingconvention/NovaServerNamingConventionGuideLineValidator.java @@ -81,7 +81,6 @@ public class NovaServerNamingConventionGuideLineValidator implements ResourceVal private void validateHeatNovaResource(String fileName, String envFileName, HeatOrchestrationTemplate heatOrchestrationTemplate, GlobalValidationContext globalContext) { - Map uniqueResourcePortNetworkRole = new HashMap<>(); //if no resources exist return if (MapUtils.isEmpty(heatOrchestrationTemplate.getResources())) { return; @@ -94,7 +93,7 @@ public class NovaServerNamingConventionGuideLineValidator implements ResourceVal .filter(entry -> entry.getValue().getType() .equals(HeatResourcesTypes.NOVA_SERVER_RESOURCE_TYPE.getHeatResource())) .forEach( entry -> validateNovaServerResourceType(entry.getKey(), fileName, envFileName, - entry, uniqueResourcePortNetworkRole, heatOrchestrationTemplate, globalContext)); + entry, new HashMap(), heatOrchestrationTemplate, globalContext)); } private void validateNovaServerResourceType(String resourceId, String fileName, @@ -192,7 +191,7 @@ public class NovaServerNamingConventionGuideLineValidator implements ResourceVal }else if (network instanceof List){ role = getNetworkRole((String)((List) network).get(0)); } - if (role != null && (uniqueResourcePortNetworkRole.containsKey(role))) { + if (role != null && uniqueResourcePortNetworkRole.containsKey(role)) { globalValidationContext.addMessage( fileName, ErrorLevel.WARNING, -- cgit 1.2.3-korg