mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
bitkeeper revision 1.1597 (429b4898xNVUuBPMVXKa545qSx7i7A)
fix xm vif-list and xm vbd-list (modulo error reporting for domain 0) Signed-off-by: Steven Hand <steven@xensource.com>
This commit is contained in:
1 parent
bef12ffef7
commit
d0e8e50db8
4 files changed
+14
-10
No files matched your search
@@ -279,12 +279,12 @@ class Xend:
|
||||
'period' : period })
|
||||
|
||||
def xend_domain_devices(self, id, type):
|
||||
return self.xendGet(self.domainurl(id),
|
||||
return self.xendPost(self.domainurl(id),
|
||||
{'op' : 'devices',
|
||||
'type' : type })
|
||||
|
||||
def xend_domain_device(self, id, type, idx):
|
||||
return self.xendGet(self.domainurl(id),
|
||||
return self.xendPost(self.domainurl(id),
|
||||
{'op' : 'device',
|
||||
'type' : type,
|
||||
'idx' : idx })
|
||||
|
||||
@@ -637,14 +637,14 @@ class XendDomain:
|
||||
return val
|
||||
|
||||
def domain_devtype_ls(self, id, type):
|
||||
"""Get list of device indexes for a domain.
|
||||
"""Get list of device sxprs for a domain.
|
||||
|
||||
@param id: domain
|
||||
@param type: device type
|
||||
@return: device indexes
|
||||
@return: device sxprs
|
||||
"""
|
||||
dominfo = self.domain_lookup(id)
|
||||
return dominfo.getDeviceIndexes(type)
|
||||
return dominfo.getDeviceSxprs(type)
|
||||
|
||||
def domain_devtype_get(self, id, type, idx):
|
||||
"""Get a device from a domain.
|
||||
|
||||
@@ -25,7 +25,7 @@ from server import messages
|
||||
from xen.xend.XendBootloader import bootloader
|
||||
import sxp
|
||||
from XendLogging import log
|
||||
from XendError import VmError
|
||||
from XendError import XendError, VmError
|
||||
from XendRoot import get_component
|
||||
|
||||
from PrettyPrint import prettyprintstring
|
||||
@@ -555,8 +555,7 @@ class XendDomainInfo:
|
||||
if self.memory is None:
|
||||
raise VmError('missing memory size')
|
||||
cpu = sxp.child_value(config, 'cpu')
|
||||
if self.recreate and self.dom and cpu is not None:
|
||||
#xc.domain_pincpu(self.dom, int(cpu))
|
||||
if self.recreate and self.dom and cpu is not None and cpu > 0:
|
||||
xc.domain_pincpu(self.dom, 0, 1<<int(cpu))
|
||||
try:
|
||||
image = sxp.child_value(self.config, 'image')
|
||||
|
||||
@@ -185,8 +185,13 @@ class SrvDomain(SrvDir):
|
||||
|
||||
def render_GET(self, req):
|
||||
op = req.args.get('op')
|
||||
if op and op[0] in ['vifs', 'vif', 'vbds', 'vbd', 'mem_target_set']:
|
||||
return self.perform(req)
|
||||
#
|
||||
# XXX SMH: below may be useful once again if we ever try to get
|
||||
# the raw 'web' interface to xend working once more. But for now
|
||||
# is useless and out of date (i.e. no ops called 'v???' anymore).
|
||||
#
|
||||
# if op and op[0] in ['vifs', 'vif', 'vbds', 'vbd', 'mem_target_set']:
|
||||
# return self.perform(req)
|
||||
if self.use_sxp(req):
|
||||
req.setHeader("Content-Type", sxp.mime_type)
|
||||
sxp.show(self.dom.sxpr(), out=req)
|
||||
|
||||