[racktables-users] Re: configuration scripts out of racktables

  • From: Michał Sochoń <kaszpir@xxxxxxxxx>
  • To: racktables-users@xxxxxxxxxxxxx
  • Date: Tue, 8 Jul 2014 19:22:39 +0100

First, dig in Racktables API
https://wiki.racktables.org/index.php/RackTablesDevelGuide
Second, you would rather need some template system, so you could parse a
template and replace it with specific options in the configuration.
I've been working with PHPXtemplate http://www.phpxtemplate.org/HomePage
which is really great in doing such things.

First i would start from typical astract class which would represent any
router, then it could be derived to more specific brands and models.
In that way you could for example prepare few templates depending on the
producers and each of those could have some common and specific elements
which would be parsed depending on the device model.

I suppose in the beginning it would be a simple tool to generate
configuration of the device - especially to automatically fill in the most
obvious parts. But it would aslo be a base to create more and more custom
configuration per devices, yet it would take time.

As per router, you could already use existing other objects from racktables
- especially ports and networks, router models etc. But then there would be
extra tables which would need to be maintained.


On Tue, Jul 8, 2014 at 6:50 PM, Lucas Aimaretto <laimaretto@xxxxxxxxx>
wrote:

> On Wed, Jun 11, 2014 at 11:21 AM, Lucas Aimaretto <laimaretto@xxxxxxxxx>
> wrote:
>
>> Hi All,
>>
>> We use daily racktables to document our routers. We have +1500 routers
>> well documented within it, documenting IP addresses, VLANs, interfaces,
>> ports with proper SFPs and also links. Fair enough. This is a great
>> application.
>>
>> Yesterday colleagues of mine and myself were thinking on twisting the nut
>> a little bit further: how could I possible generate a configuration script
>> for a given router based on the information that exists in racktables?
>>
>> So, when a new router needs to be integrated in the network, we do
>> generate a plan with IPs, interfaces, VLANs and ports. And we link the
>> router with its neighbors. It would be great if with a simple button, and
>> using the previous information, I could come out with the configuration
>> script for that given router.
>>
>> Of course we have several vendors: Alcatel-Lucent, Cisco, Juniper, etc...
>> I mean, though the information is general, the script should produce a
>> configuration script that cannot be vendor agnostic ...
>>
>> Any hint on how to start doing something like this? How can I code such a
>> plug-in? Can anyone provide any help or instructions on doing so?
>>
>> Many thanks and best regards!
>>
>> Lucas
>>
>>
>
> Hi everyone, just a friendly reminder on this issue ...
>
> I'm not expecting really someone else to do it, but rather, if any one
> knows how to write from scratch any plugin that can accomplish this, I can
> give it a try ... I really do not know how to write plugins for RT, but I
> do know how to programm ... any hint on this at least?
>
> Best regards!!
>
> Lucas
>
>
> --
> "Antes teníamos hambre y mirábamos el reloj para saber qué hora era. Ahora
> miramos el reloj para saber si tenemos hambre." -- Ernesto Sábato
>



-- 
Michal Sochoń
alias _KaszpiR_ kaszpir@xxxxxxxxx
IRC: _KaszpiR_ @ freenode.net

Other related posts: