DMTF / Redfish-Service-Conformance-Check

This tool checks an operational Redfish Service to see that it conforms to the normative statements from the Redfish specification
Other
4 stars 8 forks source link

Redfish-Service-Conformance-Check throws an assertion: TypeError: argument of type 'NoneType' is not iterable #163

Closed maximyep closed 4 years ago

maximyep commented 5 years ago

Notes:

Currently, I've observed another problem. Please take look:

Steps to reproduce:

  1. Install (if not installed) python3 -m pip install openpyxl python3 -m pip install requests python3 -m pip install beautifulsoup4

  2. Download DMTF-Simulator from git@github.com:DMTF/Redfish-Service-Conformance-Check.git and start chmod +x start.sh ./start.sh redfishProfileSimulator Version: 0.9.6 Starting redfishProfileSimulator at: hostIP=127.0.0.1, port=5000

  3. Configure properties file with: cat properties.json ... "Password": "password123456", "LoginName": "root", "DnsName": "127.0.0.1:5000",

  4. Start test with: python3 sample_run.py

Test fails with:

Traceback (most recent call last): File "sample_run.py", line 43, in rfs_test.run(sut) File "/home/max/redfish/Redfish-Service-Conformance-Check/rfs_test/init.py", line 48, in run TEST_protocol_details.run(sut, log) File "/home/max/redfish/Redfish-Service-Conformance-Check/rfs_test/TEST_protocol_details.py", line 5144, in run assertion_status = Assertion_6_1_8_3(self, log) File "/home/max/redfish/Redfish-Service-Conformance-Check/rfs_test/TEST_protocol_details.py", line 352, in Assertion_6_1_8_3 if root_link_key in self.sut_toplevel_uris and self.sut_toplevel_uris[root_link_key]['url']: TypeError: argument of type 'NoneType' is not iterable

Full logs: DMTF-Redfish-Service-Conformance-Check-logs-with-fixed-issue-161.txt

billdodd commented 5 years ago

From the very beginning of your logs:

Setting up Redfish Service Check Tool Revision: 01.05.17 : OpenBmc:127.0.0.1:5000
OPERATIONAL ERROR: GET Request for /redfish FAILED with exeption: <class 'ssl.SSLError'>

The default scheme for the conformance check tool is HTTPS, but the profile simulator only supports HTTP.

To configure the conformance check tool to use HTTP, add "UseHttp": "yes" to your SUTs section in properties.json:

...
    "Password": "password123456",
    "LoginName": "root",
    "DnsName": "127.0.0.1:5000",
    "UseHttp": "yes",
...
maximyep commented 5 years ago

It is strange, but the execution fails with: (HTTP status 401) tried with

seems error somewhere inside emulator. 2019-03-04 12_49_39-myepanes-bmc running - oracle vm virtualbox

maximyep commented 5 years ago

I'm not sure for 100% but if following is done:

max@myepanes-bmc:~/redfish/Redfish-Service-Conformance-Check$ git diff rf_sut.py 2019-03-04 14_27_40-myepanes-bmc running - oracle vm virtualbox

test started to work

billdodd commented 5 years ago

That looks like a bug in the Redfish-Profile-Simulator. Per the Redfish spec, the "/redfish/v1/odata" resource shall not require authentication. It appears the Profile-Simulator is requiring authn for that resource.

maximyep commented 5 years ago

Shell a I raise a bug into Profile-Simulator?

billdodd commented 5 years ago

@maximyep - Yes, please, that would be great.

mraineri commented 4 years ago

Closing; this issue has been open a while and should be addressed with a fix in the Redfish Profile Simulator. Please reopen if the issue still persists.