ia64/xen-unstable

view tools/python/xen/xend/server/tpmif.py @ 6689:7d0fb56b4a91

merge?
author cl349@firebug.cl.cam.ac.uk
date Wed Sep 07 19:01:31 2005 +0000 (2005-09-07)
parents 0e2b1e04d4cb dd668f7527cb
children b2f4823b6ff0 b35215021b32 9af349b055e5 3233e7ecfa9f
line source
1 # Copyright (C) 2005 IBM Corporation
2 # Authort: Stefan Berger, stefanb@us.ibm.com
3 # Derived from netif.py:
4 # Copyright (C) 2004 Mike Wray <mike.wray@hp.com>
5 """Support for virtual TPM interfaces.
6 """
8 import random
10 from xen.xend import sxp
11 from xen.xend.XendError import XendError, VmError
12 from xen.xend.XendLogging import log
13 from xen.xend.XendRoot import get_component
14 from xen.xend.xenstore import DBVar
16 from xen.xend.server.controller import Dev, DevController
18 class TPMifController(DevController):
19 """TPM interface controller. Handles all TPM devices for a domain.
20 """
22 def __init__(self, vm, recreate=False):
23 DevController.__init__(self, vm, recreate=recreate)
25 def initController(self, recreate=False, reboot=False):
26 self.destroyed = False
28 def destroyController(self, reboot=False):
29 """Destroy the controller and all devices.
30 """
31 self.destroyed = True
32 self.destroyDevices(reboot=reboot)
34 def sxpr(self):
35 val = ['tpmif', ['dom', self.getDomain()]]
36 return val
38 def newDevice(self, id, config, recreate=False):
39 """Create a TPM device.
41 @param id: interface id
42 @param config: device configuration
43 @param recreate: recreate flag (true after xend restart)
44 """
45 return None