WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] [XEND] Re-add vtpm device support in Xend

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [XEND] Re-add vtpm device support in XendConfig
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sun, 03 Dec 2006 15:10:41 +0000
Delivery-date: Sun, 03 Dec 2006 07:12:39 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Alastair Tse <atse@xxxxxxxxxxxxx>
# Node ID 98413fa7826c2b83a592fe25974c07208112e0d0
# Parent  4b577c1909a9c988210b759a79633d6560e96dc6
[XEND] Re-add vtpm device support in XendConfig

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 <stefanb@xxxxxxxxxx>
---
 tools/python/scripts/xapi.py        |    2 --
 tools/python/xen/xend/XendConfig.py |   12 +++++++++++-
 2 files changed, 11 insertions(+), 3 deletions(-)

diff -r 4b577c1909a9 -r 98413fa7826c tools/python/scripts/xapi.py
--- a/tools/python/scripts/xapi.py      Fri Dec 01 17:31:50 2006 +0000
+++ b/tools/python/scripts/xapi.py      Fri Dec 01 17:37:42 2006 +0000
@@ -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
 
 
 #
diff -r 4b577c1909a9 -r 98413fa7826c tools/python/xen/xend/XendConfig.py
--- a/tools/python/xen/xend/XendConfig.py       Fri Dec 01 17:31:50 2006 +0000
+++ b/tools/python/xen/xend/XendConfig.py       Fri Dec 01 17:37:42 2006 +0000
@@ -945,7 +945,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):

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [XEND] Re-add vtpm device support in XendConfig, Xen patchbot-unstable <=