DescriptionCarlos Mestre González
2014-09-01 11:25:20 UTC
Description of problem:
The way to remove iso images is a rest-api call with DELETE. This works to change the VM properties (UpdateVmCommand).
The problem is it cannot update it dynamically (UpdateVmDynamicDataVDSCommand), seems to just ignore the current=true parameter. This parameter works perfectly fine with PUT or GET to modify the vm's cdrom on the fly, but fails in this regard.
This is the equivalent of Change CD->Eject in the Web UI.
Version-Release number of selected component (if applicable):
ovirt-engine-restapi-3.5.0-0.0.master.20140821064931.gitb794d66.el6.noarch
ovirt-engine-3.5.0-0.0.master.20140821064931.gitb794d66.el6.noarch
How reproducible:
100%
Steps to Reproduce:
1. DELETE api/vms/e0ba3f7d-b376-453d-813f-2d6817d77be8/cdroms/00000000-0000-0000-0000-000000000000;current=true
Actual results:
Call UpdateVmCommand in the backend. iso file is removed.
Expected results:
UpdateVmDynamicDataVDSCommand is called, ejecting "dynamically" the cdrom (or at least there's a way to do this, like the eject functionality in the web ui)
Additional info:
I don't know if this is the proper way to handle this calls for consistency
DELETE should delete the cdrom object like any other object in a collection.
Eject a cdrom (iso) should be done via PUT and in a way to pass a null file property, something like this:
<cdrom><file id=''/></cdrom>
Comment 1Carlos Mestre González
2014-09-01 11:33:42 UTC
Blocking our tests to check if storage domains can be deactivated after cdroms are ejected.
Comment 2Carlos Mestre González
2014-09-01 14:51:07 UTC
Moving to ovirt (as it should have been)
Comment 3Carlos Mestre González
2014-09-16 08:51:40 UTC
So what is the solution implemented:
1) calling delete with current=true?
DELETE api/vms/e0ba3f7d-b376-453d-813f-2d6817d77be8/cdroms/00000000-0000-0000-0000-000000000000;current=true
2) sending <cdrom><file id=''/></cdrom> ?