From d4753b6daa9fee7c92835e4165a9645b350c97d7 Mon Sep 17 00:00:00 2001 From: Quentin De Coninck Date: Fri, 3 Jul 2020 16:59:26 +0200 Subject: [PATCH] fix backup command --- topos/multi_interface.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/topos/multi_interface.py b/topos/multi_interface.py index 2bca786..8b606da 100644 --- a/topos/multi_interface.py +++ b/topos/multi_interface.py @@ -140,14 +140,13 @@ class MultiInterfaceConfig(TopoConfig): self.router = self.topo.get_router(0) netmask = "255.255.255.0" - links = self.topo.get_link_characteristics() for i, l in enumerate(self.topo.c2r_client_switches): cmd = self.interface_up_command(self.get_client_interface(0, i), self.get_client_ip(i), netmask) self.topo.command_to(self.client, cmd) client_interface_mac = self.client.intf(self.get_client_interface(0, i)).MAC() self.topo.command_to(self.router, "arp -s {} {}".format(self.get_client_ip(i), client_interface_mac)) - if(links[i].backup): + if self.topo.get_client_to_router_links()[i].backup: cmd = self.interface_backup_command(self.get_client_interface(0, i)) self.topo.command_to(self.client, cmd)