Junos Automation (Scripting)
Junos Automation (Scripting)

[Python Book for Beginners]

‎12-04-2017 05:12 PM

hi guys, anyone can recommended for a book dealing with python for administrator scripting/automation?

appreciate your help where to download them.

 

 

 

2 REPLIES 2
Junos Automation (Scripting)

Re: [Python Book for Beginners]

‎12-05-2017 03:19 AM

I like Learning Python

https://www.amazon.com/Learning-Python-Mark-Lutz/dp/1449355730/

 

Also check out the free Junos Jump start webinar on Junos automation.

 

This Junos Jump start 2.5 hour webinar outlines the automation options in Junos.

https://event.on24.com/wcc/r/1479199/9650330AD93D8A8BCD258923FCA29553

 

And this listing of resources I put together may be helpful

http://puluka.com/home/networking/junos-automation-training-resources/

 

Steve Puluka BSEET - Juniper Ambassador
IP Architect - DQE Communications Pittsburgh, PA (Metro Ethernet & ISP)
http://puluka.com/home
Junos Automation (Scripting)

Re: [Python Book for Beginners]

‎12-22-2017 09:48 AM

Hi Folks,

Just my 2 cents on this..

 

Try something very basic and try it Junos…

 

lab@re0_re0> start shell  

% cd /var/db/scripts/op/

% cat > debug.py

from __future__ import print_function

from __future__ import unicode_literals

import os

import jcs

 

os_info = (

    ("pid", os.getpid()),

    ("uid", os.getuid()),

    ("euid", os.geteuid()),

    ("gid", os.getgid()),

    ("egid", os.getegid())

)

for name, value in os_info:

    jcs.syslog("user.error", "DEBUG %-10s: %s" % (name, value))

    print("%-10s: %s" % (name, value))

% exit

exit

 

Executed the python op script with lab credentials

 

lab@re0_re0> op debug.py   

pid       : 41596

uid       : 928

euid      : 928

gid       : 20

egid      : 20

-Python JNCIE 3X [SP|DC|ENT] JNCIP-SEC JNCDS 3X [ WAN | DC|SEC] JNCIS-Cloud JNCIS-DevOps CCIP ITIL
#Please mark my solution as accepted if it helped, Kudos are appreciated as well.