Search in sources :

Example 26 with NetAppClusterFacade

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());
    }
}
Also used : HashMap(java.util.HashMap) NetAppClusterFacade(com.iwave.ext.netappc.NetAppClusterFacade)

Example 27 with NetAppClusterFacade

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());
    }
}
Also used : NetAppClusterFacade(com.iwave.ext.netappc.NetAppClusterFacade)

Aggregations

NetAppClusterFacade (com.iwave.ext.netappc.NetAppClusterFacade)27 ArrayList (java.util.ArrayList)6 CifsAcl (com.iwave.ext.netappc.model.CifsAcl)5 ExportRule (com.emc.storageos.model.file.ExportRule)3 HashMap (java.util.HashMap)3 QuotaStatus (com.iwave.ext.netapp.QuotaCommands.QuotaStatus)2 Map (java.util.Map)2 ExportsRuleInfo (com.iwave.ext.netapp.model.ExportsRuleInfo)1 Qtree (com.iwave.ext.netapp.model.Qtree)1 NFSSecurityStyle (com.iwave.ext.netappc.NFSSecurityStyle)1 StorageVirtualMachineInfo (com.iwave.ext.netappc.StorageVirtualMachineInfo)1 List (java.util.List)1