* [PATCH] [Xend] Fix 2 problems related to SR class
@ 2008-01-07 12:04 Stefan Berger
2008-01-07 12:27 ` chetansa
0 siblings, 1 reply; 2+ messages in thread
From: Stefan Berger @ 2008-01-07 12:04 UTC (permalink / raw)
To: xen-devel; +Cc: chetan.lists, keir
[-- Attachment #1: Type: text/plain, Size: 167 bytes --]
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>
[-- Attachment #2: xend_fix_sr_class_issues.diff --]
[-- Type: text/x-patch, Size: 1210 bytes --]
diff -r 2491691e3e69 tools/python/xen/xend/XendAPI.py
--- a/tools/python/xen/xend/XendAPI.py Sat Dec 29 17:57:47 2007 +0000
+++ b/tools/python/xen/xend/XendAPI.py Mon Jan 07 06:58:18 2008 -0500
@@ -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')
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] [Xend] Fix 2 problems related to SR class
2008-01-07 12:04 [PATCH] [Xend] Fix 2 problems related to SR class Stefan Berger
@ 2008-01-07 12:27 ` chetansa
0 siblings, 0 replies; 2+ messages in thread
From: chetansa @ 2008-01-07 12:27 UTC (permalink / raw)
To: Stefan Berger; +Cc: xen-devel
Stefan Berger wrote:
> 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>
>
>
xen_vbd_get_status_detail() is also not implemented. Getting same error
*MESSAGE_METHOD_UNKNOWN VBD.get_status_detail *
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-01-07 12:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-07 12:04 [PATCH] [Xend] Fix 2 problems related to SR class Stefan Berger
2008-01-07 12:27 ` chetansa
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.