Search in sources :

Example 6 with LunAddParam

use of com.emc.storageos.vnxe.models.LunAddParam in project coprhd-controller by CoprHD.

the class VNXeApiClient method deleteLunsFromConsistencyGroup.

/**
 * Delete luns from consistency group
 *
 * @param cgId
 * @param luns
 * @return
 */
public VNXeCommandResult deleteLunsFromConsistencyGroup(String cgId, List<String> luns) {
    LunGroupModifyParam param = new LunGroupModifyParam();
    List<LunAddParam> lunDelete = new ArrayList<LunAddParam>();
    for (String lunId : luns) {
        VNXeBase lun = new VNXeBase(lunId);
        LunAddParam lunAdd = new LunAddParam();
        lunAdd.setLun(lun);
        lunDelete.add(lunAdd);
    }
    param.setLunDelete(lunDelete);
    ConsistencyGroupRequests req = new ConsistencyGroupRequests(_khClient);
    return req.modifyConsistencyGroupSync(cgId, param);
}
Also used : VNXeBase(com.emc.storageos.vnxe.models.VNXeBase) LunAddParam(com.emc.storageos.vnxe.models.LunAddParam) LunGroupModifyParam(com.emc.storageos.vnxe.models.LunGroupModifyParam) ArrayList(java.util.ArrayList) ConsistencyGroupRequests(com.emc.storageos.vnxe.requests.ConsistencyGroupRequests)

Aggregations

LunAddParam (com.emc.storageos.vnxe.models.LunAddParam)6 LunGroupModifyParam (com.emc.storageos.vnxe.models.LunGroupModifyParam)6 VNXeBase (com.emc.storageos.vnxe.models.VNXeBase)6 ArrayList (java.util.ArrayList)6 ConsistencyGroupRequests (com.emc.storageos.vnxe.requests.ConsistencyGroupRequests)3 LunGroupRequests (com.emc.storageos.vnxe.requests.LunGroupRequests)3