Search in sources :

Example 31 with FlashException

use of controllers.util.FlashException in project coprhd-controller by CoprHD.

the class Orders method rollbackTask.

@FlashException(referrer = { "receiptContent" })
public static void rollbackTask(String orderId, String taskId) {
    if (StringUtils.isNotBlank(taskId)) {
        ViPRCoreClient client = BourneUtil.getViprClient();
        client.tasks().rollback(uri(taskId));
        flash.put("info", MessagesUtils.get("resources.tasks.rollbackMessage", taskId));
    }
    receipt(orderId);
}
Also used : ViPRCoreClient(com.emc.vipr.client.ViPRCoreClient) FlashException(controllers.util.FlashException)

Example 32 with FlashException

use of controllers.util.FlashException in project coprhd-controller by CoprHD.

the class ScheduledOrders method edit.

@FlashException("list")
public static void edit(String id) {
    OrderDetails details = new OrderDetails(id);
    details.catalogService = CatalogServiceUtils.getCatalogService(details.order.getCatalogService());
    ScheduleEventForm scheduleEventForm = new ScheduleEventForm(details);
    angularRenderArgs().put("scheduler", scheduleEventForm);
    render(scheduleEventForm, details);
}
Also used : OrderDetails(controllers.catalog.Orders.OrderDetails) FlashException(controllers.util.FlashException)

Example 33 with FlashException

use of controllers.util.FlashException in project coprhd-controller by CoprHD.

the class BlockVolumes method deleteContinuousCopy.

@FlashException(referrer = { "volume" })
public static void deleteContinuousCopy(String volumeId, String continuousCopyId) {
    if (StringUtils.isNotBlank(volumeId) && StringUtils.isNotBlank(continuousCopyId)) {
        ViPRCoreClient client = BourneUtil.getViprClient();
        CopiesParam input = createCopiesParam(continuousCopyId);
        Tasks<VolumeRestRep> tasks = client.blockVolumes().deactivateContinuousCopies(uri(volumeId), input, VolumeDeleteTypeEnum.FULL);
        flash.put("info", MessagesUtils.get("resources.continuouscopy.deactivate"));
    }
    volume(volumeId, continuousCopyId);
}
Also used : ViPRCoreClient(com.emc.vipr.client.ViPRCoreClient) CopiesParam(com.emc.storageos.model.block.CopiesParam) VolumeRestRep(com.emc.storageos.model.block.VolumeRestRep) FlashException(controllers.util.FlashException)

Example 34 with FlashException

use of controllers.util.FlashException in project coprhd-controller by CoprHD.

the class BlockVolumes method pauseMigration.

@FlashException(referrer = { "volume" })
public static void pauseMigration(String volumeId, String migrationId) {
    if (StringUtils.isNotBlank(volumeId) && StringUtils.isNotBlank(migrationId)) {
        ViPRCoreClient client = BourneUtil.getViprClient();
        client.blockMigrations().pause(uri(migrationId));
        flash.put("info", MessagesUtils.get("resources.migrations.pause"));
    }
    volume(volumeId, null);
}
Also used : ViPRCoreClient(com.emc.vipr.client.ViPRCoreClient) FlashException(controllers.util.FlashException)

Example 35 with FlashException

use of controllers.util.FlashException in project coprhd-controller by CoprHD.

the class BlockVolumes method pauseContinuousCopy.

@FlashException(referrer = { "volume" })
public static void pauseContinuousCopy(String volumeId, String continuousCopyId) {
    if (StringUtils.isNotBlank(volumeId) && StringUtils.isNotBlank(continuousCopyId)) {
        ViPRCoreClient client = BourneUtil.getViprClient();
        CopiesParam input = createCopiesParam(continuousCopyId);
        Tasks<VolumeRestRep> tasks = client.blockVolumes().pauseContinuousCopies(uri(volumeId), input);
        flash.put("info", MessagesUtils.get("resources.continuouscopy.pause"));
    }
    volume(volumeId, null);
}
Also used : ViPRCoreClient(com.emc.vipr.client.ViPRCoreClient) CopiesParam(com.emc.storageos.model.block.CopiesParam) VolumeRestRep(com.emc.storageos.model.block.VolumeRestRep) FlashException(controllers.util.FlashException)

Aggregations

FlashException (controllers.util.FlashException)122 ViPRCoreClient (com.emc.vipr.client.ViPRCoreClient)45 ExportGroupRestRep (com.emc.storageos.model.block.export.ExportGroupRestRep)9 VirtualArrayRestRep (com.emc.storageos.model.varray.VirtualArrayRestRep)9 URI (java.net.URI)9 ExportUpdateParam (com.emc.storageos.model.block.export.ExportUpdateParam)8 Restrictions (controllers.deadbolt.Restrictions)8 ArrayList (java.util.ArrayList)7 FilePolicyRestRep (com.emc.storageos.model.file.policy.FilePolicyRestRep)6 VolumeRestRep (com.emc.storageos.model.block.VolumeRestRep)5 CopiesParam (com.emc.storageos.model.block.CopiesParam)4 SiteRestRep (com.emc.storageos.model.dr.SiteRestRep)4 ExportRule (com.emc.storageos.model.file.ExportRule)4 ExportRules (com.emc.storageos.model.file.ExportRules)4 FileShareRestRep (com.emc.storageos.model.file.FileShareRestRep)4 ProjectRestRep (com.emc.storageos.model.project.ProjectRestRep)4 ServiceErrorException (com.emc.vipr.client.exceptions.ServiceErrorException)4 JsonArray (com.google.gson.JsonArray)3 JsonObject (com.google.gson.JsonObject)3 TaskResourceRep (com.emc.storageos.model.TaskResourceRep)2