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

Geert Jansen gjansen at redhat.com
Sun Nov 27 19:13:50 UTC 2011


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?

Thanks,
Geert



More information about the Engine-devel mailing list