Search in sources :

Example 21 with SiteRestRep

use of com.emc.storageos.model.dr.SiteRestRep in project coprhd-controller by CoprHD.

the class Upgrade method downloadProgress.

public static void downloadProgress() {
    Map<String, Map<String, DownloadStatus>> siteProgress = Maps.newLinkedHashMap();
    SiteRestRep activeSite = DisasterRecoveryUtils.getActiveSite();
    DownloadProgress downloadProgress = getSysClient().upgrade().getDownloadProgress();
    siteProgress.put(activeSite.getName(), calculateDownloadStatus(downloadProgress));
    for (SiteRestRep standby : DisasterRecoveryUtils.getStandbySites()) {
        downloadProgress = getSysClient().upgrade().getDownloadProgress(standby.getUuid());
        siteProgress.put(standby.getName(), calculateDownloadStatus(downloadProgress));
    }
    renderJSON(siteProgress);
}
Also used : SiteRestRep(com.emc.storageos.model.dr.SiteRestRep) DownloadProgress(com.emc.vipr.model.sys.DownloadProgress) Map(java.util.Map)

Aggregations

SiteRestRep (com.emc.storageos.model.dr.SiteRestRep)21 Restrictions (controllers.deadbolt.Restrictions)7 Test (org.junit.Test)5 FlashException (controllers.util.FlashException)4 ArrayList (java.util.ArrayList)3 Site (com.emc.storageos.coordinator.client.model.Site)2 SiteState (com.emc.storageos.coordinator.client.model.SiteState)2 Configuration (com.emc.storageos.coordinator.common.Configuration)2 SiteAddParam (com.emc.storageos.model.dr.SiteAddParam)2 SiteDetailRestRep (com.emc.storageos.model.dr.SiteDetailRestRep)2 DownloadProgress (com.emc.vipr.model.sys.DownloadProgress)2 Date (java.util.Date)2 Map (java.util.Map)2 Matchers.anyString (org.mockito.Matchers.anyString)2 InternalSiteServiceClient (com.emc.storageos.api.service.impl.resource.utils.InternalSiteServiceClient)1 PropertyInfoExt (com.emc.storageos.coordinator.client.model.PropertyInfoExt)1 SiteInfo (com.emc.storageos.coordinator.client.model.SiteInfo)1 SiteMonitorResult (com.emc.storageos.coordinator.client.model.SiteMonitorResult)1 NetworkHealth (com.emc.storageos.coordinator.client.model.SiteNetworkState.NetworkHealth)1 CoordinatorException (com.emc.storageos.coordinator.exceptions.CoordinatorException)1