X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Femuvim%2Fdcemulator%2Fnet.py;h=ec42b669e894d0a4bd52a976e5a03b9ea9c823f8;hb=a1e59c710ed694b97cb4aed76af6e8ee34a7bfbe;hp=633ec6bd060858787f9605094587340ee205e8ac;hpb=d806ed7ca29fa8d4f07dbed383378ecb1c353c13;p=osm%2Fvim-emu.git diff --git a/src/emuvim/dcemulator/net.py b/src/emuvim/dcemulator/net.py index 633ec6b..ec42b66 100755 --- a/src/emuvim/dcemulator/net.py +++ b/src/emuvim/dcemulator/net.py @@ -221,8 +221,10 @@ class DCNetwork(Dockernet): CLI(self) # to remove chain do setChain( src, dst, cmd='del-flows') - def setChain(self, vnf_src_name, vnf_dst_name, vnf_src_interface=None, vnf_dst_interface=None, cmd='add-flow', weight=None): + def setChain(self, vnf_src_name, vnf_dst_name, vnf_src_interface=None, vnf_dst_interface=None, cmd='add-flow', + weight=None, **kwargs): + logging.info('vnf_src_if: {0}'.format(vnf_src_interface)) #check if port is specified (vnf:port) if vnf_src_interface is None: # take first interface by default @@ -305,6 +307,12 @@ class DCNetwork(Dockernet): # TODO need multiple matches to do this (VLAN tags) if isinstance( current_node, OVSSwitch ): match = 'in_port=%s' % switch_inport_nr + #add additional match entries from the argument + match_input = kwargs.get('match') + logging.info('match input:{0}'.format(match_input)) + if match_input: + s = ',' + match = s.join([match,match_input]) if cmd=='add-flow': action = 'action=%s' % switch_outport_nr