[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH] virsh: Improve editing

On 05/13/2011 06: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.
> And IMHO *edit commands are always interactive even when not called in virsh
> interactive mode so I'd prefer this behaviour to be unconditional.

I don't know - I could see a semi-reasonable chance of scripting
'EDITOR=sed virsh edit < some_sed_script'.

> I can't
> imagine anyone sane to call virsh edit from a script, it's much easier to just
> call virsh dumpxml, change the xml and virsh define it back.

But you have a point here.

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

Attachment: signature.asc
Description: OpenPGP digital signature

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]