use of com.emc.storageos.isilon.restapi.IsilonSshApi in project coprhd-controller by CoprHD.
the class IsilonFileStorageDevice method getIsilonDeviceSsh.
/**
* Get isilon device represented by the StorageDevice
*
* @param StorageSystem
* object
* @return IsilonSshApi object
*/
IsilonSshApi getIsilonDeviceSsh(StorageSystem device) throws IsilonException {
IsilonSshApi sshDmApi = new IsilonSshApi();
sshDmApi.setConnParams(device.getIpAddress(), device.getUsername(), device.getPassword());
return sshDmApi;
}
use of com.emc.storageos.isilon.restapi.IsilonSshApi in project coprhd-controller by CoprHD.
the class IsilonCommunicationInterface method discoverNetworkPools.
/**
* discover the network interface of given Isilon storage cluster
*
* @param storageSystem
* @return
* @throws IsilonCollectionException
*/
private List<IsilonNetworkPool> discoverNetworkPools(StorageSystem storageSystem) throws IsilonCollectionException {
List<IsilonNetworkPool> isilonNetworkPoolList = new ArrayList<IsilonNetworkPool>();
URI storageSystemId = storageSystem.getId();
_log.info("discoverNetworkPools for storage system {} - start", storageSystemId);
List<IsilonNetworkPool> isilonNetworkPoolsTemp = null;
try {
if (VersionChecker.verifyVersionDetails(ONEFS_V8, storageSystem.getFirmwareVersion()) >= 0) {
_log.info("Isilon release version {} and storagesystem label {}", storageSystem.getFirmwareVersion(), storageSystem.getLabel());
IsilonApi isilonApi = getIsilonDevice(storageSystem);
isilonNetworkPoolsTemp = isilonApi.getNetworkPools(null);
if (isilonNetworkPoolsTemp != null) {
isilonNetworkPoolList.addAll(isilonNetworkPoolsTemp);
}
} else {
IsilonSshApi sshDmApi = new IsilonSshApi();
sshDmApi.setConnParams(storageSystem.getIpAddress(), storageSystem.getUsername(), storageSystem.getPassword());
Map<String, List<String>> networkPools = sshDmApi.getNetworkPools();
List<String> smartconnects = null;
IsilonNetworkPool isiNetworkPool = null;
for (Map.Entry<String, List<String>> networkpool : networkPools.entrySet()) {
smartconnects = networkpool.getValue();
if (smartconnects != null) {
for (String smartconnect : smartconnects) {
isiNetworkPool = new IsilonNetworkPool();
isiNetworkPool.setAccess_zone(networkpool.getKey());
isiNetworkPool.setSc_dns_zone(smartconnect);
isilonNetworkPoolList.add(isiNetworkPool);
}
}
}
}
} catch (Exception e) {
_log.error("discover of NetworkPools is failed. %s", e.getMessage());
}
return isilonNetworkPoolList;
}
Aggregations