Regístrese ahora para una mejor cotización personalizada!

Noticias calientes

The Launchpad: Kickstart Your Learning Journey [Part 1]

Jul, 05, 2023 Hi-network.com

Welcome to the Launchpad, our new blog series! This is your one-stop shop for everything you need to get started with a certain technology or certification path. It's also the perfect place to be if you just want to learn something cool.

As I use my time to pick up a new skill or study for a certification, I realized thatI don't always know where to start. I always feel conflicted because I have limited time to study during my work week. That said, I decided to start a blog series to share my learning path with you, our learning community, in hopes that I can help you learn something new, while also giving you some direction and resources to get you over the finish line! All while making it fun!

The next couple of Launchpad blog series will focus on the Cisco Certified DevNet Expert certification exam topics.

The Direction

If you haven't done so yet:

  • Go through the exam topics and familiarize yourself with the blueprint.
  • Watchthe DevNet Expert Certification Event for an expert-led overview.
  • Make a study schedule (and stick to it)!

"Decoding the New DevNet Expert Lab Exam"

Watch #CiscoChat on-demand now.

The Learning

Now that we have an idea of what will be covered in the certification exam, let's start with the most heavily weighted topic.

Coming in at 30 percent:Infrastructure as Code.

  • Build, manage, and operate a Python-based REST API with a web application framework (endpoints, HTTP request, and response).

Flask web framework comes to mind here. Let's build a simple web application together.

The Application

  • Written in python leveraging Flask framework
  • Will receive HTTP requests via Postman
  • Handle GET/POST/PUT/DELETE methods
  • Return data based on API requests to endpoints

Simple enough, right? Let's get started:

1. First, as with anything Python, let's import the required libraries.

importjsonfromflaskimportFlask, request, jsonifyfromtinyDBimportTinyDB, Query, whereimportrandom

Json-library used for Json data manipulation
Flask-web application framework
Tinydb-exactly what it reads, a tiny database

2. We are going to build a poor man's IPAM, save IP address and its corresponding information (mask, vrf, status... etc.) to a database and allow Flask to expose an API endpoint into the data. To do so, let's create an instance of Flask and TinyDB.

app = Flask(__name__)db = TinyDB ('db/data.json')

3. Next use theroutedecorator to tell Flask what URL should trigger our function.

In this case, we accommodate for five different URLs:

  • / -Default route
  • /query GET -to retrieve records
  • /create POST -to insert records
  • /update PUT to -update existing records
  • /delete DELETE -to remove a record

I could have used the default route with 4 different http methods, but I wanted to demonstrate routes.

tag-icon Etiquetas calientes: Cisco Certifications Cisco DevNet Aprendizaje aprendizaje infrastructure-as-code (IaC) #CiscoCert DevNet Expert Certification

Copyright © 2014-2024 Hi-Network.com | HAILIAN TECHNOLOGY CO., LIMITED | All Rights Reserved.
Our company's operations and information are independent of the manufacturers' positions, nor a part of any listed trademarks company.