X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=src%2Femuvim%2Fdcemulator%2Fnet.py;h=adf17d4a3fa0778e9d1a9774833d57e83fef7842;hb=a664eb611376fd77083f101c849b1dde7fc8bea8;hp=b201112d0790e0de8fdc01eec53360b5b41f18dd;hpb=79ef6aee3dc52f49d1261e40ec5f258fb4372a1e;p=osm%2Fvim-emu.git diff --git a/src/emuvim/dcemulator/net.py b/src/emuvim/dcemulator/net.py index b201112..adf17d4 100755 --- a/src/emuvim/dcemulator/net.py +++ b/src/emuvim/dcemulator/net.py @@ -261,7 +261,7 @@ class DCNetwork(Containernet): if kwargs.get('bidirectional'): ret = ret +'\n' + self._chainAddFlow(vnf_dst_name, vnf_src_name, vnf_dst_interface, vnf_src_interface, **kwargs) - elif cmd == 'del-flows': # TODO: del-flow to be implemented + elif cmd == 'del-flows': ret = self._chainAddFlow(vnf_src_name, vnf_dst_name, vnf_src_interface, vnf_dst_interface, **kwargs) if kwargs.get('bidirectional'): ret = ret + '\n' + self._chainAddFlow(vnf_dst_name, vnf_src_name, vnf_dst_interface, vnf_src_interface, **kwargs) @@ -274,7 +274,6 @@ class DCNetwork(Containernet): def _chainAddFlow(self, vnf_src_name, vnf_dst_name, vnf_src_interface=None, vnf_dst_interface=None, **kwargs): - # TODO: this needs to be cleaned up #check if port is specified (vnf:port) if vnf_src_interface is None: # take first interface by default @@ -315,7 +314,9 @@ class DCNetwork(Containernet): # if all shortest paths are wanted, use: all_shortest_paths path = nx.shortest_path(self.DCNetwork_graph, src_sw, dst_sw, weight=kwargs.get('weight')) except: - logging.info("No path could be found between {0} and {1}".format(vnf_src_name, vnf_dst_name)) + logging.exception("No path could be found between {0} and {1}".format(vnf_src_name, vnf_dst_name)) + logging.debug("Graph nodes: %r" % self.DCNetwork_graph.nodes()) + logging.debug("Graph edges: %r" % self.DCNetwork_graph.edges()) return "No path could be found between {0} and {1}".format(vnf_src_name, vnf_dst_name) logging.info("Path between {0} and {1}: {2}".format(vnf_src_name, vnf_dst_name, path))