From fa76bbf01b55bc9a1e28c4e3fe098e288600cf9c Mon Sep 17 00:00:00 2001 From: bharnden <32446120+bharnden@users.noreply.github.com> Date: Thu, 14 Nov 2019 21:39:44 -0800 Subject: [PATCH] removed unused code in graph and coreclient --- coretk/coretk/coreclient.py | 17 ----------------- coretk/coretk/graph.py | 14 -------------- 2 files changed, 31 deletions(-) diff --git a/coretk/coretk/coreclient.py b/coretk/coretk/coreclient.py index 0d562f8a..2bf047d7 100644 --- a/coretk/coretk/coreclient.py +++ b/coretk/coretk/coreclient.py @@ -372,23 +372,6 @@ class CoreClient: response = self.client.stop_session(session_id=self.session_id) logging.debug("coregrpc.py Stop session, result: %s", response.result) - # # TODO no need, might get rid of this - # def add_link(self, id1, id2, type1, type2, edge): - # """ - # Grpc client request add link - # - # :param int session_id: session id - # :param int id1: node 1 core id - # :param core_pb2.NodeType type1: node 1 core node type - # :param int id2: node 2 core id - # :param core_pb2.NodeType type2: node 2 core node type - # :return: nothing - # """ - # if1 = self.create_interface(type1, edge.interface_1) - # if2 = self.create_interface(type2, edge.interface_2) - # response = self.client.add_link(self.session_id, id1, id2, if1, if2) - # logging.info("created link: %s", response) - def launch_terminal(self, node_id): response = self.client.get_node_terminal(self.session_id, node_id) logging.info("get terminal %s", response.terminal) diff --git a/coretk/coretk/graph.py b/coretk/coretk/graph.py index e5bab65b..f7c45e63 100644 --- a/coretk/coretk/graph.py +++ b/coretk/coretk/graph.py @@ -31,12 +31,6 @@ class ScaleOption(enum.Enum): TILED = 4 -CORE_NODES = ["router"] -CORE_WIRED_NETWORK_NODES = [] -CORE_WIRELESS_NODE = ["wlan"] -CORE_EMANE = ["emane"] - - class CanvasGraph(tk.Canvas): def __init__(self, master, core, cnf=None, **kwargs): if cnf is None: @@ -670,14 +664,6 @@ class CanvasNode: self.canvas.core.launch_terminal(node_id) else: self.canvas.canvas_action.display_configuration(self) - # if self.node_type in CORE_NODES: - # self.canvas.canvas_action.node_to_show_config = self - # self.canvas.canvas_action.display_node_configuration() - # elif self.node_type in CORE_WIRED_NETWORK_NODES: - # return - # elif self.node_type in CORE_WIRELESS_NODE: - # return - # elif self def update_coords(self): self.x_coord, self.y_coord = self.canvas.coords(self.id)