lenovo / python-redfish-lenovo

Sample Python scripts and Ansible playbooks for using the Redfish API on Lenovo servers
Apache License 2.0
87 stars 49 forks source link

documentation details #290

Open FlorianHeigl opened 2 years ago

FlorianHeigl commented 2 years ago

please be so kind to give a working example for config.ini. I'm sure I'm thinking too complicated but so far the README.md only tells us that we can set common parameters in it, but not the actual variable names for those parameters. in fact, it is not mentioned anywhere at all. also, if it were an .ini format, you'd need a [section] heading, which is also not known. The parser in fact expects one though:

  File "/usr/lib64/python3.6/configparser.py", line 1080, in _read
    raise MissingSectionHeaderError(fpname, lineno, line)
configparser.MissingSectionHeaderError: File contains no section headers.

the dnssservers script help also mentions one can set multiple, but does not inform about the correct separators. should one try i.e. a comma, they'll get a message that the format (printed to screen as parsed) they used is not a supported one. They do not get any info about what makes a supported format.

FlorianHeigl commented 2 years ago

For the record, I made it as far as this

[ConnectCfg]
bmcip=192.168.70.125
bmcusername=USERID
bmcpassword=PASSW0RD
systemid=""

I have no idea at the moment what the systemid constitutes, but with the above example I can query network info.

jixj5 commented 2 years ago

Hi, We're sorry for the confusion this has caused you. 1.systemid It means ComputerSystem instance id(None: first instance, All: all instances), such as 1, it means /redfish/v1/systems/1 instance. 2.dnssservers You can specify up to 3 DNS servers, use space to seperate them. example: 1.1.1.1 1.1.1.2. We will enhance our help message to inform about the space separators.