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

[Xen-changelog] Switch shutdown and sysrq to xstransact.



# HG changeset patch
# User cl349@xxxxxxxxxxxxxxxxxxxx
# Node ID a0399927e1a1884951f79efd458e87300a32015c
# Parent  feff6bf0417ec3b6c7615fd47ac9c0085873fd15
Switch shutdown and sysrq to xstransact.
Signed-off-by: Christian Limpach <Christian.Limpach@xxxxxxxxxxxx>

diff -r feff6bf0417e -r a0399927e1a1 tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   Tue Sep 13 19:43:58 2005
+++ b/tools/python/xen/xend/XendDomainInfo.py   Tue Sep 13 20:54:41 2005
@@ -1055,21 +1055,15 @@
     def shutdown(self, reason):
         if not reason in shutdown_reasons.values():
             raise XendError('invalid reason:' + reason)
-        db = self.db.addChild("/control");
-        db['shutdown'] = reason;
-        db.saveDB(save=True);
+        xstransact.Write(self.path, "control/shutdown", reason)
         if not reason in ['suspend']:
             self.shutdown_pending = {'start':time.time(), 'reason':reason}
 
     def clear_shutdown(self):
-        db = self.db.addChild("/control")
-        db['shutdown'] = ""
-        db.saveDB(save=True)
+        xstransact.Remove(self.path, "control/shutdown")
 
     def send_sysrq(self, key=0):
-        db = self.db.addChild("/control");
-        db['sysrq'] = '%c' % key;
-        db.saveDB(save=True);        
+        xstransact.Write(self.path, "control/sysrq", '%c' % key)
 
     def shutdown_time_left(self, timeout):
         if not self.shutdown_pending:

_______________________________________________
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®.