use of com.iwave.ext.netappc.NetAppClusterFacade in project coprhd-controller by CoprHD.
the class NetAppClusterApi method systemVer.
public Map<String, String> systemVer() throws NetAppCException {
try {
netAppClusterFacade = new NetAppClusterFacade(_ipAddress, _portNumber, _userName, _password, _https);
Map<String, String> info = netAppClusterFacade.systemVersion();
Map<String, String> versionInfo = new HashMap<String, String>();
String version = info.get("version");
// Sample NetApp Release 8.1.2 7-Mode: Tue Oct 30 19:56:51 PDT 2012
// Sample 8.1.1xsdf
String[] versInfo = version.split(" ");
String[] parseVersion = versInfo[2].split("\\.");
String convertedVers = "";
for (int i = 0; i < parseVersion.length; i++) {
_logger.info(parseVersion[i]);
Number num = NumberFormat.getInstance().parse(parseVersion[i]).intValue();
convertedVers = convertedVers + num.toString() + ".";
}
convertedVers = convertedVers.substring(0, convertedVers.length() - 1);
_logger.info("Converted Version info {}", convertedVers);
versionInfo.put("version", convertedVers);
versionInfo.put("mode", versInfo[3]);
versionInfo.put("is-clustered", info.get("is-clustered"));
return versionInfo;
} catch (Exception e) {
throw new NetAppCException("Exception listing the system information on NTAP array " + e.getMessage());
}
}
use of com.iwave.ext.netappc.NetAppClusterFacade in project coprhd-controller by CoprHD.
the class NetAppClusterApi method deleteShare.
public boolean deleteShare(String shareName) throws NetAppCException {
try {
netAppClusterFacade = new NetAppClusterFacade(_ipAddress, _portNumber, _userName, _password, _https, true, _svmName);
netAppClusterFacade.deleteCIFSShare(shareName);
return true;
} catch (Exception e) {
throw NetAppCException.exceptions.deleteShareFailed(_ipAddress, e.getMessage());
}
}
Aggregations