Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update location of gnxi files in test_telemetry due to docker-ptf modification #5574

Merged
merged 1 commit into from
Apr 28, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions tests/telemetry/test_telemetry.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def setup_telemetry_forpyclient(duthost):
def generate_client_cli(duthost, method=METHOD_GET, xpath="COUNTERS/Ethernet0", target="COUNTERS_DB", subscribe_mode=SUBSCRIBE_MODE_STREAM, submode=SUBMODE_SAMPLE, intervalms=0, update_count=3):
"""Generate the py_gnmicli command line based on the given params.
"""
cmdFormat = 'python /gnxi/gnmi_cli_py/py_gnmicli.py -g -t {0} -p {1} -m {2} -x {3} -xt {4} -o {5}'
cmdFormat = 'python /root/gnxi/gnmi_cli_py/py_gnmicli.py -g -t {0} -p {1} -m {2} -x {3} -xt {4} -o {5}'
cmd = cmdFormat.format(duthost.mgmt_ip, TELEMETRY_PORT, method, xpath, target, "ndastreamingservertest")

if method == METHOD_SUBSCRIBE:
Expand Down Expand Up @@ -101,7 +101,7 @@ def setup_streaming_telemetry(duthosts, rand_one_dut_hostname, localhost, ptfho
wait_tcp_connection(localhost, dut_ip, TELEMETRY_PORT, timeout_s=60)

# pyclient should be available on ptfhost. If it was not available, then fail pytest.
file_exists = ptfhost.stat(path="/gnxi/gnmi_cli_py/py_gnmicli.py")
file_exists = ptfhost.stat(path="/root/gnxi/gnmi_cli_py/py_gnmicli.py")
pytest_assert(file_exists["stat"]["exists"] is True)

def skip_201911_and_older(duthost):
Expand Down Expand Up @@ -160,7 +160,7 @@ def test_telemetry_ouput(duthosts, rand_one_dut_hostname, ptfhost, setup_streami

logger.info('start telemetry output testing')
dut_ip = duthost.mgmt_ip
cmd = 'python /gnxi/gnmi_cli_py/py_gnmicli.py -g -t {0} -p {1} -m get -x COUNTERS/Ethernet0 -xt COUNTERS_DB \
cmd = 'python /root/gnxi/gnmi_cli_py/py_gnmicli.py -g -t {0} -p {1} -m get -x COUNTERS/Ethernet0 -xt COUNTERS_DB \
-o "ndastreamingservertest"'.format(dut_ip, TELEMETRY_PORT)
show_gnmi_out = ptfhost.shell(cmd)['stdout']
logger.info("GNMI Server output")
Expand Down Expand Up @@ -191,7 +191,7 @@ def test_sysuptime(duthosts, rand_one_dut_hostname, ptfhost, setup_streaming_tel
duthost = duthosts[rand_one_dut_hostname]
skip_201911_and_older(duthost)
dut_ip = duthost.mgmt_ip
cmd = 'python /gnxi/gnmi_cli_py/py_gnmicli.py -g -t {0} -p {1} -m get -x proc/uptime -xt OTHERS \
cmd = 'python /root/gnxi/gnmi_cli_py/py_gnmicli.py -g -t {0} -p {1} -m get -x proc/uptime -xt OTHERS \
-o "ndastreamingservertest"'.format(dut_ip, TELEMETRY_PORT)
system_uptime_info = ptfhost.shell(cmd)["stdout_lines"]
system_uptime_1st = 0
Expand Down