Skip to content

[RFC2737, RFC3433] Exclude RJ45 port from Entity MIB and Entity sensor MIB #247

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
merged 4 commits into from
Apr 5, 2022

Conversation

keboliu
Copy link
Collaborator

@keboliu keboliu commented Mar 22, 2022

- What I did

RJ45 port will expose the below info to STATE_DB, since there is NO embedded sensor on RJ45 ports, so Entity MIB and Entity sensor MIB should skip the TRANSCEIVER_INFO and TRANSCEIVER_DOM_SENSOR DB entries for RJ45 ports.

  "TRANSCEIVER_INFO|Ethernet2": {
    "type": "RJ45",
    "vendor_rev": "N/A",
    "serial": "N/A",
    "manufacturer": "N/A",
    "model": "N/A",
    "is_replaceable": "N/A"
  },
  "TRANSCEIVER_DOM_SENSOR|Ethernet2": {
    "temperature": "N/A",
    "voltage": "N/A",
    "tx1bias": "N/A",
    "tx2bias": "N/A",
    "tx3bias": "N/A",
    "tx4bias": "N/A",
    "rx1power": "N/A",
    "rx2power": "N/A",
    "rx3power": "N/A",
    "rx4power": "N/A",
    "tx1power": "N/A",
    "tx2power": "N/A",
    "tx3power": "N/A",
    "tx4power": "N/A"
  }

- How I did it
Add logic to detect the type of transceiver, skip RJ45 type.

- How to verify it
run SNMP test on the platforms with RJ45 ports.

- Description for the changelog

@keboliu keboliu requested a review from prgeor March 22, 2022 10:17
@prgeor prgeor self-assigned this Apr 5, 2022
@prgeor prgeor merged commit 33fdf9d into sonic-net:master Apr 5, 2022
@keboliu keboliu deleted the sonic_alligator_bu_master branch April 7, 2022 05:48
ssithaia-ebay pushed a commit to ssithaia-ebay/sonic-snmpagent that referenced this pull request May 23, 2025
…r MIB (sonic-net#247)

* enhance snmp rfc2737 implementation to exclude RJ45 port

Signed-off-by: Kebo Liu <[email protected]>

* enhance RFC3433 implementation to exclude RJ45 port

Signed-off-by: Kebo Liu <[email protected]>

* add UT test case for RJ45 port support

Signed-off-by: Kebo Liu <[email protected]>

* fix typo in state_db

Signed-off-by: Kebo Liu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants