• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Rowell Dionicio

Get Techie With It

  • Home
  • About
  • Resources
    • Archives
    • Book List
    • YouTube
  • Learn
    • DevNet Associate
    • PCNSA Certified
  • Blog
  • Contact
  • Show Search
Hide Search

devnet

Listing Meraki Network Devices Using the API (DevNet)

November 11, 2020 By Rowell Leave a Comment

Starting with the basics of network automation involves learning how to construct code. The DevNet Associate will test against your ability to perform this task. 

In this example, I will leverage the Meraki API in order to get a list of devices part of a network within an Organization.

Anyone can get started with this as Meraki provides a DevNet Sandbox for people to test their Python capabilities. 

I’ll be using just three things for this lab:

  • Postman
  • Meraki Sandbox
  • Atom

Postman will help us construct our script with ease. By exploring the API with Postman, we can see which API to use that will give us the results we require. Atom is my text editor of choice.

When writing the script, we’ll eventually need to include a few libraries. Here’s what we’ll be using:

Libraries

  • Requests
  • json

The requests library is exactly how we’re going to make our request to the Meraki API. We want to request a list of devices from a network that is part of an organization.

When we make the request, we’ll get data in return and it will be in json format. We need a way to work with that json data and that’s wha the json library is for.

Meraki has their API documented very well. If our goal is to get a list of devices then we simply need to find which API call needs to be made.

There is a GET request called getNetworkDevices and we’re given the URL needed to make that request. 

From that URL, we need to pass a network ID. To find the network ID we can list all networks in an organization. 

To make a request to the Meraki API, we need to provide an API key. In this example, the API key being used was provided by Meraki from their own examples.

We have a variable defined which will contain the GET response of our request.

I’ll pass the variable into the json library and decode it into a Python object which will be a list in this case. We can tell this is a list if we pass devicesXML into the type function.

Now that we have our data in a Python object, we an iterate through it. This is where we tackle the core objective of listing devices in Meraki. We’ll do this with a for loop.

import requests
import json

url = "https://api.meraki.com/api/v1/networks/L_646829496481105433/devices"

payload = {}
headers = {
     'X-Cisco-Meraki-API-Key': '093b24e85df15a3e66f1fc359f4c48493eaa1b73'
 }

response = requests.request("GET", url, headers=headers, data=payload)

allDevices = json.loads(response.text)

for device in allDevices:
    print("Model: {} \t Serial: {}".format(device["model"], device["serial"]))

The output:

% python3 getDevices.py
Model: MX65      Serial: Q2QN-9J8L-SLPD
Model: MS220-8P      Serial: Q2HP-F5K5-R88R
Model: MR53      Serial: Q2MD-BHHS-5FDL

Cisco Cert Exams now ONLINE

April 21, 2020 By Rowell Leave a Comment

The impact COVID19 has had on this world is crazy. Everything stopped in it’s place.

If you were studying for a Cisco certification exam, you had to stop. The testing centers began closing due to social distancing rules in place and fear of contracting COVID19.

Companies such as Cisco began adapting instantly. Many exam candidates had requested Cisco make their exams available to be taken online in the comfort of their own homes.

I don’t blame them.

Cisco listened! Starting April 15, 2020 anyone should be able to take their Cisco certification exams online from home. There are only a few exceptions to the list of exams which appear to be the CCENT, CCDE and other lab exams.

Now’s the time to take advantage of this opportunity. Are you going to use this time to watch more Netflix or are you going to show up and knock out a certification or two? Will you adapt and come out of this situation on top?

Your turn…

Which Cisco exam are you studying for?

I Passed the DevNet Associate Exam!

February 28, 2020 By Rowell 5 Comments

Cisco DevNet launched in 2014 under Susie Wee. On February 24th, 2020 they released their brand new DevNet Associate certification, along with other DevNet certifications.

I remember seeing the DevNet Zone at Cisco Live about three years ago, and I was intrigued. Where was Cisco going with this?

Late in 2019, I decided to take a bigger step towards network automation and scripting with Python. I saw that it would be inevitable and it would surely enhance how I configure, manage, and troubleshoot networks.

That’s when I began dedicating time to learning Python and how it relates to DevNet. I’ve even started writing content about the DevNet Associate which will soon turn into videos.

DevNet Associate Certification

The DevNet Associate (DEVASC 200-901 version 1.0) was an excuse for me to learn Python. Since 2018, I’ve always told myself that I would learn Python to make scripts.

I didn’t follow through with that until 2019.

On February 26th, 2020, I took the DevNet Associate exam and passed! Surprisingly, I even made it into the DevNet 500, the first 500 people worldwide to obtain a DevNet certification!

Cisco DevNet Associate + DevNet 500

I’ll preface everything with, “I’m not a programmer.” But I do have the drive to learn. That’s what’s important here. Do you have a purpose other than just obtaining a certification?

How hard is the DevNet Associate?

With that said, I felt the DevNet Associate exam was very challenging for me. Why? Because the concepts are all very new to me. I’m learning so many different topics all at once, from Python to programming methodologies, to APIs and how APIs work with different Cisco technologies.

I felt the DevNet Associate was as challenging when I first took my Cisco CCNA so many years ago. It was a refreshing take, exciting, taking on a new topic.

Do you need programming and networking experience?

Without any programming experience, it will be challenging. If you already have programming experience with Python and APIs, it will give you an upper-hand.

You don’t need real-world programming experience to take this exam but it does help to have it. At the minimum you should practice with labs.

There is a small section of the DevNet Associate dedicated to networking concepts. If you don’t have any networking experience, then you’ll need to pick up some basics. Check the objectives for what you need to cover. If you’re a network administrator or network engineer, you can pass these questions with ease.

How did I study for the DevNet Associate?

I started actively studying for the DevNet Associate exam in October 2019. The certification was announced during Cisco Live 2019 in San Diego. There were no study guides available at the time so I relied 100% on labs.

Mid-2019 I started using Todoist to track my tasks and on August 10th, 2019 I added a daily task to Practice Python.

Creating a daily task in Todoist

I wasn’t able to practice it every single day but I was reminded to. It helps to install Python on your computer and learn from the labs over at developer.cisco.com (you’ll need to create a free account).

The DevNet page outlines a set of labs, although not a definitive list, you can take that map back to some of the objectives. I did every single one of those labs. Some of them I did repeatedly.

A resource that helped as well are the APIs from Meraki. I have access to Meraki environments which allowed me to test out my GET requests in a Python script.

Meraki actively maintains a Sandbox in which you can test against using the labs I mentioned earlier or you can use Postman to test API access.

The majority of my time was spent testing out API access, running other people’s scripts, and understanding how they ran.

Other parts of the objectives will require research into learning about CI/CD, methodologies, etc.

You will be tested fairly on this exam. I highly recommend learning how to write an API request and understand the different components relating to it. Don’t forget to learn how APIs are leveraged with other Cisco platforms such as routers, switches, SD-WAN, DNA Center, ACI, UCS, etc. This is a Cisco vendor exam so you should be able to describe these capabilities and their differences. 15% of the exam objectives is for Cisco Platforms and Development.

Cisco has plenty of resources around DevNet Associate from YouTube, DevNet Create, Cisco Live videos (sign up to watch these), and other contributors via blog or video.

Surround yourself with other DevNet Associate candidates on Twitter, WebEx Teams, other Cisco Champions, Slack channels, etc. It’s what I’ve done to help me get into the right mindset.

The Cisco DevNet certifications are much more than just getting a certification. For me, it’s encouragement and validation into what I’m learning. It’s the community surrounding this movement. It’s advancement in skills and in a career. It’s building efficiency and solutions to today’s problems. So today, I’m figuring out how to write a script to parse the Cisco IOS output. Wish me luck!

Are you studying for the DevNet Associate?

Let me know in the comments below.

Start Coding: Learn Python The Hard Way 3

August 21, 2018 By Rowell Leave a Comment

This is my experience into learning Python from a network engineer’s perspective. Previously, I started this path with Zero Knowledge of Coding.

Is Learn Python The Hard Way 3 (LPTHW3) the best place to start coding? Sure! One of the worst things you can do is spend endless amounts of time figuring out where to start. I made this mistake. Finally, I just dove into Learn Python The Hard Way 3.

I’m a network engineer in higher education. Diving into the CLI is a regular task for me. And that’s the most difficult part of getting into LPTHW3. I kept looking for context. How could I use functions and lists with network engineering?

But hang in there. Get through the basics. Do about one to two exercises per day. It’s going to be challenging at first but it’s worth it.

We’ve been told to transform as network engineers and get familiar with Python. After attending DevNet Create in April 2018, I felt inspired to build something. So I grabbed a copy of LPTHW3 and got going.

My first try at the book I made it about half way before work projects prevented me from moving at a regular pace.

In August, I picked it up again and started from the beginning. There are 52 exercises in the book. I made it to exercise 48 before I decided to use another learning method that had more relevance to what I do, networking.

Conclusion

It’s a great book to get you started. You’ll learn the basics quickly but the exercises get challenging as you progress into the book. It definitely teaches you the hard way. Supplement your learning with other resources. Perform each exercise as described and don’t be afraid to experiment and break things.

Zero Knowledge of Coding

August 18, 2018 By Rowell Leave a Comment

In April 2018, I was able to attend Cisco DevNet Create in Mountain View, CA as a Cisco Champion. The idea of seeing DevOps from the devs themselves had me intrigued. Which means I’m learning about this new term, NetDevOps.

Later on, this event would leave a positive impact on me. I’ll get to that later on.

I have zero knowledge of coding. Well, maybe not quite zero. I could do a simple print(“Hello world”) but that’s it.

In May 2018, I got myself a copy of Learn Python The Hard Way 3 and hit the ground running. Learning how to code is like learning networking from the beginning. It’s challenging at first but with practice you start learning the concepts. I went through it the first time within 30 days not really grasping it very well. So I took a break.

It’s now near the end of August and I took another dive into LPTHW3. Having understood the exercises better this time around, I began to feel like I might be improving and actually learning something.

Energy and persistence conquer all things.

Benjamin Franklin

After seeing what was possible at DevNet Create, I was left inspired. I was able to see what automated tasks you could perform with Python with the Meraki Dashboard API, how you can approve Cisco configs through WebEx Teams using API, among other useful tasks. It left me wanting more. But most of all, I wanted to create something. And here I am learning Python.

This is how I decide to hold myself accountable to learning something completely new. To write out my experience, my challenges, and my solutions. Welcome to the first entry of my coding journal.

Primary Sidebar

Recent Posts

  • Passed Palo Alto Networks Certified Security Administrator (PCNSA)
  • 5 Years Running
  • Q4 2021 and Yearly Income Report
  • I PASSED JNCIA-MistAI
  • Admins and Role-Based Access Control – PCNSA

Categories

  • bschool
  • Certifications
  • Coding
  • DevNet Associate
  • Events
  • Lab
  • Networking
  • Personal
  • Podcasting
  • Professional
  • Reviews
  • Security
  • Short Stories
  • Uncategorized
  • Wireless

Archives

  • May 2022
  • January 2022
  • December 2021
  • November 2021
  • August 2021
  • July 2021
  • April 2021
  • February 2021
  • January 2021
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • August 2020
  • June 2020
  • May 2020
  • April 2020
  • March 2020
  • February 2020
  • January 2020
  • December 2019
  • November 2019
  • October 2019
  • August 2019
  • June 2019
  • May 2019
  • April 2019
  • March 2019
  • February 2019
  • January 2019
  • November 2018
  • September 2018
  • August 2018

Copyright © 2022 · Written by Rowell Dionicio · You're awesome.

 

Loading Comments...