> Le 28 avr. 2017 à 18:00, Ben De Luca <[email protected]> a écrit :
>
> before people go writing yet another api client wouldn't it make sense to
> just define the api client in terms of some thing like swagger ?
> http://swagger.io/
>
>
I'm using the curl wrapper from the python sdk4, but it misses a lot of high
level wrappers and helpers. That's what I'm doing, writting code like:
@wrapper(writer_class=StorageDomainWriter, type_class=StorageDomain,
service_class=StorageDomainService)
class StorageDomainWrapper(ObjectWrapper):
pass
@wrapper(service_class=StorageDomainsService, service_root="storagedomains")
class StoragesDomainWrapper(ListObjectWrapper):
pass
That allows to pack some functions that the sdk splitted or made difficult to
find. It should allows to write simpler code for end user :
lister = StoragesDomainWrapper(api=...)
sd = lister.get(name="sd1")
print sd.status
sd.export()
_______________________________________________
Users mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/users