From: Stefan Berger Subject: [PATCH] [XenD] Re-add removed vtpm device handling code Date: Fri, 01 Dec 2006 12:29:43 -0500 Message-ID: <1164994183.5793.2.camel@lt2.watson.ibm.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-o9d7berCkAZxEJ4elzMV" 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@xensource.com List-Id: xen-devel@lists.xenproject.org --=-o9d7berCkAZxEJ4elzMV Content-Type: text/plain Content-Transfer-Encoding: 7bit This patch re-adds a recently removed vTPM device handling code. I am also removing that one code part in the test script that does not work. Signed-off-by: Stefan Berger --=-o9d7berCkAZxEJ4elzMV Content-Disposition: attachment; filename=xendconfig-vtpm-readd.diff Content-Type: text/x-patch; name=xendconfig-vtpm-readd.diff; charset=UTF-8 Content-Transfer-Encoding: 7bit Index: root/xen-unstable.hg/tools/python/xen/xend/XendConfig.py =================================================================== --- root.orig/xen-unstable.hg/tools/python/xen/xend/XendConfig.py +++ root/xen-unstable.hg/tools/python/xen/xend/XendConfig.py @@ -901,7 +901,17 @@ class XendConfig(dict): self['devices'][dev_uuid] = (dev_type, dev_info) self['vbd_refs'].append(dev_uuid) return dev_uuid - + + elif dev_type in ('vtpm'): + if cfg_xenapi.get('type'): + dev_info['type'] = cfg_xenapi.get('type') + + dev_uuid = cfg_xenapi.get('uuid', uuid.createString()) + dev_info['uuid'] = dev_uuid + self['devices'][dev_uuid] = (dev_type, dev_info) + self['vtpm_refs'].append(dev_uuid) + return dev_uuid + return '' def device_update(self, dev_uuid, cfg_sxp): Index: root/xen-unstable.hg/tools/python/scripts/xapi.py =================================================================== --- root.orig/xen-unstable.hg/tools/python/scripts/xapi.py +++ root/xen-unstable.hg/tools/python/scripts/xapi.py @@ -446,8 +446,6 @@ def xapi_vtpm_create(*args): print "Has driver type '%s'" % driver vtpm_rec = execute(server.VTPM.get_record, session, vtpm_uuid) print "Has vtpm record '%s'" % vtpm_rec - vm = execute(server.VTPM.get_VM, session, vtpm_uuid) - print "Has VM '%s'" % vm # --=-o9d7berCkAZxEJ4elzMV 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 --=-o9d7berCkAZxEJ4elzMV--