Hi All,
I am facing issue in deleting a VM snapshot.
I am using ovirt-engine-sdk-java-3.5.0.5.jar
According to the SDK API,I can delete a VM using :
api.getVMs().get(vmName).getSnapshots().getById(snapshotId).delete();
But there is no way to fetch the snapshot ID of a particular snapshot.
Or
List<VMSnapshot> vmSnapshots = api.getVMs().get(vmName).getSnapshots().list();
for (VMSnapshot vmSnapshot : vmSnapshots) {
if(vmSnapshot.getDescription() == snapshotdescription){
vmSnapshot.delete();
}
I cannot use the above snippet of code to delete a snapshot,but the multiple
snapshots for a vm can be created with the same description.
So is there a way to create a snapshot with a snapshot name assigned to it.
SO that delete,restore opeartions can be performed based on the snapshot name .
Thanks,
Prashanth R
_______________________________________________
Users mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/users