[ovs-dev] [PATCH] vswitchd: Add entity-relationship diagram to ovs-vswitchd.conf.db.5.

Jesse Gross jesse at nicira.com
Wed Jun 23 19:51:08 UTC 2010


On Wed, Jun 23, 2010 at 9:43 AM, Ben Pfaff <blp at nicira.com> wrote:

> On Tue, Jun 22, 2010 at 06:45:06PM -0700, Jesse Gross wrote:
> > On Tue, Jun 22, 2010 at 11:47 AM, Ben Pfaff <blp at nicira.com> wrote:
> > >
> > > +dnl Checks for dot.
> > > +AC_DEFUN([OVS_CHECK_DOT],
> > > +  [AC_CACHE_CHECK(
> > > +    [for dot],
> > > +    [ovs_cv_dot],
> > > +    [dnl "dot" writes -V output to stderr:
> > > +     if (dot -V) 2>&1 | grep Graphviz >/dev/null 2>&1; then
> > > +       ovs_cv_dot=yes
> > > +     else
> > > +       ovs_cv_dot=no
> > > +     fi])])
> > >
> >
> > If we're going to make our behavior conditional based on whether Graphviz
> is
> > installed should we document that somewhere?
>
> Probably.
>
> > Also, on Ubuntu "dot -V" when it isn't installed results in:
> > The program 'dot' is currently not installed.  You can install it by
> typing:
> > sudo apt-get install graphviz
>
> Jerks :-)
>
> > So this test works but only due to the difference in capitalization.
>
> Argh, the graphviz folks changed the capitalization between a couple of
> versions too.  On one of my boxes 'dot -V' prints
>        dot - graphviz version 2.26.3 (20100126.1600)
> and on another:
>        dot - Graphviz version 2.20.2 (Sun Oct 12 22:28:10 UTC 2008)
>
> I've updated the test to do better.
>
> >
> > > diff --git a/vswitchd/vswitch.pic b/vswitchd/vswitch.pic
> > > new file mode 100644
> > > index 0000000..67c3338
> > > --- /dev/null
> > > +++ b/vswitchd/vswitch.pic
> > >
> >
> > Are we trying to autogenerate this file?
>
> The idea is to distribute a copy of it so that everyone can enjoy the
> helpful diagram, even those users who don't have graphviz installed.
> Most users won't change the schema, so this works fine.  If you change
> the schema, you need graphviz if you want to get the updates.  And in
> fact most changes to the schema probably won't change the diagram anyway
> (only changes that add or remove columns with references or add or
> remove tables will change the diagram).
>
> That's close to how we handle other files that depend on tools that
> users might not have, e.g. vswitchd/vswitch-idl.c depends on Python that
> some users might not have (such as users who build inside the Xen DDK).
> (Most of those, though, we don't check into the Git repository.)
>
> Anyway, thank you for your comments.  Here is an incremental diff
> against the previous version.  What do you think now?
>

Looks good, thanks for the explanation.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-dev/attachments/20100623/b5ee235e/attachment-0003.html>


More information about the dev mailing list