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
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)
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)
@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
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)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)