[openstack-dev] [all] cross project communication: Return request-id to caller
doug at doughellmann.com
Fri Jul 24 14:08:45 UTC 2015
Excerpts from Kekane, Abhishek's message of 2015-07-24 06:33:00 +0000:
> Hi Devs,
> X-Openstack-Request-Id. We have analysed python-cinderclient, python-glanceclient, python-novaclient, python-keystoneclient and python-neutronclient to check the return types.
> There are 9 ways return values are returned from python clients:
> 1. List
> 2. Dict
> 3. Resource class object
> 4. None
> 5. Tuple
> 6. Exception
> 7. Boolean (True/False, for keystoneclient)
> 8. Generator (for list api's in glanceclient)
> 9. String (for novaclient)
> Out of 9 we have solution for all return types except generator.
> In case of glance-client list api's are returning generator which is immutable. So it is not possible to return request-id in this case, which is a blocker for adopting the solution.
> I have added detail analysis for above return types in etherpad  as solution #3.
> If you have any suggestion in case of generation type then please let me know.
It should be possible to create a new class to wrap the existing
generator and implement the iterator protocol .
>  http://eavesdrop.openstack.org/meetings/crossproject/2015/crossproject.2015-07-07-21.01.log.html
>  https://etherpad.openstack.org/p/request-id
> Thanks & Best Regards,
> Abhishek Kekane
More information about the OpenStack-dev