|
8 | 8 | from tests.tacacs.utils import check_output |
9 | 9 | from tests.bgp.test_bgp_fact import run_bgp_facts |
10 | 10 | from tests.test_features import run_show_features |
11 | | -from tests.tacacs.test_ro_user import ssh_remote_run |
| 11 | +from tests.tacacs.test_ro_user import ssh_remote_run_retry |
12 | 12 | from tests.ntp.test_ntp import run_ntp, setup_ntp_func # noqa F401 |
13 | 13 | from tests.common.helpers.assertions import pytest_require |
14 | 14 | from tests.tacacs.conftest import tacacs_creds, check_tacacs_v6_func # noqa F401 |
@@ -128,29 +128,29 @@ def test_snmp_ipv6_only(duthosts, enum_rand_one_per_hwsku_hostname, localhost, c |
128 | 128 |
|
129 | 129 | # use function scope fixture so that convert_and_restore_config_db_to_ipv6_only will setup before check_tacacs_v6_func. |
130 | 130 | # Otherwise, tacacs_v6 config may be lost after config reload in ipv6_only fixture. |
131 | | -def test_ro_user_ipv6_only(localhost, duthosts, enum_rand_one_per_hwsku_hostname, |
| 131 | +def test_ro_user_ipv6_only(localhost, ptfhost, duthosts, enum_rand_one_per_hwsku_hostname, |
132 | 132 | tacacs_creds, convert_and_restore_config_db_to_ipv6_only, check_tacacs_v6_func): # noqa F811 |
133 | 133 | # Add a temporary debug log to see if DUTs are reachable via IPv6 mgmt-ip. Will remove later |
134 | 134 | log_eth0_interface_info(duthosts) |
135 | 135 | duthost = duthosts[enum_rand_one_per_hwsku_hostname] |
136 | 136 | dutipv6 = get_mgmt_ipv6(duthost) |
137 | 137 |
|
138 | | - res = ssh_remote_run(localhost, dutipv6, tacacs_creds['tacacs_ro_user'], |
139 | | - tacacs_creds['tacacs_ro_user_passwd'], 'cat /etc/passwd') |
| 138 | + res = ssh_remote_run_retry(localhost, dutipv6, ptfhost, tacacs_creds['tacacs_ro_user'], |
| 139 | + tacacs_creds['tacacs_ro_user_passwd'], 'cat /etc/passwd') |
140 | 140 | check_output(res, 'test', 'remote_user') |
141 | 141 |
|
142 | 142 |
|
143 | 143 | # use function scope fixture so that convert_and_restore_config_db_to_ipv6_only will setup before check_tacacs_v6_func. |
144 | 144 | # Otherwise, tacacs_v6 config may be lost after config reload in ipv6_only fixture. |
145 | | -def test_rw_user_ipv6_only(localhost, duthosts, enum_rand_one_per_hwsku_hostname, |
| 145 | +def test_rw_user_ipv6_only(localhost, ptfhost, duthosts, enum_rand_one_per_hwsku_hostname, |
146 | 146 | tacacs_creds, convert_and_restore_config_db_to_ipv6_only, check_tacacs_v6_func): # noqa F811 |
147 | 147 | # Add a temporary debug log to see if DUTs are reachable via IPv6 mgmt-ip. Will remove later |
148 | 148 | log_eth0_interface_info(duthosts) |
149 | 149 | duthost = duthosts[enum_rand_one_per_hwsku_hostname] |
150 | 150 | dutipv6 = get_mgmt_ipv6(duthost) |
151 | 151 |
|
152 | | - res = ssh_remote_run(localhost, dutipv6, tacacs_creds['tacacs_rw_user'], |
153 | | - tacacs_creds['tacacs_rw_user_passwd'], "cat /etc/passwd") |
| 152 | + res = ssh_remote_run_retry(localhost, dutipv6, ptfhost, tacacs_creds['tacacs_rw_user'], |
| 153 | + tacacs_creds['tacacs_rw_user_passwd'], "cat /etc/passwd") |
154 | 154 | check_output(res, 'testadmin', 'remote_user_su') |
155 | 155 |
|
156 | 156 |
|
|
0 commit comments