ETW Network Programmability 20190504 Stritzel
ETW Network Programmability 20190504 Stritzel
Ulrich Stritzel
Berufliche Schule ITECH Elbinsel Wilhelmsburg, Hamburg
[email protected]
04.05.2019
!2
Agenda
• Chapter 1: Introduction to Basic Programming with Python
• Motivation zu diesem Kurs
• Getting (your equipment) ready
• Begriffsklärung
• Writing some code
• Chapter 2: Programming the APIC-EM
• Begriffsklärung
• Das APIC-EM REST Interface
• Klicken und gucken
• Final Exam
!3
Begrifflichkeiten: Swagger
Bildquelle
!9
Begrifflichkeiten: Swagger
Bildquelle
!10
Begrifflichkeiten: Swagger
Das Swagger Framework ist ein Open-Source-Software-Framework, um
RESTful Webservices zu entwerfen, zu erstellen, zu dokumentieren und zu
nutzen.
RESTful Webservices (REST = Representational State Transfer) meint dabei
Webdienste, die APIs anbieten (API = Application Programming Interface).
https://www.programmableweb.com/apis/directory
Beispiel: International Space Station (ISS)
http://api.open-notify.org
https://www.latlong.net
https://www.epochconverter.com
Let’s write some code…
!14
?
!19
Postman
… ist eine API-Entwicklungsumgebung um z.B. API-Requests durchzuführen
und REST-APIs auf Funktion zu prüfen.
!21
Cisco APIC-EM?
!22
Cisco APIC-EM =
Cisco Application Policy Infrastructure Controller - Enterprise Modul
!23
Quelle: https://www.cisco.com/c/de_de/products/cloud-systems-management/application-policy-infrastructure-controller-enterprise-module/index.html
!24
Quelle: https://www.cisco.com/c/de_de/products/cloud-systems-management/application-policy-infrastructure-controller-enterprise-module/index.html
!25
ingress egress
Data Plane
Hardware Purpose Example Processes
Dedicated forwards traffic to the selected packet switching, L2 switching,
ASICs destination QoS, policies, ACLs
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 13
!26
SDN Controller
OpenFlow based controller
(control plane)
OpenFlow Southbound API
Physical Topology
(data plane)
Servers
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 15
!28
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 16
!29
Physical Topology
(data plane fabric)
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 17
!30
URL
– Example: http://{APIC-EMController}/api/v1/host
Authentication
– Basic HTTP, OAuth, none, Custom
Custom Headers
– HTTP Headers
– Example: Content-Type: application/json
Request Body
– JSON or XML containing data needed to complete request
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 30
30
!34
31
!35
APIC-EM – Log in
Virtualized APIC-EM Controllers are available in several DevNet Sandboxes:
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 20
Demo…
!37