]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Make ovs Interface option set properly.
authorKAWAI Hiroaki <kawai@iij.ad.jp>
Wed, 25 Apr 2012 12:25:32 +0000 (21:25 +0900)
committerKAWAI Hiroaki <hiroaki.kawai@gmail.com>
Thu, 26 Apr 2012 06:59:08 +0000 (15:59 +0900)
Multiple ovs-vsctl set Interface option call overrides the previous
settings and result in unexpected partial condition.

Change-Id: I62b3bd6ea9adac7c1f4995fc18af9838a7e25b43

quantum/plugins/openvswitch/agent/ovs_quantum_agent.py

index 9774c2e8549cec44e575e4c388555b0791f179e3..837f1c5e36e76cb889efa220d51520837cc797f8 100755 (executable)
@@ -127,17 +127,17 @@ class OVSBridge:
     def add_tunnel_port(self, port_name, remote_ip):
         self.run_vsctl(["add-port", self.br_name, port_name])
         self.set_db_attribute("Interface", port_name, "type", "gre")
-        self.set_db_attribute("Interface", port_name, "options", "remote_ip=" +
+        self.set_db_attribute("Interface", port_name, "options:remote_ip",
             remote_ip)
-        self.set_db_attribute("Interface", port_name, "options", "in_key=flow")
-        self.set_db_attribute("Interface", port_name, "options",
-            "out_key=flow")
+        self.set_db_attribute("Interface", port_name, "options:in_key", "flow")
+        self.set_db_attribute("Interface", port_name, "options:out_key",
+            "flow")
         return self.get_port_ofport(port_name)
 
     def add_patch_port(self, local_name, remote_name):
         self.run_vsctl(["add-port", self.br_name, local_name])
         self.set_db_attribute("Interface", local_name, "type", "patch")
-        self.set_db_attribute("Interface", local_name, "options", "peer=" +
+        self.set_db_attribute("Interface", local_name, "options:peer",
                               remote_name)
         return self.get_port_ofport(local_name)