Re: [openstack-dev] [all][dev][python] constructing a deterministic representation of a python data structure

2016-11-04 Thread Amrith Kumar
t: Friday, November 4, 2016 8:22 AM > To: openstack-dev@lists.openstack.org > Subject: Re: [openstack-dev] [all][dev][python] constructing a deterministic > representation of a python data structure > > > > On 04/11/16 08:02 AM, Amrith Kumar wrote: > > [Amrith Kumar] I wasn'

Re: [openstack-dev] [all][dev][python] constructing a deterministic representation of a python data structure

2016-11-04 Thread gordon chung
On 04/11/16 08:02 AM, Amrith Kumar wrote: > [Amrith Kumar] I wasn't sure I'd be able to do this before (the only place > where this model will work is in oslo.messaging) but thanks to the links > that Dims forwarded, there may be a chance to make this part of oslo! if you do this in

Re: [openstack-dev] [all][dev][python] constructing a deterministic representation of a python data structure

2016-11-04 Thread Amrith Kumar
> -Original Message- > From: Clint Byrum [mailto:cl...@fewbar.com] > Sent: Thursday, November 3, 2016 6:04 PM > To: openstack-dev <openstack-dev@lists.openstack.org> > Subject: Re: [openstack-dev] [all][dev][python] constructing a deterministic > representation of

Re: [openstack-dev] [all][dev][python] constructing a deterministic representation of a python data structure

2016-11-03 Thread Clint Byrum
Excerpts from Amrith Kumar's message of 2016-11-03 20:50:01 +: > Josh, > > I have the key management part figured out and in actuality I will be > signing the messages. > > But step 1 is getting a deterministic representation and step 2 is hashing. > Step 3 would be signing. > > So, steps

Re: [openstack-dev] [all][dev][python] constructing a deterministic representation of a python data structure

2016-11-03 Thread Davanum Srinivas
response to him on this. > > -amrith > > -Original Message- > From: Davanum Srinivas [mailto:dava...@gmail.com] > Sent: Thursday, November 3, 2016 3:03 PM > To: OpenStack Development Mailing List (not for usage questions) > <openstack-dev@lists.openstack.org> > Subject: Re:

Re: [openstack-dev] [all][dev][python] constructing a deterministic representation of a python data structure

2016-11-03 Thread Amrith Kumar
y, November 3, 2016 3:09 PM To: openstack-dev@lists.openstack.org <mailto:openstack-dev@lists.openstack.org> Subject: Re: [openstack-dev] [all][dev][python] constructing a deterministic representation of a python data structure On 03/11/16 02:24 PM, Amrith Kumar wrote: > > So, jus

Re: [openstack-dev] [all][dev][python] constructing a deterministic representation of a python data structure

2016-11-03 Thread Amrith Kumar
f you > think that would pass muster there. > > -amrith > > -Original Message- > From: gordon chung [mailto:g...@live.ca] > Sent: Thursday, November 3, 2016 3:09 PM > To: openstack-dev@lists.openstack.org > Subject: Re: [openstack-dev] [all][dev][python] constructing a > de

Re: [openstack-dev] [all][dev][python] constructing a deterministic representation of a python data structure

2016-11-03 Thread Morgan Fainberg
> To: openstack-dev@lists.openstack.org > Subject: Re: [openstack-dev] [all][dev][python] constructing a > deterministic > representation of a python data structure > > > > On 03/11/16 02:24 PM, Amrith Kumar wrote: > > > > > So, just before calling call() or

Re: [openstack-dev] [all][dev][python] constructing a deterministic representation of a python data structure

2016-11-03 Thread Joshua Harlow
mber 3, 2016 3:09 PM To: openstack-dev@lists.openstack.org Subject: Re: [openstack-dev] [all][dev][python] constructing a deterministic representation of a python data structure On 03/11/16 02:24 PM, Amrith Kumar wrote: So, just before calling call() or cast(), I could compute the hash and s

Re: [openstack-dev] [all][dev][python] constructing a deterministic representation of a python data structure

2016-11-03 Thread Amrith Kumar
that would pass muster there. -amrith -Original Message- From: gordon chung [mailto:g...@live.ca] Sent: Thursday, November 3, 2016 3:09 PM To: openstack-dev@lists.openstack.org Subject: Re: [openstack-dev] [all][dev][python] constructing a deterministic representation of a python data structure

Re: [openstack-dev] [all][dev][python] constructing a deterministic representation of a python data structure

2016-11-03 Thread Amrith Kumar
[mailto:dava...@gmail.com] Sent: Thursday, November 3, 2016 3:03 PM To: OpenStack Development Mailing List (not for usage questions) <openstack-dev@lists.openstack.org> Subject: Re: [openstack-dev] [all][dev][python] constructing a deterministic representation of a python data structure

Re: [openstack-dev] [all][dev][python] constructing a deterministic representation of a python data structure

2016-11-03 Thread gordon chung
On 03/11/16 02:24 PM, Amrith Kumar wrote: > > So, just before calling call() or cast(), I could compute the hash and > stuff it into the dictionary that is being sent over, and I can do the > same on the receiving side. But since I cannot guarantee that the > representation on the receiving

Re: [openstack-dev] [all][dev][python] constructing a deterministic representation of a python data structure

2016-11-03 Thread Davanum Srinivas
Does oslo.versionedobjects solve some of your needs? http://www.slideshare.net/davanum/ovo-deep-dive https://gorka.eguileor.com/learning-something-new-about-oslo-versioned-objects/ http://www.danplanet.com/blog/2015/10/06/upgrades-in-nova-objects/ -- Dims On Thu, Nov 3, 2016 at 2:24 PM, Amrith

[openstack-dev] [all][dev][python] constructing a deterministic representation of a python data structure

2016-11-03 Thread Amrith Kumar
TL;DR I want to take a python data structure (see later for details) and represent it in a format that will be stable across python versions, and platforms so that I can construct a stable hash. I'm looking for pointers to some best practices on how to do this. The longer version