Hello List,
there's a few areas of configuration where we'd welcome more automation (e.g. creating a lot of nodes). Therefore, I'd like to develop some tools that interface with the central daemon. Is there any API documentation available?
Thanks,
A.
"A" == Ansgar Esztermann-Kirchner aeszter@mpibpc.mpg.de writes:
Hi again,
A> Hello List, there's a few areas of configuration where we'd A> welcome more automation (e.g. creating a lot of A> nodes). Therefore, I'd like to develop some tools that interface A> with the central daemon. Is there any API documentation A> available?
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.
Best,
Roland
On Mon, Dec 03, 2018 at 05:39:32PM +0100, Roland Fehrenbacher 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.
The long-term goal would be to have a CLI that does everything the GUI does. In the short term, I'd like to create a tool that can add new hosts according to the parameters it is given, i.e. something like
addhost -i 10.208.0.1 -n node01 -m 11:22:33:44:55:66 \ -t standard_node -e 1U
This makes it easy to add a large number of nodes with MAC addresses obtained via SNMP from a network switch.
A.
"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.
On Wed, Dec 05, 2018 at 12:54:41PM +0100, Roland Fehrenbacher wrote:
"A" == Ansgar Esztermann-Kirchner aeszter@mpibpc.mpg.de writes:
A> The long-term goal would be to have a CLI that does everything A> the GUI does.
Pretty ambitious.
Indeed.
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.
This looks like a promising approach. I am fond of CLIs (at least as an alternative) because scripting is so powerful. For example, cable lengths often mean that switch ports are increasing with node numbers in one half of a rack, but decreasing in the other half. This can be done easily from a shell script, but is a lot harder from a GUI (unless it's coded in as a special case).
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.
I'll be sure to do that.
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.
Understood. Having an open interface at all is such a boon that some API instability is just fine.
Thanks,
A.
"A" == Ansgar Esztermann-Kirchner aeszter@mpibpc.mpg.de writes:
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 \ -t A> 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.
A> This looks like a promising approach. I am fond of CLIs (at least A> as an alternative) because scripting is so powerful.
I surely agree. Scripting offers a lot more flexibility but on the other hand also requires much more knowledge about how things work.
A> For example, cable lengths often mean that switch ports are A> increasing with node numbers in one half of a rack, but A> decreasing in the other half. This can be done easily from a A> shell script, but is a lot harder from a GUI (unless it's coded A> in as a special case).
True. Thinking about it, probably the best and simplest thing for the GUI would be to just allow reading a file with a list of MACs. The admin would then just select a starting node name/IP for MAC No. 1 and the other MACs would be registered with consecutive names/IPs, basically what we already do in our 'New Hosts' dialog for 'unknown MACS' detected by the DHCP server.
>> 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.
A> I'll be sure to do that.
>> 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.
A> Understood. Having an open interface at all is such a boon that A> some API instability is just fine.
OK