summaryrefslogtreecommitdiff
path: root/vtep
Commit message (Collapse)AuthorAgeFilesLines
* libX: add new release / version info tagsAaron Conole2017-01-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit uses the $PACKAGE_VERSION automake variable to construct a release and version info combination which sets the library name to be: libfoo-$(OVS_MAJOR_VERSION).so.$(OVS_MINOR_VERSION).0.$(OVS_MICRO_VERSION) where formerly, it was always: libfoo.so.1.0.0 This allows releases of Open vSwitch libraries to reflect which specific versions they came with, and sets up a psuedo ABI-versioning scheme. In this fashion, future releases of Open vSwitch could be installed alongside older releases, allowing 3rd party utilities linked against previous versions to continue to function. ex: $ ldd /path/to/utility linux-vdso.so.1 (0x00007ffe92cf6000) libopenvswitch-2.so.6 => /lib64/libopenvswitch-2.so.6 (0x00007f733b7a3000) libssl.so.10 => /lib64/libssl.so.10 (0x00007f733b530000) ... Note the library name and version information. Signed-off-by: Aaron Conole <aconole@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* db-ctl-base: Always support all tables in schema.Ben Pfaff2017-01-131-64/+14
| | | | | | | | | | | | | | | | | When one adds a new table to a database schema, it's easy to forget to add the table to the list of tables in the *ctl.c program. When this happens, the database commands for that program don't work on that table at all, even for commands like "list" and "create" that don't need any special help. This patch fixes that problem, by making sure that db-ctl-base always has the complete list of tables. Previously, each ctl_table_class pointed directly to the corresponding ovsdb_idl_table_class. With this patch, there are instead two parallel arrays, one of ovsdb_idl_table_classes and the other of ctl_table_classes. This change accounts for the bulk of the change to the db-ctl-base code. Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Lance Richardson <lrichard@redhat.com>
* Python tests: Set CREATE_NO_WINDOW flag for PopenAlin Balutoiu2017-01-031-1/+5
| | | | | | | | | | | | | | | | On Windows if the flag CREATE_NO_WINDOW is not specified when using subprocess.Popen, a new window will appear with the new process. The window is not necessary for the tests. This patch addresses this issue by adding the flag CREATE_NO_WINDOW for all subprocess.Popen calls if the machine is running Windows. Signed-off-by: Alin Balutoiu <abalutoiu@cloudbasesolutions.com> Acked-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions> Tested-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions> Signed-off-by: Gurucharan Shetty <guru@ovn.org>
* table: correct documented default format in man pagesLance Richardson2016-12-221-1/+0
| | | | | | | | | | | | | | | | | There are currently five users of the table formatting library, all of which default to "list" except for ovsdb-client which defaults to "table". The library current default is "table", and the table.man man page fragment only considers ovs-vsctl to use something other than "table" as a default.As a result, the man pages for ovn-sbctl and vtep-ctl are currently incorrect (these options aren't documented in the ovn-nbctl man page, which will need to be addressed in a future patch). Fix by making the library default format "list" and handling ovsdb-client as the exception. Signed-off-by: Lance Richardson <lrichard@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* doc: Further populate the 'howto' sectionStephen Finucane2016-12-122-231/+0
| | | | | | | | | There are a couple of references to these for various build systems. The website is going to be our "one true resource" for all docs, so simply remove these references. Signed-off-by: Stephen Finucane <stephen@that.guru> Signed-off-by: Ben Pfaff <blp@ovn.org>
* doc: Populate 'install', 'howto' sectionsStephen Finucane2016-12-122-11/+10
| | | | | | | | | This is a dumb move of all 'INSTALL*' docs, with very little refactoring (mostly updating links and making the titles a little more consistent. Additional refactoring will be done in subsequent changes. Signed-off-by: Stephen Finucane <stephen@that.guru> Signed-off-by: Ben Pfaff <blp@ovn.org>
* treewide: Fix recent flake8-check.Joe Stringer2016-12-081-0/+1
| | | | | | | | | Without this patch, I see errors like this on master: ../ofproto/ipfix-gen-entities:115:1: E305 expected 2 blank lines after class or function definition, found 1 Signed-off-by: Joe Stringer <joe@ovn.org> Acked-by: Daniele Di Proietto <diproiettod@vmware.com>
* Add support for specifying SSL connection parameters to ovsdbEthan Rahn2016-11-101-1/+2
| | | | | Signed-off-by: Ethan Rahn <erahn@arista.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* doc: Convert datapath/README to rSTStephen Finucane2016-11-031-1/+1
| | | | | Signed-off-by: Stephen Finucane <stephen@that.guru> Signed-off-by: Russell Bryant <russell@ovn.org>
* doc: Convert README.ovs-vtep to rSTStephen Finucane2016-11-033-206/+232
| | | | | | | Expand on the definition of VTEP (it took me a bit of Googling). Signed-off-by: Stephen Finucane <stephen@that.guru> Signed-off-by: Russell Bryant <russell@ovn.org>
* ovsdb-idlc: Eliminate <prefix>_init() function from generated code.Ben Pfaff2016-10-191-1/+0
| | | | | Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Andy Zhou <azhou@ovn.org>
* doc: Convert INSTALL.Debian to rSTStephen Finucane2016-10-181-1/+1
| | | | | Signed-off-by: Stephen Finucane <stephen@that.guru> Signed-off-by: Russell Bryant <russell@ovn.org>
* json: Move from lib to include/openvswitch.Terry Wilson2016-07-221-1/+1
| | | | | | | | | | | | | | | To easily allow both in- and out-of-tree building of the Python wrapper for the OVS JSON parser (e.g. w/ pip), move json.h to include/openvswitch. This also requires moving lib/{hmap,shash}.h. Both hmap.h and shash.h were #include-ing "util.h" even though the headers themselves did not use anything from there, but rather from include/openvswitch/util.h. Fixing that required including util.h in several C files mostly due to OVS_NOT_REACHED and things like xmalloc. Signed-off-by: Terry Wilson <twilson@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* ovs-vtep: Handle tunnel key configuration in any order.Darrell Ball2016-07-151-14/+14
| | | | | | | | | | | Presently, ovs-vtep expects the datapath tunnel key to be available in the VTEP DB at startup. This may not be the case which is also observed as interrmittent unit test failures. This patch allows for the tunnel key to later appear in the VTEP database. Signed-off-by: Darrell Ball <dlu998@gmail.com> Acked-by: Russell Bryant <russell@ovn.org> Acked-by: Daniele Di Proietto <diproiettod@vmware.com>
* util: New function nullable_xstrdup().Ben Pfaff2016-06-261-1/+1
| | | | | | It's a pretty common pattern so create a function for it. Signed-off-by: Ben Pfaff <blp@ovn.org>
* ovs-vtep: Make compatible with python2.7 and 3.Joe Stringer2016-05-311-13/+12
| | | | | | | | | Translate commandline calls to UTF-8, appease flake8 and use six's integer types. This allows the testsuite to pass when using python3 as your default system python version. Signed-off-by: Joe Stringer <joe@ovn.org> Tested-by: Darrell Ball <dlu998@gmail.com>
* ovs-vtep: Support running multiple ovs-vtep processesnickcooper-zhangtonghao2016-05-181-3/+3
| | | | | | | | | | Include ovs-vtep physical switch name as part of logical switch name to support running multiple ovs-vtep processes sharing the same ovsdb and vswitchd. Signed-off-by: nickcooper-zhangtonghao <nickcooper-zhangtonghao@opencloud.tech> Tested-by: Darrell Ball <dlu998@gmail.com> Acked-by: Justin Pettit <jpettit@ovn.org> Signed-off-by: Ben Pfaff <blp@ovn.org>
* vtep: Add other_config to Global table.Dennis Sam2016-05-172-2/+13
| | | | | | | | Extend the Global table to allow for additional configurations by re-using the idea of an other_config column. Signed-off-by: Dennis Sam <dsam@arista.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* vtep: Add source node replication support.Darrell Ball2016-05-096-13/+194
| | | | | | | | | | | | | | | This patch updates the vtep schema, vtep-ctl commands and vtep simulator to support source node replication in addition to service node replication per logical switch. The default replication mode is service node as that was the only mode previously supported. Source node replication mode is optionally configurable and clearing the replication mode implicitly sets the replication mode back to a default of service node. Signed-off-by: Darrell Ball <dlu998@gmail.com> Acked-by: Bruce Davie <bdavie@vmware.com> Acked-by: Anupam Chanda <achanda@vmware.com> Signed-off-by: Justin Pettit <jpettit@ovn.org>
* list: Rename all functions in list.h with ovs_ prefix.Ben Warren2016-03-301-9/+9
| | | | | | | This attempts to prevent namespace collisions with other list libraries Signed-off-by: Ben Warren <ben@skyportsystems.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* Move lib/dynamic-string.h to include/openvswitch directoryBen Warren2016-03-191-1/+1
| | | | | Signed-off-by: Ben Warren <ben@skyportsystems.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* vtep: Introduce other_config column in some vtep schema tables.Saurabh Shrivastava2016-03-182-3/+65
| | | | | | | | Having an other_config column is a simple way to pass more information than the schema allows. Signed-off-by: Saurabh Shrivastava <saurabh.shrivastava@nuagenetworks.net> Signed-off-by: Ben Pfaff <blp@ovn.org>
* ovs-vtep: Delete flows with untagged vlan carefully.Gurucharan Shetty2016-03-171-2/+2
| | | | | | | | | | | | A (physical port + vlan) or (physical port + no tag) can be bound to a logical switch. When one unbinds (physical port + no tag) from a logical switch, the emulator inadvertantly deletes flows for (physical port + vlan) too. This commit fixes it. VMware-BZ: #1609938 Reported-by: Mike Qing <mqing@vmware.com> Signed-off-by: Gurucharan Shetty <guru@ovn.org> Acked-by: Ryan Moats <rmoats@us.ibm.com>
* vtep: Add error messages for logical router supportDennis Sam2016-02-231-0/+22
| | | | | | | | | Documents error codes that a Hardware Switch Controller can publish to the NVC to indicate errors related to the provisioning of logical routers. Signed-off-by: Dennis Sam <dsam@arista.com> Acked-by: Anupam Chanda <achandra@vmware.com> Signed-off-by: Justin Pettit <jpettit@ovn.org>
* vlog: Make the most common module reference more direct.Ben Pfaff2016-02-101-2/+2
| | | | | | | | | | | | | Most vlog calls are for the log module owned by the translation unit being compiled, but this module was referenced indirectly through a pointer variable. That seems silly, so this commit changes the code so that the local vlog module is referred to directly, as &this_module. We could get rid of the global variables for vlog modules entirely, but I like getting linker errors when there's a duplicate module name. Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Russell Bryant <russell@ovn.org>
* vtep: Support per-tunnel tunnel key in schema.Ofer Ben Yacov2016-02-082-25/+35
| | | | | | | | | | | | | | | | | | | | | | | | Currently the scenario of single logical bridge that use multiple locators with different tunnel key on each of the locators is not supported. In order to support much more flexibility in the tunnel settings, we need to add tunnel key column to the Physical_Locator table. This patch is needed to support the usage of neutron L2GW as an inter-cloud gateway. The tunnel key that is set in the logical bridge will be used 'internally' to connect the L2GW to the compute hosts and the key that is set in the physical locator will be used to connect the L2GW to a remote L2GW to form a tunnel between 2 clouds. In this case, the 'external' connection will use single 'dst_ip' on all the locators with different tunnel key for each L2 domain. The Neutron spec is available here: https://review.openstack.org/#/c/270786/ The new code depend on the ability to use different keys in multiple tunnels in the same logical switch. Signed-off-by: Ofer Ben-Yacov <ofer.benyacov@gmail.com> [blp@ovn.org added and clarified documentation] Signed-off-by: Ben Pfaff <blp@ovn.org>
* vlog: Stop using explicit references to external log modules.Ben Pfaff2016-02-031-2/+1
| | | | | | | | | | | | | | | | | It's always risky to write "extern" declarations outside a header file, since there's no way to ensure the type of what's being referenced is correct. In these cases, we can easily avoid the extern reference, so do so. There is a little tradeoff here, in that referring to the log modules through strings means that we catch an incorrect module name at runtime instead of at link time, but I think that the risk here is minimal because the mistake will be found by every test in "make check" that runs any of the utilities, since they make these calls as one of their first tasks during initialization. Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Russell Bryant <russell@ovn.org>
* vtep: add logical router related commands.Wenyu Zhang2016-02-032-0/+180
| | | | | | | | | | | Add logical router related vtep-ctl commands: vtep-ctl add-lr LR vtep-ctl del-lr LR vtep-ctl list-lr vtep-ctl lr-exists LR Signed-off-by: Wenyu Zhang <wenyuz@vmware.com> Signed-off-by: Gurucharan Shetty <guru@ovn.org>
* vtep: make vtep-ctl support L3 tables.Wenyu Zhang2016-01-281-0/+12
| | | | | | | | | | | Add supporting for tables necessary for L3 usage: Logical_Router Arp_Sources_Local Arp_Sources_Remote Signed-off-by: Wenyu Zhang <wenyuz@vmware.com> Acked-by: Shuangmin Zhang <tsingzsm@gmail.com> Signed-off-by: Gurucharan Shetty <guru@ovn.org>
* README.ovs-vtep.md: Fix incorrect spacing.Kyle Mestery2016-01-271-0/+1
| | | | | | | | This fixes a simple formatting issue with this file I noticed while reviewing the example of experimenting with the OVS HW-VTEP simulator. Signed-off-by: Kyle Mestery <mestery@mestery.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* python: Convert dict iterators.Russell Bryant2016-01-211-10/+11
| | | | | | | | | | | | | | | | In Python 2, dict.items(), dict.keys(), and dict.values() returned a list. dict.iteritems(), dict.iterkeys(), and dict.itervalues() returned an iterator. As of Python 3, dict.iteritems(), dict.itervalues(), and dict.iterkeys() are gone. items(), keys(), and values() now return an iterator. In the case where we want an iterator, we now use the six.iter*() helpers. If we want a list, we explicitly create a list from the iterator. Signed-off-by: Russell Bryant <russell@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
* python: Stop using xrange().Russell Bryant2016-01-201-0/+1
| | | | | | | | | | | | Python 2 had range() and xrange(). xrange() is more efficient, but behaves differently so range() was retained for compatibility. Python 3 only has range() and it behaves like Python 2's xrange(). Remove explicit use of xrange() and use six.moves.range() to make sure we're using xrange() from Python 2 or range() from Python 3. Signed-off-by: Russell Bryant <russell@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
* python: Remove unnecessary semicolons and slashes.Russell Bryant2016-01-051-4/+4
| | | | | | | | | | | | Resolve the following flake8 errors: E703 statement ends with a semicolon E502 the backslash is redundant between brackets Also document the reamining flake8 errors that are still ignored. Signed-off-by: Russell Bryant <russell@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
* python: Resolve a deprecation warning.Russell Bryant2016-01-051-2/+2
| | | | | | | | | | | | | | | Resolve the following deprecation warning. This deprecation warning advises to use an alternative syntax which is also compatible with Python 3, where has_key() was removed. W601 .has_key() is deprecated, use 'in' Also fix this related error: E713 test for membership should be 'not in' Signed-off-by: Russell Bryant <russell@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
* python: Fix several pep8 whitespace errors.Russell Bryant2016-01-051-21/+21
| | | | | | | | | | | | | | | | | | | | Fix the following pep8 errors: E201 whitespace after '(' E203 whitespace before ',' E222 multiple spaces after operator E225 missing whitespace around operator E226 missing whitespace around arithmetic operator E231 missing whitespace after ':' E241 multiple spaces after ':' E251 unexpected spaces around keyword / parameter equals E261 at least two spaces before inline comment E262 inline comment should start with '# ' E265 block comment should start with '# ' E271 multiple spaces after keyword Signed-off-by: Russell Bryant <russell@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
* python: Resolve pep8 comparison errors.Russell Bryant2016-01-051-2/+2
| | | | | | | | | | | | | | | | | | | | | Resolve pep8 errors: E711 comparison to None should be 'if cond is None:' The reason comparing against None with "is None" is preferred over "== None" is because a class can define its own equality operator and produce bizarre unexpected behavior. Using "is None" has a very explicit meaning that can not be overridden. E721 do not compare types, use 'isinstance()' This one is actually a mistake by the tool in most cases. 'from ovs.db import types' looks just like types from the Python stdlib. In those cases, use the full ovs.db.types name. Fix one case where it actually was types from the stdlib. Signed-off-by: Russell Bryant <russell@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
* python: Resolve pep8 blank line errors.Russell Bryant2016-01-051-1/+14
| | | | | | | | | | Resolve pep8 errors E302 and E303: E302 expected 2 blank lines, found 1 E303 too many blank lines (3) Signed-off-by: Russell Bryant <russell@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
* python: Remove unused imports and variables.Russell Bryant2016-01-051-1/+1
| | | | | | | | | | This resolves the following flake8 error types: F841 local variable 'e' is assigned to but never used F401 'exceptions' imported but unused Signed-off-by: Russell Bryant <russell@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
* python: Run flake8 at build time.Russell Bryant2016-01-051-0/+2
| | | | | | | | | | | | 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>
* ovs-vtep: Clean up local mac entries on startup.Anupam Chanda2015-12-211-0/+7
| | | | | | | | | | This change handles a corner case where local mac entries are not cleared if a vlan binding is deleted while the emulator is not running. The fix is to clean up the local mac entries once on restart. Reported-by: Hsin-Yi Shen <shenh@vmware.com> Signed-off-by: Anupam Chanda <achanda@vmware.com> Signed-off-by: Gurucharan Shetty <guru@ovn.org>
* vtep/vtep.xml: Improve XML source formatting.Ariel Tubaltsev2015-11-291-11/+11
| | | | | | | | This patch contains only cosmetic changes. Signed-off-by: Ariel Tubaltsev <tubaltzev@gmail.com> Acked-by: Bruce Davie <bdavie@vmware.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
* use "/usr/bin/env python" for shebangs for python scriptsYAMAMOTO Takashi2015-11-261-1/+1
| | | | | | | On NetBSD, a typical path of python interpreter is /usr/pkg/bin/python. Signed-off-by: YAMAMOTO Takashi <yamamoto@midokura.com> Acked-by: Ben Pfaff <blp@ovn.org>
* HW VTEP Schema: update Tunnel table definitionAriel Tubaltsev2015-11-191-59/+61
| | | | | | | | | | | vtep/vtep.xml : Tunnel table definitions were reviewed against latest OVS schema. Relevant changes taken into HW VTEP schema. XML formatting of Tunnel table corrected Signed-off-by: Ariel Tubaltsev <tubaltzev@gmail.com> Acked-by: Bruce Davie <bdavie@vmware.com> Signed-off-by: Russell Bryant <russell@ovn.org>
* vtep-ctl: Exit if database connection fails.Daniele Di Proietto2015-10-221-0/+5
| | | | | | | | | | | | | | Before this commit vtep-ctl hung forever if it didn't manage to reach the database. This caused the testcase "ovn -- 3 HVs, 1 VIFs/HV, 1 GW, 1 LS" to hang occasionally, because ovsdb-server could be killed before ovs-vtep called vtep-ctl. This mimics the behaviour of ovs-vsctl, ovn-nbctl and ovn-sbctl. Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com> Acked-by: Justin Pettit <jpettit@nicira.com>
* vtep: Make stats and status columns ephemeral.Justin Pettit2015-10-141-10/+12
| | | | | | | | | | | These fields don't need to be stored, and it causes a lot of unnecessary writes to the database log. This commit also fixes a couple of trivial indentation issues with previous ephemeral declarations. Signed-off-by: Justin Pettit <jpettit@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
* automake: Consolidate schema checksum check.Gurucharan Shetty2015-10-021-9/+1
| | | | | Signed-off-by: Gurucharan Shetty <gshetty@nicira.com> Acked-by: Ben Pfaff <blp@nicira.com>
* vtep: add ACLs to VTEP schemaBruce Davie2015-10-012-4/+352
| | | | | | | | | | Two new tables are added to the VTEP schema, for ACL entries and ACLs (which are groups of entries). The physical port table is modified to allow ACLs to be associated with ports, and the logical router table is modified to allow ACLs to be attached to logical router ports. Signed-off-by: Bruce Davie <bdavie@vmware.com> Signed-off-by: Justin Pettit <jpettit@nicira.com>
* vtep: Document the meaning of VLAN zero for vlan_bindingsBruce Davie2015-10-011-2/+5
| | | | | | | | | | | The meaning of a value of zero in the VLAN field when mapping <VLAN, port> pairs to logical switches had not previously been specified in the VTEP schema. It is now clarified that a value of zero refers to untagged traffic. Signed-off-by: Bruce Davie <bdavie@vmware.com> Acked-by: Russell Bryant <rbryant@redhat.com> Signed-off-by: Justin Pettit <jpettit@nicira.com>
* vtep: fix typosBruce Davie2015-10-011-4/+4
| | | | | | | | Correct a number of typos in vtep.xml Signed-off-by: Bruce Davie <bdavie@vmware.com> Acked-by: Russell Bryant <rbryant@redhat.com> Signed-off-by: Justin Pettit <jpettit@nicira.com>
* Fix typos in comments.Ben Pfaff2015-09-141-1/+1
| | | | | Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Alex Wang <ee07b291@gmail.com>