use of com.emc.storageos.vnxe.models.CifsShareDeleteParam in project coprhd-controller by CoprHD.
the class VNXeApiClient method removeCifsShare.
/**
* Delete cifsShare
*
* @param cifsShareId
* cifsShare Id
* @param fsId
* file system Id
* @return VNXeCommandJob
*/
public VNXeCommandJob removeCifsShare(String cifsShareId, String fsId) {
VNXeCommandJob job = null;
_logger.info("deleting cifs share" + cifsShareId);
FileSystemRequest fsRequest = new FileSystemRequest(_khClient, fsId);
VNXeFileSystem fs = fsRequest.get();
if (fs == null) {
_logger.info("Could not find file system in the vxne");
throw VNXeException.exceptions.vnxeCommandFailed("Could not find file system in the vnxe for: " + fsId);
}
String resourceId = fs.getStorageResource().getId();
ModifyFileSystemParam modifyFSParm = new ModifyFileSystemParam();
// set cifsShare delete parm
CifsShareDeleteParam deleteParam = new CifsShareDeleteParam();
VNXeBase share = new VNXeBase();
share.setId(cifsShareId);
deleteParam.setCifsShare(share);
List<CifsShareDeleteParam> deleteList = new ArrayList<CifsShareDeleteParam>();
deleteList.add(deleteParam);
modifyFSParm.setCifsShareDelete(deleteList);
FileSystemActionRequest req = new FileSystemActionRequest(_khClient);
job = req.modifyFileSystemAsync(modifyFSParm, resourceId);
return job;
}
Aggregations