Search in sources :

Example 1 with BlockExportGroupSnapshotsDataTable

use of models.datatable.BlockExportGroupSnapshotsDataTable in project coprhd-controller by CoprHD.

the class BlockExportGroups method exportGroup.

public static void exportGroup(String exportGroupId) {
    ViPRCoreClient client = BourneUtil.getViprClient();
    ExportGroupRestRep exportGroup = null;
    try {
        exportGroup = client.blockExports().get(uri(exportGroupId));
    } catch (ViPRHttpException e) {
        if (e.getHttpCode() == 404) {
            flash.error(MessagesUtils.get(UNKNOWN, exportGroupId));
            exportGroups(null);
        }
        throw e;
    }
    VirtualArrayRestRep virtualArray = null;
    if (exportGroup != null) {
        virtualArray = client.varrays().get(exportGroup.getVirtualArray());
    } else {
        notFound("Export Group " + exportGroupId);
    }
    renderArgs.put("volumeDataTable", new BlockExportGroupVolumesDataTable());
    renderArgs.put("snapshotDataTable", new BlockExportGroupSnapshotsDataTable());
    SimpleHostDataTable hostsDataTable = new SimpleHostDataTable();
    NetworkEndpointDataTable initiatorsDataTable = NetworkEndpointDataTable.createDataTable("FC");
    initiatorsDataTable.alterColumn("portGroup").hidden().setSearchable(false);
    initiatorsDataTable.alterColumn("storageSystem").hidden().setSearchable(false);
    initiatorsDataTable.alterColumn("discovered").hidden().setSearchable(false);
    HostClusterDataTable clustersDataTable = new HostClusterDataTable();
    render(hostsDataTable, initiatorsDataTable, clustersDataTable, exportGroup, virtualArray);
}
Also used : HostClusterDataTable(models.datatable.HostClusterDataTable) ViPRCoreClient(com.emc.vipr.client.ViPRCoreClient) ExportGroupRestRep(com.emc.storageos.model.block.export.ExportGroupRestRep) NetworkEndpointDataTable(models.datatable.NetworkEndpointDataTable) VirtualArrayRestRep(com.emc.storageos.model.varray.VirtualArrayRestRep) BlockExportGroupSnapshotsDataTable(models.datatable.BlockExportGroupSnapshotsDataTable) BlockExportGroupVolumesDataTable(models.datatable.BlockExportGroupVolumesDataTable) SimpleHostDataTable(models.datatable.SimpleHostDataTable) ViPRHttpException(com.emc.vipr.client.exceptions.ViPRHttpException)

Aggregations

ExportGroupRestRep (com.emc.storageos.model.block.export.ExportGroupRestRep)1 VirtualArrayRestRep (com.emc.storageos.model.varray.VirtualArrayRestRep)1 ViPRCoreClient (com.emc.vipr.client.ViPRCoreClient)1 ViPRHttpException (com.emc.vipr.client.exceptions.ViPRHttpException)1 BlockExportGroupSnapshotsDataTable (models.datatable.BlockExportGroupSnapshotsDataTable)1 BlockExportGroupVolumesDataTable (models.datatable.BlockExportGroupVolumesDataTable)1 HostClusterDataTable (models.datatable.HostClusterDataTable)1 NetworkEndpointDataTable (models.datatable.NetworkEndpointDataTable)1 SimpleHostDataTable (models.datatable.SimpleHostDataTable)1