Search in sources :

Example 1 with DeleteStorageResourceRequest

use of com.emc.storageos.vnxe.requests.DeleteStorageResourceRequest in project coprhd-controller by CoprHD.

the class VNXeApiClient method deleteLunGroup.

/**
 * Delete lun group.
 * if isForceVolumeDeletion is true, it would delete all the volumes in the lun group
 * and the lun group.
 * if isForceVolumeDeletion is false, it would remove all the volumes from the lun group,
 * then delete the lun group.
 *
 * @param lunGroupId
 * @param isForceSnapDeletion
 * @return
 */
public VNXeCommandResult deleteLunGroup(String lunGroupId, boolean isForceSnapDeletion, boolean isForceVolumeDeletion) {
    if (isForceVolumeDeletion) {
        DeleteStorageResourceRequest deleteReq = new DeleteStorageResourceRequest(_khClient);
        return deleteReq.deleteLunGroup(lunGroupId, isForceSnapDeletion);
    } else {
        BlockLunRequests lunReq = new BlockLunRequests(_khClient);
        List<VNXeLun> luns = lunReq.getLunsInLunGroup(lunGroupId);
        if (luns != null && !luns.isEmpty()) {
            List<String> lunIds = new ArrayList<String>();
            for (VNXeLun lun : luns) {
                lunIds.add(lun.getId());
            }
            removeLunsFromLunGroup(lunGroupId, lunIds);
        }
        DeleteStorageResourceRequest deleteReq = new DeleteStorageResourceRequest(_khClient);
        return deleteReq.deleteLunGroup(lunGroupId, isForceSnapDeletion);
    }
}
Also used : DeleteStorageResourceRequest(com.emc.storageos.vnxe.requests.DeleteStorageResourceRequest) BlockLunRequests(com.emc.storageos.vnxe.requests.BlockLunRequests) ArrayList(java.util.ArrayList) VNXeLun(com.emc.storageos.vnxe.models.VNXeLun)

Example 2 with DeleteStorageResourceRequest

use of com.emc.storageos.vnxe.requests.DeleteStorageResourceRequest in project coprhd-controller by CoprHD.

the class VNXeApiClient method deleteFileSystem.

/**
 * delete file system with async call
 *
 * @param fsId
 *            file system Id
 * @param forceSnapDeletion
 *            whether to delete snapshots as well
 * @return VNXeCommandJob
 * @throws VNXeException
 */
public VNXeCommandJob deleteFileSystem(String fsId, boolean forceSnapDeletion) throws VNXeException {
    _logger.info("deleting file system: " + fsId);
    DeleteStorageResourceRequest req = new DeleteStorageResourceRequest(_khClient);
    return req.deleteFileSystemAsync(fsId, forceSnapDeletion);
}
Also used : DeleteStorageResourceRequest(com.emc.storageos.vnxe.requests.DeleteStorageResourceRequest)

Example 3 with DeleteStorageResourceRequest

use of com.emc.storageos.vnxe.requests.DeleteStorageResourceRequest in project coprhd-controller by CoprHD.

the class VNXeApiClient method deleteFileSystemSync.

/**
 * delete file system sync
 *
 * @param fsId
 *            file system Id
 * @param forceSnapDeletion
 *            whether to delete snapshots as well
 * @return VNXeCommandJob
 * @throws VNXeException
 */
public VNXeCommandResult deleteFileSystemSync(String fsId, boolean forceSnapDeletion) throws VNXeException {
    _logger.info("deleting file system: " + fsId);
    DeleteStorageResourceRequest req = new DeleteStorageResourceRequest(_khClient);
    return req.deleteFileSystemSync(fsId, forceSnapDeletion);
}
Also used : DeleteStorageResourceRequest(com.emc.storageos.vnxe.requests.DeleteStorageResourceRequest)

Example 4 with DeleteStorageResourceRequest

use of com.emc.storageos.vnxe.requests.DeleteStorageResourceRequest in project coprhd-controller by CoprHD.

the class VNXeApiClient method deleteLunSync.

/**
 * delete lun sync
 *
 * @param lunId
 *            lun Id
 * @param forceSnapDeletion
 *            whether to delete snapshots as well
 * @return VNXeCommandJob
 * @throws VNXeException
 */
public VNXeCommandResult deleteLunSync(String lunId, boolean forceSnapDeletion) throws VNXeException {
    _logger.info("deleting lun: " + lunId);
    DeleteStorageResourceRequest req = new DeleteStorageResourceRequest(_khClient);
    return req.deleteLunSync(lunId, forceSnapDeletion);
}
Also used : DeleteStorageResourceRequest(com.emc.storageos.vnxe.requests.DeleteStorageResourceRequest)

Example 5 with DeleteStorageResourceRequest

use of com.emc.storageos.vnxe.requests.DeleteStorageResourceRequest in project coprhd-controller by CoprHD.

the class VNXeApiClient method deleteConsistencyGroup.

/**
 * Delete Consistency group.
 * if isForceVolumeDeletion is true, it would delete all the volumes in the Consistency group
 * and the Consistency group.
 * if isForceVolumeDeletion is false, it would remove all the volumes from the Consistency group,
 * then delete the Consistency group.
 *
 * @param cgId
 * @param isForceSnapDeletion
 *            if to delete snaps
 * @param isForceVolumeDeletion
 *            if to delete all volumes in the CG
 * @return
 */
public VNXeCommandResult deleteConsistencyGroup(String cgId, boolean isForceSnapDeletion, boolean isForceVolumeDeletion) {
    if (isForceVolumeDeletion) {
        DeleteStorageResourceRequest deleteReq = new DeleteStorageResourceRequest(_khClient);
        return deleteReq.deleteLunGroup(cgId, isForceSnapDeletion);
    } else {
        BlockLunRequests lunReq = new BlockLunRequests(_khClient);
        List<VNXeLun> luns = lunReq.getLunsInLunGroup(cgId);
        if (luns != null && !luns.isEmpty()) {
            List<String> lunIds = new ArrayList<String>();
            for (VNXeLun lun : luns) {
                lunIds.add(lun.getId());
            }
            removeLunsFromConsistencyGroup(cgId, lunIds);
        }
        DeleteStorageResourceRequest deleteReq = new DeleteStorageResourceRequest(_khClient);
        return deleteReq.deleteLunGroup(cgId, isForceSnapDeletion);
    }
}
Also used : DeleteStorageResourceRequest(com.emc.storageos.vnxe.requests.DeleteStorageResourceRequest) BlockLunRequests(com.emc.storageos.vnxe.requests.BlockLunRequests) ArrayList(java.util.ArrayList) VNXeLun(com.emc.storageos.vnxe.models.VNXeLun)

Aggregations

DeleteStorageResourceRequest (com.emc.storageos.vnxe.requests.DeleteStorageResourceRequest)6 VNXeLun (com.emc.storageos.vnxe.models.VNXeLun)2 BlockLunRequests (com.emc.storageos.vnxe.requests.BlockLunRequests)2 ArrayList (java.util.ArrayList)2