From: Dan Smith Subject: [PATCH] Make xm long list consistent with the store Date: Fri, 02 Dec 2005 07:22:37 -0800 Message-ID: <877janed6q.fsf@theine.beaverton.ibm.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" 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 Developers List-Id: xen-devel@lists.xenproject.org --=-=-= This patch changes the XendDomainInfo.sxpr() function to get its device information from the store, instead of the info['device'] list. Instead of trying to keep this bit of internal state consistent with the store, I think it's better to just use the store data directly. This makes the output of "xm list --long" always reflect the current configuration in the store. With this patch, the only two tests that fail are the following (which have been failing recently): FAIL: 12_block_attach_shared_domU Bug #331 Started a DomU with write access to an in-use block device XFAIL: 03_network_attach_detach_multiple_pos Unknown reason --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=long_list_better_fix.patch # HG changeset patch # User dan@guaranine.beaverton.ibm.com # Node ID c3509a42d8bbfba3a855cf606fbc64766fbe5dbe # Parent ca236a81729dd31c9eab7991562dd1664ceb0abf Make "xm list --long" generate device configuration data from xenstore state instead of internal xend state. Signed-off-by: Dan Smith diff -r ca236a81729d -r c3509a42d8bb tools/python/xen/xend/XendDomainInfo.py --- a/tools/python/xen/xend/XendDomainInfo.py Thu Dec 1 19:23:07 2005 +++ b/tools/python/xen/xend/XendDomainInfo.py Thu Dec 1 21:23:29 2005 @@ -968,9 +968,9 @@ if self.infoIsSet('image'): sxpr.append(['image', self.info['image']]) - if self.infoIsSet('device'): - for (_, c) in self.info['device']: - sxpr.append(['device', c]) + for cls in controllerClasses: + for config in self.getDeviceConfigurations(cls): + sxpr.append(['device', config]) def stateChar(name): if name in self.info: --=-=-= -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms@us.ibm.com --=-=-= 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 --=-=-=--