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

[Xen-changelog] [xen-unstable] [Xend] Fix 2 problems related to SR class



# 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


 


Rackspace

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