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

Re: [Xen-API] Xen API connection with python and xml-rpc int limit



Hello, 

that did the trick, thanks!


El 02/01/2013, a las 11:27, James Bulpin escribió:

Try converting the value to a string and using this as the second argument to VM.set_memory_static_max etc.
 
Cheers,
James
 
From: xen-api-bounces@xxxxxxxxxxxxx [mailto:xen-api-bounces@xxxxxxxxxxxxx] On Behalf Of Koldo Aingeru Marcos Fernández
Sent: 28 December 2012 10:09
To: xen-api@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-API] Xen API connection with python and xml-rpc int limit
 
Hello all,
 
I'm trying to change the memory limits using the python implementation of the xenapi and I'm having trouble because the value in the api is a 64bit int and the xml-rpc specifies ints as 32 bit.  So I'm getting this error (both in MacOSX and CentOS):
 
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/xmlrpclib.py", line 710, in dump_int
    raise OverflowError, "int exceeds XML-RPC limits"
OverflowError: int exceeds XML-RPC limits
 
And this is the code in xmlrpclib.py:
 
    def dump_int(self, value, write):
        # in case ints are > 32 bits
        if value > MAXINT or value < MININT:
            raise OverflowError, "int exceeds XML-RPC limits"
 
 
Is there any workaround for this? I would like to avoid both doing a ssh connection to the host or modifying xmlrpclib.py.
 
Thanks!
 
========================================
Koldo Aingeru Marcos Fdez. 
Sarenet S.A.
Tel: 944209470 - Fax: 944209465
Parque Tecnológico, Edificio 103
48170 Zamudio
Bizkaia
========================================


 

 

========================================
Koldo Aingeru Marcos Fdez. 
Sarenet S.A.
Tel: 944209470 - Fax: 944209465
Parque Tecnológico, Edificio 103
48170 Zamudio
Bizkaia
========================================




_______________________________________________
Xen-api mailing list
Xen-api@xxxxxxxxxxxxx
http://lists.xen.org/cgi-bin/mailman/listinfo/xen-api

 


Rackspace

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