On Fri, Nov 13, 2015 at 01:53:49AM EST, Paul Carver wrote: > On 11/3/2015 1:03 PM, Sean M. Collins wrote: > >Anyway, the code is currently up on GitHub - I just threw it on there > >because I wanted to scratch my hacking itch quickly. > > > >https://github.com/sc68cal/neutron-classifier > > > > Sean, > > How much is needed to turn your models into something runnable to the extent > of populating a database? I'm not really all that proficient with SQL > Alchemy or SQL in general so I can't really visualize what the polymorphism > statements in your model actually create.
Yep - the doc links are still not well organized, but when I was writing the code I had the same issue, so I stuck a lot of debugging stuff in so I could see the CREATE statements. https://github.com/sc68cal/neutron-classifier/blob/master/doc/source/usage.rst It's a little basic right now, it's just one classifier added to a chain - I'm going to take that and build it out more to show the full classifier chain that would be created in the DB for something like a security group or a firewall rule, so you see all the classifiers being created. Bear with me :) > I'd like to create a few classifier rules and see what gets populated into > the database and also to understand complicated of an SQL query is SQL > Alchemy generating in order to reassemble each rule from its polymorphic > representation in the database. Yeah. Right now my unit tests are super hacky, since I'm creating a DB engine and session and passing them into the API. It's dumb and ugly but I'm still reading through oslo_db's dev docs and some of how Neutron creates the database session and packs it into a context so it can be passed around, so my code doesn't make you want to claw your eyes out. -- Sean M. Collins __________________________________________________________________________ OpenStack Development Mailing List (not for usage questions) Unsubscribe: [email protected]?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
