[Engine-devel] SDK: multiple instances of API?

Michael Pasternak mpastern at redhat.com
Sun Nov 27 20:23:36 UTC 2011


On 11/27/2011 09:13 PM, Geert Jansen wrote:
> Hi Michael,
> 
> when i try to create multiple instances of the API object like this:
> 
>   from ovirtsdk.api import API
> 
>   url = 'xxx'
>   username = 'admin at internal'
>   password = 'yyy'
> 
>   a1 = API(url, username, password)
>   a2 = API(url, username, password)
> 
> I get this error:
> 
>   Traceback (most recent call last):
>     File "test.py", line 8, in <module>
>       a2 = API(url, username, password)
>     File "/home/geertj/Source/ovirt-engine-sdk/src/ovirtsdk/api.py", line 47, in __init__
>       Mode.R)
>     File "/home/geertj/Source/ovirt-engine-sdk/src/ovirtsdk/infrastructure/contextmanager.py", line 53, in add
>       raise ImmutableError(key)
>   ovirtsdk.infrastructure.errors.ImmutableError: [ERROR]::'proxy' is immutable.
> 
> Any ideas?

this is another TODO, it remarked in code and
in commit message.

> 
> Thanks,
> Geert
> _______________________________________________
> Engine-devel mailing list
> Engine-devel at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/engine-devel


-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D



More information about the Engine-devel mailing list