Redfishtool icon indicating copy to clipboard operation
Redfishtool copied to clipboard

Questions from a new Redfishtool user

Open tdeneau opened this issue 7 years ago • 3 comments

Very nice tool. I am using it against a supermicro X11DPU system.

One thing I wanted to do thru redfishtool was to change a BIOS setting. First I want to see what all the Bios "attributes" are. Using Curl, I can do this with GET //sysname/redfish/v1/Systems/1/Bios.

Using redfish tool, must I use the "raw" subcommand with the GET verb to accomplish this or is there a higher level way to do this?

Then I want to change one of those settings, let's say the setting for CoresEnabled. Using Curl, I can do this with

curl -sk -u ADMIN:ADMIN --data '{"CoresEnabled": 2}' -X PATCH https://sysname/redfish/v1/Systems/1/Bios 

Again, using redfishtool, am I required to use the "raw" subcommand with the PATCH verb to accomplish this? I used this:

python3 redfishtool.py -A Basic -r sysname -u ADMIN -p ADMIN raw PATCH --data='{"CoresEnabled": 2}' /redfish/v1/Systems/1/Bios

On this particular system, the response to this command has a statuscode 202 with the JSON response as follows:

{
    "Success": {
        "Message": "Successfully Completed Request.",
        "code": "Base.v1_0_0.Success"
    }
}

redfishtool responds with redfishtool: Transport: processing response status codes

I am not sure if this is an error, but it looks like one.

I can confirm that if I reset the system, the new BIOS settings do take effect. (Maybe that's the reason for the 202 response since they don't take effect immediately?)

Question: should 202 response be considered success in this context.

tdeneau avatar Mar 28 '18 20:03 tdeneau

You are correct. There is no direct support (like a "Bios" subcommand) for reading or updating Bios attributes. So you would need to use the raw command as you indicated.

And yes, the tool does seem to be incorrectly treating the 202 response status as a failure. We should fix that.

billdodd avatar Mar 28 '18 21:03 billdodd

It would be nice if there was a way to support all oData subtrees (if that's the right terminology) without having to use raw commands.

tdeneau avatar Mar 28 '18 21:03 tdeneau

The tool tends to lag behind Redfish data model in terms of functionality. It's largely dependent on what people need at a given time. When has a need for managing a type of resource via this tool, they typically file an issue in Github, and we'll assign it to someone to work on, track its progress, etc.

With regards to the BIOS resource, we haven't had any requests to date to manage BIOS attributes with Redfishtool. There are interoperability challenges with the BIOS resource, since it requires a user knowing the system vendor, the types of attributes the implementation exposes, and the valid values the implementation accepts. However, I think we could perform a generic approach to modifying attributes in the tool. Something like: redfishtool [OPTNS] Systems setBios [AttributeName] [AttributeValue]

mraineri avatar Apr 13 '18 14:04 mraineri