On 12/14/2012 09:57 AM, Luiz Capitulino wrote: >> +## >> +# @vm-snapshot-save: >> +# >> +# Create a snapshot of the whole virtual machine. If tag is provided as >> @name, >> +# it is used as human readable identifier. If there is already a snapshot >> +# with the same tag or ID, it is replaced. >> +# >> +# The VM is automatically stopped and resumed and saving a snapshot can take >> +# a long time. >> +# >> +# @name: #optional tag of new snapshot or tag|id of existing snapshot > > I wonder if we should allow 'name' to be optional in QMP.
Libvirt will always pass a 'name'. Where it gets confusing is that 'name' can be all digits; so if I say a name of '3', but it gets id '2', then future operations get way confusing (especially if later we also create a snapshot whose id becomes 3). > >> +# >> +# Returns: Nothing on success One thing is for certain - if 'name' remains optional, then you MUST return the 'id' that was auto-allocated. And even if name is not optional, returning the 'id' that was either auto-allocated or successfully looked up as an existing snapshot would be more useful than returning nothing. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature