[multi asic] Change the fib test to support multi asic platform#3214
[multi asic] Change the fib test to support multi asic platform#3214arlakshm merged 6 commits intosonic-net:masterfrom
Conversation
Signed-off-by: Arvindsrinivasan Lakshminarasimhan <[email protected]>
Signed-off-by: Arvindsrinivasan Lakshminarasimhan <[email protected]>
tests/fib/test_fib.py
Outdated
|
|
||
| asic = duthost.asic_instance(asic_index) | ||
|
|
||
| asic.shell("{} redis-dump -d 0 -k 'ROUTE*' -y > /tmp/fib.{}.txt".format(asic._ns_arg, timestamp)) |
There was a problem hiding this comment.
why not use "asic.command()". No need to use "asic._ns_arg" which looks like a private attribute as per convention.
duthost.asic_instance(asic_index).command("redis-dump -d 0 -k 'ROUTE*' -y > /tmp/fib.{}.txt")
There was a problem hiding this comment.
@smaheshm the ansible command module doesnt work with >
https://github.com/ansible/ansible/blob/f9f839fa08eee46ad7a86d6cbc7519541a50c7ef/lib/ansible/modules/command.py#L22. shell module is recommended for such cases
Change the ns_arg to public variable
tests/common/devices/sonic_asic.py
Outdated
| complex_args['namespace'] = self.namespace | ||
| return self.sonichost.config_facts(*module_args, **complex_args) | ||
|
|
||
|
|
| # ignore the prefix, if the prefix nexthop is not a frontend port | ||
| if 'members' in po[ifname]: | ||
| if 'role' in ports[po[ifname]['members'][0]] and ports[po[ifname]['members'][0]]['role'] == 'Int': | ||
| skip = True |
There was a problem hiding this comment.
Are we checking if prefixes from T0 ASICs are learned on T1 ASICS, and vice versa? We are removing all the prefixes that have next hop as the backend.
There was a problem hiding this comment.
@smaheshm for this test purpose there is no difference if the route is learnt from T0 or T2. We need to build the fib table with all the external nexthops for the ptf tests to validate the packet forwarding
There was a problem hiding this comment.
ok. We should add test case to verify all ASICs have the same prefixes in the FIB if not already there.
There was a problem hiding this comment.
We use -64-lag topology for multi asic platform testing. In this topology some ASICs T2 neighbors and some have T0 neighbors. This covers the case of more than one ASIC having the same prefix.
Signed-off-by: Arvindsrinivasan Lakshminarasimhan <[email protected]>
…c-net#3214) The PR has following changes. - Update the fixtures in the test_fib.py for multi asic platforms - Add a new options ignore_ttl to the ptf fib tests. Signed-off-by: Arvindsrinivasan Lakshminarasimhan <[email protected]>
…c-net#3214) The PR has following changes. - Update the fixtures in the test_fib.py for multi asic platforms - Add a new options ignore_ttl to the ptf fib tests. Signed-off-by: Arvindsrinivasan Lakshminarasimhan <[email protected]>
Description of PR
Summary:
Fixes # (issue)
Type of change
Approach
What is the motivation for this PR?
The PR has changes to run the tests in
test_fib.pyon multi asic platformsHow did you do it?
The PR has following changes.
test_fib.pyfor multi asic platformsignore_ttlto the ptf fib tests.How did you verify/test it?
Verify on multi asic
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation