mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
[XM][XEND] Speed up xm list
Signed-off-by: Alastair Tse <atse@xensource.com>
This commit is contained in:
1 parent
4c1d89c12c
commit
30e2b73051
2 files changed
+3
-3
No files matched your search
@@ -53,12 +53,12 @@ def domain(domid):
|
||||
info = lookup(domid)
|
||||
return fixup_sxpr(info.sxpr())
|
||||
|
||||
def domains(detail=1):
|
||||
def domains(detail=1, full = 0):
|
||||
if detail < 1:
|
||||
return XendDomain.instance().list_names()
|
||||
else:
|
||||
domains = XendDomain.instance().list_sorted()
|
||||
return map(lambda dom: fixup_sxpr(dom.sxpr()), domains)
|
||||
return map(lambda dom: fixup_sxpr(dom.sxpr(not full)), domains)
|
||||
|
||||
def domain_create(config):
|
||||
info = XendDomain.instance().domain_create(config)
|
||||
|
||||
@@ -483,7 +483,7 @@ def xm_restore(args):
|
||||
|
||||
def getDomains(domain_names, full = 0):
|
||||
if domain_names:
|
||||
return [server.xend.domain(dom) for dom in domain_names]
|
||||
return [server.xend.domain(dom, full) for dom in domain_names]
|
||||
else:
|
||||
return server.xend.domains(1)
|
||||
|
||||
|
||||