Search in sources :

Example 1 with SimpleHostDataTable

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

the class HostClusters method editHosts.

@FlashException("list")
public static void editHosts(String id) {
    ClusterRestRep cluster = ClusterUtils.getCluster(uri(id));
    if (cluster != null) {
        SimpleHostDataTable dataTable = new SimpleHostDataTable();
        render(dataTable, cluster);
    } else {
        flash.error(MessagesUtils.get(UNKNOWN, id));
        list();
    }
}
Also used : ClusterRestRep(com.emc.storageos.model.host.cluster.ClusterRestRep) SimpleHostDataTable(models.datatable.SimpleHostDataTable) FlashException(controllers.util.FlashException)

Example 2 with SimpleHostDataTable

use of models.datatable.SimpleHostDataTable 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

SimpleHostDataTable (models.datatable.SimpleHostDataTable)2 ExportGroupRestRep (com.emc.storageos.model.block.export.ExportGroupRestRep)1 ClusterRestRep (com.emc.storageos.model.host.cluster.ClusterRestRep)1 VirtualArrayRestRep (com.emc.storageos.model.varray.VirtualArrayRestRep)1 ViPRCoreClient (com.emc.vipr.client.ViPRCoreClient)1 ViPRHttpException (com.emc.vipr.client.exceptions.ViPRHttpException)1 FlashException (controllers.util.FlashException)1 BlockExportGroupSnapshotsDataTable (models.datatable.BlockExportGroupSnapshotsDataTable)1 BlockExportGroupVolumesDataTable (models.datatable.BlockExportGroupVolumesDataTable)1 HostClusterDataTable (models.datatable.HostClusterDataTable)1 NetworkEndpointDataTable (models.datatable.NetworkEndpointDataTable)1