Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.061 X-Spam-Evidence: '*H*': 0.88; '*S*': 0.00; 'automate': 0.07; 'socket': 0.07; 'already.': 0.09; 'connect,': 0.09; 'subject:skip:c 10': 0.09; 'tcp/ip': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; 'afterwards.': 0.16; 'chris,': 0.16; 'cui': 0.16; 'factory': 0.16; 'port,': 0.16; 'wrote:': 0.18; 'wed,': 0.18; 'module': 0.19; 'not,': 0.20; 'reset': 0.22; 'cc:addr:python.org': 0.22; 'module,': 0.24; 'text,': 0.24; 'initial': 0.24; 'cc:2**0': 0.24; '>': 0.26; 'push': 0.26; 'header:In-Reply-To:1': 0.27; 'fixed': 0.29; 'dec': 0.30; 'errors': 0.30; "i'm": 0.30; 'url:mailman': 0.30; '(unless': 0.31; 'probably': 0.32; 'thanks!': 0.32; 'quite': 0.32; 'worked': 0.33; 'url:python': 0.33; 'framework': 0.33; 'date:': 0.34; 'problem': 0.35; 'but': 0.35; 'done': 0.36; 'url:listinfo': 0.36; 'thanks': 0.36; 'url:org': 0.36; 'email addr:python.org': 0.37; 'level': 0.37; 'url:library': 0.38; 'whatever': 0.38; 'pm,': 0.38; 'received:65.54': 0.38; 'received:65.54.190': 0.38; 'received:bay0.hotmail.com': 0.38; 'does': 0.39; 'subject:': 0.39; 'url:mail': 0.40; 'how': 0.40; 'even': 0.60; 'read': 0.60; 'url:3': 0.61; 'simple': 0.61; 'back': 0.62; "you've": 0.63; 'email addr:gmail.com': 0.63; 're:': 0.63; 'email name:python-list': 0.65; 'to:addr:gmail.com': 0.65; 'cisco': 0.68; 'frank': 0.68; 'sound': 0.68; 'default': 0.69; 'yourself': 0.78; 'low': 0.83; '+1100': 0.84; 'blob': 0.84; 'partial': 0.84; 'presumably': 0.84; '2013': 0.98 X-TMN: [JPJMivXAE9jv0VROygKumOgPxcyQA+oZ] X-Originating-Email: [ycui@outlook.com] Content-Type: multipart/alternative; boundary="_80183845-572a-44e8-bc01-b2f2950ef1e9_" From: Frank Cui To: Chris Angelico Subject: RE: seeking a framework to automate router configurations Date: Wed, 18 Dec 2013 00:13:26 -0300 Importance: Normal In-Reply-To: References: , MIME-Version: 1.0 X-OriginalArrivalTime: 18 Dec 2013 03:43:26.0995 (UTC) FILETIME=[4F5B5630:01CEFBA3] Cc: "python-list@python.org" X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 91 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1387338274 news.xs4all.nl 2840 [2001:888:2000:d::a6]:37188 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:62263 --_80183845-572a-44e8-bc01-b2f2950ef1e9_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi Chris=2C Thanks for the advice!=20 I'm aware of this module=2C the problem is that this is quite a low level m= odule and I would have quite a lot to re-invent specific to telneting to a = cisco router. Thanks! > Date: Wed=2C 18 Dec 2013 14:27:55 +1100 > Subject: Re: seeking a framework to automate router configurations > From: rosuav@gmail.com > CC: python-list@python.org >=20 > On Wed=2C Dec 18=2C 2013 at 1:40 PM=2C Frank Cui wrote= : > > "Asynchronously reset a large number of cisco routers back to their ori= ginal > > configurations and push prepared initial configurations to them" >=20 > From the sound of your partial solutions=2C 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=2C and the > telnet part is just to push the config=2C in which case you'd be using > the default credentials)=2C but presumably you've worked that part out > already. >=20 > Python has a socket module which is probably what you want here. You > can connect on any port=2C read what comes back=2C and send whatever you > need. If the job's simple enough=2C you might even be able to just > connect=2C send a fixed blob of text=2C and then listen for errors in the > response... or even not=2C and just let the user try it afterwards. >=20 > http://docs.python.org/3/library/socket.html >=20 > Does that look like what you need? >=20 > ChrisA > --=20 > https://mail.python.org/mailman/listinfo/python-list = --_80183845-572a-44e8-bc01-b2f2950ef1e9_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi Chris=2C

T= hanks for the advice! =3B

I'm aware of this mo= dule=2C the problem is that this is quite a low level module and I would ha= ve quite a lot to re-invent specific to telneting to a cisco router.
<= div>
Thanks!

>=3B Date: Wed=2C 18 Dec 2013 14:2= 7:55 +1100
>=3B Subject: Re: seeking a framework to automate router co= nfigurations
>=3B From: rosuav@gmail.com
>=3B CC: python-list@pyt= hon.org
>=3B
>=3B On Wed=2C Dec 18=2C 2013 at 1:40 PM=2C Frank C= ui <=3Bycui@outlook.com>=3B wrote:
>=3B >=3B "Asynchronously res= et a large number of cisco routers back to their original
>=3B >=3B = configurations and push prepared initial configurations to them"
>=3B =
>=3B From the sound of your partial solutions=2C this is done over a = TCP/IP
>=3B socket? I don't know how you'd go about authenticating you= rself with
>=3B the router (unless the factory reset is done some othe= r way=2C and the
>=3B telnet part is just to push the config=2C in whi= ch case you'd be using
>=3B the default credentials)=2C but presumably= you've worked that part out
>=3B already.
>=3B
>=3B Python= has a socket module which is probably what you want here. You
>=3B ca= n connect on any port=2C read what comes back=2C and send whatever you
&= gt=3B need. If the job's simple enough=2C you might even be able to just>=3B connect=2C send a fixed blob of text=2C and then listen for errors = in the
>=3B response... or even not=2C and just let the user try it af= terwards.
>=3B
>=3B http://docs.python.org/3/library/socket.html=
>=3B
>=3B Does that look like what you need?
>=3B
>= =3B ChrisA
>=3B --
>=3B https://mail.python.org/mailman/listinfo= /python-list
= --_80183845-572a-44e8-bc01-b2f2950ef1e9_--