Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Questions from a new Redfishtool user #41

Open
tdeneau opened this issue Mar 28, 2018 · 3 comments
Open

Questions from a new Redfishtool user #41

tdeneau opened this issue Mar 28, 2018 · 3 comments

Comments

@tdeneau
Copy link

tdeneau commented Mar 28, 2018

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.

@billdodd
Copy link
Contributor

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.

@tdeneau
Copy link
Author

tdeneau commented Mar 28, 2018

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.

@mraineri
Copy link
Contributor

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 mraineri added cleanup Used for issues that are stale and should be considered for closing enhancement and removed cleanup Used for issues that are stale and should be considered for closing labels Apr 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants