> I think both ways are fine, but I'm not convinced that either is really
> RESTful according to Fielding's view of the world. Maybe that doesn't
> matter, though?
>
> Eoghan had an interesting suggestion on irc. These control commands are
> essentially requests for the VM to transition state, so perhaps this
> makes more sense:
>
> GET /vms/XXXX
> <vm>
> <id>XXXX</id>
> <name>foo</id>
> <state>RUNNING</state>
>
> </vm>
>
> PUT /vms/XXXX
> <vm>
> <state>SHUTDOWN</state>
> </vm>
>
> PUT /vms/XXXX
> <vm>
> <host>
barfoo.devel.redhat.com</host>
> </vm>
>
> However, things get sticky when you think about:
>
> - A request to shutdown might be ignored - e.g. the user might
> dismiss the shutdown dialog in the guest
>
> - A request to reboot isn't really a state transition request unless
> we explicitly make REBOOTING a state
>
> - These requests might take a long time to complete, so it might make
> sense to return 202 Accepted and allow the client to poll for
> completion
>
> - The requests might accept parameters that do not belong in the
> representation of a VM itself