Skip to content

Commit

Permalink
Support smartswitch in get_testbed_type and announce_routes (sonic-ne…
Browse files Browse the repository at this point in the history
…t#16536)

* Support smartswitch in get_testbed_type
  • Loading branch information
bingwang-ms authored and mssonicbld committed Jan 16, 2025
1 parent 2e9dea2 commit c713561
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions ansible/library/announce_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def wait_for_http(host_ip, http_port, timeout=10):

def get_topo_type(topo_name):
pattern = re.compile(
r'^(t0-mclag|t0|t1|ptf|fullmesh|dualtor|t2|mgmttor|m0|mc0|mx|dpu)')
r'^(t0-mclag|t0|t1|ptf|fullmesh|dualtor|t2|mgmttor|m0|mc0|mx|dpu|smartswitch-t1)')
match = pattern.match(topo_name)
if not match:
return "unsupported"
Expand Down Expand Up @@ -1072,7 +1072,7 @@ def main():
if topo_type == "t0":
fib_t0(topo, ptf_ip, no_default_route=is_storage_backend, action=action)
module.exit_json(changed=True)
elif topo_type == "t1":
elif topo_type == "t1" or topo_type == "smartswitch-t1":
fib_t1_lag(
topo, ptf_ip, no_default_route=is_storage_backend, action=action)
module.exit_json(changed=True)
Expand Down
2 changes: 1 addition & 1 deletion tests/common/testbed.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ def _generate_sai_ptf_topo(self, tb_dict):

def get_testbed_type(self, topo_name):
pattern = re.compile(
r'^(wan|t0|t1|ptf|fullmesh|dualtor|ciscovs|t2|tgen|mgmttor|m0|mc0|mx|dpu|ptp)'
r'^(wan|t0|t1|ptf|fullmesh|dualtor|ciscovs|t2|tgen|mgmttor|m0|mc0|mx|dpu|ptp|smartswitch)'
)
match = pattern.match(topo_name)
if match is None:
Expand Down

0 comments on commit c713561

Please sign in to comment.