ia64/xen-unstable
changeset 5208:84ecb1a32456
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>
fix xm vif-list and xm vbd-list (modulo error reporting for domain 0)
Signed-off-by: Steven Hand <steven@xensource.com>
author | smh22@firebug.cl.cam.ac.uk |
---|---|
date | Mon May 30 17:08:40 2005 +0000 (2005-05-30) |
parents | 3ff5bda9d8dd |
children | 80f5e85981da |
files | tools/python/xen/xend/XendClient.py tools/python/xen/xend/XendDomain.py tools/python/xen/xend/XendDomainInfo.py tools/python/xen/xend/server/SrvDomain.py |
line diff
1.1 --- a/tools/python/xen/xend/XendClient.py Mon May 30 16:30:26 2005 +0000 1.2 +++ b/tools/python/xen/xend/XendClient.py Mon May 30 17:08:40 2005 +0000 1.3 @@ -279,12 +279,12 @@ class Xend: 1.4 'period' : period }) 1.5 1.6 def xend_domain_devices(self, id, type): 1.7 - return self.xendGet(self.domainurl(id), 1.8 + return self.xendPost(self.domainurl(id), 1.9 {'op' : 'devices', 1.10 'type' : type }) 1.11 1.12 def xend_domain_device(self, id, type, idx): 1.13 - return self.xendGet(self.domainurl(id), 1.14 + return self.xendPost(self.domainurl(id), 1.15 {'op' : 'device', 1.16 'type' : type, 1.17 'idx' : idx })
2.1 --- a/tools/python/xen/xend/XendDomain.py Mon May 30 16:30:26 2005 +0000 2.2 +++ b/tools/python/xen/xend/XendDomain.py Mon May 30 17:08:40 2005 +0000 2.3 @@ -637,14 +637,14 @@ class XendDomain: 2.4 return val 2.5 2.6 def domain_devtype_ls(self, id, type): 2.7 - """Get list of device indexes for a domain. 2.8 + """Get list of device sxprs for a domain. 2.9 2.10 @param id: domain 2.11 @param type: device type 2.12 - @return: device indexes 2.13 + @return: device sxprs 2.14 """ 2.15 dominfo = self.domain_lookup(id) 2.16 - return dominfo.getDeviceIndexes(type) 2.17 + return dominfo.getDeviceSxprs(type) 2.18 2.19 def domain_devtype_get(self, id, type, idx): 2.20 """Get a device from a domain.
3.1 --- a/tools/python/xen/xend/XendDomainInfo.py Mon May 30 16:30:26 2005 +0000 3.2 +++ b/tools/python/xen/xend/XendDomainInfo.py Mon May 30 17:08:40 2005 +0000 3.3 @@ -25,7 +25,7 @@ from server import messages 3.4 from xen.xend.XendBootloader import bootloader 3.5 import sxp 3.6 from XendLogging import log 3.7 -from XendError import VmError 3.8 +from XendError import XendError, VmError 3.9 from XendRoot import get_component 3.10 3.11 from PrettyPrint import prettyprintstring 3.12 @@ -555,8 +555,7 @@ class XendDomainInfo: 3.13 if self.memory is None: 3.14 raise VmError('missing memory size') 3.15 cpu = sxp.child_value(config, 'cpu') 3.16 - if self.recreate and self.dom and cpu is not None: 3.17 - #xc.domain_pincpu(self.dom, int(cpu)) 3.18 + if self.recreate and self.dom and cpu is not None and cpu > 0: 3.19 xc.domain_pincpu(self.dom, 0, 1<<int(cpu)) 3.20 try: 3.21 image = sxp.child_value(self.config, 'image')
4.1 --- a/tools/python/xen/xend/server/SrvDomain.py Mon May 30 16:30:26 2005 +0000 4.2 +++ b/tools/python/xen/xend/server/SrvDomain.py Mon May 30 17:08:40 2005 +0000 4.3 @@ -185,8 +185,13 @@ class SrvDomain(SrvDir): 4.4 4.5 def render_GET(self, req): 4.6 op = req.args.get('op') 4.7 - if op and op[0] in ['vifs', 'vif', 'vbds', 'vbd', 'mem_target_set']: 4.8 - return self.perform(req) 4.9 + # 4.10 + # XXX SMH: below may be useful once again if we ever try to get 4.11 + # the raw 'web' interface to xend working once more. But for now 4.12 + # is useless and out of date (i.e. no ops called 'v???' anymore). 4.13 + # 4.14 + # if op and op[0] in ['vifs', 'vif', 'vbds', 'vbd', 'mem_target_set']: 4.15 + # return self.perform(req) 4.16 if self.use_sxp(req): 4.17 req.setHeader("Content-Type", sxp.mime_type) 4.18 sxp.show(self.dom.sxpr(), out=req)