Source:
protected boolean validate() { if (!super.validate()) { return false; } if (getParameters().getBricks() == null || getParameters().getBricks().size() == 0) { addValidationMessage(EngineMessage.ACTION_TYPE_FAILED_BRICKS_REQUIRED); return false; } if (getGlusterVolume().getVolumeType().isReplicatedType()) { if (getParameters().getReplicaCount() > getGlusterVolume().getReplicaCount() + 1) { addValidationMessage(EngineMessage.ACTION_TYPE_FAILED_CAN_NOT_INCREASE_REPLICA_COUNT_MORE_THAN_ONE); } else if (getParameters().getReplicaCount() < getGlusterVolume().getReplicaCount()) { addValidationMessage(EngineMessage.ACTION_TYPE_FAILED_CAN_NOT_REDUCE_REPLICA_COUNT); } } if (getGlusterVolume().getVolumeType().isStripedType()) { if (getParameters().getStripeCount() > getGlusterVolume().getStripeCount() + 1) { addValidationMessage(EngineMessage.ACTION_TYPE_FAILED_CAN_NOT_INCREASE_STRIPE_COUNT_MORE_THAN_ONE); } else if (getParameters().getStripeCount() < getGlusterVolume().getStripeCount()) { addValidationMessage(EngineMessage.ACTION_TYPE_FAILED_CAN_NOT_REDUCE_STRIPE_COUNT); } } if (getGlusterVolume().getVolumeType().isDispersedType()) { addValidationMessage(EngineMessage.ACTION_TYPE_FAILED_ADD_BRICK_TO_DISPERSE_VOLUME_NOT_SUPPORTED); return false; } boolean ret = updateBrickServerAndInterfaceNames(getParameters().getBricks(), true) && validateDuplicateBricks(getParameters().getBricks()); if (getCluster().supportsGlusterService() && getCluster().supportsVirtService()) { ret = ret && validateNotSameServer(getParameters().getBricks(), getParameters().getReplicaCount()); } return ret; }

Target:
protected boolean validate() { if (!super.validate()) { return false; } if (getParameters().getBricks() == null || getParameters().getBricks().size() == 0) { failValidation(EngineMessage.ACTION_TYPE_FAILED_BRICKS_REQUIRED); } if (getGlusterVolume().getVolumeType().isReplicatedType()) { if (getParameters().getReplicaCount() > getGlusterVolume().getReplicaCount() + 1) { failValidation(EngineMessage.ACTION_TYPE_FAILED_CAN_NOT_INCREASE_REPLICA_COUNT_MORE_THAN_ONE); } else if (getParameters().getReplicaCount() < getGlusterVolume().getReplicaCount()) { failValidation(EngineMessage.ACTION_TYPE_FAILED_CAN_NOT_REDUCE_REPLICA_COUNT); } } if (getGlusterVolume().getVolumeType().isStripedType()) { if (getParameters().getStripeCount() > getGlusterVolume().getStripeCount() + 1) { failValidation(EngineMessage.ACTION_TYPE_FAILED_CAN_NOT_INCREASE_STRIPE_COUNT_MORE_THAN_ONE); } else if (getParameters().getStripeCount() < getGlusterVolume().getStripeCount()) { failValidation(EngineMessage.ACTION_TYPE_FAILED_CAN_NOT_REDUCE_STRIPE_COUNT); } } if (getGlusterVolume().getVolumeType().isDispersedType()) { failValidation(EngineMessage.ACTION_TYPE_FAILED_ADD_BRICK_TO_DISPERSE_VOLUME_NOT_SUPPORTED); } boolean ret = updateBrickServerAndInterfaceNames(getParameters().getBricks(), true) && validateDuplicateBricks(getParameters().getBricks()); if (getCluster().supportsGlusterService() && getCluster().supportsVirtService() && getGlusterVolume().getVolumeType().isReplicatedType()) { ret = ret && validateNotSameServer(getParameters().getBricks(), getGlusterVolume(), getParameters().getReplicaCount()); } return ret; }