From: Ondrej Lichtner <olichtne(a)redhat.com>
Follow up patch to adding vxlan support that adds the create_vxlan
HostAPI method. This can be used to create vxlan interfaces during Task
execution.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
---
lnst/Controller/Task.py | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/lnst/Controller/Task.py b/lnst/Controller/Task.py
index e47b025..f821ccf 100644
--- a/lnst/Controller/Task.py
+++ b/lnst/Controller/Task.py
@@ -433,6 +433,21 @@ class HostAPI(object):
return self._add_iface("vlan", if_id, netns, ip, {"vlan_tci":
vlan_tci},
[realdev_iface])
+ def create_vxlan(self, vxlan_id, realdev_iface=None, group_ip=None,
+ remote_ip=None, if_id=None, netns=None, ip=None, options={}):
+ if group_ip is None and remote_ip is None:
+ raise TaskError("Either group_ip or remote_ip must be specified.")
+
+ options.update({"id": vxlan_id,
+ "group_ip": group_ip,
+ "remote_ip": remote_ip})
+ if realdev_iface is not None:
+ slaves = [realdev_iface]
+ else:
+ slaves = []
+
+ return self._add_iface("vxlan", if_id, netns, ip, options, slaves)
+
class InterfaceAPI(object):
def __init__(self, interface, host):
self._if = interface
--
2.6.4
Show replies by date
Mon, Jan 04, 2016 at 04:16:11PM CET, olichtne(a)redhat.com wrote:
From: Ondrej Lichtner <olichtne(a)redhat.com>
Follow up patch to adding vxlan support that adds the create_vxlan
HostAPI method. This can be used to create vxlan interfaces during Task
execution.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
Acked-by: Jiri Pirko <jiri(a)mellanox.com>
Mon, Jan 04, 2016 at 04:16:11PM CET, olichtne(a)redhat.com wrote:
From: Ondrej Lichtner <olichtne(a)redhat.com>
Follow up patch to adding vxlan support that adds the create_vxlan
HostAPI method. This can be used to create vxlan interfaces during Task
execution.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
Acked-by: Jan Tluka <jtluka(a)redhat.com>
Mon, Jan 04, 2016 at 04:16:11PM CET, olichtne(a)redhat.com wrote:
From: Ondrej Lichtner <olichtne(a)redhat.com>
Follow up patch to adding vxlan support that adds the create_vxlan
HostAPI method. This can be used to create vxlan interfaces during Task
execution.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
applied