From ccb433a32df81653906b3aaf5f9e8525c96fdaed Mon Sep 17 00:00:00 2001 From: Blake Harnden <32446120+bharnden@users.noreply.github.com> Date: Tue, 17 Dec 2019 22:08:14 -0800 Subject: [PATCH] update to support link config during runtime --- coretk/coretk/dialogs/linkconfig.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/coretk/coretk/dialogs/linkconfig.py b/coretk/coretk/dialogs/linkconfig.py index 9a2008ab..6f0bd51a 100644 --- a/coretk/coretk/dialogs/linkconfig.py +++ b/coretk/coretk/dialogs/linkconfig.py @@ -244,6 +244,24 @@ class LinkConfiguration(Dialog): loss = self.loss.get() if loss != "": link.options.per = float(loss) + + if self.app.core.is_runtime() and link.HasField("options"): + interface_one = None + if link.HasField("interface_one"): + interface_one = link.interface_one.id + interface_two = None + if link.HasField("interface_two"): + interface_two = link.interface_two.id + session_id = self.app.core.session_id + self.app.core.client.edit_link( + session_id, + link.node_one_id, + link.node_two_id, + link.options, + interface_one, + interface_two, + ) + self.destroy() def change_symmetry(self):