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

Add test case for gnmi subscription of bmp table #17056

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

FengPan-Frank
Copy link
Contributor

Description of PR

Summary:
Fixes # (issue)

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • New Test case
    • Skipped for non-supported platforms
  • Test case improvement

Back port request

  • 202012
  • 202205
  • 202305
  • 202311
  • 202405
  • 202411

Approach

What is the motivation for this PR?

How did you do it?

How did you verify/test it?

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@FengPan-Frank FengPan-Frank marked this pull request as draft February 20, 2025 22:54
@qiluo-msft qiluo-msft requested review from ganglyu and hdwhdw February 21, 2025 01:23
@ganglyu
Copy link
Contributor

ganglyu commented Feb 21, 2025

@qiluo-msft, this PR is using telemetry, not gnmi

for mgmt_interface, ip_configs in mgmt_interfaces.items():
for ip_addr_with_prefix in ip_configs.keys():
ip_addr = ip_addr_with_prefix.split("/")[0]
if valid_ipv4(ip_addr):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

valid_ipv4

There are some special DUTs:

  1. M0 do not have mgmt port at all, expecting to query loop IP address
  2. Some device only has ipv6 mgmt address

Suggest loop all the access if available:

  1. mgmt port ipv4
  2. mgmt port ipv6
  3. loopback ipv4
  4. loopback ipv6


# neighbor table subscription
dut_ip = get_mgmt_ip(duthost)
cmd = "~/gnmi_get -xpath_target BMP_STATE_DB -xpath BGP_NEIGHBOR_TABLE -target_addr \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gnmi_get

this is get, not subscribe. right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants