ia64/xen-unstable

view tools/python/xen/xend/server/SrvRoot.py @ 13642:ba3ec84c9423

[XEND] Add missing ConsoleController.py

Signed-off-by: Alastair Tse <atse@xensource.com>
author Alastair Tse <atse@xensource.com>
date Fri Jan 26 02:44:35 2007 +0000 (2007-01-26)
parents a18ae238eb53
children
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, 2005 Mike Wray <mike.wray@hp.com>
16 # Copyright (C) 2005 XenSource Ltd
17 #============================================================================
19 from xen.web.SrvDir import SrvDir
21 class SrvRoot(SrvDir):
22 """The root of the xend server.
23 """
25 """Server sub-components. Each entry is (name, class), where
26 'name' is the entry name and 'class' is the name of its class.
27 """
28 #todo Get this list from the XendOptions config.
29 subdirs = [
30 ('node', 'SrvNode' ),
31 ('domain', 'SrvDomainDir' ),
32 ('vnet', 'SrvVnetDir' ),
33 ]
35 def __init__(self):
36 SrvDir.__init__(self)
37 for (name, klass) in self.subdirs:
38 self.add(name, klass)
39 for (name, klass) in self.subdirs:
40 self.get(name)
42 def __repr__(self):
43 return "<SrvRoot %x %s>" %(id(self), self.table.keys())