aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-tosca-lib/src/main/java
diff options
context:
space:
mode:
authorojasdubey <ojas.dubey@amdocs.com>2018-05-23 18:04:28 +0530
committerOren Kleks <orenkle@amdocs.com>2018-05-28 07:03:23 +0000
commitd981ef67e956f1e5a28ca77f2841f49e468c5b1b (patch)
tree58bed186fb242d0cfb5e6522613d8df1168ffe16 /openecomp-be/lib/openecomp-tosca-lib/src/main/java
parentcb72310ab92091c47502f7e3c1bf2162884dca83 (diff)
Refactor Onboarding Translator code
1. Fixed sonar violations 2. Fixed static analysis issues 3. Refactored methods for code smells 4. Moved log messages to a common place Change-Id: I33725bc51040a2c7683b06b4294dea6f96c425e3 Issue-ID: SDC-1331 Signed-off-by: ojasdubey <ojas.dubey@amdocs.com>
Diffstat (limited to 'openecomp-be/lib/openecomp-tosca-lib/src/main/java')
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/DataModelUtil.java3
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/ToscaConstants.java2
2 files changed, 4 insertions, 1 deletions
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/DataModelUtil.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/DataModelUtil.java
index 69231d5c51..a8629aa287 100644
--- a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/DataModelUtil.java
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/DataModelUtil.java
@@ -1190,7 +1190,8 @@ public class DataModelUtil {
SubstitutionMapping substitutionMapping = new SubstitutionMapping();
substitutionMapping.setNode_type(nodeTypeKey);
substitutionMapping.setCapabilities(
- manageCapabilityMapping(substitutionNodeType.getCapabilities(), mapping.get("capability")));
+ manageCapabilityMapping(substitutionNodeType.getCapabilities(), mapping.get(ToscaConstants
+ .CAPABILITY)));
substitutionMapping.setRequirements(
manageRequirementMapping(substitutionNodeType.getRequirements(),
mapping.get("requirement")));
diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/ToscaConstants.java b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/ToscaConstants.java
index 47e2c9a2e1..4ce2535401 100644
--- a/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/ToscaConstants.java
+++ b/openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/ToscaConstants.java
@@ -65,6 +65,8 @@ public class ToscaConstants {
static final String ST_METADATA_FILE_NAME = "filename";
public static final String MANDATORY_PROPERTY_NAME = "mandatory";
public static final String HEAT_NODE_TYPE_SUFFIX = "heat.";
+ public static final String CAPABILITY = "capability";
+ public static final String REQUIREMENT = "requirement";
private ToscaConstants() {
//Hiding the implicit public constructor