diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2008-01-08 09:54:06 +0000 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2008-01-08 09:54:06 +0000 |
commit | ecd285a056ef7557ca2ba507728e1b8e2d6ef0b2 (patch) | |
tree | 45622ba7d387566c216922fa0a58aa42966dbf24 | |
parent | 7be3611da8c837b6e397a133d4ff28d417249334 (diff) | |
download | xen-ecd285a056ef7557ca2ba507728e1b8e2d6ef0b2.tar.gz xen-ecd285a056ef7557ca2ba507728e1b8e2d6ef0b2.tar.bz2 xen-ecd285a056ef7557ca2ba507728e1b8e2d6ef0b2.zip |
[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@us.ibm.com>
-rw-r--r-- | tools/python/xen/xend/XendAPI.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/python/xen/xend/XendAPI.py b/tools/python/xen/xend/XendAPI.py index 1a0fb4839b..c31f3657f2 100644 --- a/tools/python/xen/xend/XendAPI.py +++ b/tools/python/xen/xend/XendAPI.py @@ -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') |