[openstack-dev] [oslo] support keymirror/valuemirror dict in olso

Joshua Harlow harlowja at fastmail.com
Tue Aug 23 05:00:07 UTC 2016


So question I have is how would this work in python?

Any example anywhere?

Reason I am asking is that in the example:

 > search_opts = {
 >
 > 'all_tenants': all_tenants,
 >
 > 'status': args.status,
 >
 > 'filter':filter,
 >
 > …….
 >
 > }

There is nothing really built-in to python afaik (besides locals or 
vars) that would let u figure out the name of those in any automatic 
manner so I'm not quite sure how u would determine they key names.

-Josh

Husheng (TommyLike, R&D IT&Tools Equipment Dept) wrote:
> Hi all,
>
> I have an idea about adding common function which creating an dictionary
> with key equal to its values in OSLO. This is inspired by Key mirror in
> node js(https://www.npmjs.com/package/keymirror).This is very useful
> when we create dictionary like below:
>
> search_opts = {
>
> 'all_tenants': all_tenants,
>
> 'status': args.status,
>
> 'filter':filter,
>
> …….
>
> }
>
> What’s your opinion on this, is this reasonable ,necessary and reachable?
>
> Thanks
>
> TommyLike.Hu
>
> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev



More information about the OpenStack-dev mailing list