"A" == Ansgar Esztermann-Kirchner aeszter@mpibpc.mpg.de writes:
A> On Mon, Dec 03, 2018 at 05:39:32PM +0100, Roland Fehrenbacher A> wrote: >> >> there is no API yet, hence also no documentation :) Most likely >> you'd want to enhance qluman-cli functionality. So if you let me >> know what exactly you envisage to do I can point you in the right >> direction.
A> The long-term goal would be to have a CLI that does everything A> the GUI does.
Pretty ambitious. A lot of functionality of the GUI is not translatable into a CLI though.
A> In the short term, I'd like to create a tool that can add new A> hosts according to the parameters it is given, i.e. something A> like
A> addhost -i 10.208.0.1 -n node01 -m 11:22:33:44:55:66 \ A> -t standard_node -e 1U
A> This makes it easy to add a large number of nodes with MAC A> addresses obtained via SNMP from a network switch.
Our approach to this would be to integrate reading the MACs by SNMP into the GUI and then 'mass setup' the nodes from there. It's on our long list of features to be implemented, though not at a top spot unless someone funds development.
Anyway if you want to write your own CLI, have a look at how qluman-cli generates tokens for users and check in the GUI code, how the communication with qlumand looks when a host is generated from the 'New Hosts' dialog. Beware though, that there is no stable API for this, so changes in the QluMan code can make it necessary to adjust your CLI every now and then.