On 01/20/2017 02:42 AM, Lin Ma wrote: > In the host details dialog, the status of network and storage can be > refreshed automatically, but interface can't. re-open the host details > dialog can't help either. users have to do tab changing or reconnect to > hypervisor in virt-manager to reflect interface's status. > > Reproduce: > 1. launch virt-manager. > 2. open host details dialog and click tab 'Network Interfaces', Check > eth0's state. > 3. close host details dialog. > 4. set eth0's link to down on host. > 5. reopen host details dialog, check eth0's state. > (the opened tab last time will be showed) > > This patch refreshes the status of interface in widget when opening the > host details dialog to reflect the current status of interface. > > Signed-off-by: Lin Ma <lma@xxxxxxxx> > --- > virtManager/host.py | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/virtManager/host.py b/virtManager/host.py > index 9649963..b905099 100644 > --- a/virtManager/host.py > +++ b/virtManager/host.py > @@ -236,6 +236,7 @@ class vmmHost(vmmGObjectUI): > > def show(self): > logging.debug("Showing host details: %s", self.conn) > + self.conn.schedule_priority_tick(polliface=True) > vis = self.is_visible() > self.topwin.present() > if vis: > We already do this in the page_changed handler, which is triggered when the user is clicking between the storage/network/interface tabs. So you can click to storage and then click back to interfaces to update this. That's obviously sub optimal but then again so is all our handling of interface state change behind virt-manager's back. What we need to properly fix this is actual async event support for libvirt interfaces (not too hard) and netcf (more difficult). Until then I'd rather just leave it as is then add an interface specific poll call into the show() function Thanks, Cole _______________________________________________ virt-tools-list mailing list virt-tools-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/virt-tools-list