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] [xen-unstable] [Xend] Fix 2 problems related to SR class

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [Xend] Fix 2 problems related to SR class
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 08 Jan 2008 15:10:17 -0800
Delivery-date: Tue, 08 Jan 2008 15:10:48 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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 Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1199786046 0
# Node ID 40f9dda7c5f50795395a68d50b68f65b562732c7
# Parent  9d22f78d9e5a0301dc2915cd90018e43c6e6959a
[Xend] Fix 2 problems related to SR class

This fixes two problems related to the SR class:
- get_PBDs() was not implemented
- get_physical_size did not work

Signed-off-by: Stefan Berger <stefanb@xxxxxxxxxx>
---
 tools/python/xen/xend/XendAPI.py |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletion(-)

diff -r 9d22f78d9e5a -r 40f9dda7c5f5 tools/python/xen/xend/XendAPI.py
--- a/tools/python/xen/xend/XendAPI.py  Tue Jan 08 09:45:58 2008 +0000
+++ b/tools/python/xen/xend/XendAPI.py  Tue Jan 08 09:54:06 2008 +0000
@@ -2475,6 +2475,7 @@ class XendAPI(object):
     # Xen API: Class SR
     # ----------------------------------------------------------------
     SR_attr_ro = ['VDIs',
+                  'PBDs',
                   'virtual_allocation',
                   'physical_utilisation',
                   'physical_size',
@@ -2524,6 +2525,9 @@ class XendAPI(object):
     def SR_get_VDIs(self, _, ref):
         return self._get_SR_func(ref, 'list_images')
 
+    def SR_get_PBDs(self, _, ref):
+        return xen_api_success(XendPBD.get_by_SR(ref))
+
     def SR_get_virtual_allocation(self, _, ref):
         return self._get_SR_func(ref, 'virtual_allocation')
 
@@ -2531,7 +2535,7 @@ class XendAPI(object):
         return self._get_SR_func(ref, 'physical_utilisation')
 
     def SR_get_physical_size(self, _, ref):
-        return self._get_SR_func(ref, 'physical_size')
+        return self._get_SR_attr(ref, 'physical_size')
     
     def SR_get_type(self, _, ref):
         return self._get_SR_attr(ref, 'type')

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [Xend] Fix 2 problems related to SR class, Xen patchbot-unstable <=