diff options
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/datatypes/heattotosca/unifiedmodel/consolidation/FileComputeConsolidationData.java')
1 files changed, 13 insertions, 0 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/datatypes/heattotosca/unifiedmodel/consolidation/FileComputeConsolidationData.java b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/datatypes/heattotosca/unifiedmodel/consolidation/FileComputeConsolidationData.java index 58f59f965b..bde0dc0ede 100644 --- a/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/datatypes/heattotosca/unifiedmodel/consolidation/FileComputeConsolidationData.java +++ b/openecomp-be/lib/openecomp-sdc-translator-lib/openecomp-sdc-translator-core/src/main/java/org/openecomp/sdc/translator/datatypes/heattotosca/unifiedmodel/consolidation/FileComputeConsolidationData.java @@ -68,4 +68,17 @@ public class FileComputeConsolidationData { } return consolidationData; } + + /** + * Is number of compute types legal boolean. + * + * @return the boolean + */ + public boolean isNumberOfComputeTypesLegal() { + Collection<TypeComputeConsolidationData> typeComputeConsolidationDataCollection = + getAllTypeComputeConsolidationData(); + return typeComputeConsolidationDataCollection.size() == 1 + && typeComputeConsolidationDataCollection.iterator().next() + .isNumberOfComputeConsolidationDataPerTypeLegal(); + } } |