resourceSchema.priority =
com.vmware.aurora.interfaces.model.IDatabaseConfig.Priority.Normal;
schema.resourceSchema = resourceSchema;
// prepare disk schema
DiskSchema diskSchema = new DiskSchema();
ArrayList<Disk> disks = new ArrayList<Disk>(diskSet.size());
for (DiskSpec disk : diskSet) {
Disk tmDisk = new Disk();
tmDisk.name = disk.getName();
tmDisk.type = disk.getDiskType().getType();
tmDisk.initialSizeMB = disk.getSize() * 1024;
if (disk.getAllocType() != null && !disk.getAllocType().isEmpty())
tmDisk.allocationType =
AllocationType.valueOf(disk.getAllocType().toUpperCase());
else
tmDisk.allocationType = null;
tmDisk.datastore = disk.getTargetDs();
tmDisk.externalAddress = disk.getExternalAddress();
tmDisk.vmdkPath = disk.getVmdkPath();
tmDisk.mode = DiskMode.valueOf(disk.getDiskMode());
disks.add(tmDisk);
}
diskSchema.setParent(templateVmId);
diskSchema.setParentSnap(templateVmSnapId);
diskSchema.setDisks(disks);
schema.diskSchema = diskSchema;
// prepare network schema
ArrayList<Network> networks = new ArrayList<Network>();