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

[Xen-changelog] Added getTargetMemory, getSsidref methods to XendDomainInfo, and use these and



# HG changeset patch
# User emellor@ewan
# Node ID e517f6599e54621623110861ab47dc5b449e73d1
# Parent  567debb22ac07d8ebc3974e59d3efee3201d7a4e
Added getTargetMemory, getSsidref methods to XendDomainInfo, and use these and
getDomain, getName in SrvDomainDir, to decouple the latter from the internals of
the former, in preparation for changes internal to XendDomainInfo.
 
Signed-off-by: Ewan Mellor<ewan@xxxxxxxxxxxxx>

diff -r 567debb22ac0 -r e517f6599e54 tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   Sat Sep 17 12:59:35 2005
+++ b/tools/python/xen/xend/XendDomainInfo.py   Sat Sep 17 15:10:04 2005
@@ -333,6 +333,13 @@
 
     def getName(self):
         return self.name
+
+    def getSsidref(self):
+        return self.ssidref
+
+    def getTargetMemory(self):
+        """Get this domain's target memory size, in MiB."""
+        return self.memory
 
     def setStoreRef(self, ref):
         self.store_mfn = ref
diff -r 567debb22ac0 -r e517f6599e54 
tools/python/xen/xend/server/SrvDomainDir.py
--- a/tools/python/xen/xend/server/SrvDomainDir.py      Sat Sep 17 12:59:35 2005
+++ b/tools/python/xen/xend/server/SrvDomainDir.py      Sat Sep 17 15:10:04 2005
@@ -85,7 +85,7 @@
     def _op_create_cb(self, dominfo, configstring, req):
         """Callback to handle domain creation.
         """
-        dom = dominfo.name
+        dom = dominfo.getName()
         domurl = "%s/%s" % (req.prePathURL(), dom)
         req.setResponseCode(http.CREATED, "created")
         req.setHeader("Location", domurl)
@@ -112,7 +112,7 @@
         fn = FormFn(self.xd.domain_restore,
                     [['file', 'str']])
         dominfo = fn(req.args)
-        dom = dominfo.name
+        dom = dominfo.getName()
         domurl = "%s/%s" % (req.prePathURL(), dom)
         req.setResponseCode(http.CREATED)
         req.setHeader("Location", domurl)
@@ -153,10 +153,10 @@
             req.write('<ul>')
             for d in domains:
                req.write('<li><a href="%s%s"> Domain %s</a>'
-                         % (url, d.name, d.name))
-               req.write('id=%s' % d.domid)
-               req.write('memory=%d'% d.memory)
-               req.write('ssidref=%d'% d.ssidref)
+                         % (url, d.getName(), d.getName()))
+               req.write('id=%s' % d.getDomain())
+               req.write('memory=%d'% d.getTargetMemory())
+               req.write('ssidref=%d'% d.getSsidref())
                req.write('</li>')
             req.write('</ul>')
 

_______________________________________________
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®.