ovs-vsctl: Fix br-set-external-id.
authorBen Pfaff <blp@nicira.com>
Thu, 18 Nov 2010 22:36:53 +0000 (14:36 -0800)
committerBen Pfaff <blp@nicira.com>
Thu, 18 Nov 2010 22:36:53 +0000 (14:36 -0800)
The wrong prerequisite function was being called for set-br-external-id, so
it didn't set up to monitor the right columns, so an assertion failed.
This fixes the problem.

Also, change the test for external IDs so that it will find the regression.
(Running all of the ovs-vsctl commands together caused the column to be
monitored due to another command's intervention.)

Reported-by: Mikael Doverhag <mdoverhag@nicira.com>
Bug #4095.

AUTHORS
tests/ovs-vsctl.at
utilities/ovs-vsctl.c

diff --git a/AUTHORS b/AUTHORS
index 036e41e11bf6c418539aee852bd9e791523ddc7f..3e80eef1d8ba3f22ea428cd6eb335d10baa77d46 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -52,6 +52,7 @@ Joan Cirer              joan@ev0.net
 John Galgay             john@galgay.net
 Luiz Henrique Ozaki     luiz.ozaki@gmail.com
 Michael Mao             mmao@nicira.com
+Mikael Doverhag         mdoverhag@nicira.com
 Pankaj Thakkar          thakkar@nicira.com
 Paulo Cravero           pcravero@as2594.net
 Peter Balland           peter@nicira.com
index 152a6585c0dcecccd92dad014e249520e102d0a9..a05e8055556bba019c6824add76e8500cd6eaeb6 100644 (file)
@@ -301,7 +301,7 @@ AT_CLEANUP
 AT_SETUP([external IDs])
 AT_KEYWORDS([ovs-vsctl])
 OVS_VSCTL_SETUP
-AT_CHECK([RUN_OVS_VSCTL_TOGETHER(
+AT_CHECK([RUN_OVS_VSCTL_ONELINE(
   [add-br a], 
   [add-port a a1],
   [add-bond a bond0 a2 a3],
index 43aeb01fb79747bdbbe91cd40bcf8dd54daa3743..acdcaf31739654a31f5c7231de0a0fd143106751 100644 (file)
@@ -3236,8 +3236,8 @@ static const struct vsctl_command_syntax all_commands[] = {
     {"br-exists", 1, 1, pre_get_info, cmd_br_exists, NULL, "", RO},
     {"br-to-vlan", 1, 1, pre_get_info, cmd_br_to_vlan, NULL, "", RO},
     {"br-to-parent", 1, 1, pre_get_info, cmd_br_to_parent, NULL, "", RO},
-    {"br-set-external-id", 2, 3, pre_get_info, cmd_br_set_external_id, NULL,
-     "", RW},
+    {"br-set-external-id", 2, 3, pre_cmd_br_set_external_id,
+     cmd_br_set_external_id, NULL, "", RW},
     {"br-get-external-id", 1, 2, pre_cmd_br_get_external_id,
      cmd_br_get_external_id, NULL, "", RO},