----- Original Message ----- > From: "Ori Liel" <ol...@redhat.com> > To: engine-devel@ovirt.org > Cc: "Eoghan Glynn" <egl...@redhat.com> > Sent: Monday, April 16, 2012 8:33:27 AM > Subject: Re: [Engine-devel] Floating Disks implementation in REST-API > > I'd like us to move forward with this. > > The option of using 'attach' action does not exist, because, as > Eoghan observed, we would be executing an action on an entity which > doesn't exist in the collection: (.../api/vms/{vm:id}/disks/???-no > entity-???/attach) > > There are two options left on the table; let's see if we can agree on > one of them: > > 1) > POST/api/vms/{vm:id}/disks > <disk id="{disk:id}"/> => > attach disk > > DELETE .../api/vms/{vm:id}/disks/{disk:id} > <disk><detach>true</detach><disk> => > detach disk > > Pros: symmetrical > Cons: risky (if user wants to detach but forgot to give parameter, > disk will be deleted). > > 2) > > POST/api/vms/{vm:id}/disks > <disk id="{disk:id}"/> => > attach disk > > DELETE .../api/vms/{vm:id}/disks/{disk:id}/detach => > detach disk > > Pros: not dangerous > Cons: asymmetrical, attach done like add, but detach done using > action. >
Is there a 3rd option based on #1 where we just detach the disk rather than detaching and deleting? That could be further extended by adding an optional delete flag > > No solution is perfect but we need to decide. > > Thanks, > > Ori. > _______________________________________________ > Engine-devel mailing list > Engine-devel@ovirt.org > http://lists.ovirt.org/mailman/listinfo/engine-devel > _______________________________________________ Engine-devel mailing list Engine-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-devel