use of com.emc.storageos.model.block.BlockConsistencyGroupRestRep in project coprhd-controller by CoprHD.
the class BlockConsistencyGroups method deleteConsistencyGroup.
@FlashException(referrer = { "consistencyGroupDetails" })
public static void deleteConsistencyGroup(String consistencyGroupId) {
if (StringUtils.isNotBlank(consistencyGroupId)) {
ViPRCoreClient client = BourneUtil.getViprClient();
Task<BlockConsistencyGroupRestRep> task = client.blockConsistencyGroups().deactivate(uri(consistencyGroupId));
flash.put("info", MessagesUtils.get("resources.consistencygroup.deactivate"));
}
consistencyGroupDetails(consistencyGroupId);
}
use of com.emc.storageos.model.block.BlockConsistencyGroupRestRep in project coprhd-controller by CoprHD.
the class ConsistencyGroups method listJson.
public static void listJson(String projectId) {
List<BlockConsistencyGroup> items = Lists.newArrayList();
if (StringUtils.isNotBlank(projectId)) {
for (BlockConsistencyGroupRestRep cg : BlockConsistencyGroupUtils.getBlockConsistencyGroups(projectId)) {
items.add(new BlockConsistencyGroup(cg));
}
}
renderJSON(DataTablesSupport.createJSON(items, params));
}
use of com.emc.storageos.model.block.BlockConsistencyGroupRestRep in project coprhd-controller by CoprHD.
the class ConsistencyGroups method delete.
private static void delete(List<URI> ids) {
if (!ids.isEmpty()) {
BlockConsistencyGroupRestRep cg = BlockConsistencyGroupUtils.getBlockConsistencyGroup(ids.get(0));
if (cg != null) {
flash.put(ACTIVE_PROJECT_ID, cg.getProject().getId().toString());
}
}
for (URI id : ids) {
BlockConsistencyGroupUtils.deactivate(id);
}
flash.success(MessagesUtils.get("consistencyGroups.deleted"));
list();
}
use of com.emc.storageos.model.block.BlockConsistencyGroupRestRep in project coprhd-controller by CoprHD.
the class ConsistencyUtils method removeFullCopy.
static Tasks<BlockConsistencyGroupRestRep> removeFullCopy(URI consistencyGroupId, URI fullCopyId) {
Tasks<BlockConsistencyGroupRestRep> tasks = execute(new DetachConsistencyGroupFullCopy(consistencyGroupId, fullCopyId));
BlockStorageUtils.removeBlockResources(Collections.singletonList(fullCopyId), VolumeDeleteTypeEnum.FULL);
return tasks;
}
use of com.emc.storageos.model.block.BlockConsistencyGroupRestRep in project coprhd-controller by CoprHD.
the class ConsistencyUtils method createFullCopy.
static Tasks<BlockConsistencyGroupRestRep> createFullCopy(URI consistencyGroupId, String name, Integer count) {
int countValue = (count != null) ? count : 1;
Tasks<BlockConsistencyGroupRestRep> copies = execute(new CreateConsistencyGroupFullCopy(consistencyGroupId, name, countValue));
addAffectedResources(copies);
return copies;
}
Aggregations