*** bzhao_ has quit IRC | 00:08 | |
*** gongysh has joined #openstack-dragonflow | 01:09 | |
*** gongysh has quit IRC | 01:23 | |
*** gongysh has joined #openstack-dragonflow | 01:26 | |
*** gongysh has quit IRC | 01:34 | |
*** gongysh has joined #openstack-dragonflow | 01:35 | |
*** yuval has joined #openstack-dragonflow | 07:46 | |
*** lewo has quit IRC | 07:47 | |
*** lewo has joined #openstack-dragonflow | 07:47 | |
openstackgerrit | Omer Anson proposed openstack/dragonflow master: Migrate QosPolicy to new model structure https://review.openstack.org/439848 | 08:18 |
---|---|---|
oanson | dimak, yo, you in? | 08:24 |
dimak | oanson, yeah | 08:25 |
oanson | Consultation - do we want an AttributeError when accessing non-existent fields on an NB model? | 08:25 |
oanson | I don't mean fields, that were not set - but fields that were not defined | 08:25 |
dimak | Yeah, I think that would be most natural | 08:25 |
oanson | It will also allow us to find typo-related problems faster | 08:26 |
oanson | All right. I' | 08:26 |
oanson | All right. I'll see if I can work something up | 08:26 |
dimak | Oh, on __init__? | 08:26 |
oanson | That too | 08:27 |
oanson | Both __init__, and after the object was constructed | 08:27 |
oanson | No good? | 08:28 |
dimak | Why do you mean by the latter? | 08:29 |
oanson | e.g. the lswitch code | 08:29 |
dimak | I don't think its an issue to setattr on a new attribute | 08:29 |
oanson | lswitch = l2.LogicalSwitch(...) | 08:29 |
oanson | lswitch.asdf = 'Hi there' # <- this should raise an AttributeError | 08:30 |
dimak | Why? | 08:30 |
oanson | Because the field doesn't exist | 08:30 |
dimak | lswitch = object() wouldn't raise that | 08:30 |
dimak | You can have attributes that are not fields | 08:30 |
oanson | Yes. But it's not an object. It's a representation of our database model | 08:30 |
dimak | It is an object | 08:31 |
oanson | It shouldn't be used to have arbitrary attributes, since you don't know when it will be serialised/deserialised and those attributed will be lost | 08:31 |
dimak | What if I have lport and I want to tag it with .is_local = True? | 08:31 |
oanson | Yes. Good point... | 08:32 |
dimak | I don't have to rely on them but I can utilize them when I have them | 08:32 |
dimak | also, I have a good idea when those attributes will be present because everything goes through local controller first | 08:32 |
dimak | and then propagates to the apps | 08:32 |
oanson | And when they're re-used, they are stored in a in-memory cache as an object, not serialised | 08:33 |
oanson | Although 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 |
dimak | It is to the specific app/use case at the moment | 08:34 |
dimak | DbStore doesn't do that | 08:34 |
oanson | I thought that was the plan | 08:34 |
oanson | Although if that happens, that can be worked around with a post-get hook on the controller | 08:35 |
oanson | In any case, I'm dropping this | 08:36 |
oanson | Turns out this was a bad idea | 08:36 |
dimak | We need a singleton nb api first which we don't use in controller context | 08:36 |
oanson | For which we need https://review.openstack.org/#/c/415997/ | 08:36 |
oanson | For the Service base class | 08:36 |
dimak | Yeah | 08:37 |
*** gongysh has quit IRC | 09:28 | |
*** gongysh has joined #openstack-dragonflow | 09:28 | |
*** gongysh has quit IRC | 09:30 | |
openstackgerrit | Merged openstack/dragonflow master: Use neutron_lib for context module in mech driver https://review.openstack.org/435675 | 09:31 |
*** openstackgerrit has quit IRC | 10:33 | |
*** denismakogon has joined #openstack-dragonflow | 13:20 | |
*** denismakogon has quit IRC | 14:02 | |
*** yuval has quit IRC | 15:10 | |
*** saggi has quit IRC | 15:18 | |
*** saggi has joined #openstack-dragonflow | 15:20 | |
*** dimak has quit IRC | 23:17 | |
*** dimak has joined #openstack-dragonflow | 23:17 |
Generated by irclog2html.py 2.14.0 by Marius Gedminas - find it at mg.pov.lt!