Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Automating Cisco ACI With Python Day 1

Download as pdf or txt
Download as pdf or txt
You are on page 1of 29

Automating Cisco ACI

with Python
Bootcamp Overview
Matias Caputti
Data Scientist

mcaputti@ine.com
@yosoymatias
linkedin.com/in/matias-caputti-b8a5195b
Bootcamp Overview

+ Class schedule
+ Start at 8am PST / 11am EST daily
+ Class runs about 3 hours per day
+ Class runs 3 days

+ Using the online classroom


+ Q&A session
+ Class is recorded and will be added to bootcamp’s page
+ Code examples will be added to bootcamp’s page too
Bootcamp Topics

+ Day 1
+ Python Fundamentals
+ Python Modules
+ Reading external data with Python
+ Day 2
+ Automation options with ACI
+ Postman and ACI
+ Installing the ACI Toolkit
+ Logging into the APIC through Python
+ Creating a ACI Objects with Python Scripts
+ Day 3
+ Advanced ACI automation with Python Scripts
+ Provisioning an Entire ACI Fabric with Python
+ Q&A
+ Closing Remarks & Recommendations
Automating Cisco ACI
with Python
Python environment installation
Why learn to program?

+ Operational Efficiency
+ Getting more work done in the same amount of time, or less time
+ Automation increases operational efficiency
+ Time saved = money saved
+ People make mistakes
+ Automation decreases the margin for error
+ You career
+ Time saved = money saved
+ Presenting this to your manager via code you’ve written will translate well
into promotion feedback
+ Automating the boring stuff frees up time to do the cooler stuff
Fear

+ “I don’t want to be replaced by a script!!!”

+ Have the opposite attitude: replace all the stuff you don’t want to do with
a script!

+ “Always do what you are afraid to do.”


- Ralph Waldo Emerson
What is Python?

Python is a versatile general-purpose coding language—which means


that there are many uses for Python:
+ DevOps
+ Automation
+ Writing system scripts
+ Data processing
+ Web Dev
+ Data Visualization
+ Artificial Intelligence
+ Game Dev
+ Finance
+ ...
When and Why?

Python is a versatile general-purpose coding language—which means


that there are many uses for Python:

+ Designed and created by Dutch programmer Guido van Rossum

+ First version (v0.9.0) released in February 1991.


+ Python v1.0 in January 1994.
+ Latest v3.9 in October 2020.

+ Why did he create it?


+ He need something to occupy his time during his office’s winter holiday
break.
Why is so popular?

According to the TIOBE index, which measures the popularity of


programming languages, Python just is the second most popular
programming language in the world, behind only C.

+ Its availability. A large range of operating systems and architectures


support Python.
+ Its ease of use. For those who are new to coding and programming,
Python can be an excellent first step. Good exception handling.
+ It’s simple syntax. Python is relatively easy to read and understand, as
its syntax is more like English.
+ Its supportive community. As it’s an open-source language, anyone can
use Python to code.
Local installation

+ Download installer from the Python website


+ Using your operating system’s package manager
+ Building Python from source code
+ export PATH=”$PATH:/usr/local/bin/python”
Python interpreter

+ Python ships with an interactive interpreter


+ This tool will be your best friend as you learn the language
+ Provides instant feedback and introspection capabilities

+ $ python
+ >>> print(“Hi INE”)
+ >>> exit()
+ $
Virtual environments

The main purpose of Python virtual environments is to create an isolated


environment for Python projects. This means that each project can have its
own dependencies, regardless of what dependencies every other project has.

+ Virtualenvwrapper
+ Poetry
+ Anaconda virtual environments
Online Python interpreters

If you want to try out a Python example code without having to set it up
locally, then there are several websites which allows you to run Python code
online:
+ Python.org Online Console
+ Repl.it
+ Python Anywhere
+ Trinket
+ ...
Integrated Development Environments - IDEs

+ PyCharm
+ Visual Studio Code
+ Spyder
+ SublimeText
+ Atom
+ Jupyter Notebook / Lab
+ Vim
+ Google Colaboratory
+ Anaconda
+ ...
Automating Cisco ACI
with Python
Python Object types, Variables and Operators
Go to Lesson
Python Object types, Variables and Operators
Automating Cisco ACI
with Python
Python Collections: Lists, Tuples, Sets and Dictionaries
Go to Lesson
Python Collections: Lists, Tuples, Sets and Dictionaries
Automating Cisco ACI
with Python
Python Control Flow
Exercises
Python Control Flow
Automating Cisco ACI
with Python
Python Functions
Exercises
Python Functions
Automating Cisco ACI
with Python
Python Modules
Exercises
Python Modules
Automating Cisco ACI
with Python
Reading external data with Python
Exercises
Reading external data with Python
Where to go next?

+ Intro to Programming with Python


+ Python Collections
+ Modules and Packages with Python
+ Functional Programming with Python
+ File Management & HTTP
+ Official Python tutorial: The Python Tutorial

You might also like