Skip to content

Commit

Permalink
[voq] Add fabric_ns to the ns_list when display_option is DISPLAY_ALL. (
Browse files Browse the repository at this point in the history
#2717)

The get_ns_list_based_on_options function only gets front_ns and back_ns in current code.
This change adds fabric_ns in the ns_list when display_option is DISPLAY_ALL. This enables the fabric related tests on voq chassis, e.g the change in sonic-net/sonic-mgmt#6620
  • Loading branch information
jfeng-arista authored and StormLiangMS committed Apr 20, 2023
1 parent 4183785 commit 3fc071b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions utilities_common/multi_asic.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,13 @@ def get_ns_list_based_on_options(self):
namespaces = multi_asic.get_all_namespaces()
if self.namespace_option is None:
if self.get_display_option() == constants.DISPLAY_ALL:
ns_list = namespaces['front_ns'] + namespaces['back_ns']
ns_list = namespaces['front_ns'] + namespaces['back_ns'] + namespaces['fabric_ns']
else:
ns_list = namespaces['front_ns']
else:
if self.namespace_option not in namespaces['front_ns'] and \
self.namespace_option not in namespaces['back_ns']:
self.namespace_option not in namespaces['back_ns'] and \
self.namespace_option not in namespaces['fabric_ns']:
raise ValueError(
'Unknown Namespace {}'.format(self.namespace_option))
ns_list = [self.namespace_option]
Expand Down

0 comments on commit 3fc071b

Please sign in to comment.