[Engine-devel] ovirtSDK: ObjectsFactory would bring ability to customize objects

Itamar Heim iheim at redhat.com
Tue Feb 14 14:58:05 UTC 2012


On 02/14/2012 02:57 PM, Jaroslav Henner wrote:
> Greetings.
>
> I'm an automation tester in charge of testing SDK, my problem is that I
> cannot influence the objects that are created without so called "monkey
> patching" (google that and you will see what it means) the
> ovirtsdk.infrastructure.brokers.*. I made some comments about this
> #782891, but I was not so clear there, so I hope this will be better:
>
>
> In [12]: api.datacenters.list()[0]
> Out[12]: <ovirtsdk.infrastructure.brokers.DataCenter at 0x1a62890>
>
> You see that this returns an object that was declared somewhere in SDK.
> We have AFAIK no good way to say which object should be created.
>
> It would be good for us to be able to tell SDK:
> "
> My dear SDK, every time you are asked, please don't create and give me
> ovirtsdk.infrastructure.brokers.DataCenter, but something very similar:
> our.tests.infrastructure.brokers.DataCenter
> "

I'm not sure i understand - you want the SDK to return an object from a 
class it does not know (i.e., the SDK to return an object from your class)?
how will this look like if the SDK was in another language (say java)?




More information about the Engine-devel mailing list