On 1/25/17, 1:59 PM, "Ihar Hrachyshka" <[email protected]> wrote:
> Looking at the code, I don't see a clear case to even use set() type
> there. A list would seem to work just fine. Should we try to convert
> to using lists there?
I will convert it into a list and check how it works.
> Nevertheless, we can look into extending the object base class for
> hashing. I wonder though if it's something to tackle in Neutron scope.
> Sounds more like an oslo.versionedobjects library feature request.
Currently, I have added the hashing in the specific object but as you mentioned
it
should be in object base class. I will try implementing that.
As the hashing for the OVO’s is based on the primary keys
I am not sure whether we can implement this in oslo.versionedobjects library.
Thanks,
Anindita (irc: dasanind)
On Wed, Jan 25, 2017 at 11:53 AM, Das, Anindita <[email protected]>
wrote:
> Hi Ihar,
>
>
>
> While doing the integration for vlanallocation [1] I found that OVO
> associated with VlanAllocation throws “unhashable type” error with py35.
>
> The associated stack trace is here [2].
>
>
>
> To resolve this issue I added an equality and hash method in the
> vlanallocation OVO [3].
>
> My understanding is we will face the same problem with other OVO objects
as
> well when we do similar operations on the object as in [1].
>
> Should we make all the OVO objects hashable or deal it case by case?
> Thoughts?
>
>
>
>
>
> [1]
>
https://review.openstack.org/#/c/367810/28/neutron/plugins/ml2/drivers/type_vlan.py@77
>
> [2] http://paste.openstack.org/show/596281/
>
> [3]
>
https://review.openstack.org/#/c/367810/28/neutron/objects/plugins/ml2/vlanallocation.py@38-55
>
>
>
> Thanks,
>
> Anindita (irc: dasanind)
__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: [email protected]?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev