diff options
author | mklyus <mklyus@cisco.com> | 2020-04-13 10:36:08 +0300 |
---|---|---|
committer | mklyus <mklyus@cisco.com> | 2020-04-27 22:36:54 +0300 |
commit | f34214799a03f08d02f1ef1f1fc3c91970030f89 (patch) | |
tree | 7705f853eb77dd804a57ea0dba2b9283ffbebc05 /nfvbench/chaining.py | |
parent | a302be9afab5879a8f52153202ff972712d6b2e8 (diff) |
l3-router fixes
Change-Id: I025c97af8003e797b8cd3133e0b2d64694fe4b58
Signed-off-by: mklyus <mklyus@cisco.com>
Diffstat (limited to 'nfvbench/chaining.py')
-rw-r--r-- | nfvbench/chaining.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/nfvbench/chaining.py b/nfvbench/chaining.py index b9ed48b..a52c7e9 100644 --- a/nfvbench/chaining.py +++ b/nfvbench/chaining.py @@ -245,6 +245,7 @@ class ChainNetwork(object): self.reuse = False self.network = None self.vlan = None + self.router_name = None if manager.config.l3_router and hasattr(network_config, 'router_name'): self.router_name = network_config.router_name try: @@ -924,7 +925,10 @@ class Chain(object): if port_index: # this will pick the last item in array port_index = -1 - return self.networks[port_index].get_vlan() + # This string filters networks connected to TG, in case of + # l3-router feature we have 4 networks instead of 2 + networks = [x for x in self.networks if not x.router_name] + return networks[port_index].get_vlan() def get_vxlan(self, port_index): """Get the VXLAN id on a given port. |