Thanks for the review. Response inline On Sun, Jul 3, 2016 at 12:04 PM, Ben Pfaff <b...@ovn.org> wrote:
> On Thu, Jun 30, 2016 at 02:27:19PM -0700, Aaron Rosen wrote: > > This patch exposes the c function expr_parse_string() to be called via > > python. The motivation for this is so that clients interfacing with > > ovn can call this method in order to validate the data they are writting > > to ovn. > > > > Previously, there were several bugs in the neutron/ovn integration > > that went unnoticed due to the client writing invalid data. This should > > hopefully help catch errors like this earlier as it can now be detected > on > > the client side and an error can be raised. > > I'm OK with the idea of moving the code to create a symtab for testing > purposes into the OVN library, but I think that it should go into > expr.[ch] since that's what implements expressions, and it should have a > name and comment that makes it clear that it's for testing. > Sounds good to me I'll make this update. > > I don't yet understand how to use this, though. When I run a normal > "make check" I get failures like this: > > # -*- compilation -*- > 2132. test-ovn-utils.at:12: testing test-ovn-utils - Python2 ... > ../../tests/test-ovn-utils.at:12: $PYTHON $srcdir/test-ovn-utils.py > stderr: > Traceback (most recent call last): > File "../../../../tests/test-ovn-utils.py", line 17, in <module> > from ovs import ovn_utils > ImportError: cannot import name ovn_utils > stdout: > ../../tests/test-ovn-utils.at:12: exit code was 1, expected 0 > 2132. test-ovn-utils.at:12: 2132. test-ovn-utils - Python2 ( > test-ovn-utils.at:12): FAILED (test-ovn-utils.at:12) > > Is some extra step required? Looks like you need to run: sudo python setup.py install and sudo python3 setup.py install (if you want the python3 tests to run). inside of ovs/python first. Is there a good place were we could add a hook to make that occur? I think the other issue that we are facing before that is in order to build these C extensions it currently is relying on the openvswitch-dev package being installed on the system rather than able to use it from the current source tree: https://github.com/openvswitch/ovs/blob/master/python/setup.py#L80 I believe Terry Wilson said that he was working on a fix for that though. > Thanks, > > Ben. > _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev