libvirtobject: Populate status up front
And use this to kill paranoid object tick() that are sprinkled throughout the code.
This commit is contained in:
parent
4933cf7600
commit
1e154a373d
|
@ -1880,7 +1880,6 @@ class vmmCreate(vmmGObjectUI):
|
|||
raise RuntimeError(
|
||||
_("VM '%s' didn't show up after expected time.") % guest.name)
|
||||
vm = foundvm
|
||||
vm.tick()
|
||||
|
||||
if vm.is_shutoff():
|
||||
# Domain is already shutdown, but no error was raised.
|
||||
|
|
|
@ -499,7 +499,6 @@ class vmmHost(vmmGObjectUI):
|
|||
uilist = self.widget("net-list")
|
||||
sel = uilist.get_selection()
|
||||
model, treeiter = sel.get_selected()
|
||||
net.tick()
|
||||
|
||||
for row in uilist.get_model():
|
||||
if row[0] == connkey:
|
||||
|
@ -921,7 +920,6 @@ class vmmHost(vmmGObjectUI):
|
|||
sel = iface_list.get_selection()
|
||||
model, treeiter = sel.get_selected()
|
||||
name = iface.get_name()
|
||||
iface.tick()
|
||||
|
||||
for row in iface_list.get_model():
|
||||
if row[0] == name:
|
||||
|
|
|
@ -32,8 +32,6 @@ class vmmInterface(vmmLibvirtObject):
|
|||
(self._inactive_xml_flags,
|
||||
self._active_xml_flags) = self.conn.get_interface_flags(self._backend)
|
||||
|
||||
self.tick()
|
||||
|
||||
# Routines from vmmLibvirtObject
|
||||
def _XMLDesc(self, flags):
|
||||
return self._backend.XMLDesc(flags)
|
||||
|
|
|
@ -62,6 +62,7 @@ class vmmLibvirtObject(vmmGObject):
|
|||
self._name = None
|
||||
self.get_name()
|
||||
|
||||
self._refresh_status()
|
||||
|
||||
@staticmethod
|
||||
def log_redefine_xml_diff(obj, origxml, newxml):
|
||||
|
|
|
@ -360,7 +360,6 @@ class vmmNetworkList(vmmGObjectUI):
|
|||
# Try to start the network
|
||||
try:
|
||||
netobj.start()
|
||||
netobj.tick()
|
||||
logging.info("Started network '%s'", devname)
|
||||
except Exception, e:
|
||||
return self.err.show_err(_("Could not start virtual network "
|
||||
|
|
|
@ -323,7 +323,6 @@ class vmmStorageList(vmmGObjectUI):
|
|||
|
||||
def _populate_pool_state(self, connkey):
|
||||
pool = self.conn.get_pool(connkey)
|
||||
pool.tick()
|
||||
auto = pool.get_autostart()
|
||||
active = pool.is_active()
|
||||
|
||||
|
|
|
@ -111,8 +111,6 @@ class vmmStoragePool(vmmLibvirtObject):
|
|||
self._last_refresh_time = 0
|
||||
self._volumes = {}
|
||||
|
||||
self.tick()
|
||||
|
||||
|
||||
##########################
|
||||
# Required class methods #
|
||||
|
|
Loading…
Reference in New Issue