From: Stefan Berger Subject: [PATCH] [Xen-API] Patch for fixing the rtc/timeoffset entry Date: Sat, 05 May 2007 10:42:25 -0400 Message-ID: <1178376145.4294.5.camel@gsal-3.watson.ibm.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-AaMtkt86yEG/KhI9F2wk" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel Cc: Ewan Mellor List-Id: xen-devel@lists.xenproject.org --=-AaMtkt86yEG/KhI9F2wk Content-Type: text/plain Content-Transfer-Encoding: 7bit This patch rewrites the rtc/timeoffset entry so the VM's record can be retrieved with the Java xmlrpc library. If the entry is 'None' it upsets the xmlrpc parser. This fixes it, though maybe there's a better place in xend to place similar code. Signed-off-by: Stefan Berger --=-AaMtkt86yEG/KhI9F2wk Content-Disposition: attachment; filename=rtc_platform_fix.diff Content-Type: text/x-patch; name=rtc_platform_fix.diff; charset=UTF-8 Content-Transfer-Encoding: 7bit diff -r 3a5722420de7 tools/python/xen/xend/XendDomainInfo.py --- a/tools/python/xen/xend/XendDomainInfo.py Thu May 03 19:25:47 2007 +0100 +++ b/tools/python/xen/xend/XendDomainInfo.py Sat May 05 10:34:15 2007 -0400 @@ -891,9 +894,12 @@ class XendDomainInfo: # Check if the rtc offset has changes if vm_details.get("rtc/timeoffset", 0) != self.info["platform"].get("rtc_timeoffset", 0): - self.info["platform"]["rtc_timeoffset"] = vm_details.get("rtc/timeoffset", 0) + rtc = vm_details.get("rtc/timeoffset") + if not rtc: + rtc = "0" + self.info["platform"]["rtc_timeoffset"] = rtc changed = True - + if changed: # Update the domain section of the store, as this contains some # parameters derived from the VM configuration. --=-AaMtkt86yEG/KhI9F2wk Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --=-AaMtkt86yEG/KhI9F2wk--