def reset(self): """ Raises ------ NetworkBackendErrorReset Returns ------- """ try: if self.started and self.bridge_dev_name: self.run( IPRoute2Commands.get_link_del_cmd(self.bridge_dev_name)) except Exception as e: raise NetworkBackendErrorReset( """Could not shutdown the bridge '%s' Interface dump: %s """ % (self, pformat(self.get_interfaces())), caused_by=e)
def _shutdown(self): tunnel_cmd = IPRoute2Commands.get_link_del_cmd(self.get_tunnel_name()) self.add_command(self.EVENT_TUNNEL_REMOVE, tunnel_cmd)
def reset(self): from miniworld.model.network.backends.bridged.iproute2 import IPRoute2Commands self.run_shell(IPRoute2Commands.get_link_del_cmd(self.get_tunnel_name()))