I’m learning the basics of Python and these are my publically available notes for my reference. Hopefully they are useful for my readers as well.
The For loop in Python is used to iterate through different objects such as lists or dictionaries. The power of the For loop is that it can run as many times as needed and then stop without having to define the number of times it should run. It can also be used to run n number of times where we define n ourselves.
I’ll give some examples related to networking to make it more interesting. Let’s say that we want to create a lot of loopbacks so that we can advertise routes in BGP to play around with prefix-lists. We will create 10 loopbacks. This means that the For loop should run 10 times, we can use the range command for this. The iterator will start at 0 and have a stepping by 1 by default which means that our first loopback will be loopback0 and our first network will be 10.0.0.1/32.
for loopback in range(10): print "interface loopback{}".format(loopback) print "ip address 10.0.{}.1 255.255.255.255".format(loopback)
I was at a Cisco DNA customer event on Thursday. Someone in the audience asked a very good question. Basically they wanted to know if there was a way to extrapolate data from the APIC-EM network management tool. At first glance it didn’t seem to be something that was available in the UI. One of the Cisco representatives quickly and correctly stated that it is all available from the API.
My initial thought was that this was a product weakness. Why can’t we just manually extract this stuff to a CSV and import it wherever we want to? Whether due to intentional omission or strategic direction, an API first approach is better. It is better because it allows systems to be glued together and more of our mindless tasks to be automated. So the counter argument to that really revolves around use cases, initial effort and skills gaps. The examples I’m about to provide should help alleviate some of those concerns.
Last weekend, millions joined the Women’s March in the US and across the world. They stood up for their rights, and the rights of everyone. We need to do the same on the Internet.
The Internet gives everyone a voice, but we need people to protect those voices.
Online harassment and cyber bullying are real. And, some groups are targeted more than others.
The post Worth Reading: IOS/XR in GNS3 appeared first on 'net work.