mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
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:
1 parent
f3e44ec565
commit
76c86a2924
1 file changed
+6
-4
@@ -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.
|
||||
"""
|
||||
|
||||