DMTF / Redfish-Protocol-Validator

The Redfish Protocol Validator tests the HTTP protocol behavior of a Redfish service to validate that it conforms to the Redfish specification.
Other
14 stars 12 forks source link

The result of tool report different from manual test #19

Closed FelixD999 closed 3 years ago

FelixD999 commented 3 years ago

Tool Version: 1.0.4 python3 rf_protocol_validator.py -r https://{IP} -u USERNAME -p PASSWORD --avoid-http-redirect --no-cert-check

SERV_EVENT_POST_RESP: "If the [Event Service] subscription request succeeds, the service shall return an HTTP 201 Created status code, and the Location header that contains a URI of the newly created subscription resource.

Message: Response from event subscription POST request to /redfish/v1/EventService/Subscriptions returned status code 400; expected 201; extended error: IP provided is invalid Manual test result: Check returned status code 201, and the Location header that contains a URI of the newly created subscription resource.

Are there any verification procedures that prevent to verify completely? Did I lack step to verify this test case?

mraineri commented 3 years ago

Would you be able to provide what you did for your manual test? What was the request body when creating a new event subscription?

FelixD999 commented 3 years ago

The request body of my creating subscription is as follows. POST https://192.168.0.122/redfish/v1/EventService/Subscriptions { "Context": "Event_Sub", "Destination": "https://192.168.0.110:4443", "Protocol": "Redfishhh", "EventFormatType": "Event", "RegistryPrefixes": [], "ResourceTypes": [] }

mraineri commented 3 years ago

What happens when you provide this as a payload in your manual test?

{
    "Context": "RPV test subscription",
    "Protocol": "Redfish",
    "Destination": "https://contoso.com/Destination1"
}
mraineri commented 3 years ago

Depending on the results of the request, we can make a change to the tool to use something like https://192.168.1.1/Destination1 instead of https://contoso.com/Destination1.

FelixD999 commented 3 years ago

When I provide that as a payload in manual test, it will return 400. POST400

mraineri commented 3 years ago

@FelixD999 could you please try the branch in pull request #21 to see if that resolves the issue for you? Unfortunately I don't have a service with the same restriction yours does to test it myself.