Tuesday, 2017-03-07

*** bzhao_ has quit IRC00:08
*** gongysh has joined #openstack-dragonflow01:09
*** gongysh has quit IRC01:23
*** gongysh has joined #openstack-dragonflow01:26
*** gongysh has quit IRC01:34
*** gongysh has joined #openstack-dragonflow01:35
*** yuval has joined #openstack-dragonflow07:46
*** lewo has quit IRC07:47
*** lewo has joined #openstack-dragonflow07:47
openstackgerritOmer Anson proposed openstack/dragonflow master: Migrate QosPolicy to new model structure  https://review.openstack.org/43984808:18
oansondimak, yo, you in?08:24
dimakoanson, yeah08:25
oansonConsultation - do we want an AttributeError when accessing non-existent fields on an NB model?08:25
oansonI don't mean fields, that were not set - but fields that were not defined08:25
dimakYeah, I think that would be most natural08:25
oansonIt will also allow us to find typo-related problems faster08:26
oansonAll right. I'08:26
oansonAll right. I'll see if I can work something up08:26
dimakOh, on __init__?08:26
oansonThat too08:27
oansonBoth __init__, and after the object was constructed08:27
oansonNo good?08:28
dimakWhy do you mean by the latter?08:29
oansone.g. the lswitch code08:29
dimakI don't think its an issue to setattr on a new attribute08:29
oansonlswitch = l2.LogicalSwitch(...)08:29
oansonlswitch.asdf = 'Hi there' # <- this should raise an AttributeError08:30
dimakWhy?08:30
oansonBecause the field doesn't exist08:30
dimaklswitch = object() wouldn't raise that08:30
dimakYou can have attributes that are not fields08:30
oansonYes. But it's not an object. It's a representation of our database model08:30
dimakIt is an object08:31
oansonIt shouldn't be used to have arbitrary attributes, since you don't know when it will be serialised/deserialised and those attributed will be lost08:31
dimakWhat if I have lport and I want to tag it with .is_local = True?08:31
oansonYes. Good point...08:32
dimakI don't have to rely on them but I can utilize them when I have them08:32
dimakalso, I have a good idea when those attributes will be present because everything goes through local controller first08:32
dimakand then propagates to the apps08:32
oansonAnd when they're re-used, they are stored in a in-memory cache as an object, not serialised08:33
oansonAlthough if they are not in the in-memory cache, they are retrieved from the nb_api. At least that was the plan, no?08:33
dimakIt is to the specific app/use case at the moment08:34
dimakDbStore doesn't do that08:34
oansonI thought that was the plan08:34
oansonAlthough if that happens, that can be worked around with a post-get hook on the controller08:35
oansonIn any case, I'm dropping this08:36
oansonTurns out this was a bad idea08:36
dimakWe need a singleton nb api first which we don't use in controller context08:36
oansonFor which we need https://review.openstack.org/#/c/415997/08:36
oansonFor the Service base class08:36
dimakYeah08:37
*** gongysh has quit IRC09:28
*** gongysh has joined #openstack-dragonflow09:28
*** gongysh has quit IRC09:30
openstackgerritMerged openstack/dragonflow master: Use neutron_lib for context module in mech driver  https://review.openstack.org/43567509:31
*** openstackgerrit has quit IRC10:33
*** denismakogon has joined #openstack-dragonflow13:20
*** denismakogon has quit IRC14:02
*** yuval has quit IRC15:10
*** saggi has quit IRC15:18
*** saggi has joined #openstack-dragonflow15:20
*** dimak has quit IRC23:17
*** dimak has joined #openstack-dragonflow23:17

Generated by irclog2html.py 2.14.0 by Marius Gedminas - find it at mg.pov.lt!