Neither success nor error feedback from System's set_boot_source_override()

Bug #1668801 reported by Lucas Alvares Gomes
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-redfish
New
Undecided
Unassigned

Bug Description

The System's set_boot_source_override() doesn't provide any success or error feedback to the user, you can input any string to it and no checks will be performed against the values inputed [0]. The request is then issued by [1] but the status code is never checked. This behavior is very unfriendly and will leave the user with no information about whether the request went thru or not.

Example:

    import redfish

    obj = redfish.connect('http://127.0.0.1:8000/redfish/v1', user=None, password=None, simulator=True, enforceSSL=False)
    system = obj.Systems.systems_dict['437XR1138R2']
    ret = system.set_boot_source_override('banana', 'foo')
    print(ret) # This will print 'No Content'

[UPDATE]

Just an update, perhaps it should be another bug but... The set_boot_source_override() method doesn't work, python-redfish build the JSON manually by concatenating strings [0], why it doesn't just use a proper JSON library to do that is beyond me (import json).

Logs:

Data: b'{"Boot": {"BootSourceOverrideTarget": "banana"},{"BootSourceOverrideEnabled" : "foo"}}'

127.0.0.1 - - [28/Feb/2017 23:39:48] "PATCH /redfish/v1/Systems/437XR1138R2 HTTP/1.1" 204 -
127.0.0.1 - - [28/Feb/2017 23:42:14] code 400, message Bad request syntax ('\x16\x03\x01\x02\x00\x01\x00\x01ü\x03\x03òÉ»\x82\x19\x1cÝò7\x1dºSy\x19\x15\x0f\x9d} %i»\x95g¨¯T«\x996\x9b¿\x00\x00nÀ0À,À2À.À/À+À1À-\x00¥\x00£\x00¡\x00\x9f\x00¤\x00¢\x00\xa0\x00\x9eÀ(À$À\x14À')
127.0.0.1 - - [28/Feb/2017 23:42:14] "üòÉ»Ýò7ºSy} %i»g¨¯T«6¿nÀ0À,À2À.À/À+À1À-¥£¡¤¢ À(À$ÀÀ" 400 -

[0] https://github.com/openstack/python-redfish/blob/0361a69cb74f187283b3f0dc1418136f00fcaac3/redfish/standard.py#L444-L447

[1] https://github.com/openstack/python-redfish/blob/0361a69cb74f187283b3f0dc1418136f00fcaac3/redfish/standard.py#L416-L421

description: updated
description: updated
description: updated
description: updated
description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.