Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #62260

Re: seeking a framework to automate router configurations

References <BAY176-W28FCEC569DDE62E02C8CC4DADA0@phx.gbl>
Date 2013-12-18 14:27 +1100
Subject Re: seeking a framework to automate router configurations
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.4324.1387337284.18130.python-list@python.org> (permalink)

Show all headers | View raw


On Wed, Dec 18, 2013 at 1:40 PM, Frank Cui <ycui@outlook.com> wrote:
> "Asynchronously reset a large number of cisco routers back to their original
> configurations and push prepared initial configurations to them"

>From the sound of your partial solutions, this is done over a TCP/IP
socket? I don't know how you'd go about authenticating yourself with
the router (unless the factory reset is done some other way, and the
telnet part is just to push the config, in which case you'd be using
the default credentials), but presumably you've worked that part out
already.

Python has a socket module which is probably what you want here. You
can connect on any port, read what comes back, and send whatever you
need. If the job's simple enough, you might even be able to just
connect, send a fixed blob of text, and then listen for errors in the
response... or even not, and just let the user try it afterwards.

http://docs.python.org/3/library/socket.html

Does that look like what you need?

ChrisA

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: seeking a framework to automate router configurations Chris Angelico <rosuav@gmail.com> - 2013-12-18 14:27 +1100

csiph-web