Latest / Talk Python To Me / #128: Pythonic Networks with NAPALM
Transcript
- 0:00When you think of networks, you probably think of physical things, routers, switches, firewalls,
- 0:04and that kind of stuff. But increasingly, network engineers are managing massive networks that are
- 0:09better managed via software than by admin applications. On this episode, you'll meet
- 0:14David Barroso, who created Napalm, a vendor-neutral, cross-platform, open-source project that provides
- 0:20a unified API to network devices. This is Talk Python To Me, episode 128, recorded July 17, 2017.
- 0:28Welcome to Talk Python To Me, a weekly podcast on Python, the language, the libraries, the
- 0:47ecosystem, and the personalities. This is your host, Michael Kennedy. Follow me on Twitter,
- 0:52where I'm @mkennedy. Keep up with the show and listen to past episodes at talkpython.fm,
- 0:57and follow the show on Twitter via at talkpython. This episode is brought to you by Linode and
- 1:03Rollbar. That's right. Welcome to Linode, who has joined Talk Python To Me as a major sponsor.
- 1:09Be sure to check out what both of them are offering during their segments. It really helps support the
- 1:13show. David, welcome to Talk Python. Thank you for having me here. It's been a long time coming that
- 1:19we've talked about Python, all sorts of things, but no networking really, right? And so you're here to
- 1:24help us fix that problem and talk about Python and network programming.
- 1:28Yeah, here I am. Happy to follow.
- 1:30Yeah, it's going to be great. So we're going to talk about your project, Napalm, and you're doing a bunch of
- 1:36exciting stuff there. It seems like it's still going strong. It's been around for a few years. But before we get
- 1:40into all that, let's start with your story. How did you get into programming, networking, Python, that sort of stuff?
- 1:46Well, my background is network engineering, but I haven't always been a network engineer. I started like many, many years ago, more like systems engineer. So just dealing with Linux, Windows, Apache, Nginx, whatever. Then I was just doing, well, anything, Bash, Perl, Python, whatever you had to use to the job.
- 2:11Then at some point, I had to move some data I had on a wiki page into something I could actually query. So I was just investigating what the best tool for that would be. And I came into some page that was actually talking about Django.
- 2:29And I thought that was kind of like the perfect fit. And so I could actually say that Django was what really introduced me into Python and drove me to learn more about it. And then just like regular evolution, just career path, I just landed more into the networking side of things, which made me more focused on the network stuff, rather than on systems or actual Python or something.
- 2:55But Python has been always there just trying to help me get the job done somehow.
- 3:00I see. That's really cool. So you've done a lot of work with these systems engineering, with configuring services like Nginx and things like that. And just like Python has always played an important role in sort of making that work.
- 3:11Yeah, I remember using CFEngine like more than a decade ago and doing a lot of Perl. Like back in the day, it was mostly Perl. But likely, it's not that much Perl nowadays. It's Python.
- 3:22Yeah, I definitely think there's less Perl in the world than there used to be. That's good. And so what are you doing day to day? Like you're doing network stuff for your main job, right?
- 3:32Yeah, so I'm a network systems engineer at Fastly. I spend most of my day both automating the network and building a control plane where we can actually integrate with the application.
- 3:46So it's not the network is not only automated, but it's somehow directed by the application. The application can say like, oh, yeah, I want to send this packet via this path.
- 3:56I want to send this other packet via this other path. So I'm working on these two areas.
- 4:01Yeah, and that's pretty major stuff. I'm not sure everyone knows what Fastly is.
- 4:05So maybe give them the quick elevator pitch.
- 4:07Well, we are a CDN. The cool thing about Fastly is that we expose all of our services and configurations by an API.
- 4:16So you can actually integrate with us. So it's not like the traditional CDN where you just send your objects and they catch them until you can send a new object and then they catch that as well.
- 4:30So it's a matter of, yeah, I want to be able to respond in this way if the HTTP headers are like this. And you can actually do that in real time just by configuring it via the API.
- 4:44That's kind of cool. You're a web developer. You should check it out.
- 4:47Yeah, that sounds really cool. So you guys probably handle a little bit of network traffic, huh?
- 4:51Yeah, yeah, yeah. We do a lot. Okay, I don't recall the numbers exactly, but I think it's about 5 million requests per second and a few terabits of bandwidth.
- 5:04So yeah, it's quite a lot of traffic.
- 5:07Yeah, that's crazy. You think about like a number of requests per second for like a RESTful API or something like that.
- 5:13That might just be a couple of bytes response of JSON or something. But typically CDNs serve images and videos and files, right?
- 5:22Like that's a crazy amount of traffic.
- 5:23Yeah, we do all kind of traffic like video, music, images, JavaScript, even API. We have a few APIs behind us.
- 5:32And that's because of the integration that I was mentioning before.
- 5:35Yeah, yeah.
- 5:36But yeah, that's not really my expertise.
- 5:37No, no, but it's all built upon the network, which is super cool.
- 5:41So traditionally people maybe configured networks by logging into like a Cisco router or switch or something like that.
- 5:51And then, you know, maybe using the CLI there or using some tool.
- 5:56But working with networks these days is becoming more and more a programming type of experience, right?
- 6:03Yeah, I think that the network is following the same evolution that the system world experienced like 10, 15 years ago.
- 6:10Like before you would just like edit your Apache.com from the virtual host files and all that kind of by hand and like CF engine came along, Puppet.
- 6:22So the network is kind of now having that transition nowadays.
- 6:26Like people was used to go through the console, SSH, or maybe some tools used to use SNMP to try to configure certain things.
- 6:36But yeah, nowadays it's like tools like Puppet, Ansible, Solstack, Stagstock are starting to come to the network as well, which is interesting and cool.
- 6:47Yeah.
- 6:47Finally.
- 6:48Yeah, that's great.
- 6:49That sounds really exciting.
- 6:50How's that affecting the whole ecosystem of network engineers?
- 6:55Are people excited about this change?
- 6:57Are they like, oh, my experience is no longer relevant.
- 7:01It's not fun anymore.
- 7:02Or like what's the general feel, do you think?
- 7:05You will find both.
- 7:06Like some people is like, oh, yeah, this sounds cool, a different way of doing things.
- 7:11And I can just automate this and focus on more interesting stuff.
- 7:15While other people is a bit more scared because, I don't know, maybe they are older engineers that they don't really have the time to pick up the new tools or the new programming languages.
- 7:25So they might be a bit more averse to the change.
- 7:29I think it's, yeah, you will find all sorts of people having all sorts of opinions.
- 7:35Sure, of course.
- 7:37So one of the terms that I hear frequently around the space is software-defined networks or SDNs.
- 7:43What's the SDN?
- 7:44That's mostly marketing.
- 7:46Like vendors keep pitching SDN, but SDN doesn't really mean anything.
- 7:52Like the original term was coined by some people at Stanford that were working with OpenFlow, which was like a super low-level API to try to program the switcher.
- 8:06But that didn't translate well into hardware.
- 8:08So it never took off.
- 8:11OBS in the Linux stack uses OpenFlow, for example, for some things.
- 8:15But that's software-based, which is fine because you don't have the hardware limitations to install all those flows.
- 8:21But yeah, in the hardware world, like the real SDN never took off because of hardware limitation.
- 8:27And now it's just used as a marketing term by, yeah, by many, many vendors.
- 8:33Okay, of course we have software-defined networks now.
- 8:36So there is this whole level of automation, though.
- 8:40There is the ability to run scripts against like Cisco routers or various other types of routers.
- 8:47And that's kind of where Napalm came in, right?
- 8:51Previously, there was, for each vendor, each type of device you're going to work with, it was like a totally unique way of working with it, right?
- 8:58Yeah, like each vendor has its own API.
- 9:01Like if you go, you're logging into an iOS device by Cisco, for example, and you start typing commands.
- 9:08The commands are going to be completely different from a Juniper device, for example.
- 9:12And the CLIs, they're completely different.
- 9:16They return different things to different commands.
- 9:19They may have even different interfaces to actually connect to them programmatically.
- 9:25Like, for example, iOS until very recently didn't have anything.
- 9:28So you were using things like NetMiko, which is a Python library that works on top of Paramiko.
- 9:35So it's basically just SSH expect-based, kind of.
- 9:39Like Juniper used to have NetConf.
- 9:42Well, it still has NetConf, which is actually a network protocol to configure devices.
- 9:48And some other devices may have like a REST API.
- 9:51Like there are just many ways.
- 9:52So when you have to do something as simple as, I want to connect to my network and I want to retrieve the IP addresses that you have configured on the interface,
- 10:02you have to start just like adding a lot of boilerplate.
- 10:05Like, okay, if device equals to iOS, do this.
- 10:09If device equals to this other vendor, just do this other thing.
- 10:14So yeah, it used to be kind of a nightmare.
- 10:16That's pretty much what I tried to solve with NAPALM.
- 10:22Okay.
- 10:22So NAPALM is an acronym, right?
- 10:24What's it stand for?
- 10:25Acronym is actually, it has actually an interesting story.
- 10:28It was reversed, engineer.
- 10:29Like I first came up with the acronym and then I tried to find some meaning to it.
- 10:35Because, I mean, before it was all these if else statements that was mentioned, like if vendor this, if vendor that, right?
- 10:41And I was writing sunscreen.
- 10:44I was super pissed.
- 10:45Like, I mean, this is just stupid.
- 10:46This is just insane.
- 10:47So, I mean, I want just to leave this on fire.
- 10:51So the name came out of that and then I started just thinking, like, okay, now let's try to make some meaning out of it.
- 10:58So, yeah.
- 11:00So I came up with this network automation and programmability abstraction layer with multi-vendor support.
- 11:06But, yeah, the name was actually reversed in here.
- 11:08Yeah, that's pretty cool.
- 11:10I mean, you have the important letters.
- 11:12You got the N, the A, the P, and then you got to get creative about the ALM, right?
- 11:18Yeah.
- 11:18But, yeah, I wanted something with fire, basically, because that's actually my thing at the moment.
- 11:24You're like, all right, we got to burn this down.
- 11:26This is, like, messed up, right?
- 11:27Yeah.
- 11:28I've heard it.
- 11:28Your co-creator of this library, was it, is her name Elsa?
- 11:32I might be remembering.
- 11:33Elisa Jasinska.
- 11:35Elisa, Elisa.
- 11:36That's right.
- 11:36Yes.
- 11:37You guys started this together, right?
- 11:39Yeah.
- 11:39So I started working on this when I was at Spotify.
- 11:43And then I was just talking with her after a conference.
- 11:45And she was like, oh, that's super cool.
- 11:47I actually have exactly the same problem.
- 11:50So then I just went back to my manager.
- 11:51Like, okay, yeah, I've been talking with people.
- 11:53And it turns out that there is some interest on collaborating on this.
- 11:57So I just open sourced it.
- 11:58And I started working with her.
- 12:00And then other people came in.
- 12:03And, yeah, now it's actually a pretty big community by now.
- 12:06Yeah, it's going really strong now.
- 12:09Yeah.
- 12:09And I had heard there was even some places where people were using more or less like screen
- 12:15scraping to get configuration out of some of these tools and some of these systems because
- 12:19it was just so hard to do, right?
- 12:21Yeah, there is a lot of screen scraping in devices like iOS, for example, from IA Bay Fisco.
- 12:26Those devices traditionally didn't have any interface to interact with them.
- 12:32So it was always like, yeah, SSH to the device.
- 12:35And then just type this command.
- 12:37Look for the prompt.
- 12:38Now let's try to parse this thing.
- 12:40And there is still a lot of that, to be honest.
- 12:43Like, we do a lot of screen scraping with Napalm because, yeah, I mean, if they don't provide
- 12:47the tools, we have to fix it ourselves.
- 12:49But at least we fix it.
- 12:50So when we are trying to solve the problem, like meaning what you are trying to solve at
- 12:56your job, you don't have to care about parsing because we already fixed that problem.
- 13:01Right.
- 13:01So maybe something like that happens deep down when you call a function for a particular device,
- 13:06but nobody knows and nobody cares.
- 13:09I hope they care so they can act their vendors.
- 13:11So the vendors return some JSON, XML, I don't care, just some structured data.
- 13:16So a lot of what you guys do with Napalm is not write these vendor-specific communications
- 13:23per se, right?
- 13:25You might find libraries that are out there and just integrate them into Napalm, right?
- 13:29Yeah.
- 13:29What we try to do is just provide an abstraction layer, which means that if there is a library
- 13:34already that can talk with the device, we will just use it.
- 13:38Like, for example, for Juniper, they maintain a library to work with those devices.
- 13:44So we just use that one.
- 13:46That means that we only have to care about transforming data, for example, and providing
- 13:50like common behaviors.
- 13:52Like this method behaves in the same way, regardless if it's Juniper or Cisco.
- 13:57And when you run this other method, the data that you return, it comes back normalized.
- 14:03Right.
- 14:04We don't really bother in dealing with the transport and connecting to the device.
- 14:08Like someone else is caring about that.
- 14:10We just provide the abstraction.
- 14:12Yeah, that's really cool.
- 14:13So you basically just do like an adapter to make it all look the same, the various libraries
- 14:18that are out there.
- 14:18What are some of the major libraries, Python libraries that people or that are maybe that
- 14:22you're built upon?
- 14:23So the two major ones, I would say that it's the Juniper library I mentioned, which is called
- 14:29Pi EC, as Pi EZ.
- 14:31And the other one is NetMiko.
- 14:35That's quite popular, actually.
- 14:37It's built on Paramiko.
- 14:38And it's specifically to be able to interact with network devices because each one has different
- 14:46idiosyncrasies.
- 14:47Like one has this, I don't know, like the new line.
- 14:51It's using this code, which is super old from the early Unix days.
- 14:56This other one changes the prompt.
- 14:58So you have to take into account.
- 15:00So yeah, it builds on top of Paramiko, but it knows how to the tiny, gritty details of
- 15:05each platform.
- 15:06Yeah, yeah.
- 15:07That sounds like something you don't want to write yourself that you would just like to
- 15:10use.
- 15:11Yeah, yeah.
- 15:11Yeah, yeah.
- 15:12So before we get into how it works, what hardware vendors do you support?
- 15:17The list is getting long, right?
- 15:19It used to be pretty short at the beginning.
- 15:20Yeah, the original one was just four vendors because that's actually the ones that I and
- 15:25Elisa had in our networks.
- 15:27But nowadays it's, so from Fisco, it's iOS, iOS XR, and NXOS because if I have only one operating
- 15:37system, you're going to have three.
- 15:38Right, of course.
- 15:39Why not?
- 15:39It's Juniper.
- 15:42It's Arista.
- 15:44It's Fortinet.
- 15:46It's, who else?
- 15:48Microtech.
- 15:49There's people working on Brocade as well.
- 15:52Oh, there's Palo Alto as well.
- 15:55There are probably a few more, but yeah, I don't recall them right now.
- 15:58Yeah, of course.
- 15:58No, but it's pretty comprehensive these days, huh?
- 16:01Yeah, it's quite extensive.
- 16:02And people keep working on adding more and more.
- 16:05So one of the really important building blocks was these libraries that we talked about, the
- 16:10actual communication with the various devices.
- 16:12The other one is Ansible.
- 16:14And you actually added SaltStack and StackStorm as well, right?
- 16:19Yeah, I mean, we try to provide just a library.
- 16:21We try not to have opinions on how people should be doing things.
- 16:25So we try to just provide the basic Python library so people can either integrate with their own
- 16:31framework or just write their own script.
- 16:35So the three major tools that we integrate with are Ansible, SaltStack, and StackStorm.
- 16:42Okay, that's really cool.
- 16:44So let's just pick Ansible, for example, but it would be similar to others.
- 16:48Can you maybe describe to me how we would use Napalm and Ansible?
- 16:54And let's have some kind of goal, right?
- 16:56Let's suppose you want to set up a load balancer, a couple of web front ends, and maybe a database server,
- 17:05and some caching tiers, and try to build that network all together so that, you know,
- 17:09only the right pieces can see each other and things like that.
- 17:14How would that work?
- 17:14So the way it would work is that you would have templates for your services, right?
- 17:19But now with Ansible, you would have another template to map how this new service maps into
- 17:25the network as well.
- 17:26That might be like a new VLAN, a new IP address, somewhere else.
- 17:29So you would just write another template as you did for Nginx and, I don't know, MySQL
- 17:36or whatever you're using in your network.
- 17:39And then you just have to, when you just compile this template with the data and you get like
- 17:45an actual output, the only thing you have to do is tell Napalm to use that configuration.
- 17:48file and apply it into the device.
- 17:51And then you can do two things.
- 17:52Either you apply it straight into the device or you just get a diff that you can actually
- 17:58peer review or, you know, or something of the like.
- 18:01That's a pretty nice experience that you can go to your network and reach out to all the
- 18:06devices, right?
- 18:07You'd set up your Ansible scripts and, you know, one for the load balancer, one for the
- 18:11web tier, maybe things like that.
- 18:12And you'd set them up and you could say, go query them the way they are now.
- 18:17Figure out the changes that you would push to them and then generate a text diff of what
- 18:23we're about to do to it, right?
- 18:25Yeah.
- 18:25I mean, the only difference between managing like your web server and your network with
- 18:30Ansible and Napalm is going to be that instead of reloading the service, you're going to be
- 18:36applying the configuration with Napalm into the device.
- 18:38But the rest should be exactly the same workflow.
- 18:41Just the template model, the data coming from your backend or YAML file.
- 18:46And yeah.
- 18:47Yeah.
- 18:47Yeah.
- 18:47It's really nice.
- 18:48So that probably makes it pretty easy to store these in like GitHub or somewhere like that
- 18:53and have like a history of the changes you've applied to your devices.
- 18:56Yeah.
- 18:57That's pretty much what everybody is doing.
- 18:59Just like, yeah.
- 19:00Just have it as any other template on your GitHub or whatever you're using.
- 19:05Yeah.
- 19:05And one thing you guys talked about is you push the entire configuration for the device over
- 19:11to it.
- 19:11But somehow the device knows to actually only apply the delta.
- 19:15How does that work?
- 19:16So, yeah.
- 19:17So you can do both things.
- 19:18You can either apply just a snippet of configuration.
- 19:21Like if you just want to configure a VLAN, you can choose to configure that single VLAN.
- 19:27Or you can apply the entire configuration.
- 19:31The problem with applying snippets of configuration is that the way that devices work, you don't
- 19:37have a single configuration file where you just like apply it on the device and then reload
- 19:42the service.
- 19:42And only what's on that file is what's going to be applied.
- 19:46Actually, on a network device, you actually tell the network device how to do things.
- 19:51Would be like going to a Linux box and start configuring the network using IP route commands.
- 19:57IP route at this interface or IP route at this routing here.
- 20:02So you're actually telling the device what to do and how to do it.
- 20:05So if you're merging snippets of configuration, you have to be aware that if you want to remove
- 20:10a VLAN, for example, you have to tell it remove this VLAN.
- 20:13It's not good enough to just send the list of VLANs that you want.
- 20:18That's why I'm trying to...
- 20:20This is my kind of like a personal opinion.
- 20:23I like instead just somehow compiling the entire configuration of the device, send it
- 20:28to the device and tell the device, now reload the service, which is exactly how I would manage
- 20:33Nginx and my SQL or something.
- 20:35And just like, here's my config file.
- 20:36Now reload.
- 20:37I don't care what you had before.
- 20:39Just do this.
- 20:40All right.
- 20:40This...
- 20:41I want you to be like this.
- 20:42Now be that way.
- 20:42Yeah.
- 20:43So that works well with most devices, but this feature for Napalm to use it has to be supported
- 20:50natively.
- 20:50And most of the devices nowadays, like iOS supports it, Arista supports it, Juniper, like the major
- 20:57vendors support this, these features.
- 21:00You're going to actually send a entire config file and reload the service.
- 21:04It's a great quote, quote on the reload the service.
- 21:07Yeah.
- 21:08This portion of Talk Python To Me is brought to you by Linode.
- 21:13Are you looking for bulletproof hosting that is fast, simple, and incredibly affordable?
- 21:17Look past that bookstore and check out Linode at talkpython.fm/Linode.
- 21:22That's L-I-N-O-D-E.
- 21:24Plans start at just $5 a month for a dedicated server with a gig of RAM.
- 21:28They have 10 data centers across the globe.
- 21:31So no matter where you are, there's a data center near you.
- 21:34Whether you want to run your Python web app, host a private Git server, or even a file server,
- 21:38you'll get native SSDs on all the machines, a 40 gigabit network, 24-7 friendly support,
- 21:45even on holidays, and a seven-day money-back guarantee.
- 21:48Want a dedicated server for free for the next four months?
- 21:51Use the coupon code python17 at talkpython.fm/Linode.
- 21:58One of the consequences of the way Napalm works is that if somebody goes and manually starts changing the network settings or something, right?
- 22:07They SSH in there and they make a few changes and then just log out.
- 22:13And they don't save that anywhere, right?
- 22:15Napalm will basically wipe that away, won't it?
- 22:17If you're using this replace operation that I just described, yeah, that's exactly how it would work.
- 22:24It's just like, yeah, I just created this VLAN by hand and you didn't save it in your template or in your database or something.
- 22:31Yeah, it's going to be completely wiped out.
- 22:34If you're using the other method where you're just applying snippets of configuration,
- 22:39then unless you're explicitly removing the configuration, Napalm won't remove it.
- 22:44Because Napalm won't even know that the configuration is in there.
- 22:47Right.
- 22:48Unless that snippet has exactly to do with that part that was changed, they might not never interact, right?
- 22:53Yeah.
- 22:53So some people are combining both manual with automated operations.
- 22:57So they prefer to use this method where you just tell the device, apply this snippet of configuration.
- 23:04So it depends a bit on what you are trying to accomplish and what your network looks like.
- 23:09For some people, the network is so full of snowflakes that actual automating every tiny detail is literally impossible.
- 23:18Yeah.
- 23:19Yeah, of course.
- 23:20I can imagine places like that.
- 23:22It never was really built all at once.
- 23:25It just kind of grew this way.
- 23:26Oh, yeah.
- 23:27Organic design.
- 23:29Yes, of course.
- 23:30Is there a way to go in reverse?
- 23:32Like, I know I could come up with a bunch of Ansible scripts and I could generate a network out of it.
- 23:38But is there a way to go to a network and say, now generate me the set of Ansible scripts that would reverse engineer it?
- 23:47So that you could sort of start from an existing network, come up with these scripts, and then going forward, go in reverse, use Napalm to work with it.
- 23:54So what I have done to migrate from this snowflake environment to a fully automated environment is I just copy the configuration file.
- 24:05I mean, I just copy the configuration of the device and just put it into a static file.
- 24:09And I just deploy that static file with Napalm.
- 24:13And the only thing I'm doing is just override the configuration that it's already there.
- 24:16The configuration is just completely static.
- 24:18And then I start just taking bits of the configuration that is just defined statically into templates.
- 24:26So that way I can just start migrating bit by bit.
- 24:29Like, okay, now I have automated the VLANs.
- 24:31So I can just remove the VLANs from the static configuration file and use a template for that.
- 24:37The only thing I have to do is append one file into the other with Ansible.
- 24:41And now I'm going to automate, like, the interface generation.
- 24:45So I just take that away and automate that bit.
- 24:48So you can start doing this step by step and just keeping your configuration statically defined somewhere else.
- 24:54Yeah, that's a pretty good idea.
- 24:55Just copy it over and go, this is how it is.
- 24:57And then we're going to pull out the little pieces that change every now and then that we want to automate.
- 25:02And everything else, we can just forget it, just leave it.
- 25:04Okay.
- 25:04Yeah, yeah, it makes a lot of sense.
- 25:06So Napalm is written entirely in Python, right?
- 25:10If I can trust GitHub's little measure of what languages are involved in this project, it's like all Python.
- 25:16Yeah, it's all Python.
- 25:17Yeah, yeah.
- 25:18That's really cool.
- 25:18You don't have too many performance considerations or anything where you might bring in Cython or other types of things, right?
- 25:25It's more just quick communicate over the network to the device and the device has to do the heavy lifting.
- 25:31Yeah, I mean, we are talking about something that you're interacting with.
- 25:35I mean, you're interacting with the device over the network and you're probably using some API or method to interact with the device, which is not extremely fast.
- 25:46So it's not like you're doing mathematical computation.
- 25:51So I don't think that, yeah, that performance is a concern.
- 25:56No one has brought that up at least.
- 25:58Yeah.
- 25:59And if it is, it's probably not your performance issue that you can work with, right?
- 26:04It's like, well, this device is just slow when I do this to it.
- 26:06Yeah.
- 26:06I mean, most of the devices, like you type, like, I don't know, show interfaces.
- 26:10And maybe the device has like 100 interfaces.
- 26:12So the device takes like one or two seconds to actually return all the data.
- 26:17So it's like, yeah, we could optimize like 10 milliseconds out of two seconds.
- 26:22So, okay.
- 26:23Yeah, of course.
- 26:23Yeah, exactly.
- 26:24Don't worry about it.
- 26:25Yeah, I guess the real trick would be to make sure you're using the latest APIs and libraries from the various vendors.
- 26:31Like if you were previously doing some weird screen scraping thing and now they have a JSON API, like switch to that, right?
- 26:36Yeah, that's actually the main challenge we have.
- 26:38Like trying to use the latest APIs, it usually don't go that well because, yeah, because vendors, I'm sorry, vendors, users still have like networks running operating system from the, I don't know, early 2000.
- 26:51I mean, I have seen a lot of people with, yeah, my device has a 10 years uptime.
- 26:56Like maybe you should count that on security advisories more than instead of in years.
- 27:01That's really interesting.
- 27:04So I'm paranoid about like security issues and things like that on my servers and on things like Nginx and stuff.
- 27:15And if there's an update, like that thing is, even if it causes a reboot, it's getting applied because it's on the internet.
- 27:22That's such a bad thing.
- 27:24And so to think that a device is up for 10 years, that's probably needs some attention.
- 27:29Well, the thing is that for most legacy networks, like reloading a device is super hard because you might bring down a lot of systems.
- 27:38Like because everything uses the network.
- 27:41It's the very foundation.
- 27:42It's like taking away memory or the CPU or something, basically.
- 27:46Exactly.
- 27:46Exactly.
- 27:47And most of the networks are actually completely isolated from the internet.
- 27:51So the only way of actually trying to exploit like some bugs would be by first getting inside your network by just hacking the VPN or the bastion that you might have in your network.
- 28:05So there is like certain degree of isolation in the network as well.
- 28:09So upgrading is not.
- 28:10It's not as critical as like a front end web server that's taking traffic off the internet.
- 28:14Yeah.
- 28:14Yeah.
- 28:14That's one thing to pass the traffic along.
- 28:17It's another to be the endpoint to like send it into your executing code.
- 28:21Okay.
- 28:23Interesting.
- 28:24So one thing I wanted to ask you about is like there's a lot of cloud computing and other sort of programmable, automatable systems like virtual private servers, you know, things like Linode or DigitalOcean.
- 28:36And then we've got EC2, we've got Azure and Heroku.
- 28:40How does this whole network automation story fit with that?
- 28:45Like, is there any place for say Napalm in AWS or is this really, I have my own data center.
- 28:51I want to manage that or I would go do something with AWS or.
- 28:55Yeah.
- 28:55So the main focus of Napalm is actually like physical infrastructure.
- 29:00So we don't really have any hooks with any of the, all the cloud companies, like none of them.
- 29:06Like, yeah, we mostly operate on switches, routers, firewalls, all this kind of thing.
- 29:12Yeah.
- 29:12And you, you rarely have that low level of access in any of those places.
- 29:17Yeah.
- 29:17I mean, there could be like, maybe, yeah, I'm, I'm not a juicer myself of the public cloud.
- 29:23So I'm not sure how they work, but there might be some room for like, I don't know, maybe integrating with how, with the firewall, their firewalls and load balancers.
- 29:34But yeah, I don't know.
- 29:35I haven't heard of anyone even considering something like this.
- 29:39Sure.
- 29:39I mean, there are APIs for the load balancers and APIs for the firewalls, but yeah, I'm not sure.
- 29:45I'm not sure if it makes sense, but maybe, maybe it makes sense somehow.
- 29:48Right.
- 29:49But, but maybe not the same.
- 29:51Right.
- 29:51Maybe say, I want to connect these three machines and I want to have this in a virtual private network and whatnot.
- 29:56Like that possibly could be a thing, but I'm not sure if it really makes sense to mix these tools.
- 30:00I will say if someone comes up with something after hearing this podcast.
- 30:04Yeah, exactly.
- 30:06Maybe you'll get a pull request.
- 30:07What about like Dockers?
- 30:09If I'm a Docker, if I'm using Docker or like, I've got a bunch of them running together managed like by Kubernetes.
- 30:15But let's say that's on my own network.
- 30:17Well, if it's on your network, I'm pretty sure that you could somehow orchestrate configuring the network somehow with, with Napalm.
- 30:25I don't know the details of Kubernetes, but I know people doing exactly that with OpenStack.
- 30:32So their provisioning system just uses, uses Napalm to orchestrate the physical network with the rest of the, I don't know how it's called, Neutron.
- 30:42I think it is the network plugin for, for OpenStack.
- 30:46Interesting.
- 30:46Yeah.
- 30:46So what's the story between Napalm and OpenStack?
- 30:50So OpenStack being like.
- 30:51I don't know the details, to be honest.
- 30:53I know that someone I was working on just like they have their, they're just in OpenStack to just deploy their virtual infrastructure.
- 31:02And one of the pieces is actually configuring the network, right?
- 31:07So someone had just written up plugin, which I don't know if it was just in production, actually, to just like configuring.
- 31:15Like, for example, if I'm deploying this service, I need to configure this BGP station in here or this VLAN in there.
- 31:21So it was just a matter of doing that with Napalm.
- 31:24Okay.
- 31:24Yeah.
- 31:25There probably is some opportunities for some kind of integration there.
- 31:29But, you know, I don't do enough with OpenStack, honestly.
- 31:31I mean, yeah.
- 31:33All right.
- 31:35So can you maybe give us like the general workflow of working with Napalm?
- 31:39So we start breaking down the devices into different services, right?
- 31:44Like here's a firewall.
- 31:46Here's a web server.
- 31:48Things like that, right?
- 31:49It depends on what you're doing, actually.
- 31:51Because we try to just provide the API as generic as possible so you can write your own workflow.
- 31:57So we do a set of methods, for example.
- 32:01One set of methods just interact with the device configuration.
- 32:05So you can say like, okay, I want to deploy this configuration.
- 32:08Or I want to replace the existing configuration with this one.
- 32:13This is the method that was mentioned before where you just wipe everything out, right?
- 32:19Okay.
- 32:19Now I have this configuration loaded.
- 32:21I want to either discard it, commit it, or just get a diff back.
- 32:27So these are just basic, primitive, so you can actually build your own workflow.
- 32:31You can just integrate it with, I don't know, with Jenkins, for example, to stage the change and get a diff back, open a pull request and have someone validate it.
- 32:41Like, for example, that's a common workflow.
- 32:44And the other set of methods, it's getting data out of the network.
- 32:47Like, I want to get the interfaces of my devices.
- 32:50Or I want to get the BGP neighbors of my network.
- 32:53Stuff like that.
- 32:55So you can actually have into your Jenkins job, like after the change has been made.
- 33:03Just get the data out and verify that the interface that you configure is actually configured as you want it.
- 33:09So, yeah, we don't really have built-in workflow, but we try to just have the basic primitives so people can write their own workflows and just, yeah, integrate as they want.
- 33:19Yeah, it's pretty agnostic to the way that the vendors want you to work.
- 33:22You can come up with your own workflow, and because it'll talk to all the devices the same, that more or less should work, right?
- 33:30Yeah.
- 33:30Yeah, for example, I like more the workflow of just generating the entire config and send it to the device.
- 33:36Because that way I know that what I told the device, it's going to be in there.
- 33:40Rather than having to tell the device how to do things, like, yeah, I don't know how to do it.
- 33:45Just get this done.
- 33:46But other people prefer more like not all sorts of operations where they have like a self-service portal and they just click somewhere like, okay, create this, delete that.
- 33:56So, yeah, it depends on your preference, I guess.
- 34:00Yeah.
- 34:00And probably how you're using your network and how often it changes and whatnot.
- 34:04So, you mentioned Jenkins.
- 34:07Like, what's the story with continuous integration?
- 34:09Like, what are you seeing people do with Napalm and CI?
- 34:12I would say that the common thing that people does with CI and Napalm is mostly automated deployment.
- 34:18Like, for example, I just change some data on a YAML file, right?
- 34:23And that triggers a Jenkins job that just runs an Ansible playbook, for example.
- 34:27And Ansible playbook connects to the device, loads the new candidate configuration, and retrieves back a div.
- 34:36And the div just gets just, it's posted into some PR sort of tool.
- 34:42Could be Garrett or maybe another GitHub repo.
- 34:46So, that's a common workflow.
- 34:47Another workflow I have seen, it's a bit weird.
- 34:53I don't remember who did this.
- 34:55But we have a framework within Napalm where you can define certain rules.
- 34:59Like, for example, I want to verify that all my BGP neighbors are sending me at least five prefixes.
- 35:05We have a framework to describe things like that, for example.
- 35:09Or I want to check that my interfaces have no errors.
- 35:11It's just a YAML file where you can just describe certain data and validate it.
- 35:16So, I've seen some people that when they deploy something on the application, they run this sort of validation tool to verify that the network is working fine.
- 35:27Like, for example, we start this backup.
- 35:29We want to check that we are not having interface errors at the same time.
- 35:33So, I've seen people not connecting completely unrelated pieces and verifying stuff with CI as well.
- 35:40Okay. And things like, I made a change to the network, but I don't expect the number of endpoints to change.
- 35:47So, let's make sure that that is still a constant number or something like that, right?
- 35:51Yeah, it was a kind of weird workflow.
- 35:53They were trying to explain to me, I was like, okay, that sounds all confusing and cool.
- 35:58So, I didn't really understand it very well.
- 36:03Yeah, interesting.
- 36:04This portion of Talk Python To Me has been brought to you by Rollbar.
- 36:08One of the frustrating things about being a developer is dealing with errors.
- 36:11Relying on users to report errors, digging through log files, trying to debug issues, or getting millions of alerts just flooding your inbox and ruining your day.
- 36:20With Rollbar's full-stack error monitoring, you get the context, insight, and control you need to find and fix bugs faster.
- 36:27Adding Rollbar to your Python app is as easy as pip install Rollbar.
- 36:31You can start tracking production errors and deployments in eight minutes or less.
- 36:36Are you considering self-hosting tools for security or compliance reasons?
- 36:39Then you should really check out Rollbar's compliant SaaS option.
- 36:43Get advanced security features and meet compliance without the hassle of self-hosting, including HIPAA, ISO 27001, Privacy Shield, and more.
- 36:52They'd love to give you a demo.
- 36:54Give Rollbar a try today.
- 36:56Go to talkpython.fm/Rollbar and check them out.
- 37:00So to test this out, do you actually have to have the devices like a Juniper device or a Cisco device?
- 37:06Or is there like the equivalent of virtual machines for these network devices?
- 37:10Most platforms nowadays have a VM equivalent.
- 37:15So we can use that for testing.
- 37:19But we rely a lot on mocks.
- 37:22Like for example, most of the time we, like most of the code is actually just normalizing data.
- 37:28But just connecting to a device, retrieving the interface information and normalizing it into a common model.
- 37:35So for those things, that's easy to mock.
- 37:38You just need the original data, a few use cases, and just test that the parser, normalizer works fine.
- 37:47So yeah, we can get away a lot with just mocks.
- 37:50But yeah, there are certain things that you need, a VM or something.
- 37:53Yeah, that makes sense.
- 37:54It's like, so run some particular command on some test lab setup and just capture that text and go, now tell it that it gave you this.
- 38:03Yeah.
- 38:03With the mock layer in your CI.
- 38:06Yeah.
- 38:07The thing that you don't want to mock is the configuration management bit.
- 38:12Because that's so critical.
- 38:13If you miss something up in there, like you might be costing an outage.
- 38:18So that we try to always, always test with VMs.
- 38:22I want to play it safe there.
- 38:24Is it stressful to work on this project?
- 38:26About just to think like people might be running this against huge networks, either your own at Fastly or someone else's and just like, okay, I really have to get this right.
- 38:36Because it could have real consequences if I mess it up.
- 38:40No, I don't think it's stressful.
- 38:42No, I don't think so.
- 38:44Like the primitives that we provide with Napon to configure the network, it's actually five or six methods.
- 38:52And those ones, they're written, they're written.
- 38:55Like you don't really have to deal with them.
- 38:57So yeah, I mean, it's a bit delicate when you're writing them for the first time.
- 39:02But then once that's written, it's just a matter of, yeah, just keep testing.
- 39:07I see what you're saying.
- 39:08It's kind of low enough that the parts where it may get tricky or not quite right is actually at the person using Napalm, not Napalm itself.
- 39:18And I mean, obviously, you're integrating into something as low level as your infrastructure.
- 39:23You have to do your homework and actually do some integration testing yourself.
- 39:28And make sure that, yeah, the exact version that you're running on the network, it actually works well with Napalm.
- 39:33Like maybe you have like this super tiny bug that we have on the operating system of the network, I mean, that we haven't encountered before.
- 39:40So that's just, yeah, basic integration testing, I guess.
- 39:44Yeah, yeah.
- 39:44Do you get requests for people to add support for particular devices that you don't have access to?
- 39:51Oh, yeah, all the time.
- 39:52And so how do you deal with evaluating those PRs?
- 39:55For the configuration management part, we always ask to have proof that it's working.
- 40:00And that could be as simple as he just creates a necessary user for me so I can actually validate the testing person while he's running the test on his machine.
- 40:10Or I might be running the test on my machine.
- 40:12But the thing is that if I don't have access to the device, at least the configuration bit, I need to be able to test it the first time myself.
- 40:20Because then once it's tested and it's working in there, it will probably barely change.
- 40:26And yeah, and what retrieves data from the device, that's easy.
- 40:31That's just a matter of mocking the output.
- 40:33So yeah, that's not really a worry.
- 40:36Yeah, it just seems like when you work with all these different devices, it's tricky because you probably don't have access to every single variation of them, right?
- 40:43Yeah, yeah, correct.
- 40:44Yeah, so we just try to at least, at least the first time to validate, not take only the word of the contributor.
- 40:51Could you do like screen sharing and just like watch them?
- 40:54Yeah, I mean, anything that works for them.
- 40:56I mean, if they don't want to share the screen, I mean, and they can just give me access to the device, I can just pull their branch and test it myself.
- 41:03I mean, that's fine.
- 41:04Yeah, cool.
- 41:06So I just wanted to highlight a video presentation that you did at Nanog.
- 41:12What was the first?
- 41:13I might be getting it wrong.
- 41:15Yeah, Nanog.
- 41:15Yeah, Nanog.
- 41:16I thought that was really helpful.
- 41:17It's a little bit dated, right?
- 41:18That was, I think, from 2015, but it still shows a lot of the workflow and how people might do it.
- 41:24So if they're really interested, I'll be sure to put that video in the show notes.
- 41:28People can check it out.
- 41:29Yeah, that's actually the video that we recorded when we went live with the project.
- 41:34Like, here we are.
- 41:35Yeah, here you are a couple years later, and I remember there was just the few devices you guys supported, and now there's a whole bunch.
- 41:41Yeah.
- 41:42Yeah, so do you want to tell us about some of the major deployments or users of Napalm?
- 41:47So I don't really have an official list.
- 41:50I never thought about that.
- 41:52But I was actually going through the contributors and just trying to see where they work.
- 41:57So this list I'm going to mention now is based on trying to check on where people work.
- 42:03I don't know if they're actually using it on their networks.
- 42:06It might be that the contributor is just, I don't know, doing it on its own spare time.
- 42:13I don't know.
- 42:13Just disclaimer here.
- 42:15But I don't know.
- 42:15I've seen contributions from people working at places like some trading firm that, I don't know,
- 42:22friendly is called IMC, Nike, Netflix, obviously Spotify, which is where everything started, like eBay.
- 42:29Yeah, you were at Spotify when you started working on this, right?
- 42:32Yeah, right, right.
- 42:33Yeah, I was working at Spotify when I started the project.
- 42:36eBay is a big user of Python, so that makes a lot of sense.
- 42:38Yeah, I know.
- 42:39I have seen some contributions from people working there.
- 42:42Again, I'm talking based on where I have seen they work.
- 42:46I don't really know what they're doing.
- 42:48There are a few IXPs like Lynx and Linux, which if you're a network engineer, you probably know who they are.
- 42:55And Fastly, we use it as well.
- 42:56And another big contributor is also Cloudflare, which is another CDN.
- 43:01But yeah, there are a few contributors.
- 43:05They seem to be working in interesting places.
- 43:07Yeah, that's great.
- 43:08Are you looking for more contributors?
- 43:10People always ask me if there are good places to get started in open source that are kind of new.
- 43:15They want to check this out.
- 43:16So are you looking for competitors and what kind, I guess?
- 43:19Anyone could help, actually.
- 43:20There is a lot of work to do, both in, I don't know,
- 43:23like something as basic as documentation.
- 43:25That's kind of like even if you don't know Python or you're starting with Python, you can always help there.
- 43:31And then also something you have to bear in mind is that this is mostly built by network engineers,
- 43:39which means that it might not be the best Python.
- 43:43So even if you don't know anything about networking, but you just want to help a project by just reviewing the code
- 43:49and proposing improvements or something like that,
- 43:53like, yeah, Napalm would be a great fit for that because, yeah, we are mostly network engineers.
- 43:58But, yeah, we don't know what we are doing.
- 44:00We're just trying to solve problems.
- 44:03Hey, we made it work.
- 44:04It's great.
- 44:04So I asked you earlier about how you deal with the hardware that you don't know about.
- 44:08But if somebody's got some new piece of hardware and they want to integrate it into Napalm,
- 44:13what are all the steps that they got to go through for that to work?
- 44:16So if you're a vendor, which actually has happened already, it's the same workflow as if you were just a regular contributor.
- 44:23Like you just come to us proposing the idea.
- 44:27That's just so we know that you're working on that because someone might already be working on us.
- 44:31It's trying to avoid duplicating effort.
- 44:35But I don't know.
- 44:36We don't really have a formal structure.
- 44:38Like there are certain ways that you have to integrate with the project.
- 44:42But that's just part of how the project is kind of designed.
- 44:48It's not really like formalities.
- 44:50Like, oh, yeah, you have to support at least these three methods.
- 44:53And if they're not supported, like it's a completely no-go.
- 44:56Like, no, we don't really have strict rules like that.
- 44:58I mean, if it's useful, it's useful.
- 45:00Even if it's just like a couple of methods, someone else might just pick it up and improve it.
- 45:06Right.
- 45:06Just getting it started might be a big deal.
- 45:08Nice.
- 45:08Okay.
- 45:09That's great.
- 45:09So what's the feature, Nepal?
- 45:12Like, what are you guys planning to add?
- 45:14Or where is it going?
- 45:16Now we just launched a new library where we tried to normalize syslog events, for example.
- 45:24This is completely new.
- 45:25The first release was launched like maybe a couple of weeks ago.
- 45:31So because this, yeah, in the same way that every device has its own CLI and output from different calls.
- 45:40Yeah.
- 45:41In the same way that that happens, they also send like different syslog events with different data and everything.
- 45:47So now we are trying to be able to normalize that.
- 45:50So you can just start this service, use it as a syslog endpoint and just normalize the data and send it somewhere else, like whatever, log stash or whatever you're doing.
- 46:01And I don't know.
- 46:03We're trying now to integrate as well with OpenConfig.
- 46:06OpenConfig is an industry effort to normalize the data that devices return, for example.
- 46:14So when we started, OpenConfig didn't exist yet.
- 46:20So we designed our own data models, to call them in some way.
- 46:24And now we are trying to start integrating with this data models.
- 46:29Yeah.
- 46:29So if there's going to be a standard around all the data, then you guys definitely want to be part of it.
- 46:34Yeah.
- 46:34So now we're trying to integrate with that instead of just completely designing everything ourselves.
- 46:39Like, yeah, if someone is solving that problem for me, why not?
- 46:42Yeah.
- 46:42And if people want to get in touch, you have both a Slack channel and a mailing list, right?
- 46:46Yeah.
- 46:46We're in Slack.
- 46:48The Slack organization is called Network2Code.
- 46:51We can probably add a link on the show notes to the page to register.
- 46:55And there is also a mailing list, although it's not very active, to be honest.
- 46:59Most people prefer Slack nowadays.
- 47:01Looks like email is slowly dying.
- 47:04And we actually launched today a webpage to keep all the news posted there and links to the Slack channel and everything.
- 47:12So that's actually a good...
- 47:15Wow, that's great.
- 47:15Just today, huh?
- 47:16Yeah, yeah.
- 47:17Just like a couple of hours ago.
- 47:18Nice.
- 47:19Be sure to put that in the show notes that we're sharing so we can make sure everyone has that.
- 47:24Yeah, because before we had just the GitHub.
- 47:27But GitHub is not great if you want to keep people up to date into like, oh, yeah, we just launched this.
- 47:33Or we have fixed this.
- 47:35So make sure that you are updating your requirements and stuff like that.
- 47:39So, yeah, we built this web too.
- 47:41Yeah, nice.
- 47:42Yeah.
- 47:42And what's the Python 3 versus Python 2 story?
- 47:45Do you support both or one or the other?
- 47:48Yeah, we actually support both.
- 47:50Kirk, which is one of the main contributors and happens to be also the creator of NetMiko, the tool that I mentioned before.
- 47:58He really likes Python 3.
- 47:59So he worked very, very hard.
- 48:01And he got all the code working there.
- 48:04That's great.
- 48:05Very nice.
- 48:06So you don't have to worry in a couple of years when Python 2 gets phased out.
- 48:11That's good.
- 48:12All right.
- 48:13So Napalm seems like a really cool project.
- 48:15If you're doing network automation, it seems really excellent.
- 48:19So I wanted to ask you why I had you here.
- 48:21A few more general questions just about networking type of things.
- 48:25So what is the future for network?
- 48:28What does it look like for network engineers, do you think?
- 48:30More stuff like what you're doing with Napalm or is it changing or what do you think?
- 48:35Million dollar question, I guess.
- 48:36Everybody keeps asking that.
- 48:37I don't know.
- 48:39I mean, the way I see it is somehow the network engineer will transition into an SRE type of role.
- 48:46Where you're not this CLI jockey that knows all in and outs of a network device, all the knobs.
- 48:54Networks are becoming simpler and simpler because people keep just building bigger and bigger.
- 49:00So there is less room for snowflakes.
- 49:03So I see more like network engineers transitioning into an SRE type of role.
- 49:08Okay.
- 49:08And do you think things like this data standard you talked about and Napalm itself,
- 49:14where you don't actually have to know the details as specifically about the devices?
- 49:19Do you think it's more automation programmability, less specific knowledge about the individual devices?
- 49:25Well, the thing is that networks traditionally were full of knobs.
- 49:29Like you go and you configure OSPF and then you enable this super obscure option in here.
- 49:36Then this other knob in that other place.
- 49:41Like, yeah, when your network is not so small, you keep just trying to optimize like everything.
- 49:47But now when you start building things at a bigger scale, like there is not that much room for those kind of thing.
- 49:53Like you need to build something fast.
- 49:55Regardless of if you're doing it manually or in an automated way, you need to start standardizing things.
- 50:01So my guess is that eventually things will happen.
- 50:05I mean, it's the same that happened with other services.
- 50:07Like before you had like, I don't know, 20 instances of MySQL and each one was configured differently, trying to optimize every detail.
- 50:14Now that you have like 100 MySQL, I don't look the same.
- 50:17I didn't really care about anything.
- 50:20Yeah, whatever.
- 50:22Yeah, it's more about trying to manage 100 things than it is about tweaking little bits.
- 50:26Because if you can manage 100, you can just add a few more and get better performance or whatever, right?
- 50:30Yeah, the cloud is cheap, right?
- 50:31So you just have more compute.
- 50:32That's right.
- 50:34The other thing I wanted to ask you about was IoT devices, right?
- 50:37So we saw recently one of the, it was the biggest denial of service attack.
- 50:42And the denial of service attack actually came from a bunch of hacked webcams or something like this, a bunch of these IoT things.
- 50:51So it seems to me like having all these little crappy, unsecured, non-updated devices on networks is a problem.
- 51:00It's going to be more and more of a problem as things go.
- 51:02Like from a network perspective, like what can be done about these things?
- 51:06The problem is where are those IoT devices located?
- 51:09Are they located like behind a corporate network or are they located behind like someone's home?
- 51:16Probably someone's home connected to a crappy firewall, a crappy NAT router that is like hasn't been updated in five years.
- 51:22Yeah, I mean, then you have a problem because there is no actual way of automating that box that your provider gave you and didn't even provide you the user and passwords, right?
- 51:33Yeah, I guess there is a little hope in there.
- 51:36Not a whole lot of hope.
- 51:37Do you have any hope for it?
- 51:39Do you think like, what do you think is going to happen?
- 51:42I don't know.
- 51:43I hope that at some point, like the people building those devices actually take some responsibility and pride, I guess, on what they are building.
- 51:52And they start building them properly.
- 51:55I mean, that's actually the only thing we can hope for because you don't know where they are going to be.
- 51:59Like if they're behind a corporate network, you can always secure the perimeter somehow.
- 52:03But I mean, yeah, I mean, if it's at your, I mean, at home, like, I don't know.
- 52:07Yeah, it's kind of kind of tough.
- 52:08Even if you put them on like isolated networks, like my router will let me create multiple, like a guest network and another one, I could put it on there and it won't get to my stuff.
- 52:17But still, it becomes a denial of service thing on the internet, right?
- 52:20Which is not great.
- 52:21Yeah, and you're tech savvy, right?
- 52:23Like, I mean, if my parents try to, like, they buy like this Philips bulb that can do like a million things.
- 52:30Like, I mean, they have no idea about computers.
- 52:31They just bought it with the remote control that it comes and it just works.
- 52:35Yeah, it seems to me that the silly cheap light bulbs and other things like this are going to have an interesting fix in the future.
- 52:42And networking will probably somehow be part of it, but I don't know what it is yet.
- 52:45All right, well, thanks for those questions.
- 52:47So, I mean, we should wrap it up.
- 52:49We're getting kind of into the show.
- 52:50So, a couple of questions for you.
- 52:53If you're going to write some Python code, what editor do you use?
- 52:56BI, always.
- 52:57BI, awesome.
- 52:59Yeah, I saw you use it on your demo there in the video.
- 53:01That's great.
- 53:01And notable PyPI packages.
- 53:04Aha.
- 53:05So, obviously, we can pip install Napalm, right?
- 53:08Yeah, correct.
- 53:09Okay.
- 53:09So, there's a good one.
- 53:11Any others?
- 53:12I would say Hammock, which builds on top of requests, and Enmico.
- 53:17Yeah, those are probably the two I would mention.
- 53:19Yeah, okay.
- 53:20I don't know about Hammock.
- 53:21That's cool.
- 53:21What does it do?
- 53:22It's mostly a wrapper on top of requests.
- 53:25So, you can start doing, like, you create your instance, and then you do, like, myapi.api.v1.host.get.
- 53:34And then the URL just builds itself.
- 53:36So, it's kind of like...
- 53:37Oh, interesting.
- 53:38I see.
- 53:38Nice to use.
- 53:39It uses, like, the dynamic nature of types themselves to express the URL.
- 53:43Okay, that's really cool.
- 53:45I got to check that out.
- 53:46All right.
- 53:47So, it was very nice.
- 53:48Thanks for being on the show.
- 53:49Any final call for action?
- 53:50If people want to get started, how do they do it?
- 53:52So, well, if people want to get started, they can always visit our new webpage where you
- 53:57can find links to our GitHub repo, to the documentation as well.
- 54:01We have instructions on how to use VMs so you can actually start poking at Napalm without
- 54:07having to deal with the actual infrastructure.
- 54:09So, yeah, our website, it's probably the best place to begin with.
- 54:14Okay.
- 54:14Excellent.
- 54:15Well, David, thank you so much for being on the show.
- 54:17It was great to talk about networks with you.
- 54:19Yeah, thank you for having me here.
- 54:20It was a lot of fun.
- 54:21You've got...
- 54:22This has been another episode of Talk Python To Me.
- 54:25Today's guest was David Barroso, and this episode has been brought to you by Linode and Rollbar.
- 54:31Linode is bulletproof hosting for whatever you're building with Python.
- 54:35Get your four months free at talkpython.fm/linode.
- 54:40Just use the code python17.
- 54:42Rollbar takes the pain out of errors.
- 54:45They give you the context and insight you need to quickly locate and fix errors that might
- 54:50have gone unnoticed until your users complain, of course.
- 54:53As Talk Python To Me listeners, track a ridiculous number of errors for free at rollbar.com slash
- 54:59talkpythontome.
- 55:00Are you or a colleague trying to learn Python?
- 55:03Have you tried books and videos that just left you bored by covering topics point by point?
- 55:08Well, check out my online course, Python Jumpstart, by building 10 apps at talkpython.fm/course
- 55:14to experience a more engaging way to learn Python.
- 55:16And if you're looking for something a little more advanced, try my Write Pythonic code course
- 55:21at talkpython.fm/pythonic.
- 55:24Be sure to subscribe to the show.
- 55:26Open your favorite podcatcher and search for Python.
- 55:29We should be right at the top.
- 55:30You can also find the iTunes feed at /itunes, Google Play feed at /play, and
- 55:36direct RSS feed at /rss on talkpython.fm.
- 55:39Are you looking for a way to support the show?
- 55:42Well, taking or recommending one of our courses is really the best way.
- 55:45But if that's not for you, you can become a patron.
- 55:47Visit patreon.com slash mkennedy for details.
- 55:51You can give as little as $1 an episode.
- 55:53This is your host, Michael Kennedy.
- 55:55Thanks so much for listening.
- 55:57I really appreciate it.
- 55:58Now get out there and write some Python code.
- 56:00Thank you.
- 56:01Thank you.
- 56:02Thank you.
- 56:03Thank you.
- 56:03Thank you.
- 56:04Thank you.
- 56:04Thank you.
- 56:05Thank you.
- 56:05Thank you.
- 56:06Thank you.
- 56:06Thank you.
- 56:06Thank you.
- 56:06Thank you.
- 56:07Thank you.
- 56:08Thank you.
- 56:08Thank you.
- 56:08Thank you.
- 56:08Thank you.
- 56:09Thank you.
- 56:10Thank you.
- 56:10Thank you.
- 56:10Thank you.
- 56:11Thank you.
- 56:12Thank you.
- 56:12Thank you.
- 56:13Thank you.
- 56:14Thank you.
- 56:14Thank you.
- 56:15Thank you.
- 56:16Thank you.
- 56:17you
- 56:17Thank you.
- 56:20Thank you.