use of com.emc.storageos.volumecontroller.impl.BiosCommandResult in project coprhd-controller by CoprHD.
the class VNXUnityFileStorageDevice method doModifyFS.
@Override
public BiosCommandResult doModifyFS(StorageSystem storage, FileDeviceInputOutput fd) throws ControllerException {
BiosCommandResult result = new BiosCommandResult();
result.setCommandSuccess(false);
result.setCommandStatus(Operation.Status.error.name());
result.setMessage("Modify FS NOT supported for VNXe.");
return result;
}
use of com.emc.storageos.volumecontroller.impl.BiosCommandResult in project coprhd-controller by CoprHD.
the class DataDomainFileStorageDevice method doUpdateQuotaDirectory.
@Override
public BiosCommandResult doUpdateQuotaDirectory(StorageSystem storage, FileDeviceInputOutput args, QuotaDirectory qd) throws ControllerException {
BiosCommandResult result = new BiosCommandResult();
ServiceError serviceError = DeviceControllerErrors.datadomain.operationNotSupported();
result = BiosCommandResult.createErrorResult(serviceError);
return result;
}
use of com.emc.storageos.volumecontroller.impl.BiosCommandResult in project coprhd-controller by CoprHD.
the class DataDomainFileStorageDevice method doCreateQuotaDirectory.
@Override
public BiosCommandResult doCreateQuotaDirectory(StorageSystem storage, FileDeviceInputOutput args, QuotaDirectory qd) throws ControllerException {
BiosCommandResult result = new BiosCommandResult();
ServiceError serviceError = DeviceControllerErrors.datadomain.operationNotSupported();
result = BiosCommandResult.createErrorResult(serviceError);
return result;
}
use of com.emc.storageos.volumecontroller.impl.BiosCommandResult in project coprhd-controller by CoprHD.
the class DataDomainFileStorageDevice method doCreateFS.
@Override
public BiosCommandResult doCreateFS(StorageSystem storage, FileDeviceInputOutput args) throws ControllerException {
_log.info("DataDomainFileStorageDevice doCreateFS {} with name {} - start", args.getFsId(), args.getFsName());
// TODO
try {
_log.info("DataDomainFileStorageDevice doCreateFS {} with name {} - start", args.getFsId(), args.getFsName());
DataDomainClient ddclient = getDataDomainClient(storage);
if (ddclient == null) {
_log.error("doCreateFS failed, provider unreachable");
String op = "FS create";
return BiosCommandResult.createErrorResult(DeviceControllerErrors.datadomain.operationFailedProviderInaccessible(op));
}
// Update path and mountPath
// TODO: try to mount export
String path = args.getFsName();
String mountPath;
if (!path.startsWith(DataDomainApiConstants.FS_PATH_BASE)) {
mountPath = DataDomainApiConstants.FS_PATH_BASE + path;
} else {
mountPath = path;
}
_log.info("Mount path to mount the DataDomain File System {}", mountPath);
args.setFsMountPath(mountPath);
args.setFsPath(mountPath);
// Create MTree
// Data Domain expects capacity in Bytes
Long mtreeCapacity = args.getFsCapacity();
// TODO: Following two values are hard-coded for now, until they are implemented in UI
Boolean enableRetention = false;
String retentionMode = "compliance";
DDMTreeInfo ddMtreeInfo = ddclient.createMTree(args.getStoragePool().getNativeId(), mountPath, mtreeCapacity, enableRetention, retentionMode);
args.setFsNativeId(ddMtreeInfo.getId());
String serialNumber = storage.getSerialNumber();
if (serialNumber == null) {
serialNumber = storage.getModel();
}
String fsNativeGuid = NativeGUIDGenerator.generateNativeGuid(storage.getSystemType(), serialNumber.toUpperCase(), ddMtreeInfo.getId());
args.setFsNativeGuid(fsNativeGuid);
args.setNewFSCapacity(args.getFsCapacity());
if (args.getFsExtensions() == null) {
args.initFsExtensions();
}
args.getFsExtensions().put(DataDomainApiConstants.TOTAL_PHYSICAL_CAPACITY, String.valueOf(args.getFsCapacity()));
_log.info("DataDomainFileStorageDevice doCreateFS {} - complete", args.getFsId());
return BiosCommandResult.createSuccessfulResult();
} catch (DataDomainApiException e) {
_log.error("doCreateFS failed, device error...attempting to delete FS to rollback.", e);
// rollback this operation to prevent partial result of file share create
BiosCommandResult rollbackResult = doDeleteFS(storage, args);
if (rollbackResult.isCommandSuccess()) {
_log.info("DataDomainFileStorageDevice doCreateFS {} - rollback completed.", args.getFsId());
} else {
_log.error("DataDomainFileStorageDevice doCreateFS {} - rollback failed, message: {} .", args.getFsId(), rollbackResult.getMessage());
}
return BiosCommandResult.createErrorResult(e);
}
}
use of com.emc.storageos.volumecontroller.impl.BiosCommandResult in project coprhd-controller by CoprHD.
the class DataDomainFileStorageDevice method doDeleteQuotaDirectory.
@Override
public BiosCommandResult doDeleteQuotaDirectory(StorageSystem storage, FileDeviceInputOutput args) throws ControllerException {
BiosCommandResult result = new BiosCommandResult();
ServiceError serviceError = DeviceControllerErrors.datadomain.operationNotSupported();
result = BiosCommandResult.createErrorResult(serviceError);
return result;
}
Aggregations