Search in sources :

Example 1 with ProvisionBareMetalHostsParam

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

the class CreateHosts method executeTask.

@Override
public Tasks<HostRestRep> executeTask() throws Exception {
    ProvisionBareMetalHostsParam create = new ProvisionBareMetalHostsParam();
    create.setCluster(cluster);
    create.setComputeVpool(vcp);
    create.setTenant(getOrderTenant());
    create.setVarray(varray);
    for (String hostName : hostNames) {
        if (hostName != null) {
            create.getHostNames().add(hostName);
        }
    }
    Tasks<HostRestRep> tasks = getClient().hosts().provisionBareMetalHosts(create);
    for (Task<HostRestRep> task : tasks.getTasks()) {
        addOrderIdTag(task.getTaskResource().getId());
    }
    return tasks;
}
Also used : HostRestRep(com.emc.storageos.model.host.HostRestRep) ProvisionBareMetalHostsParam(com.emc.storageos.model.host.ProvisionBareMetalHostsParam)

Aggregations

HostRestRep (com.emc.storageos.model.host.HostRestRep)1 ProvisionBareMetalHostsParam (com.emc.storageos.model.host.ProvisionBareMetalHostsParam)1