use of com.emc.storageos.isilon.restapi.IsilonClusterConfig in project coprhd-controller by CoprHD.
the class IsilonCommunicationInterface method discoverCluster.
private void discoverCluster(StorageSystem storageSystem) throws IsilonCollectionException {
URI storageSystemId = storageSystem.getId();
try {
_log.info("discoverCluster information for storage system {} - start", storageSystemId);
IsilonApi isilonApi = getIsilonDevice(storageSystem);
IsilonClusterConfig clusterConfig = isilonApi.getClusterConfig();
storageSystem.setSerialNumber(clusterConfig.getGuid());
String nativeGuid = NativeGUIDGenerator.generateNativeGuid(DiscoveredDataObject.Type.isilon.toString(), clusterConfig.getGuid());
storageSystem.setNativeGuid(nativeGuid);
String clusterReleaseVersion = clusterConfig.getOnefs_version_info().getReleaseVersionNumber();
storageSystem.setFirmwareVersion(clusterReleaseVersion);
String minimumSupportedVersion = VersionChecker.getMinimumSupportedVersion(Type.valueOf(storageSystem.getSystemType()));
_log.info("Verifying version details : Minimum Supported Version {} - Discovered Cluster Version {}", minimumSupportedVersion, clusterReleaseVersion);
if (VersionChecker.verifyVersionDetails(minimumSupportedVersion, clusterReleaseVersion) < 0) {
storageSystem.setCompatibilityStatus(DiscoveredDataObject.CompatibilityStatus.INCOMPATIBLE.name());
storageSystem.setReachableStatus(false);
DiscoveryUtils.setSystemResourcesIncompatible(_dbClient, _coordinator, storageSystem.getId());
IsilonCollectionException ice = new IsilonCollectionException(String.format(" ** This version of Isilon firmware is not supported ** Should be a minimum of %s", minimumSupportedVersion));
throw ice;
}
storageSystem.setSupportSoftLimit(false);
storageSystem.setSupportNotificationLimit(false);
// Check license status for smart quota and set the support attributes as true
if (ACTIVATED.equalsIgnoreCase(isilonApi.getLicenseInfo(IsilonLicenseType.SMARTQUOTA)) || EVALUATION.equalsIgnoreCase(isilonApi.getLicenseInfo(IsilonLicenseType.SMARTQUOTA))) {
storageSystem.setSupportSoftLimit(true);
storageSystem.setSupportNotificationLimit(true);
}
storageSystem.setCompatibilityStatus(DiscoveredDataObject.CompatibilityStatus.COMPATIBLE.name());
storageSystem.setReachableStatus(true);
_log.info("discoverCluster information for storage system {} - complete", storageSystemId);
} catch (Exception e) {
storageSystem.setReachableStatus(false);
String errMsg = String.format("discoverCluster failed. %s", e.getMessage());
_log.error(errMsg, e);
IsilonCollectionException ice = new IsilonCollectionException(errMsg);
throw ice;
}
}
use of com.emc.storageos.isilon.restapi.IsilonClusterConfig in project coprhd-controller by CoprHD.
the class IsilonFileStorageDeviceTest method testDiscoverIsilon.
/**
* Tests Isilon discovery
*
* @throws Exception
*/
@Test
public void testDiscoverIsilon() {
try {
IsilonApi isilonApi = _isi.getIsilonDevice(_device);
IsilonClusterConfig clusterConfig = isilonApi.getClusterConfig();
Assert.assertTrue("Isilon discovery failed " + clusterConfig.getGuid(), false);
} catch (IsilonException iex) {
System.out.println("Isilon discovery failed: " + iex.getCause());
}
}
Aggregations