summaryrefslogtreecommitdiff
path: root/python/automake.mk
Commit message (Collapse)AuthorAgeFilesLines
* Python tests: Add winutils.py moduleAlin Balutoiu2017-01-031-1/+2
| | | | | | | | | | | | This patch adds a new python module which contains helper functions. These will be neccessary for the Windows implementation. They cover the following aspects: sockets and namedpipes. Signed-off-by: Alin Balutoiu <abalutoiu@cloudbasesolutions.com> Acked-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions> Signed-off-by: Gurucharan Shetty <guru@ovn.org>
* python tests: Added fcntl module for WindowsPaul Boca2016-08-031-0/+1
| | | | | | | | | | This is needed for lockf function used to lock the PID file on Windows. ioctl and fcntl functions are not implemented at this time because they are not used by any script. Signed-off-by: Paul-Daniel Boca <pboca@cloudbasesolutions.com> Acked-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Signed-off-by: Gurucharan Shetty <guru@ovn.org>
* Add optional C extension wrapper for Python JSON parsingTerry Wilson2016-06-081-0/+3
| | | | | | | | | | | | | | | | | | | | The pure Python in-tree JSON parser is *much* slower than the in-tree C JSON parser. A local test parsing a 100Mb JSON file showed the Python version taking 270 seconds. With the C wrapper, it took under 4 seconds. The C extension will be used automatically if it can be built. If the extension fails to build, a warning is displayed and the build is restarted without the extension. The Serializer class is replaced with Python's built-in JSON library since the ability to process chunked data is not needed in that case. The extension should work with both Python 2.7 and Python 3.3+. Signed-off-by: Terry Wilson <twilson@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* python: Run flake8 at build time.Russell Bryant2016-01-051-0/+7
| | | | | | | | | | | | If flake8 is installed, run it at build time. Similar to most Makefile targets, run it once and then only run again if the files change. flake8 is set to ignore all error and warning types that currently occur. Future patches will remove items from the ignore list as they are resolved. Signed-off-by: Russell Bryant <russell@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
* Makefiles: Stop distributing files because building them requires Python.Ben Pfaff2015-06-231-1/+1
| | | | | | | | | | | | A long time ago, the Open vSwitch build did not depend on Python (whereas the runtime did), so the "make dist" based distribution included the results of Python build tools. Later, the build began using Python, but the distribution still included some of those results, because no one had gone to the trouble of changing them. This commit changes the Makefiles not to distribute Python-generated files but instead to just generate them at build time. Signed-off-by: Ben Pfaff <blp@nicira.com>
* python: Add setuptools for Python lib for PyPI.Terry Wilson2015-04-141-0/+11
| | | | | | | | | | | | | | | This adds very basic support for setuptools so that the OVS Python lib can be added to PyPI. This currently uses the Open vSwitch version number and the generated dirs.py, though there is no real reason to tie the Python libraries releases or version numbers to the main project's. Signed-off-by: Terry Wilson <twilson@redhat.com> Acked-by: Russell Bryant <rbryant@redhat.com> Acked-by: Kyle Mestery <mestery@mestery.com> [blp@nicira.com adjusted automake.mk] Signed-off-by: Ben Pfaff <blp@nicira.com>
* ovsdb-doc: Factor out nroff formatting into a separate Python module.Ben Pfaff2015-02-191-0/+6
| | | | | | | This will make it cleaner to add another build-time program that generates nroff from XML. Signed-off-by: Ben Pfaff <blp@nicira.com>
* Makefiles: Add $(AM_V_GEN) annotations to clean up "make" output.Ben Pfaff2014-09-291-4/+4
| | | | | | | | The Open vSwitch "make" output was still pretty verbose even when configured with --enable-silent-rules. This cleans it up. Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Joe Stringer <joestringer@nicira.com>
* dirs: dbdir default must be based on sysconfdir.Ben Pfaff2012-08-031-6/+23
| | | | | | | | | | | | | | | Some in-tree and out-of-tree code sets the OVS_SYSCONFDIR environment variable to control where /etc files go (mostly for test purposes). When the database directory (dbdir) was split off from the sysconfdir, the configure-time default continued to be based on the sysconfdir, but overriding the sysconfdir at runtime with OVS_SYSCONFDIR didn't have any effect on the dbdir, which caused a visible change in behavior for code that set the OVS_SYSCONFDIR environment variable. This commit reverts that change in behavior, by basing the dbdir on OVS_SYSCONFDIR if that environment variable is set (but the OVS_DBDIR environment variable is not). Signed-off-by: Ben Pfaff <blp@nicira.com>
* Make the location of the database separately configurable.Ben Pfaff2012-08-011-0/+1
| | | | | | | | | The default is unchanged, /etc/openvswitch/conf.db. This makes it possible to transition each Open vSwitch packaging from /etc/openvswitch/conf.db to /var/lib/openvswitch/conf.db independently. Signed-off-by: Ben Pfaff <blp@nicira.com>
* ovs-l3ping: A new test utility that allows to detect L3 tunneling issuesAnsis Atteka2012-07-021-0/+1
| | | | | | | | | | | | | | | | | | ovs-l3ping is similar to ovs-test, but the main difference is that it does not require administrator to open firewall holes for the XML/RPC control connection. This is achieved by encapsulating the Control Connection over the L3 tunnel itself. This tool is not intended as a replacement for ovs-test, because ovs-test covers much broader set of test cases. Sample usage: Node1: ovs-l3ping -s 192.168.122.236,10.1.1.1 -t gre Node2: ovs-l3ping -c 192.168.122.220,10.1.1.2,10.1.1.1 -t gre Issue#11791 Signed-off-by: Ansis Atteka <aatteka@nicira.com>
* python: Break unixctl implementation into registry, client, and server.Ben Pfaff2012-05-221-1/+3
| | | | | | | | | | | I wish to add some unixctl commands to the Python vlog module. However, importing ovs.unixctl in ovs.vlog creates a circular dependency, because ovs.unixctl imports ovs.vlog already. The solution, in this commit, is to break the unixctl module into three parts: a register (ovs.unixctl) that does not depend on ovs.vlog, and client (ovs.unixctl.client) and server (ovs.unixctl.server) modules that do. This breaks the circular dependency. Signed-off-by: Ben Pfaff <blp@nicira.com>
* Use PYTHONDONTWRITEBYTECODE=yes for invoking Python for build or test.Ben Pfaff2012-05-221-2/+0
| | | | | | | | | | | | | | | An upcoming commit will break the ovs.vlog module into an ovs.vlog package with submodules. This commit makes switching between trees with the old structure and those with the new structure much easier. This commit works by setting PYTHONDONTWRITEBYTECODE=yes in Python invocations from the build system and testing. This keeps Python 2.6+ from creating .pyc and .pyo files. Creating .py[co] works OK for any given version of Open vSwitch, but it causes trouble if you switch from a version with foo/__init__.py into an (older) version with plain foo.py, since foo/__init__.pyc will cause Python to ignore foo.py. Signed-off-by: Ben Pfaff <blp@nicira.com>
* Fix typo in "PYTHONPATH".Ben Pfaff2012-05-221-1/+1
| | | | | Reported-by: Justin Pettit <jpettit@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* ovs-test: Enhancements to the ovs-test toolAnsis Atteka2012-04-181-1/+2
| | | | | | | | | | | | | | | | | | | -Implemented support for ovs-test client, so that it could automatically spawn an ovs-test server process from itself. This reduces the number of commands the user have to type to get tests running. -Automated creation of OVS bridges and ports (for VLAN and GRE tests), so that user would not need to invoke ovs-vsctl manually to switch from direct, 802.1Q and GRE tests. -Fixed some pylint reported warnings. -Fixed ethtool invocation so that we always try to query the physical interface to get the driver name and version. -and some others enhancements. The new usage: Node1:ovs-test -s 15531 Node2:ovs-test -c 127.0.0.1,1.1.1.1 192.168.122.151,1.1.1.2 -d -l 125 -t gre Signed-off-by: Ansis Atteka <aatteka@nicira.com>
* configure: Remove --with-build-number.Ben Pfaff2012-03-191-4/+0
| | | | | | | | | | From early days, Nicira used the --with-build-number option to configure to stamp our internal builds. We've since switched to another scheme, so this option is obsolete. Good riddance. Signed-off-by: Ben Pfaff <blp@nicira.com>
* python: Fix "make distcheck" error on version.py.Ben Pfaff2012-03-121-6/+6
| | | | | | | | | | | | | | | The generated version.py has to go in the srcdir and has to be regenerated based on config.status, which breaks "make distcheck" because it write-protects the srcdir. However, the contents of version.py only change when the version number changes, so we can just "touch" it when it doesn't really need to change. The same pattern is used elsewhere in the tree for other files in the same situation, e.g. the various RPM spec files. Reported-by: Chris Wright <chrisw@sous-sol.org> Acked-by: Chris Wright <chrisw@sous-sol.org> Signed-off-by: Ben Pfaff <blp@nicira.com>
* python: Make build number format consistent with C.Ethan Jackson2012-03-071-1/+4
| | | | | | | | The C code displays the build number as the empty string when 0, and as +build<num> otherwise. This commit updates version.py to be consistent and tests that it is in the unit tests. Signed-off-by: Ethan Jackson <ethan@nicira.com>
* python: Port unixctl to Python.Ethan Jackson2012-03-021-2/+4
| | | | | | | | | Many of the currently implemented Python daemons, and likely many daemons to be implemented in the future, could benefit from unixctl support even if only to implement "exit" and "version" commands. This patch implements unixctl in Python. Signed-off-by: Ethan Jackson <ethan@nicira.com>
* python: New method to retrieve OVS version at runtime.Ethan Jackson2012-03-021-0/+8
| | | | | | | | Version information is typically fairly useful when debugging Open vSwitch. This patch adds a new version.py module which python code can use to report its version to callers. Signed-off-by: Ethan Jackson <ethan@nicira.com>
* tests: Add code coverage for Python.Ethan Jackson2012-03-021-1/+3
| | | | | | | Adds support for Ned Batchelder's code coverage tool to the test suite. http://nedbatchelder.com/code/coverage/ Signed-off-by: Ethan Jackson <ethan@nicira.com>
* ovs-test: A new tool that allows to diagnose connectivity and performance issuesAnsis Atteka2011-11-181-0/+56
This tool will be a replacement for the current ovs-vlan-test utility. Besides from connectivity issues it will also be able to detect performance related issues in Open vSwitch setups. Currently it uses UDP and TCP protocols for stressing. Issue #6976