boolean mixed = vGroup.getNodeGroups().size() > 1;
Integer vNodeNum = 0;
// ensure all node groups have the same host number
if (mixed) {
NodeGroupCreate primary = vGroup.getPrimaryGroup();
vNodeNum = primary.getInstanceNum() / primary.instancePerHost();
AuAssert.check(vNodeNum != null && vNodeNum > 0);
// slave groups cannot have required host numbers large than the primary group
for (NodeGroupCreate nodeGroup : vGroup.getNodeGroups()) {
AuAssert.check(nodeGroup.calculateHostNum() <= vNodeNum);