Trigger domain cleanup on @releaseDomain watch-event instead of domain exc. virq.

Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
This commit is contained in:
cl349@firebug.cl.cam.ac.uk committed 2005-09-07 13:41:49 +00:00
1 parent f3e44ec565
commit 76c86a2924
1 file changed
+6 -4
+6 -4
View File
@@ -67,7 +67,7 @@ class XendDomain:
xroot.add_component("xen.xend.XendDomain", self)
self.domains = XendDomainDict()
self.dbmap = DBMap(db=XenNode("/domain"))
eserver.subscribe('xend.virq', self.onVirq)
self.watchReleaseDomain()
self.initial_refresh()
def list(self):
@@ -95,11 +95,13 @@ class XendDomain:
doms = self.list_sorted()
return map(lambda x: x.name, doms)
def onVirq(self, event, val):
"""Event handler for virq.
"""
def onReleaseDomain(self):
self.refresh(cleanup=True)
def watchReleaseDomain(self):
from xen.xend.xenstore.xswatch import xswatch
self.releaseDomain = xswatch("@releaseDomain", self.onReleaseDomain)
def xen_domains(self):
"""Get table of domains indexed by id from xc.
"""
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.