@Override protected boolean canDoAction() { if (!super.canDoAction()) { return false; } VDSGroup cluster = getVdsGroup(); if (cluster == null) { addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_CLUSTER_IS_NOT_VALID); return false; } if (!cluster.supportsGlusterService()) { addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_CLUSTER_DOES_NOT_SUPPORT_GLUSTER); return false; } if (volumeNameExists(volume.getName())) { addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_GLUSTER_VOLUME_NAME_ALREADY_EXISTS); addCanDoActionMessage(String.format("$volumeName %1$s", volume.getName())); return false; } return validateBricks(volume); }
@Override public void setMainTabSelectedItem(VDSGroup selectedItem) { driver.edit(getDetailModel()); form.update(); glusterSwiftPanel.setVisible( selectedItem.supportsGlusterService() && GlusterFeaturesUtil.isGlusterSwiftSupported( selectedItem.getcompatibility_version())); }