ibm-openbmc / dev

Product Development Project Mgmt and Tracking
16 stars 2 forks source link

1050: SNMP Out of range port doesn't throw error returns HTTPS 201, it should throw HTTPS 400 error #3626

Closed gtmills closed 1 year ago

gtmills commented 1 year ago

@lxwinspur @ChicagoDuan @sunharis FYI

Internal defect is 432448

This is for the 1050 release. We should match the behavior of 1030 https://gerrit.openbmc.org/c/openbmc/bmcweb/+/38599 is the upstream commit and was pulled into 1030.

Expected Behavior

A SNMP port that is out of range should return a 400 error like it did on 1030

Actual Behavior

If the port is out of range it defaults to 162

Steps to Reproduce the Problem

  1. redfishtool -u admin -p 0penBmc0 -r xxx.aus.stglabs.ibm.com -S Always raw POST /redfish/v1/EventService/Subscriptions --data='{"Destination":"snmp://9.41.166.76:65536", "SubscriptionType":"SNMPTrap", "Protocol":"SNMPv2c"}' (curl can also be used)
  2. redfishtool -u admin -p 0penBmc0 -r xxx.aus.stglabs.ibm.com -S Always raw GET /redfish/v1/EventService/Subscriptions/snmp20 (see that is recreated with port 162)
ChicagoDuan commented 1 year ago

Done, please review: https://github.com/ibm-openbmc/bmcweb/pull/668

ChicagoDuan commented 1 year ago

Merged. https://github.com/ibm-openbmc/bmcweb/pull/668