|
|
|
|
|
|
|
|
|
|
xen-api
Re: [Xen-API] Re: Problems in xen_sr_get_physical_size
It looks like the error is in Xend.
This patch may fix the problem, though
it returns 'max_int'.
Stefan
Signed-off-by: Stefan Berger <stefanb@xxxxxxxxxx>
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
Sun Jan 06 14:16:10 2008 -0500
@@ -2531,7 +2531,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-api-bounces@xxxxxxxxxxxxxxxxxxx wrote on 01/06/2008
06:28:55 AM:
> chetansa wrote:
> Hi all,
> I would like to know if I am doing something wrong in my test code
> (using libxen). Here is the test code snippet and associated results.
> ---- Code -----
>
> xen_sr_set *mySrList;
> xen_sr *mySr;
>
> if (!xen_sr_get_all(session, &mySrList))
> {
> cout<<"Error in xen_sr_get_all"<<endl;
> return 1;
> }
> cout<<"SR array size:"<<(int)mySrList->size<<endl;
>
> mySr = mySrList->contents[0];
>
> char* srname;
>
> if (!xen_sr_get_type(session, &srname, (mySrList->contents[0])))
> {
> cout<<"Error in xen_sr_get_type"<<endl;
> return 1;
> }
>
> cout<<"SR type:"<<srname<<endl;
>
> int64_t srno;
>
> if (!xen_sr_get_physical_size(session, &srno, (mySrList->contents[0])))
> {
> cout<<"Error in xen_sr_get_physical_size"<<endl;
> return 1;
> }
>
> cout<<"SR detail:"<<(int)srno<<endl;
>
> ---- Results -----
>
> SR array size: 2
> SR type: local
> Error in xen_sr_get_physical_size
> Thanks
>
> Chetan
> Here is an error description given by the session
struct,
>
> 2INTERNAL_ERROR 'int' object is not callable
> _______________________________________________
> xen-api mailing list
> xen-api@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-api
_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-api
|
|
|
|
|