ibm-openbmc / dev

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

1050:Everest:SNMP: Not Able to configure SNMP manager with empty port #3627

Closed yadlapati closed 1 year ago

yadlapati commented 1 year ago

Not Able to configure SNMP manager with default port

Steps to create:

bash-4.2$ curl -k -H "X-Auth-Token: $bmc_token" -X POST -D headers.txt https://${bmc}/redfish/v1/EventService/Subscriptions -d '{"Destination":"snmp://9.41.166.76:", "SubscriptionType":"SNMPTrap", "Protool":"SNMPv2c"}' { "Destination@Message.ExtendedInfo": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The value 'snmp://9.41.166.76:' for the property Destination is of a different format than the property can accept.", "MessageArgs": [ "snmp://9.41.166.76:", "Destination" ], "MessageId": "Base.1.13.0.PropertyValueFormatError", "MessageSeverity": "Warning", "Resolution": "Correct the value for the property in the request body and resubmit the request if the operation failed." } ] }

Expectation: We should get 201 status code, instead of 400 (it should get configure with default port 162)

Please Note : We are not able to configure SNMP manager with default port via GUI also getting an error (Error in adding SNMP alert destination)

BMC Info:

ever28bmc

ID=openbmc-openpower NAME="IBM eBMC (OpenBMC for IBM Enterprise Systems)" VERSION="fw1050.00-2.27" VERSION_ID=fw1050.00-2.27-1050.2317.20230418a (NM1050_010) VERSION_CODENAME="${DISTRO_CODENAME}" PRETTY_NAME="IBM eBMC (OpenBMC for IBM Enterprise Systems) fw1050.00-2.27" BUILD_ID="20231001" OPENBMC_TARGET_MACHINE="p10bmc" EXTENDED_VERSION=NM1050_010 BMC_SIGNATURE_TYPE=Development HOST_SIGNATURE_TYPE=Development

ChicagoDuan commented 1 year ago

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