Skip to content

Commit

Permalink
Initialize neighbor_ip before use
Browse files Browse the repository at this point in the history
Signed-off-by: zitingguo-ms <[email protected]>
  • Loading branch information
Gfrom2016 committed Mar 3, 2025
1 parent b3055a8 commit 5679b00
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/srv6/test_srv6_dataplane.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,13 @@ def setup_uN(duthosts, enum_frontend_dut_hostname, enum_frontend_asic_index, tbi

logger.info("Doing test on DUT port {} | PTF port {}".format(dut_port, ptf_src_port))

neighbor_ip = None
# get neighbor IP
lines = duthost.command("show ipv6 bgp sum")['stdout'].split("\n")
for line in lines:
if neighbor in line:
neighbor_ip = line.split()[0]
assert neighbor_ip
assert neighbor_ip, "Unable to find neighbor {} IP".format(neighbor)

# use DUT portchannel if applicable
pc_info = duthost.command("show int portchannel")['stdout']
Expand Down

0 comments on commit 5679b00

Please sign in to comment.