[libvirt] [PATCH] virsh: Improve editing

Cole Robinson crobinso at redhat.com
Fri May 13 14:23:27 UTC 2011


On 05/13/2011 08:57 AM, Jiri Denemark wrote:
> On Fri, May 13, 2011 at 12:34:25 +0200, Michal Privoznik wrote:
>> When users (pool-/net-)edit and they make a mistake, temporary file
>> and thus all changes are gone. Better way is to let them decide if
>> they want to get back to edit and correct what's wrong.
>> However, this is suitable only in interactive mode.
>> ---
>>  tools/virsh.c |   42 ++++++++++++++++++++++++++++++++++++++++--
>>  1 files changed, 40 insertions(+), 2 deletions(-)
> 
> I like the idea (not sure if that's because I suggested it :-P) but, I have a
> few comments. The patch doesn't touch iface-edit, which is not generated from
> cmdEdit, though the right fix might turn out to be generating cmdIfaceEdit
> together with cmdPoolEdit and cmdNetworkEdit.
> 

I think we should just drop the 'edit' generation. It's a one-off that
doesn't fit with the rest of the virsh code. I'm sure most of the shared
functionality could be broken out into helper functions.

Either that or embrace it and generate more virsh commands :)

- Cole




More information about the libvir-list mailing list