use of com.iwave.ext.netappc.NetAppClusterFacade in project coprhd-controller by CoprHD.
the class NetAppClusterApi method deleteNFSShare.
public Boolean deleteNFSShare(String fsName, String qtreeName, ExportRule oldRule, String mountPath) throws NetAppCException {
try {
netAppClusterFacade = new NetAppClusterFacade(_ipAddress, _portNumber, _userName, _password, _https, true, _svmName);
List<com.iwave.ext.netapp.utils.ExportRule> netAppCompatableRules = new ArrayList<>();
com.iwave.ext.netapp.utils.ExportRule netAppOldRule = new com.iwave.ext.netapp.utils.ExportRule();
copyPropertiesToSave(netAppOldRule, oldRule);
netAppCompatableRules.add(netAppOldRule);
netAppClusterFacade.deleteNFSShare(fsName, qtreeName, netAppOldRule, mountPath);
return true;
} catch (Exception e) {
throw NetAppCException.exceptions.deleteNFSFailed(mountPath, _ipAddress, e.getMessage());
}
}
use of com.iwave.ext.netappc.NetAppClusterFacade in project coprhd-controller by CoprHD.
the class NetAppClusterApi method deleteNFSExport.
public Boolean deleteNFSExport(String exportPath) throws NetAppCException {
try {
netAppClusterFacade = new NetAppClusterFacade(_ipAddress, _portNumber, _userName, _password, _https, true, _svmName);
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(exportPath, _ipAddress, e.getMessage());
}
}
use of com.iwave.ext.netappc.NetAppClusterFacade in project coprhd-controller by CoprHD.
the class NetAppClusterApi method addNFSShare.
public Boolean addNFSShare(String fsName, String qtreeName, String exportPath, ExportRule newRule) throws NetAppCException {
try {
netAppClusterFacade = new NetAppClusterFacade(_ipAddress, _portNumber, _userName, _password, _https, true, _svmName);
_logger.info("NetApp Inputs for modifyNFSShare exportPath: {} ", exportPath);
List<com.iwave.ext.netapp.utils.ExportRule> netAppCompatableRules = new ArrayList<>();
com.iwave.ext.netapp.utils.ExportRule netAppNewRule = new com.iwave.ext.netapp.utils.ExportRule();
copyPropertiesToSave(netAppNewRule, newRule);
netAppCompatableRules.add(netAppNewRule);
netAppClusterFacade.addNFSShare(fsName, qtreeName, exportPath, netAppNewRule);
} catch (Exception e) {
_logger.error("Error Occured {} ", e.getMessage(), e);
throw NetAppCException.exceptions.exportFSFailed(exportPath, exportPath, e.getMessage());
}
return true;
}
use of com.iwave.ext.netappc.NetAppClusterFacade in project coprhd-controller by CoprHD.
the class NetAppClusterApi method listSnapshots.
public List<String> listSnapshots(String volumeName) throws NetAppCException {
List<String> snapshots = null;
try {
netAppClusterFacade = new NetAppClusterFacade(_ipAddress, _portNumber, _userName, _password, _https, true, _svmName);
snapshots = (List<String>) netAppClusterFacade.listSnapshots(volumeName);
} catch (Exception e) {
String[] params = { volumeName, e.getMessage() };
_logger.info("Failed to retrieve list of snapshots for {} due to {}", params);
}
return snapshots;
}
use of com.iwave.ext.netappc.NetAppClusterFacade in project coprhd-controller by CoprHD.
the class NetAppClusterApi method offlineVol.
public Boolean offlineVol(String volName) throws NetAppCException {
try {
netAppClusterFacade = new NetAppClusterFacade(_ipAddress, _portNumber, _userName, _password, _https, true, _svmName);
netAppClusterFacade.setVolumeOffline(volName, 1);
return true;
} catch (Exception e) {
throw NetAppCException.exceptions.deleteFSFailed(volName, _ipAddress, e.getMessage());
}
}
Aggregations