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

Entries under .1.3.6.1.2.1.31.1.1.1.18 OID should return the "description" field of PORT_TABLE entries in APPL_DB or CONFIG_DB #224

Merged
merged 1 commit into from
Jul 12, 2021

Conversation

raphaelt-nvidia
Copy link
Contributor

@raphaelt-nvidia raphaelt-nvidia commented Jul 8, 2021

- What I did

This is a correction of #218, which is contained in sonic-net/sonic-buildimage#7859, after community decided that entries under .1.3.6.1.2.1.31.1.1.1.18 OID should return the "description" field of PORT_TABLE entries in APPL_DB or CONFIG_DB. For vlan, management and LAG, these are empty strings.

- How I did it

Deleted the lines of code quoted by Suvarna in the above PRs. This necessitated modifying 4 unit tests that had been written under the assumption that these OIDs would return non-empty data.

- How to verify it

Run unit tests in build and snmp tests in sonic-mgmt.

- Description for the changelog

Entries under .1.3.6.1.2.1.31.1.1.1.18 OID should return the "description" field of PORT_TABLE entries in APPL_DB or CONFIG_DB.

@qiluo-msft
Copy link
Contributor

LAG, VLAN and management interfaces under 1.3.6.1.2.1.31.1.1.1.18 OID should continue to return empty strings

Actually your code return the "description" field of PORT_TABLE entry's in APPL_DB or CONFIG_DB

Copy link
Contributor

@SuvarnaMeenakshi SuvarnaMeenakshi left a comment

Choose a reason for hiding this comment

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

LGTM, Please update description as suggested.

…tion" field of PORT_TABLE entries in APPL_DB or CONFIG_DB.

For vlan, management and LAG, these are empty strings.

Signed-off-by: Raphael Tryster <raphaelt@nvidia.com>
@raphaelt-nvidia raphaelt-nvidia changed the title Community decided that vlan, management and LAG entries under .1.3.6.… Entries under .1.3.6.1.2.1.31.1.1.1.18 OID should return the "description" field of PORT_TABLE entries in APPL_DB or CONFIG_DB Jul 11, 2021
@SuvarnaMeenakshi SuvarnaMeenakshi merged commit 0813b42 into sonic-net:master Jul 12, 2021
SuvarnaMeenakshi pushed a commit to SuvarnaMeenakshi/sonic-snmpagent that referenced this pull request Feb 24, 2023
…tion" field of PORT_TABLE entries in APPL_DB or CONFIG_DB. (sonic-net#224)

- What I did
This is a correction of sonic-net#218, which is contained in sonic-net/sonic-buildimage#7859, after community decided that entries under .1.3.6.1.2.1.31.1.1.1.18 OID should return the "description" field of PORT_TABLE entries in APPL_DB or CONFIG_DB. For vlan, management and LAG, these are empty strings.
- How I did it
Deleted the lines of code quoted by Suvarna in the above PRs. This necessitated modifying 4 unit tests that had been written under the assumption that these OIDs would return non-empty data.
- How to verify it
Run unit tests in build and snmp tests in sonic-mgmt.
- Description for the changelog
Entries under .1.3.6.1.2.1.31.1.1.1.18 OID should return the "description" field of PORT_TABLE entries in APPL_DB or CONFIG_DB.

Signed-off-by: Raphael Tryster <raphaelt@nvidia.com>
(cherry picked from commit 0813b42)
SuvarnaMeenakshi pushed a commit to SuvarnaMeenakshi/sonic-snmpagent that referenced this pull request Feb 28, 2023
…tion" field of PORT_TABLE entries in APPL_DB or CONFIG_DB. (sonic-net#224)

- What I did
This is a correction of sonic-net#218, which is contained in sonic-net/sonic-buildimage#7859, after community decided that entries under .1.3.6.1.2.1.31.1.1.1.18 OID should return the "description" field of PORT_TABLE entries in APPL_DB or CONFIG_DB. For vlan, management and LAG, these are empty strings.
- How I did it
Deleted the lines of code quoted by Suvarna in the above PRs. This necessitated modifying 4 unit tests that had been written under the assumption that these OIDs would return non-empty data.
- How to verify it
Run unit tests in build and snmp tests in sonic-mgmt.
- Description for the changelog
Entries under .1.3.6.1.2.1.31.1.1.1.18 OID should return the "description" field of PORT_TABLE entries in APPL_DB or CONFIG_DB.

Signed-off-by: Raphael Tryster <raphaelt@nvidia.com>
(cherry picked from commit 0813b42)
qiluo-msft pushed a commit that referenced this pull request Mar 4, 2023
… for RFC2863 (#279)

**- What I did**
Cherry-pick the required PRs to 202012 Branch to add SNMP VLAN Support.
This is done because the VLAN if index comes in ipNetToMediaPhysAddress (1.3.6.1.2.1.4.22.1.2) but not in ifName 1.3.6.1.2.1.31.1.1.1.1.

**- How I did it**
Cherry-pick below PRs:
#218 - Main change
#224 - Follow up PR
#237 - Follow up PR

**- How to verify it**
Before PR changes:
```
admin@str2-sn3800-02:~$ docker exec -it snmp snmpwalk -v2c -c msft 127.0.0.1 1.3.6.1.2.1.31.1.1.1.1
iso.3.6.1.2.1.31.1.1.1.1.1 = STRING: "etp1a"
iso.3.6.1.2.1.31.1.1.1.1.3 = STRING: "etp1b"
iso.3.6.1.2.1.31.1.1.1.1.5 = STRING: "etp2a"
iso.3.6.1.2.1.31.1.1.1.1.7 = STRING: "etp2b"
iso.3.6.1.2.1.31.1.1.1.1.9 = STRING: "etp3a"
iso.3.6.1.2.1.31.1.1.1.1.11 = STRING: "etp3b"
..
iso.3.6.1.2.1.31.1.1.1.1.255 = STRING: "etp64b"
iso.3.6.1.2.1.31.1.1.1.1.1101 = STRING: "PortChannel101"
iso.3.6.1.2.1.31.1.1.1.1.1102 = STRING: "PortChannel102"
iso.3.6.1.2.1.31.1.1.1.1.1103 = STRING: "PortChannel103"
iso.3.6.1.2.1.31.1.1.1.1.1104 = STRING: "PortChannel104"
iso.3.6.1.2.1.31.1.1.1.1.10000 = STRING: "eth0"
```

After PR changes; Can see vlan 1000 with ifindex3000:
```
admin@str2-sn3800-02:~$ docker exec -it snmp snmpwalk -v2c -c msft 127.0.0.1 1.3.6.1.2.1.31.1.1.1.1
iso.3.6.1.2.1.31.1.1.1.1.1 = STRING: "etp1a"
iso.3.6.1.2.1.31.1.1.1.1.3 = STRING: "etp1b"
iso.3.6.1.2.1.31.1.1.1.1.5 = STRING: "etp2a"
iso.3.6.1.2.1.31.1.1.1.1.7 = STRING: "etp2b"
iso.3.6.1.2.1.31.1.1.1.1.9 = STRING: "etp3a"
iso.3.6.1.2.1.31.1.1.1.1.11 = STRING: "etp3b"
..
iso.3.6.1.2.1.31.1.1.1.1.255 = STRING: "etp64b"
iso.3.6.1.2.1.31.1.1.1.1.1101 = STRING: "PortChannel101"
iso.3.6.1.2.1.31.1.1.1.1.1102 = STRING: "PortChannel102"
iso.3.6.1.2.1.31.1.1.1.1.1103 = STRING: "PortChannel103"
iso.3.6.1.2.1.31.1.1.1.1.1104 = STRING: "PortChannel104"
iso.3.6.1.2.1.31.1.1.1.1.3000 = STRING: "Vlan1000"       
iso.3.6.1.2.1.31.1.1.1.1.10000 = STRING: "eth0"
```
UT Passes
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.

3 participants