use of com.emc.storageos.vnxe.requests.CifsShareRequests in project coprhd-controller by CoprHD.
the class VNXeApiClient method getCifsSharesForFileSystem.
/**
* Find cifsShares for filesystem Id
*
* @param fsId
* file system Id
* @return list of cifsShare
*/
public List<VNXeCifsShare> getCifsSharesForFileSystem(String fsId) {
_logger.info("finding cifsShares for filesystem id: {} ", fsId);
CifsShareRequests req = new CifsShareRequests(_khClient);
List<VNXeCifsShare> shares = req.getSharesForFileSystem(fsId);
return shares;
}
use of com.emc.storageos.vnxe.requests.CifsShareRequests in project coprhd-controller by CoprHD.
the class VNXeApiClient method findCifsShareByName.
/**
* find CIFS share by its name
*
* @param shareName
* CIFS share name
* @return
*/
public VNXeCifsShare findCifsShareByName(String shareName) {
CifsShareRequests req = new CifsShareRequests(_khClient);
List<VNXeCifsShare> shares = req.getCifsShareByName(shareName);
if (shares != null && !shares.isEmpty()) {
return shares.get(0);
} else {
return null;
}
}
use of com.emc.storageos.vnxe.requests.CifsShareRequests in project coprhd-controller by CoprHD.
the class VNXeApiClient method createCifsShareForSnap.
/**
* Create CIFS share for snapshot
*
* @param snapId
* snapshot id
* @param shareName
* CIFS share name
* @param permission
* READ, CHANGE, FULL
* @return VNXeCommandJob
* @throws VNXeException
*/
public VNXeCommandJob createCifsShareForSnap(String snapId, String shareName, String permission, String path, String fsId) throws VNXeException {
_logger.info("Creating CIFS snapshot share name: {} for path: {}", shareName, path);
// to get NETBIOS of CIFS Server file system is used as for snapshot
FileSystemRequest fsRequest = new FileSystemRequest(_khClient, fsId);
VNXeFileSystem fs = fsRequest.get();
List<VNXeCifsServer> cifsServers = getCifsServers(fs.getNasServer().getId());
netBios = cifsServers.get(0).getNetbiosName();
CifsShareRequests req = new CifsShareRequests(_khClient);
CifsShareCreateForSnapParam param = new CifsShareCreateForSnapParam();
param.setPath(path);
VNXeBase snap = new VNXeBase();
snap.setId(snapId);
if (!VNXeUtils.isHigherVersion(getBasicSystemInfo().getSoftwareVersion(), VNXeConstants.VNXE_BASE_SOFT_VER)) {
param.setFilesystemSnap(snap);
} else {
param.setSnap(snap);
}
param.setName(shareName);
if (permission != null && !permission.isEmpty() && permission.equalsIgnoreCase(AccessEnum.READ.name())) {
param.setIsReadOnly(true);
} else {
param.setIsReadOnly(false);
}
return req.createShareForSnapshot(param);
}
use of com.emc.storageos.vnxe.requests.CifsShareRequests in project coprhd-controller by CoprHD.
the class VNXeApiClient method getCifsSharesForSnap.
/**
* Find cifsShares for snapshot Id
*
* @param snapId
* file system snapshot Id
* @return list of cifsShare
*/
public List<VNXeCifsShare> getCifsSharesForSnap(String snapId) {
_logger.info("finding cifsShares for snap id: {} ", snapId);
CifsShareRequests req = new CifsShareRequests(_khClient);
List<VNXeCifsShare> shares = req.getSharesForFileSystemSnap(snapId);
return shares;
}
Aggregations