From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: [BUG, PATCH] xen-4.1-3 xend/XendDomainInfo.py#device_configure() TypeError Date: Wed, 5 Jun 2013 14:52:44 -0400 Message-ID: <20130605185244.GB15558@phenom.dumpdata.com> References: <201305241953.10495.hahn@univention.de> <20130528152552.GA4695@phenom.dumpdata.com> <201305290747.11406.hahn@univention.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <201305290747.11406.hahn@univention.de> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Philipp Hahn Cc: xen-devel List-Id: xen-devel@lists.xenproject.org On Wed, May 29, 2013 at 07:47:11AM +0200, Philipp Hahn wrote: > Hello, > > Am Dienstag 28 Mai 2013, 17:25:52 schrieben Sie: > > > def _getDeviceInfo_vbd(self, devid): > > > for dev_type, dev_info in self.info.all_devices_sxpr() > ... > > > return dev_info > > > > Ewwww, that looks buggy. Could you just do 'return dev' ? > > I don't think that this would be correct, since dev and devid are just the device numbers, but dev_info contains the device details as an Sxpr: > devid='768' > dev='hda:cdrom' ... dev='hda' ... dev=768 > dev_type='vbd' > dev_info=['vbd', ('uuid', '920a5c24-28c6-6abb-ad47-9c1144012986'), ('bootable', 1), ('driver', 'paravirtualised'), ('dev', 'hda:cdrom'), ('uname', 'file:/var/lib/libvirt/images/UCS_3.1-1-amd64.iso'), ('mode', 'r'), ('VDI', ''), ('backend', 0)] > > So chaning the return type of the function with the name _get*DeviceInfo* look wrong. Or am I missing something? I think you are right. My understanding from your description was incorrect. Could you repost the patch with your SoB please? I seem to have lost it somewhere :-( (The original email). > > Sincerely > Philipp > -- > Philipp Hahn Open Source Software Engineer hahn@univention.de > Univention GmbH be open. fon: +49 421 22 232- 0 > Mary-Somerville-Str.1 D-28359 Bremen fax: +49 421 22 232-99 > http://www.univention.de/