From d325a1a2f8d7c815cbaa016858db053412201b9d Mon Sep 17 00:00:00 2001 From: James Slagle Date: Mon, 11 Apr 2016 12:19:51 -0400 Subject: Add support for OVS tunnels Adds support for configuring OVS Tunnels via os-net-config. Tunnels are configured as members of ovs_bridge's where the type is set to ovs_tunnel. The object also supports setting OVS extra and options so that additional tunnel data can be defined, such as remote_ip. Change-Id: I31ac1cbe8a13247a1529c0f99a0aea5807888844 --- os_net_config/__init__.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'os_net_config/__init__.py') diff --git a/os_net_config/__init__.py b/os_net_config/__init__.py index 745da18..700a09d 100644 --- a/os_net_config/__init__.py +++ b/os_net_config/__init__.py @@ -71,6 +71,8 @@ class NetConfig(object): self.add_linux_bond(obj) for member in obj.members: self.add_object(member) + elif isinstance(obj, objects.OvsTunnel): + self.add_ovs_tunnel(obj) def add_interface(self, interface): """Add an Interface object to the net config object. @@ -121,6 +123,13 @@ class NetConfig(object): """ raise NotImplemented("add_linux_bond is not implemented.") + def add_ovs_tunnel(self, tunnel): + """Add a OvsTunnel object to the net config object. + + :param tunnel: The OvsTunnel object to add. + """ + raise NotImplemented("add_ovs_tunnel is not implemented.") + def apply(self, cleanup=False): """Apply the network configuration. -- cgit 1.2.3-korg