From: stevenvanrossem Date: Tue, 7 Feb 2017 23:46:02 +0000 (+0100) Subject: fix bug - vlan was added to monitoring links on single switch paths X-Git-Tag: v3.1~45^2~10 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=634c5ef1b0bf7ed9e6d09fe8e9598c83c8b2d270;p=osm%2Fvim-emu.git fix bug - vlan was added to monitoring links on single switch paths --- diff --git a/src/emuvim/dcemulator/net.py b/src/emuvim/dcemulator/net.py index 1a8d938..30b7ce2 100755 --- a/src/emuvim/dcemulator/net.py +++ b/src/emuvim/dcemulator/net.py @@ -500,12 +500,10 @@ class DCNetwork(Containernet): :param cookie: cookie for the installed flowrules (can be used later as identifier for a set of installed chains) :param match: custom match entry to be added to the flowrules (default: only in_port and vlan tag) :param priority: custom flowrule priority -<<<<<<< HEAD :param monitor: boolean to indicate whether this chain is a monitoring chain :param tag: vlan tag to be used for this chain (pre-defined or new one if none is specified) -======= + :param skip_vlan_tag: boolean to indicate if a vlan tag should be appointed to this flow or not :param path: custom path between the two VNFs (list of switches) ->>>>>>> upstream/master :return: output log string """ @@ -620,7 +618,7 @@ class DCNetwork(Containernet): ## if path contains more than 1 switch cmd = kwargs.get('cmd') vlan = None - if cmd == 'add-flow': + if cmd == 'add-flow' and len(path) > 1: if kwargs.get('tag'): # use pre-defined tag vlan = kwargs.get('tag') @@ -661,7 +659,7 @@ class DCNetwork(Containernet): switch_outport_nr = self.DCNetwork_graph[current_hop][next_hop][index_edge_out]['src_port_nr'] - # set of entry via ovs-ofctl + # set OpenFlow entry if isinstance( current_node, OVSSwitch ): kwargs['vlan'] = vlan kwargs['path'] = path