Hi all. There a set of openstack api functions which starts background actions and return preliminary results - like 'novaclient.create'. Those functions requires periodically check results and handle timeouts/errors (and often cleanup + restart help to fix an error).
Check/retry/cleanup code duplicated over a lot of core projects. As examples - heat, tempest, rally, etc and definitely in many third-party scripts. I propose to provide common higth-level API for such functions, which uses 'futures' (http://en.wikipedia.org/wiki/Futures_and_promises) as a way to present background task. Idea is to add to each background-task-starter function a complimentary call, that returns 'future' object. E.g. create_future = novaclient.servers.create_async(....) ..... vm = create_future.result() This allows to unify(and optimize) monitoring cycles, retries, etc. Please found complete BP at https://github.com/koder-ua/os_api/blob/master/README.md Thanks -- Kostiantyn Danilov aka koder <http://koder.ua> Principal software engineer, Mirantis skype:koder.ua http://koder-ua.blogspot.com/ http://mirantis.com
__________________________________________________________________________ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev