openSUSE / orthos2

Orthos is a machine administration tool.
GNU General Public License v2.0
14 stars 12 forks source link

Switch Cobbler utils to XML-RPC API #255

Closed SchoolGuy closed 2 weeks ago

SchoolGuy commented 3 months ago

Current Orthos uses SSH to log into the Cobbler server and execute Cobbler CLI commands. This is very bad as error handling is harder and we are less flexible in terms of reusability of the code that manages Cobbler. Lastly, the performance should increase with the XML-RPC API.

SchoolGuy commented 1 month ago

I have started this locally. The main challenge is how to save the credentials. Extending the machine object seems reasonable but is a lot of effort. Maybe a dedicated object?

SchoolGuy commented 1 month ago

A nice side effect of this ticket will be that we can test the functionality more easily as we can replace the XML-RPC server object with a MagicMock and assert the usage of the MagicMock.

Integration testing is also easier as we don't need to generate the SSH keys related to the service communication.

SchoolGuy commented 1 month ago

I had to create https://github.com/cobbler/cobbler/issues/3799 since atm we can't retrieve the kernel options of an unsaved item.

SchoolGuy commented 1 month ago

So the status quo is at the moment the following according to my research:

SchoolGuy commented 1 month ago

I have found out that the BMC passwords are saved as clear text in the database. As such we need to solve this in a greater manner and review the codebase as a whole for the topic of passwords. I will create a dedicated issue for this and proceed to use plaintext passwords for now.