From: stevenvanrossem Date: Thu, 22 Dec 2016 09:31:38 +0000 (+0100) Subject: merge son-monitor update with upstream X-Git-Tag: v3.1~45^2~27 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=7062cee83ca95f51b9f43987e61a434e9e5e32f4;p=osm%2Fvim-emu.git merge son-monitor update with upstream --- 7062cee83ca95f51b9f43987e61a434e9e5e32f4 diff --cc src/emuvim/dcemulator/net.py index 8f627b5,531e5f1..191d6a8 --- a/src/emuvim/dcemulator/net.py +++ b/src/emuvim/dcemulator/net.py @@@ -894,14 -593,3 +894,14 @@@ class DCNetwork(Containernet) dict.update({match[0]:m2}) return dict + def find_connected_dc_interface(self, vnf_src_name, vnf_src_interface): + for connected_sw in self.DCNetwork_graph.neighbors(vnf_src_name): + link_dict = self.DCNetwork_graph[vnf_src_name][connected_sw] + for link in link_dict: + if (link_dict[link]['src_port_id'] == vnf_src_interface or + link_dict[link]['src_port_name'] == vnf_src_interface): # Fix: we might also get interface names, e.g, from a son-emu-cli call + # found the right link and connected switch + src_sw = connected_sw + src_sw_inport_nr = link_dict[link]['dst_port_nr'] + src_sw_inport_name = link_dict[link]['dst_port_name'] - return src_sw_inport_name ++ return src_sw_inport_name