DMTF / Redfish-Mockup-Server

A simple Python 3.4 program that can be copied into a folder at the top of any Redfish mockup and can serve Redfish requests on the specified IP/port.
Other
83 stars 37 forks source link

option --port does not work for Redfish Mockup Server, version 1.0.7 #51

Closed El-H-git closed 5 years ago

El-H-git commented 5 years ago

option -P does not work for Redfish Mockup Server, version 1.0.7 . It gives the following error:

sh-4.2# python redfishMockupServer.py -H 172.17.0.8 -P 8003 redfishMockupServer.py Redfish Mockup Server, version 1.0.7 program: redfishMockupServer.py Hostname: 172.17.0.8 Port: 8000 dir path specified by user:None response time: 0 seconds Serving Mockup in abs real directory path:/RGB-telemetry/Redfish-Mockup-Server Traceback (most recent call last): File "redfishMockupServer.py", line 755, in main(sys.argv) File "redfishMockupServer.py", line 732, in main fpath = myServer.construct_path('/redfish/v1', 'index.json') AttributeError: 'HTTPServer' object has no attribute 'construct_path' sh-4.2# python redfishMockupServer.py -H 127.0.0.1 -P 8000 redfishMockupServer.py Redfish Mockup Server, version 1.0.7 program: redfishMockupServer.py Hostname: 127.0.0.1 Port: 8000 dir path specified by user:None response time: 0 seconds Serving Mockup in abs real directory path:/RGB-telemetry/Redfish-Mockup-Server Traceback (most recent call last): File "redfishMockupServer.py", line 755, in main(sys.argv) File "redfishMockupServer.py", line 732, in main fpath = myServer.construct_path('/redfish/v1', 'index.json') AttributeError: 'HTTPServer' object has no attribute 'construct_path'

sh-4.2# python redfishMockupServer.py -H 172.17.0.8 redfishMockupServer.py Redfish Mockup Server, version 1.0.7 program: redfishMockupServer.py Hostname: 172.17.0.8 Port: 8000 dir path specified by user:None response time: 0 seconds Serving Mockup in abs real directory path:/RGB-telemetry/Redfish-Mockup-Server Serving Redfish mockup on port: 8000 running Server...

billdodd commented 5 years ago

Use lower-case -p (or --port) for the port option. Upper-case -P (or --ssdp) is for the SSDP listener option.

It does look like the usage help statement needs to be cleaned up some.

billdodd commented 5 years ago

Actually, yes, I see that --port does not seem to be working. But lower-case -p still works. Not sure why --port isn't working...

El-H-git commented 5 years ago

Thanks