Hi all,
I'm trying to create/get/delete an independent disk using vcloud sdk for java.
Here is a working snippet of code:
Disk newDisk = vdc.createDisk(createDiskParameters());
where:
private DiskCreateParamsType createDiskParameters() {
DiskCreateParamsType diskCreateParams = new DiskCreateParamsType();
DiskType diskType = new DiskType();
diskType.setName(DISK_NAME);
diskType.setSize(DISK_SIZE);
diskCreateParams.setDisk(diskType);
return diskCreateParams;
}
The creation step is ok, but the deletion fails with java.lang.NullPointerException using: Disk.delete(client, newDisk.getReference());
In fact, also vdc.getDiskRefs() returns an empty collection of Refs
Also I'd like to be able to setStorageProfile using diskType.setStorageProfile(ReferenceType value)
but I don't know how to list all the available StorageProfiles on my vcd. In fact vdc.getVdcStorageProfileRefs() returnsan empty collection of Refs as well.
Can you help me?
Thanks,
Andrea