use of com.emc.storageos.vnxe.models.VNXeCommandJob in project coprhd-controller by CoprHD.
the class VNXeApiClient method expandLun.
public VNXeCommandJob expandLun(String lunID, long newSize, String lunGroupID) {
VNXeCommandJob job = null;
_logger.info("expanding lun:" + lunID);
VNXeLun vnxeLun = getLun(lunID);
if (vnxeLun == null) {
_logger.info("Could not find lun in the vxne");
throw VNXeException.exceptions.vnxeCommandFailed("Could not find lun in the vnxe for: " + lunID);
}
LunModifyParam lunModifyParam = new LunModifyParam();
// set lunParam
LunParam lunParam = new LunParam();
lunParam.setSize(newSize);
lunModifyParam.setLunParameters(lunParam);
if (vnxeLun.getType() == GENERIC_STORAGE_LUN_TYPE) {
if (lunGroupID == null || lunGroupID.isEmpty()) {
_logger.error("Lun Group Id not found for lun: " + lunID);
throw VNXeException.exceptions.vnxeCommandFailed("Could not find lun group for lun: " + lunID);
}
LunGroupModifyParam param = new LunGroupModifyParam();
List<LunModifyParam> lunModifyParamList = new ArrayList<LunModifyParam>();
lunModifyParam.setLun(new VNXeBase(lunID));
lunModifyParamList.add(lunModifyParam);
param.setLunModify(lunModifyParamList);
if (isUnityClient()) {
ConsistencyGroupRequests cgRequest = new ConsistencyGroupRequests(_khClient);
job = cgRequest.modifyConsistencyGroupAsync(lunGroupID, param);
} else {
LunGroupRequests lunGroupRequest = new LunGroupRequests(_khClient);
job = lunGroupRequest.modifyLunGroupAsync(lunGroupID, param);
}
} else if (vnxeLun.getType() == STANDALONE_LUN_TYPE) {
BlockLunRequests req = new BlockLunRequests(_khClient);
job = req.modifyLunAsync(lunModifyParam, lunID);
}
return job;
}
use of com.emc.storageos.vnxe.models.VNXeCommandJob in project coprhd-controller by CoprHD.
the class ApiClientTest method getJob.
// @Test
public void getJob() {
JobRequest req = new JobRequest(_client, "N-612");
VNXeCommandJob job = req.get();
System.out.println(job.getMessageOut().getMessage());
}
use of com.emc.storageos.vnxe.models.VNXeCommandJob in project coprhd-controller by CoprHD.
the class ApiClientTest method restoreSnap.
// @Test
public void restoreSnap() {
VNXeCommandJob job = apiClient.restoreSnap("38654706051");
System.out.println(job.getId());
}
use of com.emc.storageos.vnxe.models.VNXeCommandJob in project coprhd-controller by CoprHD.
the class ApiClientTest method createSnap.
// @Test
public void createSnap() {
VNXeCommandJob job = apiClient.createSnap("res_47", "snap1vipr41812", false);
System.out.println(job.getId());
}
use of com.emc.storageos.vnxe.models.VNXeCommandJob in project coprhd-controller by CoprHD.
the class ApiClientTest method createLun.
@Test
public void createLun() {
String name = "tyu-lun1";
VNXeCommandJob job = apiClient.createLun(name, "pool_1", 2000000000L, true, null);
System.out.println(job.getId());
}
Aggregations