use of controllers.util.FlashException in project coprhd-controller by CoprHD.
the class BlockSnapshotSessions method deleteSnapshotSession.
@FlashException(referrer = { "snapshotSessionDetails" })
public static void deleteSnapshotSession(String snapshotId, VolumeDeleteTypeEnum deleteType) {
if (StringUtils.isNotBlank(snapshotId)) {
ViPRCoreClient client = BourneUtil.getViprClient();
Tasks<BlockSnapshotSessionRestRep> task = client.blockSnapshotSessions().deactivate(uri(snapshotId), deleteType);
flash.put("info", MessagesUtils.get("resources.snapshot.deactivate", snapshotId));
}
snapshotSessionDetails(snapshotId);
}
use of controllers.util.FlashException in project coprhd-controller by CoprHD.
the class BlockVolumes method stopContinuousCopy.
@FlashException(referrer = { "volume" })
public static void stopContinuousCopy(String volumeId, String continuousCopyId) {
if (StringUtils.isNotBlank(volumeId) && StringUtils.isNotBlank(continuousCopyId)) {
ViPRCoreClient client = BourneUtil.getViprClient();
CopiesParam input = createCopiesParam(continuousCopyId);
Tasks<VolumeRestRep> tasks = client.blockVolumes().stopContinuousCopies(uri(volumeId), input);
flash.put("info", MessagesUtils.get("resources.continuouscopy.stop"));
}
volume(volumeId, null);
}
use of controllers.util.FlashException in project coprhd-controller by CoprHD.
the class BlockVolumes method deleteVolume.
@FlashException(referrer = { "volume" })
public static void deleteVolume(String volumeId, VolumeDeleteTypeEnum type) {
if (StringUtils.isNotBlank(volumeId)) {
ViPRCoreClient client = BourneUtil.getViprClient();
Task<VolumeRestRep> task = client.blockVolumes().deactivate(uri(volumeId), type);
flash.put("info", MessagesUtils.get("resources.volume.deactivate"));
}
volume(volumeId, null);
}
use of controllers.util.FlashException in project coprhd-controller by CoprHD.
the class BlockVolumes method resumeMigration.
@FlashException(referrer = { "volume" })
public static void resumeMigration(String volumeId, String migrationId) {
if (StringUtils.isNotBlank(volumeId) && StringUtils.isNotBlank(migrationId)) {
ViPRCoreClient client = BourneUtil.getViprClient();
client.blockMigrations().resume(uri(migrationId));
flash.put("info", MessagesUtils.get("resources.migrations.resume"));
}
volume(volumeId, null);
}
use of controllers.util.FlashException in project coprhd-controller by CoprHD.
the class ConsistencyGroups method save.
@FlashException(referrer = { "create", "edit" })
public static void save(ConsistencyGroupForm consistencyGroup) {
flash.put(ACTIVE_PROJECT_ID, consistencyGroup.projectId);
consistencyGroup.validate("consistencyGroup");
if (Validation.hasErrors()) {
Common.handleError();
}
// NOTE : Only Create is supported at this time
if (consistencyGroup.isNew()) {
BlockConsistencyGroupCreate createParam = new BlockConsistencyGroupCreate();
createParam.setName(consistencyGroup.name);
createParam.setProject(uri(consistencyGroup.projectId));
createParam.setArrayConsistency(consistencyGroup.arrayConsistency);
BlockConsistencyGroupUtils.create(createParam);
}
flash.success(MessagesUtils.get("consistencyGroups.saved", consistencyGroup.name));
if (StringUtils.isNotBlank(consistencyGroup.referrerUrl)) {
redirect(consistencyGroup.referrerUrl);
} else {
list();
}
}
Aggregations