[libvirt] Request to rename 'destroy' to something milder.

Eric Blake eblake at redhat.com
Tue Jun 14 16:29:18 UTC 2011


On 06/14/2011 04:31 AM, Kashyap Chamarthy wrote:
> (please cc me in response as I have not subscribed to this list)
> 
> Hi all,
> 
> A minor nitpick:
> 
> Every-time I suggest someone to do a force shut-down a guest using
> 'virsh destroy foo' , the very first question I get is -- does it
> _destroy_ my data?
> 
> This causes confusion to the inexperienced user and makes him/her
> suspect that the data/disk could be destroyed while running 'virsh
> destroy foo'
> 
> Maybe replacing it to a milder name like 'poweroff' or something might
> help?

I don't know how successful you'll be at this.  I recall asking at one
point in the past about adding 'nodedev-detach' as an alias for
'nodedev-dettach' to fix the spelling error (but I can't find it in the
mail archives, so it was probably a question I asked on IRC).  My
recollection of the response is:

1. any client that cares about maximum portability will use the older
spelling, not the newer one, so adding won't help portable scripts.

2. adding an alias means that the user writing a new script has to read
the documentation to see which of the two commands they want to use,
whereas offering only one spelling makes the decision easier.

3. while we may mark old spellings as deprecated, we have no plans to
remove them at any point (not even for a major number bump); backwards
compatibility demands that we keep everything we ever add, and adding
aliases adds that much more to maintain (although the maintenance burden
of an alias is lighter than the burden for a new API).

I'm personally in favor of the idea of adding better-named aliases, so
I'm not the person to convince.  For this idea to work, you'll need
buy-in from the Daniels (DV and danpb).  And we _do_ have at least one
example of an alias: 'virsh quit' and 'virsh exit' are aliases.

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110614/17175fdc/attachment-0001.sig>


More information about the libvir-list mailing list