-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
upstream snmp sonic-yang files #10828
upstream snmp sonic-yang files #10828
Conversation
"sonic-snmp:sonic-snmp": { | ||
"sonic-snmp:SNMP_COMMUNITY": { | ||
"SNMP_COMMUNITY_LIST": [ | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please check indentation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
taken care. Please see new changes
description | ||
"SNMP System Contact."; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please replace tab
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Taken care.
container CONTACT { | ||
leaf Contact { | ||
type string { | ||
length "1..255"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not 0?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not to allow configuration of empty string.
eff7abf
to
f89ac89
Compare
/azp run Azure.sonic-buildimage |
Azure Pipelines successfully started running 1 pipeline(s). |
"Contact": "[email protected]" | ||
}, | ||
"LOCATION": { | ||
"Location": "Sonic Location" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
"SNMP": { | ||
"CONTACT": { | ||
"Contact": "[email protected]" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's use [email protected]
which is more safe. #Closed
/azp run Azure.sonic-buildimage |
Commenter does not have sufficient privileges for PR 10828 in repo Azure/sonic-buildimage |
/azpw run Azure.sonic-buildimage |
/AzurePipelines run Azure.sonic-buildimage |
Azure Pipelines successfully started running 1 pipeline(s). |
Could you help resolve the conflict, and merge latest master if not following it? |
…uildimage into snmp_yang_upstream1
Could you merge master again and resolve the conflicts? |
/azp run Azure.sonic-buildimage |
Commenter does not have sufficient privileges for PR 10828 in repo Azure/sonic-buildimage |
/azpw run Azure.sonic-buildimage |
/AzurePipelines run Azure.sonic-buildimage |
Azure Pipelines successfully started running 1 pipeline(s). |
Hi @suresh-rupanagudi , I saw the test always fail on GCU test.
Here is the reason: But in SONiC default config, the
I think the default SONiC SNMP config need to be updated. |
Thanks JingWeng, Gang for looking into this. Now solution is From rfc8407."Identifiers SHOULD follow a consistent naming pattern throughout the |
Pipeline will run basic test, so we can detect errors before merging PR.
Please follow sonic-mgmt/docs at master * sonic-net/sonic-mgmt (github.com)<https://github.com/sonic-net/sonic-mgmt/tree/master/docs> to setup testbed and run tests.
I think modify yang file will be easier, and sonic-acl.yang is using capital letters.
BR
Gang
From: suresh-rupanagudi ***@***.***>
Sent: Thursday, July 28, 2022 6:28 PM
To: Azure/sonic-buildimage ***@***.***>
Cc: Gang Lv ***@***.***>; Review requested ***@***.***>
Subject: Re: [Azure/sonic-buildimage] upstream snmp sonic-yang files (PR #10828)
Thanks JingWeng, Gang for looking into this.
1)why are we not getting this error when we build "sonic-broadcom.bin" locally?.
What needs to be done to run this locally?.
Now solution is
1)to change "type" to "TYPE" in yang file. OR
2)change "TYPE" to "type" in snmp_yml_to_configdb.py file. We might also need to take care all the tests where community is used.
Yang standard allows defining identifier with capital letters.
But I could not see any yang module using this.
Please let me know
From rfc8407.
"Identifiers SHOULD follow a consistent naming pattern throughout the
module. Only lowercase letters, numbers, and dashes SHOULD be used
in identifier names. Uppercase characters, the period character, and
the underscore character MAY be used if the identifier represents a
well-known value that uses these characters. YANG does not permit
any other characters in YANG identifiers."
-
Reply to this email directly, view it on GitHub<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FAzure%2Fsonic-buildimage%2Fpull%2F10828%23issuecomment-1197959503&data=05%7C01%7Cganglv%40microsoft.com%7C29e097283f4a48313a4308da7083dc86%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637946008927605692%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=HmqqTHo4pGYHDzBlShkH1ybkTNQXtmVlEbZlNmrWBwA%3D&reserved=0>, or unsubscribe<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAVG7POSUY65BVMXHPVSSQXTVWJODNANCNFSM5V3UZPDQ&data=05%7C01%7Cganglv%40microsoft.com%7C29e097283f4a48313a4308da7083dc86%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637946008927761915%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=TTTA263%2FIHuNbLBmciSx2Xh1yiQeh46x1rQFEW%2Bz9jc%3D&reserved=0>.
You are receiving this because your review was requested.Message ID: ***@***.***>
|
1)Because it doesn't have any test failures during the image build. For example, you define the SNMP_COMMUNITY['public']['type'] with RO or RW, so you just test the config here with
However it tested real machine during sonic-mgmt test and found that the real config doesn't validate SNMP_COMMUNITY's YANG. Because the real config is
I think you can modify the config here and change |
/azpw run Azure.sonic-buildimage |
/AzurePipelines run Azure.sonic-buildimage |
Azure Pipelines successfully started running 1 pipeline(s). |
Hi jingwenxie, |
@suresh-rupanagudi this change cannot be cherrypicked to 202205 cleanly. Please create new PR for 202205 branch. |
@suresh-rupanagudi, @zhangyanzhao, can you help create separate PR for 202205 branch? If the change has been done. Please link the 202205 PR to this PR so that I can close the cherry-picking request. |
ETA for PR on 202205 branch is 2/20/2023 |
@suresh-rupanagudi is this PR not needed for 202211 branch? |
Hi, Not sure if this PR required for 202211 branch. Please cherry pick changes if required. |
Fix #10549
Fix #10550
Why I did it
Create sonic yang model for SNMP
Tables:SNMP, SNMP_COMMUNITY
How I did it
Defined yang models based for SNMP based on snmp.yml
How to verify it
Added test cases to verify