diff options
author | talio <tali.orenbach@amdocs.com> | 2017-09-14 10:54:21 +0300 |
---|---|---|
committer | talio <tali.orenbach@amdocs.com> | 2017-09-14 10:54:21 +0300 |
commit | 9c94d11d63d9016af74dcf3a2fd72d50955eace2 (patch) | |
tree | 5f56c433dabf17e5bca92a4f95711853f7b871a5 /openecomp-be/lib/openecomp-tosca-lib/src/main/java/org | |
parent | de8841c36349510e1b4c773753afad0eb8061f8c (diff) |
Removing service templates without node templates
Bugfix for cases where we have substitution service templates without node templates
Issue - ID : SDC-330
Change-Id: Ia9f33ce90fe0dbcc8ca2596ca63da704a48c7e67
Signed-off-by: talio <tali.orenbach@amdocs.com>
Diffstat (limited to 'openecomp-be/lib/openecomp-tosca-lib/src/main/java/org')
-rw-r--r-- | openecomp-be/lib/openecomp-tosca-lib/src/main/java/org/openecomp/sdc/tosca/services/DataModelUtil.java | 9 |
1 files changed, 7 insertions, 2 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 d908b2cf74..df2459368e 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 @@ -698,7 +698,7 @@ public class DataModelUtil { * @return the metadata */ public static Map<String, String> createMetadata(String templateName, String templateVersion, - String templateAuthor) { + String templateAuthor) { mdcDataDebugMessage.debugEntryMessage(null, null); @@ -1318,7 +1318,7 @@ public class DataModelUtil { * @return the relationship template */ public static Map<String, RelationshipTemplate> getRelationshipTemplates(ServiceTemplate - serviceTemplate) { + serviceTemplate) { if (serviceTemplate == null || serviceTemplate.getTopology_template() == null || serviceTemplate.getTopology_template().getRelationship_templates() == null) { @@ -1575,4 +1575,9 @@ public class DataModelUtil { mdcDataDebugMessage.debugExitMessage(null, null); } + + public static boolean isNodeTemplateSectionMissingFromServiceTemplate(ServiceTemplate serviceTemplate){ + return Objects.isNull(serviceTemplate.getTopology_template() ) + || MapUtils.isEmpty(serviceTemplate.getTopology_template().getNode_templates()); + } } |