[XM][XEND] Speed up xm list

Signed-off-by: Alastair Tse <atse@xensource.com>
This commit is contained in:
Alastair Tse committed 2006-10-05 17:29:20 +01:00
1 parent 4c1d89c12c
commit 30e2b73051
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -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)
+1 -1
View File
@@ -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)
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.