ia64/xen-unstable

view tools/python/xen/xend/server/usbif.py @ 6958:db4a0526d4e5

Use DevController.allocateDeviceID rather than using a local variable.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
author emellor@ewan
date Mon Sep 19 13:44:05 2005 +0100 (2005-09-19)
parents 7e8eac6e96c6
children c0c96a494c76
line source
1 #============================================================================
2 # This library is free software; you can redistribute it and/or
3 # modify it under the terms of version 2.1 of the GNU Lesser General Public
4 # License as published by the Free Software Foundation.
5 #
6 # This library is distributed in the hope that it will be useful,
7 # but WITHOUT ANY WARRANTY; without even the implied warranty of
8 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
9 # Lesser General Public License for more details.
10 #
11 # You should have received a copy of the GNU Lesser General Public
12 # License along with this library; if not, write to the Free Software
13 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
14 #============================================================================
15 # Copyright (C) 2004 Mike Wray <mike.wray@hp.com>
16 # Copyright (C) 2004 Intel Research Cambridge
17 # Copyright (C) 2004 Mark Williamson <mark.williamson@cl.cam.ac.uk>
18 # Copyright (C) 2005 XenSource Ltd
19 #============================================================================
22 """Support for virtual USB hubs.
23 """
25 from xen.xend.server.DevController import DevController
28 class UsbifController(DevController):
29 """USB device interface controller. Handles all USB devices
30 for a domain.
31 """
33 def __init__(self, vm):
34 """Create a USB device controller.
35 """
36 DevController.__init__(self, vm)
39 def getDeviceDetails(self, _):
40 """@see DevController.getDeviceDetails"""
42 return (self.allocateDeviceID(), {}, {})