Skip to content

[fib.j2] there is no testbed_type defined as 't0-64-32'  #966

@crzas

Description

@crzas

Description
Running the test case: Fib with topology: t0-64-32, the file:/root/fib_info.txt is always empty.
This empty fib_info.txt caused fail , because it read this file to get ip range(_ipv4_lpm_dict or _ipv6_lpm_dict) in fib.py.

Steps to reproduce the issue:

  1. From shared-fib.yml, we know the fib_info.txt is created from the templates: fib.j2. as below:
  • name: Generate route-port map information
    template: src=roles/test/templates/fib.j2
    dest=/root/fib_info.txt
    delegate_to: "{{ptf_host}}"
  1. there is no 't0-64-32' defined as testbed_type in fib.j2 , like the following:
    {% if testbed_type == 't1' %}

Describe the results you received:
The more detail error messages as blow:
"=============================================================",
"ERROR: fib_test.FibTest",
"----------------------------------------------------------------------",
"Traceback (most recent call last):",
" File "ptftests/fib_test.py", line 286, in runTest",
" self.check_ip_range()",
" File "ptftests/fib_test.py", line 121, in check_ip_range",
" exp_port_list = self.fib[ip_range.get_first_ip()].get_next_hop_list()",
" File "ptftests/fib.py", line 71, in getitem",
" return self._ipv4_lpm_dict[str(ip)]",
" File "ptftests/lpm.py", line 77, in getitem",
" return self.subnet_tree[key]",
" File "/usr/local/lib/python2.7/dist-packages/SubnetTree.py", line 157, in getitem",
" return SubnetTree.SubnetTree___getitem
(self, cidr)",
"KeyError: '1.0.0.0'",
"",
"----------------------------------------------------------------------",
"Ran 1 test in 0.004s",
"",
"FAILED (errors=1)"

Describe the results you expected:
we expect the route file: fib_info.txt should not be empty!

Additional information you deem important:

**Output of `show version`:**

```
(paste your output here)
```

**Attach debug file `sudo generate_dump`:**

```
(paste your output here)
```

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions