[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] fix xm vif-list and xm vbd-list (modulo error reporting for domain 0)



ChangeSet 1.1597, 2005/05/30 18:08:40+01:00, smh22@xxxxxxxxxxxxxxxxxxxx

        fix xm vif-list and xm vbd-list (modulo error reporting for domain 0)
        
        Signed-off-by: Steven Hand <steven@xxxxxxxxxxxxx> 



 XendClient.py       |    4 ++--
 XendDomain.py       |    6 +++---
 XendDomainInfo.py   |    5 ++---
 server/SrvDomain.py |    9 +++++++--
 4 files changed, 14 insertions(+), 10 deletions(-)


diff -Nru a/tools/python/xen/xend/XendClient.py 
b/tools/python/xen/xend/XendClient.py
--- a/tools/python/xen/xend/XendClient.py       2005-05-30 14:02:52 -04:00
+++ b/tools/python/xen/xend/XendClient.py       2005-05-30 14:02:54 -04:00
@@ -279,12 +279,12 @@
                               '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 })
diff -Nru a/tools/python/xen/xend/XendDomain.py 
b/tools/python/xen/xend/XendDomain.py
--- a/tools/python/xen/xend/XendDomain.py       2005-05-30 14:02:54 -04:00
+++ b/tools/python/xen/xend/XendDomain.py       2005-05-30 14:02:54 -04:00
@@ -637,14 +637,14 @@
         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.
diff -Nru a/tools/python/xen/xend/XendDomainInfo.py 
b/tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   2005-05-30 14:02:54 -04:00
+++ b/tools/python/xen/xend/XendDomainInfo.py   2005-05-30 14:02:54 -04:00
@@ -25,7 +25,7 @@
 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 @@
         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')
diff -Nru a/tools/python/xen/xend/server/SrvDomain.py 
b/tools/python/xen/xend/server/SrvDomain.py
--- a/tools/python/xen/xend/server/SrvDomain.py 2005-05-30 14:02:54 -04:00
+++ b/tools/python/xen/xend/server/SrvDomain.py 2005-05-30 14:02:54 -04:00
@@ -185,8 +185,13 @@
         
     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)

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.