});
System.out.printf("Creating vm - vpdcId %s, vpdcName %s, networkName %s, name %s, os %s%n", vpdcId, vpdc.getName(), networkTierName, name, os);
// TODO: determine the sizes available in the VDC, for example there's
// a minimum size of boot disk, and also a preset combination of cpu count vs ram
Task task = api.addVMIntoVDC(billingSiteId, vpdcId, VMSpec.builder().name(name).networkTierName(
networkTierName).operatingSystem(os).memoryInGig(2).addDataDrive("/data01", 25).build());
// make sure there's no error
assert task.getId() != null && task.getError() == null : task;
assert this.taskTester.apply(task.getId());
// fetch the task again, in savvis, task.getOwner is populated with vApp after task has finished
task = restContext.getApi().getBrowsingApi().getTask(task.getId());
vm = restContext.getApi().getBrowsingApi().getVM(task.getOwner().getHref(), GetVMOptions.NONE);
assert vm.getHref() != null : vm;
// cannot ssh in savvis, as no public ip is assigned by default
// conditionallyCheckSSH();
}