Skip to content

Removed unused variables in rfc2863.py#237

Merged
qiluo-msft merged 1 commit intosonic-net:masterfrom
raphaelt-nvidia:vlan_snmp_3
Oct 26, 2021
Merged

Removed unused variables in rfc2863.py#237
qiluo-msft merged 1 commit intosonic-net:masterfrom
raphaelt-nvidia:vlan_snmp_3

Conversation

@raphaelt-nvidia
Copy link
Contributor

Signed-off-by: raphaelt [email protected]

- What I did

Removed unused variables rif_port_map and port_rif_map in rfc2863.py

- How I did it

Edited rfc2863.py as requested by @qiluo-msft in merged PR #218.

- How to verify it

pytest-3 test_interfaces.py and pytest-3 namespace/test_interfaces.py in sonic-snmpagent/tests.

- Description for the changelog

Removed unused variables.

@qiluo-msft qiluo-msft merged commit a07da53 into sonic-net:master Oct 26, 2021
SuvarnaMeenakshi pushed a commit to SuvarnaMeenakshi/sonic-snmpagent that referenced this pull request Feb 24, 2023
**- What I did**

Removed unused variables rif_port_map and port_rif_map in rfc2863.py

**- How I did it**

Edited rfc2863.py as requested by @qiluo-msft in merged PR sonic-net#218.

**- How to verify it**

pytest-3 test_interfaces.py and pytest-3 namespace/test_interfaces.py in sonic-snmpagent/tests.

**- Description for the changelog**

Removed unused variables.

(cherry picked from commit a07da53)
SuvarnaMeenakshi pushed a commit to SuvarnaMeenakshi/sonic-snmpagent that referenced this pull request Feb 28, 2023
**- What I did**

Removed unused variables rif_port_map and port_rif_map in rfc2863.py

**- How I did it**

Edited rfc2863.py as requested by @qiluo-msft in merged PR sonic-net#218.

**- How to verify it**

pytest-3 test_interfaces.py and pytest-3 namespace/test_interfaces.py in sonic-snmpagent/tests.

**- Description for the changelog**

Removed unused variables.

(cherry picked from commit a07da53)
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
ssithaia-ebay pushed a commit to ssithaia-ebay/sonic-snmpagent that referenced this pull request May 23, 2025
**- What I did**

Removed unused variables rif_port_map and port_rif_map in rfc2863.py

**- How I did it**

Edited rfc2863.py as requested by @qiluo-msft in merged PR sonic-net#218.

**- How to verify it**

pytest-3 test_interfaces.py and pytest-3 namespace/test_interfaces.py in sonic-snmpagent/tests.

**- Description for the changelog**

Removed unused variables.
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.

2 participants