[virt-tools-list] virt-manager XML editing UI WIP

Cole Robinson crobinso at redhat.com
Wed May 8 23:44:32 UTC 2019


On 4/15/19 2:51 PM, Cole Robinson wrote:
> I published a virt-manager branch with some inprogress work to add a raw
> XML editing UI. The code is here:
> 
> https://github.com/crobinso/virt-manager/tree/uixml
> 
> The implementation is a bit hacky right now, there's still some internal
> API bits that need some thought. That branch adds it for:
> 
> * Editing <network> XML in Connection Details
> * Editing <pool> XML in Connection Details
> * Editing device XML in addhardware
> 
> There's some screenshots here: https://imgur.com/a/fduqpv6
> 
> It's structured as a gtknotebook with two tabs
> 
> * 'Details' which shows the existing UI in the above cases
> * 'XML' which switches to a GtkSourceView with the XML
> 
> It reuses the existing UI 'apply'/'finish' buttons to actually commit
> the changes. If you edit the 'XML' and try to switch tabs before
> 'apply'ing we warn that changes will be lost, because we don't really
> have any way to switch back and forth between editing individual XML
> fields and editing the XML raw. It's not the nicest looking thing but
> it's the best I could think of that's a reusable UI pattern, and
> reusable means it simplifies wiring this up everywhere else.
> 

The branch is updated now.

https://github.com/crobinso/virt-manager/tree/uixml

It's pretty much done IMO. The added bits are:

- createnet wizard was shrunk to a single page. To get there I removed a
couple settings

* the ./network/@ipv6 setting which took 4 sentences in the UI to
explain, and tells the firewall to not filter ipv6 when ipv6 dhcp hasn't
been explicitly configured. I figure we could turn this on by default
but it would need testing, not sure if it causes networks to fail to
start if host ipv6 is disabled or similar. In general I think the
createnet wizard should aim to enable ipv6 by default but it needs some
work to get there

* the static <route> configuration. the libvirt docs make it sound like
a very advanced use case and the UI was pretty limited for configuring
it anyways.

- createpool wizard was shrunk to a single page
- details.py was split into vmwindow.py and details.py. vmwindow handles
the menu bar, tool bar, and gluing together the console and snapshot and
details bits. details.py is about 80% of the previous details.py.
- XML editing for createnet
- XML editing for createpool
- XML editing for createvol
- XML editing for domain devices pages
- XML editing for other pages shows the entire domain XML
- XML editing wired up for the customize wizard

Known issues/limitations:
- No attempt at using the libvirt domain schemas yet.
- Device/domain hotplug/update isn't supported, it only alters offline
config
- There isn't any warning about 'changes will take effect on next
reboot' for anything other than <domain> where we already had that
warning wired up

Besides adding UI tests I'm not planning on doing much else with it in
the near term

Thanks,
Cole




More information about the virt-tools-list mailing list