Make ovs Interface option set properly.
Multiple ovs-vsctl set Interface option call overrides the previous settings and result in unexpected partial condition. Change-Id: I62b3bd6ea9adac7c1f4995fc18af9838a7e25b43
This commit is contained in:
parent
bb49ab0a0c
commit
fc3cb0968d
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user