[ovs-git] Open vSwitch: tests: Add basic unit tests for interface-reconfigure. (next)

dev at openvswitch.org dev at openvswitch.org
Tue Feb 23 18:06:10 UTC 2010


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Open vSwitch".

The branch, next has been updated
       via  48d014bff2b896b3a9d8937d26facad9a54d5a1a (commit)
       via  b63fadcfdc8a96ddb5e944b60733edf21999a1ad (commit)
       via  64ddb6fecfe21a7b50c5907dd88de67a87ec6eca (commit)
       via  86e1bb44dadf886a34bfef00b5523873081f32fe (commit)
       via  7966caf4a08629f7d0498427420ef83b44838f44 (commit)
       via  2a75efe8236e0c98838d866399cc0092fc7f2cd1 (commit)
       via  c0a50086d9e60995b17bdd8a4e1f150caba337d5 (commit)
       via  56cac225ae4df8ff0c50a806b78abdb6ac96c33a (commit)
       via  d77ffabfbcf9eb04b7e69ff6b34e12f000d314ee (commit)
       via  96c7918c4043326bfa0e05b3fc9cbb9547279d40 (commit)
       via  6987c81c05f21c579fbe60e9b6693862abbbb762 (commit)
       via  7c79588e006eb28e51ca8b715e22abce0c81f5d4 (commit)
       via  3b1acc9955fa9c595f6b9e41999aa40041c7b049 (commit)
      from  394ca24967595c231bdbf2cedc0c30c8397b74ae (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 48d014bff2b896b3a9d8937d26facad9a54d5a1a
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=48d014bff2b896b3a9d8937d26facad9a54d5a1a
Author: Ben Pfaff <blp at nicira.com>
		
tests: Add basic unit tests for interface-reconfigure.
		
These tests are probably not perfect, and we could and should certainly
add more of them, but they should at least help us to notice when commits
change interface-reconfigure's behavior.

Signed-off-by: Ben Pfaff <blp at nicira.com>


commit b63fadcfdc8a96ddb5e944b60733edf21999a1ad
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=b63fadcfdc8a96ddb5e944b60733edf21999a1ad
Author: Ben Pfaff <blp at nicira.com>
		
xenserver: Add --no-syslog feature to interface-reconfigure.
		
This makes it easier to do unit tests (some of which will be added in an
upcoming commit) by allowing messages to be read from stderr instead of
having to somehow intercept syslog calls.

Signed-off-by: Ben Pfaff <blp at nicira.com>


commit 64ddb6fecfe21a7b50c5907dd88de67a87ec6eca
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=64ddb6fecfe21a7b50c5907dd88de67a87ec6eca
Author: Ben Pfaff <blp at nicira.com>
		
xenserver: Add --root-prefix feature to interface-reconfigure.
		
This makes it easier to do unit tests (some of which will be added in an
upcoming commit) by allowing fake configuration files and scripts to be
added in a directory other than the real root.

Signed-off-by: Ben Pfaff <blp at nicira.com>


commit 86e1bb44dadf886a34bfef00b5523873081f32fe
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=86e1bb44dadf886a34bfef00b5523873081f32fe
Author: Ben Pfaff <blp at nicira.com>
		
xenserver: Add assertion and additional comments to ovs-vsctl commands.
		
I found these useful while debugging.

Signed-off-by: Ben Pfaff <blp at nicira.com>


commit 7966caf4a08629f7d0498427420ef83b44838f44
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=7966caf4a08629f7d0498427420ef83b44838f44
Author: Ben Pfaff <blp at nicira.com>
		
xenserver: Remove a VLAN's bridge when bringing down its PIF.
		
Before, interface-reconfigure would only bring remove a VLAN's bridge
incidentally as part of removing its datapath's bridge.  This commit fixes
it.

Signed-off-by: Ben Pfaff <blp at nicira.com>


commit 2a75efe8236e0c98838d866399cc0092fc7f2cd1
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=2a75efe8236e0c98838d866399cc0092fc7f2cd1
Author: Ben Pfaff <blp at nicira.com>
		
xenserver: Avoid doing unneeded work in deconfigure_datapath().
		
Deleting a bridge deletes all of its ports, too, so there's no benefit in
doing so manually beforehand.

Signed-off-by: Ben Pfaff <blp at nicira.com>


commit c0a50086d9e60995b17bdd8a4e1f150caba337d5
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=c0a50086d9e60995b17bdd8a4e1f150caba337d5
Author: Ben Pfaff <blp at nicira.com>
		
xenserver: Set xs-network-uuids for both datapath and VLAN bridges.
		
It makes sense to set xs-network-uuids for every bridge, so this commit
does so.  It also makes the code a bit more readable by factoring logic
out into a new function.

Signed-off-by: Ben Pfaff <blp at nicira.com>


commit 56cac225ae4df8ff0c50a806b78abdb6ac96c33a
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=56cac225ae4df8ff0c50a806b78abdb6ac96c33a
Author: Ben Pfaff <blp at nicira.com>
		
xenserver: Always call ovs-vsctl in bring_down().
		
The datapath_modify_config() call here was at the wrong level of
indentation, so it was only getting called if 'dp' was to be deleted.

Signed-off-by: Ben Pfaff <blp at nicira.com>


commit d77ffabfbcf9eb04b7e69ff6b34e12f000d314ee
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=d77ffabfbcf9eb04b7e69ff6b34e12f000d314ee
Author: Ben Pfaff <blp at nicira.com>
		
xenserver: Fix bringing up VLAN PIFs.
		
In configure_datapath(), bringing up a VLAN PIF's datapath is no different
from bringing up a non-VLAN PIF's datapath, but the code was making
unnecessary distinctions.  Also, the test
	if parent and datapath:
did not work at all, because there was no variable named 'datapath' in
scope and no obvious source of one.

In preconfigure(), it then becomes necessary to create a VLAN bridge for a
VLAN PIF, in a straightforward way.

Signed-off-by: Ben Pfaff <blp at nicira.com>


commit 96c7918c4043326bfa0e05b3fc9cbb9547279d40
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=96c7918c4043326bfa0e05b3fc9cbb9547279d40
Author: Ben Pfaff <blp at nicira.com>
		
xenserver: Hoist identical bridge and vswitch functions into common code.
		
The previous commit made pif_bridge_name() in the bridge and vswitch
versions of interface-reconfigure functionally identical, so this commit
hoists them into a single common implementation in InterfaceReconfigure.py.

pif_is_bridged() also comes along for the ride because it is also generic
and because it is logically related.  Only the bridge code uses it at the
moment.

Suggested-by: Ian Campbell <ian.campbell at citrix.com>
Signed-off-by: Ben Pfaff <blp at nicira.com>


commit 6987c81c05f21c579fbe60e9b6693862abbbb762
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=6987c81c05f21c579fbe60e9b6693862abbbb762
Author: Ben Pfaff <blp at nicira.com>
		
xenserver: Accept VLAN PIFs in pif_bridge_name().
		
pif_bridge_name() was written when the vswitch interface-reconfigure was
working with the raw Open vSwitch configuration via ovs-cfg-mod.  Then,
it made no sense to ask for the "bridge name" of a VLAN PIF, because a
VLAN PIF didn't have a bridge.

Now, however, the vSwitch interface-reconfigure works with ovs-vsctl, which
provides a thin layer over the OVS configuration that makes VLAN bridges
appear to exist.  So now it makes sense to ask for the bridge of a VLAN
PIF, and this commit enables that.

Signed-off-by: Ben Pfaff <blp at nicira.com>


commit 7c79588e006eb28e51ca8b715e22abce0c81f5d4
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=7c79588e006eb28e51ca8b715e22abce0c81f5d4
Author: Ben Pfaff <blp at nicira.com>
		
xenserver: Delete ports by interface name.
		
ovs-vsctl command "--if-exists del-port eth0" does nothing if eth0 is on
a bridge as part of a bond, because the bond's port name is not eth0 but
something else.  But interface-reconfigure needs to do that, so this commit
adds that ability to ovs-vsctl and modifies interface-reconfigure to use it.

Signed-off-by: Ben Pfaff <blp at nicira.com>


commit 3b1acc9955fa9c595f6b9e41999aa40041c7b049
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=3b1acc9955fa9c595f6b9e41999aa40041c7b049
Author: Ben Pfaff <blp at nicira.com>
		
xenserver: Fix comment in interface-reconfigure.
		
This comment was accurate, but didn't actually say what the function did.

Signed-off-by: Ben Pfaff <blp at nicira.com>


-----------------------------------------------------------------------

Summary of changes:
 tests/automake.mk                                  |    3 +-
 tests/interface-reconfigure.at                     |  910 ++++++++++++++++++++
 tests/testsuite.at                                 |    1 +
 utilities/ovs-vsctl.8.in                           |   11 +
 utilities/ovs-vsctl.c                              |   55 +-
 .../opt_xensource_libexec_InterfaceReconfigure.py  |   63 ++-
 ...xensource_libexec_InterfaceReconfigureBridge.py |   38 +-
 ...ensource_libexec_InterfaceReconfigureVswitch.py |  129 ++--
 .../opt_xensource_libexec_interface-reconfigure    |   35 +-
 9 files changed, 1102 insertions(+), 143 deletions(-)
 create mode 100644 tests/interface-reconfigure.at


hooks/post-receive
-- 
Open vSwitch




More information about the git mailing list