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;
}
Aggregations