WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] Added getTargetMemory, getSsidref methods to XendDomainI

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Added getTargetMemory, getSsidref methods to XendDomainInfo, and use these and
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 19 Sep 2005 13:26:14 +0000
Delivery-date: Mon, 19 Sep 2005 13:25:15 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Added getTargetMemory, getSsidref methods to XendDomainInfo, and use these and, Xen patchbot -unstable <=