Skip to content

[yang]SONiC Yang model support for Telemetry_client. (#12483) #13314

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

Merged

Conversation

NanQiSweeper
Copy link
Collaborator

@NanQiSweeper NanQiSweeper commented Jan 10, 2023

Why I did it

Create SONIC Yang model for Telemetry_client

How I did it

Defined Yang models based on Guideline doc:
https://github.com/Azure/SONiC/blob/master/doc/mgmt/SONiC_YANG_Model_Guidelines.md
and
https://github.com/Azure/sonic-utilities/blob/master/doc/Command-Reference.md

How to verify it

Added test cases to verify it.

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211

Description for the changelog

Ensure to add label/tag for the feature raised. example - PR#2174 under sonic-utilities repo. where, Generic Config and Update feature has been labelled as GCU.

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Jan 10, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

NanQiSweeper and others added 2 commits January 10, 2023 17:00
Fix compilation error caused by adding sonic-telemetry_client.yang file, missing closing bracket.
container TELEMETRY_CLIENT {
container Global {
leaf retry_interval {
type uint64;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there a range for retry interval?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I checked the code and there is no limitation.

}

leaf report_interval {
type uint64;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there a range for report interval?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I checked the code and there is no limitation. But there is a default value of 5000 milliseconds.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks for sharing! Could you add default value into this yang model?

@zhangyanzhao zhangyanzhao changed the title SONiC Yang model support for Telemetry_client. (#12483) [yang]SONiC Yang model support for Telemetry_client. (#12483) Jan 26, 2023
@zhangyanzhao zhangyanzhao added the YANG YANG model related changes label Feb 2, 2023

yang-version 1.1;

namespace "http://github.com/Azure/sonic-telemetry_client";
Copy link
Contributor

Choose a reason for hiding this comment

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

Please use sonic-net instead of Azure

}

list TELEMETRY_CLIENT_DS_LIST {
ordered-by user;
Copy link
Contributor

Choose a reason for hiding this comment

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

why do you add this line?

@zhangyanzhao
Copy link
Collaborator

@NanQiSweeper can you please help to fix the conflicts and restart the build? Thanks.

@NanQiSweeper
Copy link
Collaborator Author

@zhangyanzhao OK,i'll fix it.

@NanQiSweeper NanQiSweeper force-pushed the telemetry_client_sonic_yang branch from 40b3ed4 to a79e48a Compare March 6, 2023 02:17
@NanQiSweeper
Copy link
Collaborator Author

@zhangyanzhao Hi, I have resolved the conflict.

@NanQiSweeper
Copy link
Collaborator Author

@zhangyanzhao Hi, If there is no other problem, can you merge as soon as possible to avoid other conflicts.

@qiluo-msft qiluo-msft merged commit ae71988 into sonic-net:master Mar 9, 2023
xumia pushed a commit to xumia/sonic-buildimage-1 that referenced this pull request Mar 10, 2023
sonic-net#13314)

#### Why I did it
Create SONIC Yang model for Telemetry_client
#### How I did it
Defined Yang models  based on Guideline doc:
https://github.com/Azure/SONiC/blob/master/doc/mgmt/SONiC_YANG_Model_Guidelines.md
and
https://github.com/Azure/sonic-utilities/blob/master/doc/Command-Reference.md
#### How to verify it
Added test cases to verify it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
YANG YANG model related changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants