[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] Return the changed path as an argument to the watch callback. This is useful



# HG changeset patch
# User emellor@xxxxxxxxxxxxxxxxxxxxxx
# Node ID fbd3f3cb6f65a230f89faf702006c3f9971bf126
# Parent  27a2cb379c8ffcca77d9ec262d3baf06e7f85175
Return the changed path as an argument to the watch callback.  This is useful
for the test CD, and simplifies DevController everso slightly.  It ought to be
generally useful, too.
 
Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>

diff -r 27a2cb379c8f -r fbd3f3cb6f65 tools/python/xen/xend/XendDomain.py
--- a/tools/python/xen/xend/XendDomain.py       Mon Nov 21 16:06:42 2005
+++ b/tools/python/xen/xend/XendDomain.py       Mon Nov 21 17:33:17 2005
@@ -114,7 +114,7 @@
 
     ## private:
 
-    def onReleaseDomain(self):
+    def onReleaseDomain(self, _):
         self.domains_lock.acquire()
         try:
             self.refresh()
diff -r 27a2cb379c8f -r fbd3f3cb6f65 tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   Mon Nov 21 16:06:42 2005
+++ b/tools/python/xen/xend/XendDomainInfo.py   Mon Nov 21 17:33:17 2005
@@ -424,7 +424,7 @@
             return []
 
 
-    def storeChanged(self):
+    def storeChanged(self, _):
         log.trace("XendDomainInfo.storeChanged");
 
         changed = False
diff -r 27a2cb379c8f -r fbd3f3cb6f65 
tools/python/xen/xend/server/DevController.py
--- a/tools/python/xen/xend/server/DevController.py     Mon Nov 21 16:06:42 2005
+++ b/tools/python/xen/xend/server/DevController.py     Mon Nov 21 17:33:17 2005
@@ -328,7 +328,7 @@
             ev = Event()
             result = { 'status': Timeout }
             
-            xswatch(statusPath, hotplugStatusCallback, statusPath, ev, result)
+            xswatch(statusPath, hotplugStatusCallback, ev, result)
 
             ev.wait(DEVICE_CREATE_TIMEOUT)
             return result['status']
diff -r 27a2cb379c8f -r fbd3f3cb6f65 tools/python/xen/xend/xenstore/xswatch.py
--- a/tools/python/xen/xend/xenstore/xswatch.py Mon Nov 21 16:06:42 2005
+++ b/tools/python/xen/xend/xenstore/xswatch.py Mon Nov 21 17:33:17 2005
@@ -51,7 +51,7 @@
         try:
             we = xs.read_watch()
             watch = we[1]
-            res = watch.fn(*watch.args, **watch.kwargs)
+            res = watch.fn(we[0], *watch.args, **watch.kwargs)
             if not res:
                 watch.unwatch()
         except:

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.