© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
Welcome Aboard
This Session IS
• an Overview of Network Programmability Capabilities
• based on real-life Enterprise Examples
• fast
This Session IS NOT
• a deep-dive into any product or technology
• limited to Enterprise
PSOCRS-3114 3
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
We are using Cisco Spark
Use Cisco Spark to communicate with the Speakers and fellow participants
1. Download Cisco Spark app from iTunes or Google Play• Go to the Cisco events Mobile app
• Find this session
• Click the Spark button under Speakers in the session description
• Enter the room, room name = “PSOCRS-3114: …”
• Join the conversation!
2. Login to Cisco Spark on your Lab Notebook too
Spark Room will be open for 2 weeks after Cisco Live
PSOCRS-3114 4
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
Cisco Digital Network Architecture
Automation
Abstraction & Policy Control
from Core to Edge
Open & Programmable | Standards-Based
Open APIs | Developers Environment
Network-enabled Applications
Policy | Orchestration
Infrastructure
Physical | Virtual | Programmable | App Hosting
Analytics
Network Data,
Contextual Insights
Insights &
Experiences
Automation
& Assurance
Security &
Compliance
Cloud Services and Management
Cloud-enabled | Software-delivered
Principles
PSOCRS-3114 6
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
Cisco Digital Network Architecture
Open & Programmable | Standards-Based
Open APIs | Developers Environment
Cloud Services and Management
Cloud-enabled | Software-delivered
Physical & Virtual Infrastructure | App Hosting
Policy | Orchestration
Abstraction & Policy Control
from Core to Edge
Network Data,
Contextual Insights
PSOCRS-3114 7
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
Cisco Digital Network Architecture
Automation
Abstraction & Policy Control
from Core to Edge
Open & Programmable | Standards-Based
Open APIs | Developers Environment
Network-enabled Applications
Policy | Orchestration
Infrastructure
Physical | Virtual | Programmable | App Hosting
Analytics
Network Data,
Contextual Insights
Cloud Services and Management
Cloud-enabled | Software-delivered
Cloud-Level APIsExamples include: Case API, proTACtive,
apiconsole.cisco.com, ...
Controller-Level APIsExamples include: APIC-EM NB REST API,
DNA Analytics NB API, ...
Infrastructure-Level APIsExamples include: RESTCONF, Open Service
Containers, embedded EEM/Python, ...
PSOCRS-3114 8
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
Embedded Event Manager (EEM)
Problem: How to automate within a network device
Solution: Exploring EEM Applet and Policy capabilities
See also: http://www.99-bottles-of-beer.net/language-cisco-ios-embedded-event-manager-applet-2909.html
event manager applet 99-bob
description written by bklauser inspired by http://www.99-bottles-of-beer.net
event none
action 100 set b 99
action 110 while $b gt 1
action 120 puts "$b bottles of beer on the wall, $b bottles of beer."
action 130 decrement b
action 140 puts "Take one down, pass it around, "
action 150 puts "$b bottles of beer on the wall.\n"
action 160 end
action 170 puts "$b bottle of beer on the wall, $b bottle of beer."
action 180 puts "Take one down, pass it around, "
action 190 puts "no more bottles of beer on the wall.\n"
action 200 puts "No more bottles of beer on the wall, "
action 210 puts "no more bottles of beer."
action 220 puts "Go to the store and buy some more, "
action 230 puts "99 bottles of beer on the wall.\n"
!
alias exec sing event manager run 99-bob
Setting a Variable
Decrementing a Variable
Referencing a Variable
While Loop – {
While Loop – }
Using an Alias to run our Applet
PSOCRS-3114 10
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
Embedded Event
Manager
Syslogemail
notification
SNMP set
Counter
CLI
Applets
SNMP
get
SNMP
notification
Application
specific
TCL
Policies
Reload or
switch-over
EEM Applets
multi-event-correlation
IOS.sh
Policies
Actions
Event Detectors
Syslog
Event
Process
Scheduler
Database
Interface
Descriptor
Blocks
Syslog
ED
Watchdog
ED
Interface
Counter
ED
CLI
ED
OIR
ED
ERM
ED
EOT
ED
RF
ED
none
ED
GOLD
ED
XML
RPC
ED
SNMP
EDs
Remote:
• Notification
Local:
• Notification
• Get/Set
NetFlow
ED
IPSLA
ED
Route
ED
Timer
EDs
• Cron
• Count
down
HW
EDs
• Fan
• Temp
• Env
• ...
CDP
LLDP
ED
802.1x
ED
MAC
ED
Embedded Event Manager (EEM)
PSOCRS-3114 11
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
1 + 1 > 2
Python
+ guestshell
(from 16.5 / 16.3.1)
EEM+
PSOCRS-3114 12
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
Problem: How to accurately detect cabling issues?
most cabling issues are non-fatal (initially)
not all wire-pairs may be affected
may not be located at cable termination
specialized test equipment may not be available
Solution: Time Domain Reflectometry
injects a test signal into the cable
measures reflections caused by non-uniform impedance
Detection and (approximate) location
See: http://en.wikipedia.org/wiki/Time-domain_reflectometryOn Copper Ethernet 10/100/1000 ports, (subset of) Catalyst 3k, 4k, and 6k since 12.1(19)EA1
Example: Time Domain Reflectometry (TDR) – 1/2
PSOCRS-3114 13
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
But: You may not want to run on all interfaces and only escalate relevant results
Example: Time Domain Reflectometry (TDR) – 2/2
1) Run TDR Test:
switch# test cable-diagnostics tdr interface gigabitethernet1/0/3
TDR test on Gi1/0/9 will affect link state and traffic
TDR test started on interface Gi1/0/3
A TDR test can take a few seconds to run on an interface
Use 'show cable-diagnostics tdr' to read the TDR results.
Note: This will be disruptive!
2) Check Results:
switch# show cable-diagnostics tdr interface gigabitethernet1/0/2
TDR test last run on: December 18 21:05:37
Interface Speed Local pair Pair length Remote pair Pair status
--------- ----- ---------- ------------------ ----------- --------------------
Gi1/0/2 auto Pair A 0 +/- 2 meters N/A Open
Pair B 0 +/- 2 meters N/A Open
Pair C 0 +/- 2 meters N/A Open
Pair D 0 +/- 2 meters N/A Open
Solution: Run on-box from guestshell / Python and parse / filter results before escalating
See https://github.com/CiscoDevNet/python_code_samples_network/tree/master/tdr-test
+ Python
+ guestshell
(from 16.5 / 16.3.1)
PSOCRS-3114 14
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
Open Device Programmability
Other vendors…
RESTCONF NETCONF gRPC
Data Model
Configuration
StandardDevice Specific
Device Features
Interface BGP QoS ACL …
Operational
StandardDevice Specific
Open Device Programmability
Physical and Virtual Network Infrastructure
AutomateSet Get
PSOCRS-3114 16
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
Open Device Programmability – YANG Models
• Industry definition
• Compliant with standard (IETF, ITU, etc) definition
• Compliant with customer definition (ie OpenConfig)
Example:ietf-diffserv-policy.yang(IETF Diffserv data model)
• Cisco definition
• Common across 2 or more Cisco operating systems
Example:cisco-vxlan.yang(IOS-XE/NX-OS VxLAN data model)
• Cisco definition
• Unique to a single Cisco operating system
Example:Cisco-IOS-XR-ipv4-bgp-cfg.yang(IOS-XR BGP data model)
(Open) Common
Model
(Cisco) Common
Model
(Cisco) Native
Model
PSOCRS-3114 17
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
Working with YANG Models
pyang – extensible YANG validator and converter in python
• https://github.com/mbj4668/pyang
• Via PyPi: pyang - A YANG (RFC 6020) validator and converter
• Mandatory tool
YANG Explorer – open-source YANG Browserand RPC Builder Application
• https://github.com/CiscoDevNet/yang-explorer
• Web Based UI
• ‘Postman’-like concept, feature rich
PSOCRS-3114 18
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
Working with YANG Models - YangExplorer(1) Select a Profile
(2) Browse Models
(3) Define Operations
(4) Create RPC
(5) Run RPC
Python Scripts
Check Capabilities
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
Example: Preventive Analytics – Connected TAC
apiconsole.cisco.com
5)
5. NEW proTACtive makes apps available via REST APIs on apiconsole.cisco.com (updates weekly)
4)
4. Hundreds of TAC engineers write scripted apps daily (currently >>16’000 apps)
Problem: Most root causes of production outages have been in the network for some time and have been seen before in other networks. How to prevent them from affecting YOUR network?
Solution: Leverage automated Connected TAC Analytics:
1. Customer reports incident (1.3M incidents p.a.)1)
2. Cisco TAC Expert analyses root cause
TAC
2)
3. IF analysis can be automated AND there is a preventive action a scripted app is created
3)
Prevent outages before they happen
!
PSOCRS-3114 21
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
Example: Preventive Analytics – Connected TAC
REST APIs, node.js AgentIn use at Cisco, ISVs, Partners, CustomersJSON Results
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco PublicTechnical Solutions Clinic – Hall 2.2 (The Hub)
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
Cisco Digital Network Architecture
Automation
Abstraction & Policy Control
from Core to Edge
Open & Programmable | Standards-Based
Open APIs | Developers Environment
Network-enabled Applications
Policy | Orchestration
Infrastructure
Physical | Virtual | Programmable | App Hosting
Analytics
Network Data,
Contextual Insights
Insights &
Experiences
Automation
& Assurance
Security &
Compliance
Cloud Services and Management
Cloud-enabled | Software-delivered
Principles
PSOCRS-3114 24
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
Cisco Digital Network Architecture
Automation
Abstraction & Policy Control
from Core to Edge
Open & Programmable | Standards-Based
Open APIs | Developers Environment
Network-enabled Applications
Policy | Orchestration
Infrastructure
Physical | Virtual | Programmable | App Hosting
Analytics
Network Data,
Contextual Insights
Insights &
Experiences
Automation
& Assurance
Security &
Compliance
Cloud Services and Management
Cloud-enabled | Software-delivered
Principles
PSOCRS-3114 25
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
Deploy, Report, Measure, Adjust, Repeat
Analytics
Business Intent
Service Policy
Infra Config
Business Insight
Service Analytics
Infra Telemetry
Automation
Abstraction & Policy Control
from Core to Edge
Analytics
Network Data,
Contextual Insights
PSOCRS-3114 26
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
Northbound REST API
APIC-EM Platform Architecture – Today
APIC-EM Applications
Elastic Controller Infrastructure (Grapevine 1 )
Network
PnPIWAN
Path
TraceEasy QoS
Advanced Topology Visualizer
APIC-EM Controller Platform Services
Inventory
ManagerRBAC Policy Analysis
Policy
Programmer
Network PnPData Access
Service
Topology
ServicesIWAN
Services
Applications built on top of APIC-EM
Applications packaged with APIC-EM
Core Applications bundled
IWAN Application separately licensed
Open and Documented REST API
Core Services
Applications Specific Services
Provides Scale and High Availability
Network
Inventory
PSOCRS-3114 27
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
Bundling, Versioning, Deprecation and Release Strategy
• API changes within a version will be backward compatible i.e adding a new optional
parameter to existing API URL does not constitute a version change
• Up versioning an API does not guarantee backward compatibility
• When a new version of an API is released, the older version will be
supported for 2 or more years before it is removed
• Telemetry will be used to get insights in API usage and retire unused APIs early in cycle
• Deprecated APIs will respond with appropriate message
(that emphasizes the deprecation, time until it is valid, etc)
APIC-EM Northbound REST API
PSOCRS-3114 28
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
APIC-EM Northbound REST API
Problem: How to get started with a Controller API?
Solution: Explore
Example:
1) In the APIC-EM User Interface,click on [API]
2) Navigate to the desired APIin our example:/network-device/count
PSOCRS-3114 30
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
Example: Subnets seen by APIC-EM
Problem: How to get a full list of all subnets seen by APIC-EM ?
Real-World Example
:
for item in interface_list:
if (item[0] != '') & (item[1] != ''):
subnet = ipcalc.Network(item[0] + "/" + item[1])
subnets.append(...)
:
Solution: Use the APIC-EM REST APIs:
1) For each network device:
2) Extract IP/Subnet Information of all interfaces into a list
3) De-duplicate Subnets
4) Sort the List
See: https://communities.cisco.com/people/steffenwebb/blog/2016/04/07/get-all-subnets-from-apic-em-controller
virtual NETWORK-, APPLICATION-, MANAGEMENT- FUNCTIONS
SWITCHING | ROUTING | WIRELESS
Subnets seen by APIC-EM:
40.0.0.0 /24
40.0.1.0 /30
40.0.1.4 /30
40.0.1.8 /30
40.0.1.12 /30
40.0.1.16 /30
40.0.1.20 /30
40.0.1.24 /30
40.0.1.28 /30
40.0.1.32 /30
40.0.1.36 /30
40.0.1.40 /30
40.0.1.44 /30
40.0.1.48 /30
40.0.2.0 /30
40.0.2.4 /30
40.0.2.8 /30
40.0.2.12 /30
40.0.2.16 /30
40.0.5.0 /24
40.0.7.0 /24
172.10.0.0 /24
172.20.0.0 /24
192.168.1.0 /24
192.168.2.0 /24
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
Tra
ditio
na
l IT
Example: Inventory Integration
Problem: How to leverage APIC-EM discovery and inventory to feed service monitoring?
Real-World Example
Solution: Integrate APIC-EM REST APIs with existing Paessler / PRTG System:
1. Identify Relevant Service Domains
2. Run APIC-EM Discovery
3. Share APIC-EM Inventory via REST APIs and modular PowerShell Tool/Adapter
4. Correlate with EoX and proTACtiveinformation via apiconsole.cisco.com
5. Visualize and Share with IT and DevOps users via PRTG
See www.damovo.com
virtual NETWORK-, APPLICATION-, MANAGEMENT- FUNCTIONS
SWITCHING | ROUTING | WIRELESS
PSOCRS-3114 32
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
Network Plug and Play (PnP)
DiscoveryDevice can reach
PnP Server on APIC-EM1
DeploymentDevice receives target
image and configuration2
No StagingNo Staging Required
PnP Runs from Cisco
Factory-Default ConfigurationSwitches (Catalyst®)
Routers (ISR, ASR)
Wireless Access Points
PSOCRS-3114 34
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
Network Plug and Play (PnP) – Components
PnP Agent
Runs on Cisco® switches, routers, and wireless access points
Automates the deployment process
PnP Server
Central Server on APIC-EM
Manages sites, devices, images, licenses, workflow
Provides Northbound REST APIs
PnP Protocol
Runs between Agent and Server
Open Schema
PnP Helper App
[ Optional ]
Delivers bootstrap, status and troubleshooting checks
Redpark RJ45
Apple 30pin
Redpark RJ45
Apple 8pin
GetConsole
Airconsole2.0
Bluetooth Adapter
Cloud Redirect Service
[ Optional ]
Roadmap Phase 2
PSOCRS-3114 35
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
PnP – Simple & Secure & Consistent
Switches
(Catalyst)
Routers
(ISR/ASR)Wireless AP
APIC-EM PnP Dashboard
APIC-EM Bulk Import/Export
APIC-EM PnP REST API Support
Python
APIC-EM API
PnP REST API
Customer’s Existing
Automation Frameworks
Automation Framework
(i.e. Python scripts,
configuration generator, etc)
Device Repository
and Database
PSOCRS-3114 36
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
Network Plug and Play (PnP) – Templates
PnP Templates
• Introduced in 1.3
• Based on Apache Velocity
• UI Support
• API Support
PSOCRS-3114 37
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
Tra
ditio
na
l IT
Example: Campus Automation
Problem: How automate campus network operations to minimize OPEX and increase efficiency?
Real-World Example
Solution: Leverage APIC-EM and DevNet to deliver automated solutions to customers
• 1st PnP Prodution Reference
• Custom App on top of PnP‘Config Writer’
• OPEX Reduction
• Standardization
• Enables Innovation
See www.computacenter.com
PSOCRS-3114 38
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
Example: PnP for Wireless using Android
Problem: How to automate deployment of Wireless AP and their WLC Association ?
Real-World Example
Solution: Leverage APIC-EM PnP and Android to automate
1. Scan Access Point Serial
2. Load List of PnP Projects from APIC-EM
3. Assign AP to Project Site
4. Auto-Provision AP into correct WLC Group
Credits: Hans Donnerborg and Rene Andersen
2
3
PSOCRS-3114 39
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
APIC-EM Path Trace
Problem: How to capture Application Flow Information along a complex wireless, wired path?
Accurate 5-tuple path flow-analysis – available via GUI and REST APIs
Solution: Leverage APIC-EM – the SDN Controller for Enterprise
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
APIC-EM Path TraceAccurate 5-tuple path flow-analysis – available via GUI and REST APIs
Link Source InformationStats: Device, Interface, QoS, PerfmonACL CheckCAPWAP Tunnel
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
APIC-EM Path TraceAccurate 5-tuple path flow-analysis – available via GUI and REST APIs
"response": {
"request": {
"sourceIP": "212.1.10.20",
"destIP": "65.1.1.6"
},
"lastUpdate": "Thu Apr 23 01:23:21 UTC 2015",
"properties": [ ],
"networkElementsInfo": [
{
"id": "424621be-d2b4-4d42-ad16-92d4d5c19fa4",
"type": "WIRED",
"ip": "212.1.10.20",
"linkInformationSource": "Wired"
},
{
"id": "8beada2e-cd2c-421d-941f-3ba42696c489",
"name": "CAMPUS-Access1",
"type": "SWITCH",
"ip": "212.1.10.1",
{
"sourceIP": "65.1.1.83",
"destIP": "212.1.10.20"
}
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
APIC-EM Easy QoS App
“QoS rollouts were once 6-month projects costing
over $200K. With Cisco APIC EM Easy QoS, we will
go from months to minutes with nominal costs. ”
Brian McEvoy, Sr. Network Engineer, Symantec
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
APIC-EM Easy QoS App – Dynamic QoS
Client A calls
client B
QoS policy enabled
on network device
Application
Dynamic Policy
Management
Call ends
Client sends call setup
info to App server
Client sends call teardown
info to App Server
QoS policy removed
from network device
Application
Dynamic Policy
Management
App Server calls APIC-EM
to setup policy
APIC
EM
SDN API
App Server calls APIC-EM
to delete policy
APIC
EM
SDN API
PSOCRS-3114 47
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
4)
Example: Dynamic Admission Control
Problem: How to consistently and predictably implement dynamic call admission control (DAC) policies on top of an IP network, across campus and branches, supporting multiple communication and collaboration technologies ?
Real-World Example
Solution: Leverage DNA and APIC-EM capabilities to integrate with communicationand collaboration controllers
1) Define Admission Control Policies in Netwrapper
2) Integrate with Communication Controllers(Skype4Business, Cisco CUCM, …)
3) Integrate with APIC-EM NIB and Easy QoS
4) Communicate and Operate with predictableQoS and SLA
See: www.italtel.com/products/sdn-monitoring-automationhttps://marketplace.cisco.com/catalog/companies/italtel-s-p-a/products/netwrapper--2
WAN
Branch Branch
2)
3)
1)
Service Topology
Analyzer
Policy Engine
QoS
Adapter
CAC
AdapterNetwrapper
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
5. Read Results
4. Wait for Task Completion
APIC-EM 1.4 – Command Runner
Problem: A controller API which is model-based and policy-driven is great – but sometimes we just need some arbitrary operational data. Why can’t I just run a plain old show command via the API?
Solution:
1. Upgrade to APIC-EM 1.4
2. Select Devices from Inventory
3. Run Commands
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
5. Read Results
4. Wait for Task Completion
APIC-EM 1.4 – Command Runner
Problem: A controller API which is model-based and policy-driven is great – but sometimes we just need some arbitrary operational data. Why can’t I just run a plain old show command via the API?
Solution:
1. Upgrade to APIC-EM 1.4
2. Select Devices from Inventory
3. Run Commands
• POST a cli read request using/network-device-poller/cli/read-request
accepts a JSON-encoded request
maximum of 100 device IPs and a maximum of 5 commands)
returns a Task ID, which can be polled for status:/task/{taskId}
• 3) when the task is complete, the response will return a File ID.
• Resulting file contains the command output:/file/{fileId}
PSOCRS-3114 51
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
5. Read Results
4. Wait for Task Completion
APIC-EM 1.4 – Command Runner
Problem: A controller API which is model-based and policy-driven is great – but sometimes we just need some arbitrary operational data. Why can’t I just run a plain old show command via the API?
Solution:
1. Upgrade to APIC-EM 1.4
2. Select Devices from Inventory
3. Run Commands
[{'commandResponses': {'BLACKLISTED': {},
'FAILURE': {},
'SUCCESS': {'show configuration id detail': 'Configuration '
'version '
': 56303\n'
'Last '
'change '
'time '
': '
'2017-01-19T06:12:53.573Z\n'
'Changed by '
'user '
': cisco\n'
'Changed '
'from '
'process '
': Virtual '
'Exec',
'show ip interface brief': 'Interface '
'IP-Address '
'OK? Method '
'Status '
'Protocol\n'
'Embedded-Service-Engine0/0 '
'unassigned '
'YES NVRAM '
'administratively '
'down down \n'
'GigabitEthernet0/0 '
'172.16.2.2 '
'YES manual '
'up '
'up \n'
'GigabitEthernet0/1 '
'10.2.2.1 '
'YES manual '
'up '
'up \n'
'GigabitEthernet0/2 '
'10.2.1.18 '
'YES manual '
'up '
'up \n'
'Loopback0 '
'10.255.2.1 '
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
5. Read Results
4. Wait for Task Completion
APIC-EM 1.4 – Command Runner
Problem: A controller API which is model-based and policy-driven is great – but sometimes we just need some arbitrary operational data. Why can’t I just run a plain old show command via the API?
Solution:
1. Upgrade to APIC-EM 1.4
2. Select Devices from Inventory
3. Run Commands
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
Network
Example: Visualizing Multicast
Problem: In a Hospital, Multicast is used for critical Medical Equipment as well as Patient Entertainment and Media – data privacy is a key concern. How to visualize the relevant multicast information?
Real-World Example
1)
Multicast Visualizer App
2)
Solution: Harvest information from the network and create custom, augmented displays
1) Collect relevant Topology, Inventory and Host information from APIC-EM
2) Augment with Multicast tree(s)
3) Use NeXt UI to for visual representation
4) Share with operational staff
See: http://www.anyweb.chhttp://www.hsr.ch
NeXt UI Toolkit3)
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
Cisco Digital Network Architecture
Automation
Abstraction & Policy Control
from Core to Edge
Open & Programmable | Standards-Based
Open APIs | Developers Environment
Network-enabled Applications
Policy | Orchestration
Infrastructure
Physical | Virtual | Programmable | App Hosting
Analytics
Network Data,
Contextual Insights
Insights &
Experiences
Automation
& Assurance
Security &
Compliance
Cloud Services and Management
Cloud-enabled | Software-delivered
Principles
PSOCRS-3114 56
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
Cisco Digital Network Architecture
Automation
Abstraction & Policy Control
from Core to Edge
Open & Programmable | Standards-Based
Open APIs | Developers Environment
Network-enabled Applications
Policy | Orchestration
Infrastructure
Physical | Virtual | Programmable | App Hosting
Analytics
Network Data,
Contextual Insights
Insights &
Experiences
Automation
& Assurance
Security &
Compliance
Cloud Services and Management
Cloud-enabled | Software-delivered
Principles
PSOCRS-3114 57
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
DevOps
Separation of IT areas and buying
centers preventing IT to move at the
speed demanded by the business
Business Owners and App
Developers went straight to Public
Cloud to meet agility and demand.
Security and Data Sovereignty arise.
Focus evolved from Consolidation to
Automation and now it’s all about
Consumption
Operations become bi-modal – IT
governance AND agile business
interaction.
Shift from “how it works”
to “how to consume it”
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
Interacting with Humans – #1 Requirement
PSOCRS-3114 59
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
Enable
• Rapid Adoption- TTFHW (time-to-first hellow world): Minutes- TTFPP (time-to-first production pilot) : Hours
• Scale and Quality Interaction- with the same skills, technologies, architecture and tooling
Interacting with Humans – #1 Requirement
PSOCRS-3114 60
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
Interacting with Humans – NeXt
Problem: How to quickly provide a Graphical UI for network-centric custom SDN/DevOps Applications ?
Solution: NeXt
Embedded User eXperience for Network UIs
• HTML 5 / JavaScript based
• Open source
• Developed within Cisco
• Used by APIC-EM, Glance, DNA and others
• Rapid Adoption
developer.cisco.com/site/neXt/ JavaScript CoreOOP/MVVM/Data Binding/Data Type
Topology Component
Web Applications
UI CoreUI Component/View Engine/DOM/AOP/Application Support
PSOCRS-3114 62
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
NeXt is on DevNet – Try it Out
PSOCRS-3114 63
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
It is all open sourced now for free with eclipse license 1.0
PSOCRS-3114 65
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
• index.html your web page
can be dynamic, no static body elements required
• Data.js topology data
single topology object, from file or in memroy
• Shell.js (custom) behavior
extend and override for custom behavior
default functionality is present already(pan, zoom, select, tooltips, colors, etc)
Anatomy of a NeXt UI
<html>
<head>
<link rel="stylesheet" href="dest/css/next.css">
<script src="dest/js/next.js"></script>
<script src="Data.js"></script>
<script src="Shell.js"></script>
</head>
<body>
</body>
</html>
var topologyData = {
nodes: [
{"id": 0, "x": 050, "y": 100, "name": "65.1.1.46"},
{"id": 1, "x": 100, "y": 50, "name": "AP7081.059f.19ca"},
{"id": 2, "x": 150, "y": 100, "name": "CAMPUS-Access1"}
],
links: [
{"source": 0, "target": 1},
{"source": 1, "target": 2}
]
};
PSOCRS-3114 66
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
NeXt on DevNet
• Documentation
• Tutorials and Labs
• Downloads
• Community
http://developer.cisco.com/site/neXt/http://communities.cisco.com/community/developer/devnetlabs/next
Sharing and Running NeXt Examples
• Works best on Platforms such as JSFiddle.net or Codepen.io
http://codepen.io/collection/nrBeEQ/http://codepen.io/collection/nMWevE/http://jsfiddle.net/user/nextsupport/fiddles/
Engage with your peers/users
Sharing NeXt Code – Client Side JavaScript
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
Interacting With Humans – ChatOps
PSOCRS-3114 69
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
Developer Portal Interactive Docs
Server SDKs
Cisco Spark for Developers
24/7 Dev Supporthttps://developer.ciscospark.com/
PSOCRS-3114 70
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
Interacting with Humans – Spark
SPARK_HEADERS = {'Content-type': 'application/json',
'Authorization': 'Bearer YOUR-ACCESS-TOKEN'}
msg = json.dumps({'roomId':SPARK_ROOM,
'text':'Hello Spark'})
q = requests.post('https://api.ciscospark.com/v1/messages',
data=msg,
headers=SPARK_HEADERS)
Problem: How to post instant information to a chat room and/or interact?
Solution: Use the Cisco Spark REST APIs
• Login to developer.ciscospark.com
• Copy Access Token
• Query Roomsdeveloper.ciscospark.com/endpoint-rooms-get.html
• Copy Room ID
• Post
PSOCRS-3114 71
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
Spark API GET vs. Webhooks vs. Bots
1. User’s Clients interact with
the Spark Service
2. Scripts and Apps can GET or
POST messages by calling
the Spark API3. A webhook allows an App to
subscribe for Notifications from
Spark in real time
4. Apps which interact with other
users via Spark can register as
Bots – much like humanoids
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
Example: ChatOps with Humans Bots
Bot
Human: @Bot Who has the lease for 10.100.252.43?
Bot: 10.100.252.43 is leased by …
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
Interacting with Humans – ChatOps
Problem: What if your Ops users are road warriors, managers and remote workers?
Solution: ChatOps – Integrate via Cisco Spark REST APIs and/or Tropo.com
Demo at Italtel Booth G12 – Hall 3.2
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
Example Bot: Exploring and Interacting
Problem: How to explore SDN Controllers and DevOps-style Human Interaction?
Real-World Example
Solution: Combine a few things:
• DevNet Sandbox
• APIC-EM in the Sandbox
• APIC-EM REST API via Python
• Spark REST APIs
Then query host information in APIC-EM from a Spark Room
See: https://github.com/CiscoDevNet/awesome-ciscospark and
https://github.com/CiscoDevNet/spark-webhooks-sample
PSOCRS-3114 76
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
Solution: Tropo Scripting and Web APIs
• Voice Interaction APIs
• SMS/Text Interaction APIs
• Custom logic can be
• cloud-hosted (Scripting API)
• on-premise (Web API)
• Rapid Adoption via PHP, Ruby, Python, JavaScript, JSON, Groovy, …
www.tropo.com/docs/scripting/quickstarts
www.tropo.com
answer()
say("Hello World")
hangup()
answer();
say("Hello World");
hangup();
{"tropo":[
{"say": "Hello World"}
]}
Interacting with Humans – Tropo
Problem: How to automate Phone Interactions ?
<?php
answer();
say("Hello World");
hangup();
?>
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
Example - Simple IVR Readout and Choice
• Create an App in Development Mode
• Script based on QuickStart Examples
• Call in to test (+41 43 508 13 03)
• Evolve ...
Interacting with Humans – Tropo
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
Automation
Abstraction & Policy Control
from Core to Edge
Open & Programmable | Standards-Based
Open APIs | Developers Environment
Network-enabled Applications
Policy | Orchestration
Infrastructure
Physical | Virtual | Programmable | App Hosting
Analytics
Network Data,
Contextual Insights
Cloud Services and Management
Cloud-enabled | Software-delivered
Cisco Digital Network Architecture
Cloud-Level APIsExamples include: Case API, proTACtive,
apiconsole.cisco.com, ...
Controller-Level APIsExamples include: APIC-EM NB REST API,
DNA Analytics NB API, ...
Infrastructure-Level APIsExamples include: RESTCONF, Open Service
Containers, embedded EEM/Python, ...
PSOCRS-3114 82
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
What can DevNet do for me?
Accelerate Your Journey as you and your business adopt Programmability and DevOps Practices
Learn InspireCode
PSOCRS-3114 83
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
Helping you on the Journey….
DevNet membership
350,000+
Getting Started and API
Reference Guides
300+ Network
Partners and Growing
250+ “Compatible”
Network Solutions
Learn InspireCode
Technology Tracks
Learning Paths
DevNet Zone
Roadshows &
Pop-up Events
Certification ProgramComing in 2017
Sample Applications 1500+ SolutionsDevNet Express
40+ DevNet Learning Labs
Structured TrainingeLearning Instructor Led
Community and
Pay-for Developer Support
40+Developer
Sandboxes 4,400+ Companies
9,800+ DevelopersCisco Professional Services
2500+ Partners Strong
PSOCRS-3114 84
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
• Self paced learning
• Modular format (modules 10 – 45 min in duration)
• Beginner and refresher content
• Content includes; programming technologies, concepts and APIs
learninglabs.cisco.com
DevNet Learning Labs
PSOCRS-3114 85
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
Join a DevNet Express
DevNet Express Event Team
“Educate and equip customers and partners
to begin leveraging
next-generation solution sets – powered by
APIs and Programmability.”
PSOCRS-3114 86
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
DNA Programmability
• Learn and be inspired
• Meet with Peers
• Engage with DevNet
• Lead the transformation
• Seed Talks, Hands-On Missions, Fun, Collaborative and Engaging
See http://hackathon.cisco.com/events
Join a DevNet Express
Hackathon Instructor-Led
Training (ILT)
free flowing step-by-step
Technical
Seed Talks
Side-by-side
Exploration
Hands-on
Missions
LEARN, PLAY, AND GET HANDS ON WITH”
• APIS
• LEARNING LABS,
• CODING CLASSES,
• WORKSHOPS,
• PRODUCT DEMOS,
AND MUCH MORE….
Let’s Connect Follow @CiscoDevNet #DevNet
To learn more about the API just described and other development opportunities…
Visit the DEVNET ZONE!
LEARN
CODE
INSPIRE
CONNECT
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
Complete Your Online Session Evaluation
Don’t forget: Cisco Live sessions will be available for viewing on-demand after the event at CiscoLive.com/Online
• Please complete your Online Session Evaluations after each session
• Complete 4 Session Evaluations & the Overall Conference Evaluation (available from Thursday) to receive your Cisco Live T-shirt
• All surveys can be completed via the Cisco Live Mobile App or the Communication Stations
PSOCRS-3114 89
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
Continue Your Education
• Demos in the Cisco campus
• Walk-in Self-Paced Labs
• Lunch & Learn
• Meet the Engineer 1:1 meetings
• Related sessions
PSOCRS-3114 90
© 2017 Cisco and/or its affiliates. All rights reserved. Cisco Public
SDN @ CiscoLive 2017
Software-Driven Network Architectures
• Analytics
• Automation
• Programmability
• Virtualization
Highlights Include:
BRKSDN-1009 Python 101 for Network Engineers
BRKSDN-2935 From Zero to Network Programmability in 90 minutes - APIC-EM, Prime Infrastructure, UCSD, Spark and Tropo
BRKARC-3004 APIC-EM: Policy automation with DNA and network automation easy, fast, reliable
BRKSDN-1001 Programming Cisco APIC Enterprise Module with visual oriented programming languages
BRKSDN-2046 DNA Quality of Service
BRKSDN-2066 Service Function Chaining: Programming Your Data and Service Planes
BRKSDN-2116 Containers on routers and switches: Run your apps and tools natively on Cisco boxes
BRKSDN-3004 DNS-AS - How to use DNS as a Source of Metadata to Identify your Applications for QoS and Beyond...
BRKSDN-3900 Network Automation with the Meraki API
BRKSDN-2901 Next-gen Network Telemetry is Within Your Packets: In-band OAM
PSOCRS-3114 13 Smart Ways to Program Your Cisco Network
TECSDN-2602 Enterprise SDN: Architectures and Key Concepts
TECSDN-3602 Enterprise SDN: Advanced Network Programming - Hands-On Lab
TECSDN-3600 APIC-EM: Redefining the Campus and Branch through a policy based controller
LTRSDN-2500 A Practical Look at Cisco Application Policy Infrastructure Controller Enterprise Module (APIC-EM): Hands-On Lab
LTRSDN-2870 Implementing Cloud based virtual managed services with NFV & vBranch