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:
smh22@firebug.cl.cam.ac.uk committed 2005-05-30 17:08:40 +00:00
1 parent bef12ffef7
commit d0e8e50db8
4 files changed
+14 -10

No files matched your search

+2 -2
View File
@@ -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 })
+3 -3
View File
@@ -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.
+2 -3
View File
@@ -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')
+7 -2
View File
@@ -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)
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.