use of com.iwave.ext.netappc.NetAppClusterFacade in project coprhd-controller by CoprHD.
the class NetAppClusterApi method listCIFSShareAcl.
public List<CifsAcl> listCIFSShareAcl(String shareName) {
try {
netAppClusterFacade = new NetAppClusterFacade(_ipAddress, _portNumber, _userName, _password, _https, true, _svmName);
_logger.info("Facade created : {} ", netAppClusterFacade);
List<CifsAcl> oldAcls = netAppClusterFacade.listCIFSAcls(shareName);
return oldAcls;
} catch (Exception e) {
_logger.error("Error Occured {} ", e.getMessage(), e);
throw NetAppCException.exceptions.listCIFSShareAclFailed(shareName, e.getMessage());
}
}
use of com.iwave.ext.netappc.NetAppClusterFacade in project coprhd-controller by CoprHD.
the class NetAppClusterApi method deleteQtree.
public void deleteQtree(String qtreeName, String volumeName, String vfilerName) throws NetAppCException {
try {
netAppClusterFacade = new NetAppClusterFacade(_ipAddress, _portNumber, _userName, _password, _https, true, _svmName);
String qtreePath = constructQtreePath(volumeName, qtreeName);
// Before deleting the qtree, delete the quota associated with the tree.
if (netAppClusterFacade.getTreeQuota(volumeName, qtreePath) != null) {
netAppClusterFacade.deleteTreeQuota(volumeName, qtreePath);
}
// Now delete the qtree.
netAppClusterFacade.deleteQtree(qtreePath, true);
} catch (Exception e) {
throw NetAppCException.exceptions.deleteQtreeFailed(qtreeName, e.getMessage());
}
}
use of com.iwave.ext.netappc.NetAppClusterFacade in project coprhd-controller by CoprHD.
the class NetAppClusterApi method deleteNFS.
public Boolean deleteNFS(String volName) throws NetAppCException {
String exportPath = volName;
try {
netAppClusterFacade = new NetAppClusterFacade(_ipAddress, _portNumber, _userName, _password, _https, true, _svmName);
if (volName != null && !volName.isEmpty() && !volName.startsWith("/")) {
exportPath = "/" + volName;
}
List<ExportsRuleInfo> exportRules = listNFSExportRules(volName);
if (exportRules.isEmpty()) {
_logger.info("Export doesn't exist on the array to delete {}", exportPath);
return true;
}
List<String> deletedPaths = netAppClusterFacade.deleteNFSShare(exportPath, false);
if ((deletedPaths == null) || (1 >= deletedPaths.size())) {
_logger.error("exportPath deletion failed");
return false;
}
return true;
} catch (Exception e) {
throw NetAppCException.exceptions.deleteNFSFailed(volName, _ipAddress, e.getMessage());
}
}
use of com.iwave.ext.netappc.NetAppClusterFacade in project coprhd-controller by CoprHD.
the class NetAppClusterApi method setQtreemode.
public void setQtreemode(String volPath, String mode) throws NetAppCException {
try {
netAppClusterFacade = new NetAppClusterFacade(_ipAddress, _portNumber, _userName, _password, _https, true, _svmName);
netAppClusterFacade.setQTreeSecurityStyle(volPath, mode);
} catch (Exception e) {
throw NetAppCException.exceptions.setVolumeQtreeModeFailed(volPath, mode);
}
}
use of com.iwave.ext.netappc.NetAppClusterFacade in project coprhd-controller by CoprHD.
the class NetAppClusterApi method addCIFSShareAcl.
public boolean addCIFSShareAcl(String shareName, List<CifsAcl> acls) {
try {
netAppClusterFacade = new NetAppClusterFacade(_ipAddress, _portNumber, _userName, _password, _https, true, _svmName);
_logger.info("Facade created : {} ", netAppClusterFacade);
for (CifsAcl acl : acls) {
acl.setShareName(shareName);
netAppClusterFacade.addCIFSAcl(acl);
}
} catch (Exception e) {
_logger.error("Error Occured {} ", e.getMessage(), e);
throw NetAppCException.exceptions.addCifsShareAclFailed(shareName, e.getMessage());
}
return true;
}
Aggregations