dell / redfish-ansible-module

Ansible modules for Out-Of-Band Controllers using Redfish APIs
GNU General Public License v3.0
197 stars 80 forks source link

Redfish API error "msg": "Status code was 405 and not [200]: HTTP Error 405: Method Not Allowed", #194 #103

Closed ashokbeh closed 2 years ago

ashokbeh commented 2 years ago

Hi, Using Ansible playbook trying to run a diagnostic test against the Dell poweredge server using iDRAC. However,on POST to initiate the diagnostic, encountered an error

"msg": "Status code was 405 and not [200]: HTTP Error 405: Method Not Allowed", "odata_version": "4.0", "redirected": false, "server": "Apache", "status": 405, "strict_transport_security": "max-age=63072000; includeSubDomains; preload", "url": "https://xxx.corp/redfish/v1/Managers/iDRAC.Embedded.1/DellLCService/Actions/DellLCService.RunePSADiagnostics", "x_frame_options": "DENY"

If I use "url": 'https://xxxx.corp/redfish/v1/Managers/iDRAC.Embedded.1/Oem/Dell/DellLCService/Actions/DellLCService.RunePSADiagnostics", It works. This is against the syntax specified in iDRAC API web link. https://www.dell.com/support/manuals/en-us/idrac9-lifecycle-controller-v4.x-series/idrac9_4.00.00.00_redfishapiguide_pub/supported-action--runepsadiagnostics?guid=guid-adf45a5b-a8e1-4c04-ab2f-f05fb012bf50&lang=en-us&emcs_t=S2h8ZW1haWx8dG9waWNfc3Vic2NyaXB0aW9ufEtYWkxRVk1OUDdMQTVUfDgxMTcyODV8U1VCU0NSSVBUSU9OU3xoSw

May I know anyone come across such issue and justify the reason of using additional prefix /Oem/Dell.

Regards Ashok Behera

anupamaloke commented 2 years ago

If I use "url": 'https://xxxx.corp/redfish/v1/Managers/iDRAC.Embedded.1/Oem/Dell/DellLCService/Actions/DellLCService.RunePSADiagnostics", It works. This is against the syntax specified in iDRAC API web link. https://www.dell.com/support/manuals/en-us/idrac9-lifecycle-controller-v4.x-series/idrac9_4.00.00.00_redfishapiguide_pub/supported-action--runepsadiagnostics?guid=guid-adf45a5b-a8e1-4c04-ab2f-f05fb012bf50&lang=en-us&emcs_t=S2h8ZW1haWx8dG9waWNfc3Vic2NyaXB0aW9ufEtYWkxRVk1OUDdMQTVUfDgxMTcyODV8U1VCU0NSSVBUSU9OU3xoSw

@ashokbeh, In the API guide, the link mentioned is: /redfish/v1/Dell/Managers/<Manager-Id>/DellLCService/Actions/DellLCService.RunePSADiagnostics. See the part in blue. This is the old URI format/convention for the iDRAC Redfish OEM APIs. As per the Redfish standards (see here), these OEM end-points have now been standardized under /redfish/v1/Managers/<Manager-Id>/Oem/Dell with new iDRAC 5.x firmware versions. You can continue to use the old URI format on both iDRAC 4.xx.xx.xx and 5.xx.xx.xx firmware versions as backward compatibility is provided in 5.xx.xx.xx when using old URI formats. However, it is always recommended to upgrade to iDRAC 5.xx.xx.xx.

anupamaloke commented 2 years ago

@ashokbeh, I will be closing this issue if there are no more concerns with respect to this issue. Please reopen if the issue persists.

ashokbeh commented 2 years ago

Thank you anupamaloke for your support.