"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