Closed ghost closed 6 years ago
Redfishtool is designed to be a command-line tool rather than a programmatic API. For programmatic use, you probably would be better off using python-redfish-library.
That said, it is possible to use Redfishtool programmatically (albeit a bit awkward). For a couple of examples, see:
Discussion 6/7: the group agrees that using Redfishtool as a module really isn't the right approach. While we did that in a couple of instances, we should consider changing those other tools to leverage the python-redfish-library.
7/19: Our stance is still that redfishtool is a standalone tool and not meant for being a module in an application.
The documentation for redfishtool very well describes how to use it as a command line utility, but there is no information how to use modules to write code. For example, if I want to get root:
`from redfishtool.ServiceRoot import RfServiceRoot
root = RfServiceRoot.getServiceRoot () print (root)`
Executed with an error: root = RfServiceRoot.getServiceRoot () TypeError: getServiceRoot () missing 2 required positional arguments: 'self' and 'rft' And how can I choose a port for example. What is rft and where to take these all abbreviations. Help please start using this module