diff options
Diffstat (limited to 'openecomp-be/lib/openecomp-tosca-lib/src/main')
-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()); + } } |