X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=src%2Femuvim%2Fdcemulator%2Fnet.py;h=ec42b669e894d0a4bd52a976e5a03b9ea9c823f8;hb=a1e59c710ed694b97cb4aed76af6e8ee34a7bfbe;hp=ac44d57009c2244c4aad952cf7ccfaf19c8aaf70;hpb=307aa1f4774345d9e9a70c02eeee312ecb1b13cf;p=osm%2Fvim-emu.git diff --git a/src/emuvim/dcemulator/net.py b/src/emuvim/dcemulator/net.py index ac44d57..ec42b66 100755 --- a/src/emuvim/dcemulator/net.py +++ b/src/emuvim/dcemulator/net.py @@ -221,7 +221,8 @@ 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) @@ -306,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