Search in sources :

Example 1 with HostUpdateParam

use of com.emc.storageos.model.host.HostUpdateParam in project coprhd-controller by CoprHD.

the class AddHostToCluster method doExecute.

@Override
public Task<HostRestRep> doExecute() throws Exception {
    HostUpdateParam hostUpdateParam = new HostUpdateParam();
    hostUpdateParam.setCluster(cluster);
    Task<HostRestRep> task = getClient().hosts().update(host, hostUpdateParam);
    return task;
}
Also used : HostRestRep(com.emc.storageos.model.host.HostRestRep) HostUpdateParam(com.emc.storageos.model.host.HostUpdateParam)

Example 2 with HostUpdateParam

use of com.emc.storageos.model.host.HostUpdateParam in project coprhd-controller by CoprHD.

the class SetBootVolume method executeTask.

@Override
public Task<HostRestRep> executeTask() throws Exception {
    HostUpdateParam update = new HostUpdateParam();
    update.setBootVolume(volumeId);
    update.setUpdateSanBootTargets(updateSanBootTargets);
    Task<HostRestRep> task = getClient().hosts().updateBootVolume(hostId, update);
    addOrderIdTag(task.getTaskResource().getId());
    return task;
}
Also used : HostRestRep(com.emc.storageos.model.host.HostRestRep) HostUpdateParam(com.emc.storageos.model.host.HostUpdateParam)

Example 3 with HostUpdateParam

use of com.emc.storageos.model.host.HostUpdateParam in project coprhd-controller by CoprHD.

the class HostClusters method removeHosts.

@FlashException(referrer = { "editHosts" })
public static void removeHosts(String clusterId, @As(",") String[] ids) {
    if (ids != null && ids.length > 0) {
        for (String hostId : ids) {
            HostUpdateParam hostUpdateParam = new HostUpdateParam();
            hostUpdateParam.setCluster(uri("null"));
            HostUtils.updateHost(uri(hostId), hostUpdateParam, false);
        }
        flash.success(MessagesUtils.get(REMOVED_HOSTS));
    }
    editHosts(clusterId);
}
Also used : HostUpdateParam(com.emc.storageos.model.host.HostUpdateParam) FlashException(controllers.util.FlashException)

Example 4 with HostUpdateParam

use of com.emc.storageos.model.host.HostUpdateParam in project coprhd-controller by CoprHD.

the class RemoveHostFromCluster method doExecute.

@Override
public Task<HostRestRep> doExecute() throws Exception {
    HostUpdateParam hostUpdateParam = new HostUpdateParam();
    hostUpdateParam.setCluster(uri("null"));
    Task<HostRestRep> task = getClient().hosts().update(host, hostUpdateParam);
    return task;
}
Also used : HostRestRep(com.emc.storageos.model.host.HostRestRep) HostUpdateParam(com.emc.storageos.model.host.HostUpdateParam)

Example 5 with HostUpdateParam

use of com.emc.storageos.model.host.HostUpdateParam in project coprhd-controller by CoprHD.

the class DiscoverHost method executeTask.

@Override
public Task<HostRestRep> executeTask() throws Exception {
    HostUpdateParam param = new HostUpdateParam();
    param.setDiscoverable(true);
    Task<HostRestRep> task = getClient().hosts().update(hostId, param);
    addOrderIdTag(task.getTaskResource().getId());
    return task;
}
Also used : HostRestRep(com.emc.storageos.model.host.HostRestRep) HostUpdateParam(com.emc.storageos.model.host.HostUpdateParam)

Aggregations

HostUpdateParam (com.emc.storageos.model.host.HostUpdateParam)7 HostRestRep (com.emc.storageos.model.host.HostRestRep)4 FlashException (controllers.util.FlashException)2