From: Jiri Pirko jiri@mellanox.com
When user passes None and the if_id is generated by Machine class, get the created id and use it further.
Fixes: c1ef94696 ("Task: Allow to create software devices from running task") Signed-off-by: Jiri Pirko jiri@mellanox.com --- lnst/Controller/Task.py | 1 + 1 file changed, 1 insertion(+)
diff --git a/lnst/Controller/Task.py b/lnst/Controller/Task.py index 8670150..2f16e84 100644 --- a/lnst/Controller/Task.py +++ b/lnst/Controller/Task.py @@ -365,6 +365,7 @@ class HostAPI(object):
def _add_iface(self, if_type, if_id, netns, ip, options, slaves): interface = self._m.new_soft_interface(if_id, if_type) + if_id = interface.get_id() iface = InterfaceAPI(interface, self) self._ifaces[if_id] = iface