Search in sources :

Example 16 with RepositoryInfo

use of com.emc.storageos.coordinator.client.model.RepositoryInfo in project coprhd-controller by CoprHD.

the class CoordinatorClientImpl method getControlNodesState.

@Override
public ClusterInfo.ClusterState getControlNodesState(String siteId) {
    try {
        // get target repository and configVersion
        final RepositoryInfo targetRepository = getTargetInfo(RepositoryInfo.class);
        final PropertyInfoRestRep targetProperty = getTargetInfo(PropertyInfoExt.class);
        final PowerOffState targetPowerOffState = getTargetInfo(PowerOffState.class);
        final StorageDriversInfo targetDrivers = getTargetInfo(StorageDriversInfo.class);
        // get control nodes' repository and configVersion info
        final Map<Service, RepositoryInfo> controlNodesInfo = getAllNodeInfos(RepositoryInfo.class, CONTROL_NODE_SYSSVC_ID_PATTERN, siteId);
        final Map<Service, ConfigVersion> controlNodesConfigVersions = getAllNodeInfos(ConfigVersion.class, CONTROL_NODE_SYSSVC_ID_PATTERN, siteId);
        final Map<Service, VdcConfigVersion> controlNodesVdcConfigVersions = getAllNodeInfos(VdcConfigVersion.class, CONTROL_NODE_SYSSVC_ID_PATTERN, siteId);
        final Map<Service, StorageDriversInfo> controlNodesDrivers = getAllNodeInfos(StorageDriversInfo.class, CONTROL_NODE_SYSSVC_ID_PATTERN, siteId);
        return getControlNodesState(targetRepository, controlNodesInfo, targetProperty, controlNodesConfigVersions, controlNodesVdcConfigVersions, targetPowerOffState, targetDrivers, controlNodesDrivers, siteId);
    } catch (Exception e) {
        log.info("Fail to get the control node information ", e);
        return ClusterInfo.ClusterState.UNKNOWN;
    }
}
Also used : PropertyInfoRestRep(com.emc.storageos.model.property.PropertyInfoRestRep) RepositoryInfo(com.emc.storageos.coordinator.client.model.RepositoryInfo) VdcConfigVersion(com.emc.storageos.coordinator.client.model.VdcConfigVersion) ConfigVersion(com.emc.storageos.coordinator.client.model.ConfigVersion) Service(com.emc.storageos.coordinator.common.Service) ExecutorService(java.util.concurrent.ExecutorService) StorageDriversInfo(com.emc.storageos.coordinator.client.model.StorageDriversInfo) VdcConfigVersion(com.emc.storageos.coordinator.client.model.VdcConfigVersion) PowerOffState(com.emc.storageos.coordinator.client.model.PowerOffState) CoordinatorException(com.emc.storageos.coordinator.exceptions.CoordinatorException) RetryableCoordinatorException(com.emc.storageos.coordinator.exceptions.RetryableCoordinatorException) KeeperException(org.apache.zookeeper.KeeperException) IOException(java.io.IOException) UnknownHostException(java.net.UnknownHostException)

Example 17 with RepositoryInfo

use of com.emc.storageos.coordinator.client.model.RepositoryInfo in project coprhd-controller by CoprHD.

the class BackupOps method getCurrentVersion.

private String getCurrentVersion() throws Exception {
    RepositoryInfo info = coordinatorClient.getTargetInfo(RepositoryInfo.class);
    String version = info.getCurrentVersion().toString();
    log.info("Current ViPR version: {}", version);
    return version;
}
Also used : RepositoryInfo(com.emc.storageos.coordinator.client.model.RepositoryInfo)

Aggregations

RepositoryInfo (com.emc.storageos.coordinator.client.model.RepositoryInfo)17 SoftwareVersion (com.emc.storageos.coordinator.client.model.SoftwareVersion)10 CoordinatorClientException (com.emc.storageos.systemservices.exceptions.CoordinatorClientException)6 ClusterInfo (com.emc.vipr.model.sys.ClusterInfo)6 IOException (java.io.IOException)6 CheckPermission (com.emc.storageos.security.authorization.CheckPermission)5 APIException (com.emc.storageos.svcs.errorhandling.resources.APIException)5 Service (com.emc.storageos.coordinator.common.Service)4 InvalidSoftwareVersionException (com.emc.storageos.coordinator.exceptions.InvalidSoftwareVersionException)4 ServiceUnavailableException (com.emc.storageos.svcs.errorhandling.resources.ServiceUnavailableException)4 LocalRepositoryException (com.emc.storageos.systemservices.exceptions.LocalRepositoryException)4 RemoteRepositoryException (com.emc.storageos.systemservices.exceptions.RemoteRepositoryException)4 CoordinatorClient (com.emc.storageos.coordinator.client.service.CoordinatorClient)3 ArrayList (java.util.ArrayList)3 Path (javax.ws.rs.Path)3 Test (org.junit.Test)3 ConfigVersion (com.emc.storageos.coordinator.client.model.ConfigVersion)2 CoordinatorException (com.emc.storageos.coordinator.exceptions.CoordinatorException)2 PropertyInfoRestRep (com.emc.storageos.model.property.PropertyInfoRestRep)2 LocalRepository (com.emc.storageos.systemservices.impl.upgrade.LocalRepository)2