Search in sources :

Example 21 with ClusterInfo

use of com.emc.vipr.model.sys.ClusterInfo in project coprhd-controller by CoprHD.

the class ConfigProperties method properties.

public static void properties() {
    ClusterInfo clusterInfo = Common.getClusterInfoWithRoleCheck();
    List<PropertyPage> pages = loadPropertyPages();
    render(pages, clusterInfo);
}
Also used : ClusterInfo(com.emc.vipr.model.sys.ClusterInfo) SecurityPropertyPage(models.properties.SecurityPropertyPage) SupportPropertyPage(models.properties.SupportPropertyPage) NetworkPropertyPage(models.properties.NetworkPropertyPage) PropertyPage(models.properties.PropertyPage) ControllerPropertyPage(models.properties.ControllerPropertyPage) SmtpPropertyPage(models.properties.SmtpPropertyPage) PasswordPropertyPage(models.properties.PasswordPropertyPage) DiscoveryPropertyPage(models.properties.DiscoveryPropertyPage) DefaultPropertyPage(models.properties.DefaultPropertyPage) BackupPropertyPage(models.properties.BackupPropertyPage) UpgradePropertyPage(models.properties.UpgradePropertyPage)

Example 22 with ClusterInfo

use of com.emc.vipr.model.sys.ClusterInfo in project coprhd-controller by CoprHD.

the class Upgrade method clusterStatus.

public static void clusterStatus() {
    ClusterInfo clusterInfo = getSysClient().upgrade().getClusterInfo();
    Collection<String> repositoryVersions = clusterInfo.getTargetState().getAvailable();
    Collection<String> newVersions = clusterInfo.getNewVersions() == null ? Collections.<String>emptyList() : clusterInfo.getNewVersions();
    String clusterState = calculateClusterState(clusterInfo);
    boolean isStable = clusterState.equalsIgnoreCase(ClusterInfo.ClusterState.STABLE.toString());
    boolean isWorking = !isStable && !clusterState.equalsIgnoreCase(ClusterInfo.ClusterState.UNKNOWN.toString());
    boolean isDownloading = clusterState.equals(DOWNLOADING_CLUSTER_STATE) || isStandbySiteDownloading();
    DbConsistencyStatusRestRep checkDbState = getSysClient().upgrade().getDbCheckState();
    String isDbCheckStatus = checkDbState.getStatus().toString();
    int checkProgress = checkDbState.getProgress();
    Map<String, Map<String, DownloadStatus>> downloadStatus = Maps.newLinkedHashMap();
    if (isDownloading) {
        SiteRestRep activeSite = DisasterRecoveryUtils.getActiveSite();
        DownloadProgress downloadProgress = getSysClient().upgrade().getDownloadProgress();
        downloadStatus.put(activeSite.getName(), calculateDownloadStatus(downloadProgress));
        for (SiteRestRep standby : DisasterRecoveryUtils.getStandbySites()) {
            downloadProgress = getSysClient().upgrade().getDownloadProgress(standby.getUuid());
            downloadStatus.put(standby.getName(), calculateDownloadStatus(downloadProgress));
        }
    }
    render(clusterInfo, clusterState, newVersions, repositoryVersions, isStable, isWorking, isDownloading, downloadStatus, checkProgress, isDbCheckStatus);
}
Also used : DbConsistencyStatusRestRep(com.emc.storageos.model.db.DbConsistencyStatusRestRep) ClusterInfo(com.emc.vipr.model.sys.ClusterInfo) SiteRestRep(com.emc.storageos.model.dr.SiteRestRep) DownloadProgress(com.emc.vipr.model.sys.DownloadProgress) Map(java.util.Map)

Example 23 with ClusterInfo

use of com.emc.vipr.model.sys.ClusterInfo in project coprhd-controller by CoprHD.

the class Upgrade method checkDbStatus.

/*
     * Method to trigger Database consistency check
     */
public static void checkDbStatus() {
    ClusterInfo clusterInfo = getSysClient().upgrade().getClusterInfo();
    String clusterState = calculateClusterState(clusterInfo);
    try {
        BourneUtil.getSysClient().upgrade().triggerDbCheck();
    } catch (Exception e) {
        Logger.error(e, "Checking Database Consistency");
        flash.error(MessagesUtils.escape(e.getMessage()));
    }
    render(clusterInfo, clusterState);
}
Also used : ClusterInfo(com.emc.vipr.model.sys.ClusterInfo)

Example 24 with ClusterInfo

use of com.emc.vipr.model.sys.ClusterInfo in project coprhd-controller by CoprHD.

the class Upgrade method statusChanged.

/**
 * Allows the UI to ping the backend so that it knows when the upgrade is complete
 */
public static void statusChanged(String currentStatus) {
    ClusterInfo clusterInfo = getSysClient().upgrade().getClusterInfo();
    String clusterState = calculateClusterState(clusterInfo);
    // don't go back to the index page until download is complete on all sites
    if (currentStatus.equals(DOWNLOADING_CLUSTER_STATE)) {
        renderJSON(!clusterState.equals(currentStatus) && !isStandbySiteDownloading());
    } else {
        boolean statusChanged = !clusterState.equals(currentStatus);
        renderJSON(statusChanged);
    }
}
Also used : ClusterInfo(com.emc.vipr.model.sys.ClusterInfo)

Aggregations

ClusterInfo (com.emc.vipr.model.sys.ClusterInfo)24 RepositoryInfo (com.emc.storageos.coordinator.client.model.RepositoryInfo)7 APIException (com.emc.storageos.svcs.errorhandling.resources.APIException)7 CoordinatorClientException (com.emc.storageos.systemservices.exceptions.CoordinatorClientException)7 IOException (java.io.IOException)7 Path (javax.ws.rs.Path)7 SoftwareVersion (com.emc.storageos.coordinator.client.model.SoftwareVersion)5 InvalidSoftwareVersionException (com.emc.storageos.coordinator.exceptions.InvalidSoftwareVersionException)5 CheckPermission (com.emc.storageos.security.authorization.CheckPermission)5 ServiceUnavailableException (com.emc.storageos.svcs.errorhandling.resources.ServiceUnavailableException)5 LocalRepositoryException (com.emc.storageos.systemservices.exceptions.LocalRepositoryException)5 RemoteRepositoryException (com.emc.storageos.systemservices.exceptions.RemoteRepositoryException)5 ArrayList (java.util.ArrayList)4 POST (javax.ws.rs.POST)4 ViPRSystemClient (com.emc.vipr.client.ViPRSystemClient)3 RecoveryStatus (com.emc.vipr.model.sys.recovery.RecoveryStatus)3 Map (java.util.Map)3 Produces (javax.ws.rs.Produces)3 Service (com.emc.storageos.coordinator.common.Service)2 CoordinatorException (com.emc.storageos.coordinator.exceptions.CoordinatorException)2