use of com.emc.storageos.volumecontroller.impl.BiosCommandResult in project coprhd-controller by CoprHD.
the class VNXFileStorageDeviceXML method getFSSnapshotList.
// Get FS snapshot list from the array
@Override
public BiosCommandResult getFSSnapshotList(StorageSystem storage, FileDeviceInputOutput args, List<String> snapshots) throws ControllerException {
// TODO: Implement method
String op = "getFSSnapshotList";
String devType = storage.getSystemType();
BiosCommandResult result = BiosCommandResult.createErrorResult(DeviceControllerException.errors.unsupportedOperationOnDevType(op, devType));
return result;
}
use of com.emc.storageos.volumecontroller.impl.BiosCommandResult in project coprhd-controller by CoprHD.
the class VNXFileStorageDeviceXML method doRestoreFS.
@Override
public BiosCommandResult doRestoreFS(StorageSystem storage, FileDeviceInputOutput args) throws ControllerException {
_log.info("FileShare, Snapshot {} {}", args.getFsUUID(), args.getSnapshotId());
_log.info("FSName: {}", args.getFsName());
_log.info("SnapShotName: {}", args.getSnapshotName());
int snapNativeId = 0;
XMLApiResult result = null;
ApplicationContext context = null;
try {
context = loadContext();
VNXFileCommApi vnxComm = loadVNXFileCommunicationAPIs(context);
if (null == vnxComm) {
throw VNXException.exceptions.communicationFailed(VNXCOMM_ERR_MSG);
}
result = vnxComm.doRestoreSnapshot(storage, args.getFsNativeId(), args.getFsName(), args.getSnapNativeId(), args.getSnapshotName());
_log.info("restoreSnapshot call result : {}", result.isCommandSuccess());
} catch (NumberFormatException ne) {
// Call failed
result = new XMLApiResult();
result.setCommandFailed();
result.setMessage("Not valid snapshot Id " + args.getSnapNativeId());
} catch (VNXException e) {
throw new DeviceControllerException(e);
} finally {
clearContext(context);
}
_log.info("restoreSnapshot call result : {}", result.isCommandSuccess());
BiosCommandResult cmdResult = null;
if (result.isCommandSuccess()) {
cmdResult = BiosCommandResult.createSuccessfulResult();
} else {
cmdResult = BiosCommandResult.createErrorResult(DeviceControllerErrors.vnx.unableToRestoreFileSystem(result.getMessage()));
}
return cmdResult;
}
use of com.emc.storageos.volumecontroller.impl.BiosCommandResult in project coprhd-controller by CoprHD.
the class VNXeStorageDevice method doDeleteQuotaDirectory.
@Override
public BiosCommandResult doDeleteQuotaDirectory(StorageSystem storage, FileDeviceInputOutput args) throws ControllerException {
BiosCommandResult result = new BiosCommandResult();
ServiceError serviceError = DeviceControllerErrors.vnxe.operationNotSupported("Delete Quota Directory", "VNXe");
result = BiosCommandResult.createErrorResult(serviceError);
return result;
}
use of com.emc.storageos.volumecontroller.impl.BiosCommandResult in project coprhd-controller by CoprHD.
the class BiosCommandResultTest method doCreateFS.
// In the default/public build, we do not have access to an isilon, so this test is off by default.
@Ignore
@Test
public void doCreateFS() throws Exception {
FileShare fs = new FileShare();
fs.setId(URIUtil.createId(FileShare.class));
fs.setLabel("test");
fs.setCapacity(102400L);
FileDeviceInputOutput args = new FileDeviceInputOutput();
args.addStoragePool(_pool);
args.setVPool(createVPool());
args.addFSFileObject(fs);
final BiosCommandResult result = _isi.doCreateFS(_device, args);
Assert.assertEquals(Status.error.name(), result.getCommandStatus());
Assert.assertEquals(false, result.getCommandSuccess());
Assert.assertEquals(ServiceCode.ISILON_CONNECTION_ERROR, result.getServiceCoded().getServiceCode());
Assert.assertEquals("Unable to connect to isilon using url https://127.0.0.1:8080/", result.getMessage());
Assert.assertNotNull(result.getServiceCoded());
}
use of com.emc.storageos.volumecontroller.impl.BiosCommandResult in project coprhd-controller by CoprHD.
the class VNXeStorageDevice method doUpdateQuotaDirectory.
@Override
public BiosCommandResult doUpdateQuotaDirectory(StorageSystem storage, FileDeviceInputOutput args, QuotaDirectory qd) throws ControllerException {
BiosCommandResult result = new BiosCommandResult();
ServiceError serviceError = DeviceControllerErrors.vnxe.operationNotSupported("Update Quota Directory", "VNXe");
result = BiosCommandResult.createErrorResult(serviceError);
return result;
}
Aggregations