summaryrefslogtreecommitdiff
path: root/ovsdb/ovsdb-dot.in
Commit message (Collapse)AuthorAgeFilesLines
* Require Python 3 and remove support for Python 2.Ben Pfaff2019-09-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Python 2 reaches end-of-life on January 1, 2020, which is only a few months away. This means that OVS needs to stop depending on in the next release that should occur roughly that same time. Therefore, this commit removes all support for Python 2. It also makes Python 3 a mandatory build dependency. Some of the interesting consequences: - HAVE_PYTHON, HAVE_PYTHON2, and HAVE_PYTHON3 conditionals have been removed, since we now know that Python3 is available. - $PYTHON and $PYTHON2 are removed, and $PYTHON3 is always available. - Many tests for Python 2 support have been removed, and the ones that depended on Python 3 now run unconditionally. This allowed several macros in the testsuite to be removed, making the code clearer. This does make some of the changes to the testsuite files large due to indentation level changes. - #! lines for Python now use /usr/bin/python3 instead of /usr/bin/python. - Packaging depends on Python 3 packages. Acked-by: Numan Siddique <nusiddiq@redhat.com> Tested-by: Numan Siddique <nusiddiq@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* ovsdb: ovsdb-dot.in: Replace sys.maxint with sys.maxsize for Python3Markos Chandras2018-01-091-2/+2
| | | | | | | | | There is no sys.maxint anymore on python3. However, sys.maxsize can be used as an integer larger than any practical list or string index. Link: https://docs.python.org/3.1/whatsnew/3.0.html#integers Signed-off-by: Markos Chandras <mchandras@suse.de> Signed-off-by: Ben Pfaff <blp@ovn.org>
* ovsdb: ovsdb-dot.in: Change exception semantics for Python3Markos Chandras2018-01-091-2/+2
| | | | | | | | | | | | | | | | PEP-3110 changes the semantics for capturing exceptions in Python3 from 'except E,N' to 'except E as N'. This fixes the following problem when building with python3 SyntaxError: invalid syntax File "./ovsdb/ovsdb-dot.in", line 106 except ovs.db.error.Error, e: ^ SyntaxError: invalid syntax Link: https://www.python.org/dev/peps/pep-3110/ Signed-off-by: Markos Chandras <mchandras@suse.de> Signed-off-by: Ben Pfaff <blp@ovn.org>
* ovsdb: ovsdb-dot.in: Use print function for Python3Markos Chandras2018-01-091-14/+14
| | | | | | | | | | | | | | | | The python2 print statement no longer works in python3 since the latter uses a print function. As such, replace all instances of 'print' with 'print()'. This fixes the following build problem with python3 > ovsdb/ovsdb-client.1.tmp File "./ovsdb/ovsdb-dot.in", line 34 print "\t%s -> %s [%s];" % ( ^ SyntaxError: invalid syntax Signed-off-by: Markos Chandras <mchandras@suse.de> Signed-off-by: Ben Pfaff <blp@ovn.org>
* ovsdb: Use items() instead of iteritems() for Python3Markos Chandras2018-01-091-2/+2
| | | | | | | | | | | | | | | | Python3 removed the iteritems() iterator and replaced it with items() which should also work in Python2. This fixes the following build problem on Python3: Traceback (most recent call last): File "./ovsdb/ovsdb-idlc.in", line 1436, in <module> func(*args[1:]) File "./ovsdb/ovsdb-idlc.in", line 314, in printCIDLHeader for columnName, column in sorted(table.columns.iteritems()): AttributeError: 'dict' object has no attribute 'iteritems' Signed-off-by: Markos Chandras <mchandras@suse.de> Signed-off-by: Ben Pfaff <blp@ovn.org>
* docs: Fix overlapping 'weak' edges in ovs-vswitchd.conf.db.5.Shu Shen2015-02-131-1/+0
| | | | | | | | | | | | | Multiple weak edges between nodes at the same rank overlaps with each other in a dot/graphviz diagram. The vswitchd.pic used in ovs-vswitchd.conf.db.5 suffers this problem. Removing "constraint=false" allows graphviz to rank the nodes using the weak edages as well so that the nodes at the ends of a weak edge won't be at the same rank and allows mutlple 'weak' edges to be visible. Signed-off-by: Shu Shen <shu.shen@radisys.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* ovsdb-dot: Include arrows by default.Ben Pfaff2013-10-171-5/+11
| | | | | | | | | | | | | When ovsdb-dot generates diagrams for use in the manpages, the dot2pic postprocessor makes nicer output if the arrowheads are omitted (dot2pic adds the arrowheads itself). But for other uses that don't go through the postprocessor, we generally want the arrowheads. So this commit adds an option. On the principle that the default should be the least surprising to a naive user, arrowheads are included by default. Signed-off-by: Ben Pfaff <blp@nicira.com> Signed-off-by: Justin Pettit <jpettit@nicira.com> Acked-by: Justin Pettit <jpettit@nicira.com>
* vswitchd: Improve the readability of the E-R diagram.Ben Pfaff2013-10-081-0/+1
| | | | | Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Justin Pettit <jpettit@nicira.com>
* ovs.db.types: Add table reference to ovs.db.types.BaseType.Ben Pfaff2011-09-231-2/+2
| | | | | | | | | | Until now ovs.db.types.BaseType has kept track of the name of the referenced table but not a reference to it. This commit renames the ref_table attribute to ref_table_name and adds a new ref_table attribute whose value is a reference to the named table. This will be useful in an upcoming commit where table references are actually followed.
* ovsdb: Annotate E-R diagram with number of allowed values.Ben Pfaff2011-05-241-5/+20
| | | | This makes the diagram even more informative.
* ovsdb: Implement garbage collection.Ben Pfaff2011-03-101-5/+11
|
* ovsdb: Remove trailing whitespaceEthan Jackson2010-11-291-2/+2
| | | | | This commit removes trailing whitespace from the files in the ovsdb directory.
* docs: Implement our own dot->pic translator.Ben Pfaff2010-11-051-0/+1
| | | | | | | | Recent versions of Graphviz no longer support output to PIC format, so this commit adds our own internal translator from dot's "plain" output format to PIC format. The "plain" format works best with slightly different "dot" input (advised by the Graphviz manual description of the "plain" format) so this commit also adjusts ovsdb-dot's output.
* configure: Fix Graphviz test and input generation.Ben Pfaff2010-11-051-5/+7
| | | | | | | | | | This check for Graphviz never actually worked properly because Autoconf swallows up the [] around [gG], so Graphviz was always detected as missing. This commit fixes the problem by doubling up to [[gG]]. Because Graphviz was never used, I never noticed that ovsdb-dot had not been revised to use the latest Python interface to OVSDB, so this commit fixes up those problems too.
* Implement initial Python bindings for Open vSwitch database.Ben Pfaff2010-08-251-6/+1
| | | | | | | | | | These initial bindings pass a few hundred of the corresponding tests for C implementations of various bits of the Open vSwitch library API. The poorest part of them is actually the Python IDL interface in ovs.db.idl, which has not received enough attention yet. It appears to work, but it doesn't yet support writes (transactions) and it is difficult to use. I hope to improve it as it becomes clear what semantics Python applications actually want from an IDL.
* vswitchd: Add entity-relationship diagram to ovs-vswitchd.conf.db.5.Ben Pfaff2010-06-241-0/+87
I've updated http://openvswitch.org/ovs-vswitchd.conf.db.5.pdf with example output.