use of com.iwave.ext.netapp.NetAppFacade in project coprhd-controller by CoprHD.
the class NetAppApi method modifyShare.
public Boolean modifyShare(String mntpath, String shareName, String comment, int maxusers, String permission, String forcegroup) throws NetAppException {
try {
netAppFacade = new NetAppFacade(_ipAddress, _portNumber, _userName, _password, _https, _vFilerName);
CifsAcl acl = new CifsAcl();
acl.setShareName(shareName);
acl.setAccess(CifsAccess.valueOfAccess(cifsPermissionMap.get(permission)));
acl.setUserName(CIFS_DEFAULT_GROUP);
netAppFacade.setCIFSAcl(acl);
return true;
} catch (Exception e) {
throw NetAppException.exceptions.modifyShareFailed(_ipAddress, e.getMessage());
}
}
use of com.iwave.ext.netapp.NetAppFacade in project coprhd-controller by CoprHD.
the class NetAppApi method deleteAllQTrees.
public Boolean deleteAllQTrees(String volName) throws NetAppException {
String qtreeName = null;
try {
netAppFacade = new NetAppFacade(_ipAddress, _portNumber, _userName, _password, _https);
List<Qtree> qtrees = netAppFacade.listQtrees(volName);
if (qtrees != null && !qtrees.isEmpty()) {
for (Qtree qtree : qtrees) {
qtreeName = qtree.getQtree();
// Skip the unnamed Qtree.
if (qtreeName != null && !qtreeName.isEmpty()) {
deleteQtree(qtreeName, volName, _vFilerName);
}
}
}
return true;
} catch (Exception e) {
_logger.error("Deleting the qtree {} of filesystem {} failed ", qtreeName, volName);
throw NetAppException.exceptions.deleteQtreeFailed(qtreeName, e.getMessage());
}
}
use of com.iwave.ext.netapp.NetAppFacade in project coprhd-controller by CoprHD.
the class NetAppApi method setVolumeSize.
public Boolean setVolumeSize(String volume, String newSize) throws NetAppException {
try {
netAppFacade = new NetAppFacade(_ipAddress, _portNumber, _userName, _password, _https);
String cmdResult = netAppFacade.setVolumeSize(volume, newSize);
// Return value is a empty string if the operation is not success
if (cmdResult == null || cmdResult.equalsIgnoreCase("")) {
return false;
} else {
return true;
}
} catch (Exception e) {
throw NetAppException.exceptions.setVolumeSizeFailed(volume, newSize);
}
}
use of com.iwave.ext.netapp.NetAppFacade in project coprhd-controller by CoprHD.
the class NetAppApi method setQtreemode.
public void setQtreemode(String volPath, String mode) throws NetAppException {
try {
netAppFacade = new NetAppFacade(_ipAddress, _portNumber, _userName, _password, _https, _vFilerName);
netAppFacade.setQTreeSecurityStyle(volPath, mode);
} catch (Exception e) {
throw NetAppException.exceptions.setVolumeQtreeModeFailed(volPath, mode);
}
}
use of com.iwave.ext.netapp.NetAppFacade in project coprhd-controller by CoprHD.
the class NetAppApi method modifyShare.
public void modifyShare(String shareName, Map<String, String> attrs) throws NetAppException {
try {
netAppFacade = new NetAppFacade(_ipAddress, _portNumber, _userName, _password, _https);
netAppFacade.changeCIFSShare(shareName, attrs);
} catch (Exception e) {
throw NetAppException.exceptions.modifyShareNameFailed(shareName, _ipAddress, e.getMessage());
}
}
Aggregations