use of com.emc.storageos.vnxe.models.LunAddParam in project coprhd-controller by CoprHD.
the class VNXeApiClient method addLunsToLunGroup.
/**
* Add luns to LunGroup
*/
public VNXeCommandResult addLunsToLunGroup(String lunGroupId, List<String> luns) {
LunGroupModifyParam param = new LunGroupModifyParam();
List<LunAddParam> lunAdds = new ArrayList<LunAddParam>();
for (String lunId : luns) {
VNXeBase lun = new VNXeBase(lunId);
LunAddParam lunAdd = new LunAddParam();
lunAdd.setLun(lun);
lunAdds.add(lunAdd);
}
param.setLunAdd(lunAdds);
LunGroupRequests req = new LunGroupRequests(_khClient);
return req.modifyLunGroupSync(lunGroupId, param);
}
use of com.emc.storageos.vnxe.models.LunAddParam in project coprhd-controller by CoprHD.
the class VNXeApiClient method addLunsToConsistencyGroup.
/**
* Add luns to consistency group
*
* @param cgId
* consistency group Id
* @param luns
* luns to be added into the consistency group
*/
public VNXeCommandResult addLunsToConsistencyGroup(String cgId, List<String> luns) {
LunGroupModifyParam param = new LunGroupModifyParam();
List<LunAddParam> lunAdds = new ArrayList<LunAddParam>();
for (String lunId : luns) {
VNXeBase lun = new VNXeBase(lunId);
LunAddParam lunAdd = new LunAddParam();
lunAdd.setLun(lun);
lunAdds.add(lunAdd);
}
param.setLunAdd(lunAdds);
ConsistencyGroupRequests req = new ConsistencyGroupRequests(_khClient);
return req.modifyConsistencyGroupSync(cgId, param);
}
use of com.emc.storageos.vnxe.models.LunAddParam in project coprhd-controller by CoprHD.
the class VNXeApiClient method removeLunsFromConsistencyGroup.
/**
* Remove luns from the consistency group
*
* @param cgId
* lun group id
* @param luns
* list of lun IDs
* @return
*/
public VNXeCommandResult removeLunsFromConsistencyGroup(String cgId, List<String> luns) {
LunGroupModifyParam param = new LunGroupModifyParam();
List<LunAddParam> lunRemoves = new ArrayList<LunAddParam>();
for (String lunId : luns) {
VNXeBase lun = new VNXeBase(lunId);
LunAddParam lunAdd = new LunAddParam();
lunAdd.setLun(lun);
lunRemoves.add(lunAdd);
}
param.setLunRemove(lunRemoves);
ConsistencyGroupRequests req = new ConsistencyGroupRequests(_khClient);
return req.modifyConsistencyGroupSync(cgId, param);
}
use of com.emc.storageos.vnxe.models.LunAddParam in project coprhd-controller by CoprHD.
the class VNXeApiClient method removeLunsFromLunGroup.
/**
* Remove luns from the lun group
*
* @param lunGroupId
* lun group id
* @param luns
* list of lun IDs
* @return
*/
public VNXeCommandResult removeLunsFromLunGroup(String lunGroupId, List<String> luns) {
LunGroupModifyParam param = new LunGroupModifyParam();
List<LunAddParam> lunRemoves = new ArrayList<LunAddParam>();
for (String lunId : luns) {
VNXeBase lun = new VNXeBase(lunId);
LunAddParam lunAdd = new LunAddParam();
lunAdd.setLun(lun);
lunRemoves.add(lunAdd);
}
param.setLunRemove(lunRemoves);
LunGroupRequests req = new LunGroupRequests(_khClient);
return req.modifyLunGroupSync(lunGroupId, param);
}
use of com.emc.storageos.vnxe.models.LunAddParam in project coprhd-controller by CoprHD.
the class VNXeApiClient method deleteLunsFromLunGroup.
/**
* Delete luns from lun group
*
* @param lunGroupId
* @param luns
* @return
*/
public VNXeCommandJob deleteLunsFromLunGroup(String lunGroupId, 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);
LunGroupRequests req = new LunGroupRequests(_khClient);
return req.modifyLunGroupAsync(lunGroupId, param);
}
Aggregations