Cisco Blogs


Cisco Blog > Architect & DE Discussions

Programmability in Python: Confessions of a Networking Guy

I am not qualified to discuss it much, but can you guess what this does?

     ne = NetworkElement("172.16.66.1", "JasonsApp")
     conn = ne.connect("admin", "cisco", sc)
     intf1 = ne.get_interface_by_name("FastEthernet0/1")
     intf1.shut_down(1)
     sleep(5)
     intf1.shut_down(0)

 

If you guessed that it logs into a switch at 172.16.66.1 and disables interface F0/1 for 5 seconds and re-enables it, then you guessed right.

Let us talk a little about putting the “ability” in programmability.  Did I code in college? Yes. Was I good at it? Not really. Dijksta’s algorithm (the actual coding bit) drove me crazy, however, actually using and operating networks quickly became my cup of tea. I became a network geek. Subnets? Awesome! Cisco CLI? Sweet. Using Enhanced Interior Gateway Routing Protocol (EIGRP)? Yay! AVVID? Even better. But I never wanted to see C++ or another “program” again.

Fast forward to 2014.  I’m still a networking guy but now I’m seeing code again.  The good news is, maybe like you, I hang out with some really cool people. I challenged a couple of them to help me demonstrate program “ability” to networking people on the show floor at CiscoLive Milan…with me as the test subject! Read More »

Tags: , , , , , , ,