[rancid] Vyatta config processing.
Ed Ravin
eravin at panix.com
Wed Sep 25 04:21:51 UTC 2013
I wrote a RANCID module for Vyattas running Mendocino a few years ago. It
used non-interaactive SSH (required public/private key pair) and ran each
command through this template:
"unset _OFR_CONFIGURE; exec vbash --noediting --noprofile -c 'source /etc/bash_completion; _vyatta_op_run <COMMAND>'"
That convinced the Vyatta to give me the Vyatta CLI without also thinking
that an interactive terminal existed. I have no idea whether this still
works in current versions, as I stopped working with Vyattas after that.
I also used a different command list:
commandtable=(
{'show version' => "ShowVersion"},
{'show hardware dmi' => "ShowHard"},
{'show hardware pci' => "ShowHard"},
{'show hardware cpu' => "ShowCPU"},
{'show system usb' => "ShowUSB"},
{'show system routing-daemons' => "ShowRoutingDaemons"},
{'show configuration commands' => "ShowConfig"},
);
Note the use of "show configuration commands" - this gives you the Vyatta
config in command-line rather than config-file form, so it's much easier
to make sense of the diffs.
I'll send you the tarball separately. I never published it on this list
because I don't know of anyone else who has it working in their environment.
It's possible that my code strayed too far from both RANCID's paradigm and
current Vyatta practice, but maybe you'll be able to use something from it.
-- Ed
On Tue, Sep 24, 2013 at 03:22:32PM +0100, Matthew MacAulay wrote:
...
>
> A vyatta router, there are a couple of scripts / modules out there and
> I have tried to make them work but I am stuck and need some help.
>
> This one seems most promising as it followed the normal rancid module
> structure.
>
> [1]https://gist.github.com/Dunkirk/4032499
>
> The default commandtable command did not work for me, the prompt logs
> in fine and runs the show configuration commands, but it needs an any
> key pressing to display all of the config.. I have tried and failed to
> make this work, I think I need to change my prompt to be a large number
> or lines or something?
[...]
More information about the Rancid-discuss
mailing list