1 2 3 Previous Next


256 posts

Lots of exciting news for everyone leveraging Open NX-OS this week, and I figured it was a good reason to pull it all together in one place.


New code!

Yep, that's right, the latest version of Open NX-OS was posted to CCO on May 17th.  Release 7.0(3)I6(1) (sometimes called the 'F' release) is now available.  Several new features are in this release, including some new NX-API REST commands.  Checkout the Release Notes for full details.


Updated DevNet Site for Open NX-OS

nx-os on devnet.png

To go along with the updated code, we've been hard at work providing a fresh look and updated content to the Open NX-OS Site up on DevNet.  On this new page you'll find quick links to the most common network programmability topics, making it easier than ever to get started.  And we've got new Quick Start Guides for Model Driven Programmability with YANG, POAP, Streaming Telemetry, Guest Shell, Configuration Management, and Ansible.  Definitely check out the site today!


New Developer Tooling Resources

APIs are great, but what about making it easier to program with them?  With that need in mind we are adding new "Developer Tooling" documentation to our content on DevNet, and Open NX-OS is one of the first pages to get the treatment.  On this page you'll find details about the available DevNet Sandboxes for NX-OS, how to leverage Vagrant and the Nexus 9000v to have a local dev environment, info on the Nexus 9000v Virtual Switch, Sample Code and Learning Labs.  This is fresh new content that we will be regularly updating with new guides and information as they become available, so check back regularly!


Still More to Come!!!

We aren't done yet, not even close.


We are hard at work updating the Open NX-OS Sandbox offered by DevNet Sandboxes to not only the latest code, but expanding it out to offer four, yes four, N9000v switches arranged in a Spine Leaf topology.   The new Sandbox will also come with a GitHub repository with sample code and configurations developers can use as starting points or inspiration.  Look for this new Sandbox in early June!


And what about Learning Labs you maybe asking... well we've got lots in store for you there too.  A whole new DevNet Express for Data Center Infrastructure Track is being developed where Open NX-OS will have a large role.  But if you can't wait for a DNE event to come near you, we'll also make the labs available at anytime via Learning Labs on DevNet.  Expect these around Cisco Live US 2017.


So... what do you think?  Got any suggestions for other resources or content.  Let me know on Twitter, or in the comments!

Okay...A slight admission - this blog is an update from my previous blog on blockchain at CiscoLive - but you should totally still read it!

Blockchain - Now there’s a word that has many an industry worried and excited in equal measure. As well as having boardroom execs raising eyebrows everywhere, it has developers the world over salivating at the possible applications of the technology.

"Why all the interest?”…I hear you ponder.

Because, blockchain technology, the technology behind many a cryptocurrency including Bitcoin and numerous others, has the potential to revolutionize and completely disrupt how numerous global business models function today. From finance and healthcare to the music industry, IoT enablement and beyond.

“Uh-huh…Really?”, I hear you scoff…”How so?"

Blockchain technology was originally developed to power the cryptocurrency Bitcoin. The further application of this technology across industries has since began to emerge and is now recognised to have the potential to change many of them, from banking applications and transactions, through to energy management and smart metering applications.

“OK. Sounds very grand. But get to the tech. WHAT is a blockchain?”

In essence, a blockchain is a cryptographically secure record, or ledger, of digital events (say, an IoT device like a Drone being registered at manufacture). This record is totally distributed - shared among many different people and parties. BUT, very secure. It can only be updated by consensus of a majority of the participants in the system – participants being person-owned compute ‘nodes’ that are part of a particular blockchain network. Once a ‘block’ of transactions is validated and entered into the ‘chain’ (‘block-chain’ - clever, huh?!), the transaction information can never be erased.


“Alright…so....what can developers do with it?"

A lot. Blockchains these days come with the ability to write code and deploy to the chain, much in the same way as regular transactions are recorded. This code can then be called and executed on demand or via events (such as time events, other code executing, etc.). This means you have a global database and system of record that uses  every end node in the world attached to the chain as processing power for your application. A world computer!


“Woah! I’m just about holding it together here, where can I get more information on the tech and the applications / use cases?”

At Cisco Live Las Vegas at the end of June, Vallard Benincosa and I will be providing a 101 session on blockchain technology, code uses that will hopefully expand your mind! We’ll also talk about the pitfalls in today’s blockchain offerings and there’ll be a demo and we’ll provide excellent stage banter for you to cringe and shake your head at, too. Not to be missed for anyone wanting a glimpse into the world of Blockchain!


Feel free to register here.


See you there!



One thing that’s always constant about the tech industry is that it never stands still.  Physical servers have filled datacenters for years and as recently as the 1990’s, application architectures had to treat them with great care as a scarce resource, like pets, because they took months to refresh. Virtual machines then came along and originally intended to separate resource usage but since their creation time was on the order of minutes so developers could treat them like cattle, which gave rise to a different type of architecture that assumed compute resources could be created and destroyed at will.



The current wave of technology involves containers, which uses a different and lower overhead resource separation technique than the VM stage that preceded it.  As a result, application architectures are comprised of smaller pieces of functionality that bind to one another over APIs.  These “microservices” can take advantage of the seconds it takes to spin up a new container for autoscaling and disaster recovery purposes.  To continue the pets/cattle analogy this wave is sometimes referred to as “chickens” because containers are smaller and more portable than VMs.


Serverless: The Next Wave Beyond Containers

But what if you want to create an application architecture based on even smaller components than what you can accomplish with microservices?  What if you could load single purpose functions in milliseconds and chain a set of them together with a set of events?  How easy would it be to get started if you had a million free function executions per month and you only got charged by the function execution, not for idle time?


The next technology wave looms on the horizon – feathers, if you will – and it’s called Serverless or sometimes Functions-as-a-Service.  It might sound a little weird for a company like Cisco that sells servers to be talking about a technology called Serverless, but in a session at Cisco Live (DEVNET-1193 Tuesday, 6/27 1:00PM-1:45PM Classroom 2) Tom Davies ( thodavie ) and Pete Johnson ( petercjo ) will explain how servers are indeed still there underneath the hood of a Serverless application architecture.


We’ll be discussing how Serverless works, how you can take advantage of the growing ecosystem of services and frameworks in this space, and why you may or may not consider a Serverless approach, all before providing a demonstration of this emerging technology.


Cisco Live! is a great time to learn about new things and this session is a perfect opportunity to get your first exposure to the next step in the evolution of application architectures!

Cisco Live is nearing and it is time to set your schedule.  I’m excited to have a new session BRKDEV-2000: NetDevOps: Let's Do it Like They Do in the Developer Channel.  I apologize for the poor wordplay on the Bloodhound gang song.  But since the scheduling gods gave me the 830 session after the party we will need to either keep the party going or wake everyone up with fun and exciting Network Automation!


I noticed that the session is somehow already full.  But have no fear.  Get on the waitlist.  Think about how many of you went to the Thursday 830 session before?  If you managed to go, I’m sure you recall many open seats.  Many prospective session-goers will fall victim to the snooze button or booze glutton but lose out-on BRKDEV-2000.


What is DevOps?


It is the trend to integrate application development with the operations team that support the end product.  While that concept of development may not apply to Networking as much as other IT fields, the Network must keep up with the more rapid changes to support those Applications.  This means more Access-list updates, Load-balancer changes and even Routing tweaks.  To keep up, we can leverage the same cool tools the DevOps teams are using and make our lives less mundane (maybe even insane or profane) and focus on the fun stuff like deploying new advanced technology or going home at a decent hour.

So how does BRKDEV-2000 help?  It is a session to help the Network Engineer navigate the waters of DevOps.


We will dip our toes into APIs and the many opportunities for integration they present, wade through concepts of Configuration Abstraction and Infrastructure as Code, and lastly we will get our feet wet with Continuous Integration through Automated Toolchain as a method for versioning control, collaboration, validation and implementation.  Please take a look at session information for all the deep dives to plunge deeper into each of the topics like Git, Python, Python for networking, Network Device APIs, Infrastructure as Code, CICD Pipeline to fully quench your curiosity.  There is even a Learning Path for Network Engineers looking to get started with Network Programmability.


I hope to see you at Cisco Live where I will present this and a few more Programmability Sessions.  But if you can’t make it please take advantage of the library of session videos and presos, DevNet’s free lessons and sandbox, and don’t forget to leverage the many blogs at Cisco and DevNet.  And feel free to hit me up at @sdn_dude on twitter.

Ever wanted to get started developing with containers but didn’t have an easy button for deploying or managing them? Wanted to get to understand how to use Kubernetes and how it can help you manage your containers, but didn’t have the time to deploy or host your own cluster? Or maybe you’re a little more advanced and want to test out the latest container networking newcomer on the block – Contiv – to manage your networking and bandwidth policies?


Well, Great news container fans! Our new Kubernetes with Contiv Sandbox removes all these barriers for you!


From today, you can hit the Sandbox Catalog and reserve yourself your very own mini Kubernetes Cluster with Contiv plugged in and ready to go! And of course – it’s FREE!

Screen Shot 2017-05-05 at 16.49.57.png


For a bit of background on Kubernetes – it’s an open-source system for automating deployment of, scaling, and managing containers and containerized applications. It groups containers that make up an application into logical units for easy management and discovery. Check out https://kubernetes.io/ for more info there.


Contiv is also open source and provides a networking fabric for your containers, combining great network performance and an application-orientated policy engine for communication between containers and bandwidth management. You can find more on Contiv here: http://contiv.github.io/.

Together they provide a fantastic platform for deploying and managing cloud native and containerised applications and solutions!


Screen Shot 2017-05-05 at 17.05.32.png


With this sandbox, you’ll get a Kubernetes cluster containing one master node and three minions. The Kubernetes UI is also installed and can be hit from your local machine once you’re VPN’ed in. You’re free to get a great understanding of Kubernetes and how and use the cluster to deploy your containers as you see fit.


  Further, Contiv is configured and ready to go to allow container networking of your pods and for you to be able to manage network and bandwidth policy between them. You can do that either via the command line or the UI we’ve also set up for you. We’ve given you a simple ‘Hello World’ command line example to whet your appetites!

Screen Shot 2017-05-05 at 16.43.17.png


And if that wasn’t enough, we’ve also provided a little DevBox for you to use. It’s crammed with Dev Tool goodies you might find useful, but may not want to deploy to your local machine to begin with – just log into the DevBox and the tools are yours!


We’re really hoping that you enjoy the new sandbox and please do fire over feedback you might have in the forums!




Ctrl Alt Delete Hate is a hackathon, powered by AngelHack, Code For A Cause, Tech Stands Up and We Persist, designed to leverage the power of people and technology to fight bigotry, hate, racism, and any forces seeking to divide humanity. We believe that the technology community has a responsibility to organize and utilize our collective skills and resources to protect and serve a unified, peaceful and inclusive society.

This event was held on April 1st - April 2nd, 2017 in the ThoughtWorks co-working space in San Francisco, CA.

On day 1, individuals made post-its on the walls. There was categories of skills and attendees would put their name next to what their skills are. Later in the day, people began to collaborate and find the people who matched the skillsets to put their team together. (Example: UX, Designer, Developer Frontend, Developer Backend, Project Manager, etc..). By the end of the day, teams were formed and the creative juices began to flow.

By day 2, there were 6 teams giving their last touch ups and ready to give their 60 second pitches. Every single idea was great!

Cisco DevNet was present (or you can say me!), who is also a partner sponsor of AngelHack. It was a lot of fun giving out swag and talking to attendees. This event was different than any hackathon I’ve been to. Attendees were not interested in competing or winning any prizes. (It was embarrassing that I didn't realize this until the end. People had no interest in prizes I had to offer. I should have asked the organizers for more details). The other sponsor gave out a few sweaters and the rest gave out stickers. Although people were very engaged in their project, they were still interested in what Cisco was doing in their DevNet program.

This type of hackathon is the future. Hackathons should be a place where people gather to share ideas, passions, and to solve a problem by teaming up with individuals who share different skillsets. Attendees were not stressed out and were well rested and seemed to be really enjoying working on their applications.

Let’s keep it this way. Until next time!

At Sandbox, we enjoy making access to the latest Cisco APIs quick and easy for everyone in the DevNet community.  One of the ways we achievie this is building more Always-on sandbox environments and we have continued this with our Connected Mobile Experience (CMX) labs.


We have just launched two new CMX always-on sandbox labs, CMX Cloud and CMX Presence. We have also updated or CMX location sandbox to 10.3 and added some new content. More details below. All of the below labs are located in the Networking category of the sandbox portal.



CMX Cloud


Screen Shot 2017-05-02 at 11.08.43.png


The new CMX Cloud Sandbox is essentially running the CMX software in a Cisco supported cloud that is accessible and delivered as a software subscription to the customer. Both the software and support are included in the service offering. This sandbox contains the latest version of the CMX Cloud package, Connect with Presence Analytics, and is tied to a simulated environment that contains an access point and clients. This allows you to utilise the full range of APIs offered by the Cisco CMX Cloud interfaces.


Currently the CMX cloud sandbox can be accessed through http://cmxcisco.com. For more details, go to the Sandbox topology page here.


CMX Presence

Screen Shot 2017-05-02 at 11.08.56.png


This new Sandbox lab contains the latest version of CMX Presence and is tied to a simulated environment that contains a virtual campus, building, floor, access points, and clients allowing you to utilise the complete range of APIs offered by the CMX REST interfaces



  • New always on Sandbox with Cisco CMX 10.3
  • Publicly available CMX Presence: http://cmxpresencesandbox.cisco.com/
  • CMX monitoring AP with 20 client
  • Sample python code to help you get started.


For more information on this, go directly to the Sandbox page here.



CMX Location

Screen Shot 2017-05-02 at 11.09.20.png


We have updated the existing CMX Location Sandbox. This lab now contains the latest version of CMX Location and is tied to a simulated environment that contains a virtual campus, building, floor, access points, and clients.


  • Updated Always on CMX Location sandbox with CMX version 10.3
  • Updated URL for CMX Location:   http://cmxlocationsandbox.cisco.com/
  • CMX monitoring 10 Access points and 80 clients
  • Sample python code example of REST Location API calls


More information is available on the topology page here.


As always, let us know what your think. Your feedback is greatly appreciated. If any issues arise, support for the all of our Sandbox labs is provided in our community page here


Best Regards,


DevNet Sandbox Team.

Hi Devnet Users,


We recently finished updating our Smart+Connected Digital Platform (S+CDP) sandbox to version 3.1.1.


S+CDP is an IoT solution targeting public sector cities and provides automation of services such as parking, lighting, and air quality.  While we have a fully functioning S+CDP Sandbox for you in DevNet to play with right now, in production this a Cisco cloud hosted solution.  This link will take you to the S+CDP product page for more info.


Version 3.1.1 is primarily an S+CDP architecture evolution.   Previously, the product used a MuleSoft Anypoint server within the hosted cloud.  With this release, a new WS02 Enterprise Service Bus Server is designed to be deployed to the customer premise.   But to prevent you, the user, from having to acquire and deploy a WS02 server, this server remains hosted in the Sandbox environment.

From the API authorization perspective, the clients/users have a common client ID and secret, but different user and access keys. This aids in simpler policy management and better metering capabilities. The new release also provides simpler licensing.  Version 3.2 is expected to be released later this year with additional fun features for you to explore.


Having previously worked for a county IT department, I find it exciting to see the automation capabilities now available to municipalities!  I expect our communities will benefit through this type of service immensely. 


If you’d like to explore the S+CDP lab and the associated APIs, locate and reserve the S+CDP lab from this page.



In Vegas at Cisco Live we are introducing a new DevNet Learning Path called “Network Programmability Foundations” and I’m pretty excited to see it come together.  The idea behind the path came from many discussions with attendees within the DEVNET Zone at recent Cisco Lives in Melbourne, Berlin, Cancun and last year in Vegas.  Network Programmability is such a large topic, that it can be a bit overwhelming and difficult to figure out exactly how to jump in, and where to start.


"Network Programmability Foundations” was designed to offer a currated set of sessions and activities scheduled through the week within DEVNET Zone that provide a starting point covering both core programming and network programmability topics.  The topics covered in the classroom and workshop sessions are in the categories of


  • General Strategy
  • Coding and DevOps
  • Device Capabilities & APIs
  • Network Controllers


Cisco Live session registration will be opening soon, and within the catalog you’ll find “Network Programmability Foundations” as a Learning Path to help as you arrange your week.



Click HERE to check out the scheduler!  

Here’s a preview of what the track has to offer! 



DEVNET-1040: Python Programming for Network Architects and Engineers - Part 1

In this first installment of the three part coding series designed for Network Architects and Engineers you will learn core Python skills and look at libraries and templates helpful for working with network objects and devices.



The new industry standards for model driven programmability are all about YANG Data Models and the protocols of NETCONF and RESTCONF.  In this session we’ll demystify exactly what problems they solve, how these technologies relate to each other, and get you ready to get hands on in the workshops!


DEVNET-2561: DEVNET Workshop - Intro to NETCONF and YANG

Armed with an understanding of the protocols from DEVNET-1721, in this DEVNET Workshop you’ll get hands on experience using NETCONF along with YANG Data Models with routers and switches.

NOTE:  Also offered on Wednesday


DEVNET-2036: APIC-EM API Deep Dive

The APIC-EM Enterprise Network Controller is a foundation element of the Digital Network Architecture and offers a platform for network configuration, operation and troubleshooting through it’s many applications.  In this session you’ll learn all about the APIs it offers for your custom scripts and apps.


DEVNET-1021: Cisco Meraki Developers: Cloud as a Platform Overview

With Meraki, Cisco takes network programmability to the Cloud.  Learn about the capabilities of the platform to help you automate network deployments, locate devices in real-time, collect marketing data, and engage your customers.



DEVNET-1725: How to be a Network Engineer in a Programmable Age

Start Tuesday with a look at what it means to be a Network Engineer… We'll look back fondly on the early days of networking, when the it was simple and the biggest concerns we had the number of Spanning-Tree instances to run... You 'll laugh, you 'll groan, you might even get angry, but that 's okay.


DEVNET-1028: Cisco's Open Device Programmability Strategy - An Open Discussion

In this session learn about the focus and important Cisco has placed on Network Programmability across enterprise, data center and service provider.  You’ll hear about the latest advancements and capabilities around open and standard APIs, application hosting features, and Day 0 provisioning technologies.


DEVNET-1041: Python Programming for Network Architects and Engineers - Part 2

In the second part of the programming series you will build upon what you learned in Part I and to develop a set of OS and network based utilities that can be added to the Python Toolbox you started on Monday.


DEVNET-1694: Supercharge the Network with Python On IOS-XE

Python has become the language of choice for network automation, and in this session you’ll learn how with the latest release of IOS-XE you can know build and execute your Python scripts directly on routers and switches!.  Though focusing on IOS-XE, this feature also works on NX-OS and IOS-XR.


DEVNET-2101: DEVNET Workshop - NXOS in the Real World Using NX-API REST

In this hands on workshop you’ll have a chance to test drive the NX-API with some real-world examples of network programmability.

NOTE: Also offered on Thursday



DEVNET-1042: Python Programming for Network Architects and Engineers - Part 3

In the final installment of the coding series, this session builds upon the toolbox utilities created in the previous two sessions showing how to build additional Python based network programming tools. These include using the Python socket library to create a simple TCP based client/server message passing script.


DEVNET-1695: Application Hosting in IOS-XE

Learn how to leverage Guest Shell to install and host Linux Applications directly on your routers and switches in this session.  Though this session will leverage the latest IOS-XE software release, NX-OS also offers this capability and lessons learned here can be leveraged within the data center as well!



Get hands on in this workshop by working with the APIC-EM REST API to access the powerful network applications hosted on the enterprise network controller.

NOTE: Also offered on Monday


DEVNET-2556: DEVNET Workshop - Dive into Leveraging Python on IOS-XE

Put the new IOS-XE features to use in this workshop and fire-up Python directly on an IOS-XE device, explore the included Python libraries for interacting with the network element, and see how to integrate Python script execution into your operations workflows.

NOTE: Also offered on Monday


DEVNET-2557: DEVNET Workshop - Application Hosting in IOS-XE

Get ready to see how you can install and execute your favorite Linux utilities and software directly on your IOS-XE routers and switches in this session.  Don’t have any favorites?  That’s okay, you will when you leave this session!

NOTE: Also offered on Thursday



DEVNET-2000: Network Programmability with Cisco ACI

Application Centric Infrastructure (ACI) from Cisco offers a complete programmatic approach to software define your data center network.  Up level your network administration skills by learning the system programmatic API's, tools available to automate tasks in the environment.


DEVNET-1002: DEVNET Workshop - NetDevOps for the Network Dude - How to get started with API's, Ansible and Python

DevOps isn’t just for application developers or system admins.  Get hands on with the tools that can help you really up level your network automation practices.  Bathrobes and bowling shoes optional attire.

NOTE: Also offered on Tuesday


DEVNET-2044:  DEVNET Workshop - “Exploring” NETCONF / RESTCONF / YANG API

Attend this jam packed workshop for even more hands on with the key model drive programmability technologies of NETCONF/RESTCONF/YANG.

NOTE: Also offered on Tuesday


Ready, set, schedule! 


I know what you are thinking… holy buffer overload Batman… that’s quite a schedule… and yes it is.  But believe it or not, it’s only a selection of the great content we have in store for you within the DEVNET Zone covering network programmability topics.  If you have been dabbling in the topics for awhile now, we have more sessions on topics like network analytics, zero touch provisioning, YANG programming with ydk, network function virtualization, and Open Source projects like OpenDaylight.  Not to mention all the sessions on IOT, Security, Collaboration, etc, etc, etc…


And stay tuned for more details on other elements of the “Network Programmability Foundations” program.  We’re planning some special swag for participants, meet-ups and all around social networking before, after and during Cisco Live proper!  Let me know what you think in the comments!




I’ve been long waiting for the latest version of IOS-XE to ship, and on April 13th IOS-XE 16.5 “Everest” posted to https://cisco.com/go/software for the ISR, ASR, and CSR routing platforms (still to come are the Catalyst Switching lines).  The “Everest" release of IOS-XE is jam packed with new programmability features that I think everyone will agree are excellent additions as network programmability is becoming a mainstream topic for us all.  Some of the highlights of this release include


  • A modular approach to YANG Data Models for Cisco IOS-XE Features (ISR, CSR, ASR)
  • Support for Zero Touch Provisioning (ZTP) for Day 0 infrastructure setup (ISR)
  • New Application Hosting capabilities provided by a Linux Guest Shell (ISR)
  • Ability to develop and execute Python scripts On-Box (ISR)


Note: Not all IOS-XE platforms support all features in release 16.5.  Future software releases will extend features to other platforms. 


In future blog posts I’ll dive deeper into all of these features, but today we’re going to look at the new Python execution capabilities.


Python and GuestShell


The ability to execute Python code directly on an end device is a part of the Application Hosting capabilities provided by GuestShell.  We’ll go deeper into GuestShell on another day, but for now it is important to understand just some of the basics.  GuestShell is a containerized Linux runtime that can be enabled on your IOS-XE device.  On the ISR 4000 platforms, Guest Shell provides a CentOS 7 environment in which you can install and run applications, such as Python scripts.  From within Guest Shell you and your applications have access to the networks of the host platform, bootflash, and IOS CLI.  Guest Shell is isolated from the underlying host software to prevent interference of the core network functions of the device.


And I can’t go any further without mentioning that though a new feature to IOS-XE, Open NX-OS has offered Guest Shell and Python for awhile now.  In fact the feature within IOS-XE is modeled after how it works within NX-OS so much of what we’ll look at here applies to NX-OS as well!


Guest Shell Quick Start


Enough talk… let’s get into some config and code!  For this blog post I am using an ISR 4431 running 16.5.1b.  The router was recently upgraded to 16.5 and has little other configuration in place.  Before we can jump into doing something interesting with Python, we need to get Guest Shell up and running.


Step 1: Enable IOX

IOX is the manager that handles guest shell and other 3rd party applications in IOS-XE.


dev4431-1#conf t

Enter configuration commands, one per line.  End with CNTL/Z.




dev4431-1#show iox

Virtual Service Global State and Virtualization Limits:

Infrastructure version : 1.7

Total virtual services installed : 0

Total virtual services activated : 0

Machine types supported   : KVM, LXC

Machine types disabled    : none

Maximum VCPUs per virtual service : 2

Resource virtualization limits:

Name                         Quota     Committed     Available


system CPU (%)                  75             0            75

memory (MB)                    512             0           512

bootflash (MB)                1000             0          1000

IOx Infrastructure Summary:


IOx service (CAF)    : Running

IOx service (HA)     : Not Running

IOx service (IOxman) : Running

Libvirtd             : Running


It should take only a few minutes for IOX start up.  The HA service may not start on all platforms.


Step 2: Enable Guest Shell


From enable mode, you can now start the Guest Shell.  It will take a few minutes to finish the startup procedure.


dev4431-1#guestshell enable

Management Interface will be selected if configured

Please wait for completion

dev4431-1#show app-hosting list

App id                           State


guestshell                       RUNNING



Step 3: Setup Guest Shell for Network Access - DNS


To do anything of real interest, you need to tell Guest Shell what DNS servers to use.  We do this by setting them within “/etc/resolv.conf” just like a typical Linux OS.


! Log into Guest Shell from the router

dev4431-1#guestshell run bash

[guestshell@guestshell ~]$

# Use echo to add your DNS Server to the file.  Here I use Open DNS. 

[guestshell@guestshell ~]$ echo "nameserver" | sudo tee --append /etc/resolv.conf


[guestshell@guestshell ~]$ cat /etc/resolv.conf


# Test to see if things are working by using pip to install “requests”

[guestshell@guestshell ~]$ sudo -E pip install requests

Collecting requests

  Downloading requests-2.13.0-py2.py3-none-any.whl (584kB)

    100% |################################| 593kB 610kB/s

Installing collected packages: requests

Successfully installed requests-2.13.0


Note… if your environment requires Proxy Servers to access the internet, you will need to configure them within Guest Shell as well as DNS.



Alright, we are all set and ready for some Python Magic!


Quick Exploration of Python on IOS-XE


As Guest Shell is based on Cent OS 7, it comes with Python 2.7.5 pre-installed.


[guestshell@guestshell ~]$ python --version

Python 2.7.5


Along with Guest Shell, a few Python libraries are included for interacting with the underlying IOS platform.  Below I give a show how we can use them send commands to IOS and process the results.


[guestshell@guestshell ~]$ python

Python 2.7.5 (default, Jun 17 2014, 18:11:42)

[GCC 4.8.2 20140120 (Red Hat 4.8.2-16)] on linux2

Type "help", "copyright", "credits" or "license" for more information.

>>> from cli import *


>>> ios_version = cli("show version")

>>> print(ios_version)


Cisco IOS XE Software, Version 16.05.01b

>>> ip_interfaces = cli("show ip int bri")

>>> print(ip_interfaces)

Interface              IP-Address      OK? Method Status                Protocol

GigabitEthernet0/0/0     YES DHCP   up                    up

GigabitEthernet0/0/1   unassigned      YES NVRAM  down                  down

GigabitEthernet0/0/2   unassigned      YES NVRAM  down                  down

GigabitEthernet0/0/3   unassigned      YES NVRAM  down                  down

GigabitEthernet0    YES DHCP   up                    up

VirtualPortGroup0    YES manual up                    up

>>> # Now I’ll configure the description on an interface

>>> conf_snippet = '''interface GigabitEthernet0/0/2

...                     desc Configured by Python'''

>>> config_result = configure(conf_snippet)

>>> config_result

[ConfigResult(success=True, command='interface GigabitEthernet0/0/2', line=1, output='', notes=None), ConfigResult(success=True, command='   desc Configured by Python', line=2, output='', notes=None)]

>>> # The clip function runs a command and prints the results

>>> clip("show run int GigabitEthernet0/0/2")

Building configuration...

Current configuration : 132 bytes


interface GigabitEthernet0/0/2

description Configured by Python

no ip address


media-type rj45

negotiation auto


>>> exit()


If you prefer Python 3, you can install it like you would on any Cent OS 7 device.


[guestshell@guestshell ~]$sudo -E yum -y install https://centos7.iuscommunity.org/ius-release.rpm

[guestshell@guestshell ~]$sudo -E yum -y install python35u-3.5.3

[guestshell@guestshell ~]$python3.5 --version

Python 3.5.3


Let’s do something interesting


Okay, running live Python commands on a router is interesting, but not very powerful all by itself.  Let’s take a look at how we can combine this new feature with EEM for new and interesting options.  With the addition of Python and Guest Shell, you can now have EEM execute a Python Script as an action.  This provides the power of Python, with the event driven actions of EEM… Awesome!   For this example we’ll take a step into “Chat Ops” and our Router send a Spark message every time the configuration is changed.


Step 1:  Create a Spark Bot Account for our Router


In order to send a message with Spark, our router will need an account to use.  Rather than create a full account for every device, I’ll just create a Bot under my own Spark Account for this router.  From https://developer.ciscospark.com, I create a new bot account.  I grab the Authentication Token because I’ll need that for my script.




Step 2:  The Python Code


For this demo, I created a very simple Python Script that can be used to send a message to someone.  Here is the script.


from ciscosparkapi import CiscoSparkAPI

if __name__=='__main__':
    # Use ArgParse to retrieve command line parameters.
    from argparse import ArgumentParser
    parser = ArgumentParser("Spark Check In")
    # Retrieve the Spark Token and Destination Email
        "-t", "--token", help="Spark Authentication Token", required=True
    # Retrieve the Spark Token and Destination Email
        "-e", "--email", help="Email to Send to", required=True
    args = parser.parse_args()
    token = args.token
    email = args.email
    message = "**Alert:** Config Changed"
    api = CiscoSparkAPI(access_token=token)
    api.messages.create(toPersonEmail=email, markdown=message)


I am using the very handy CiscoSparkAPI Python module to send the message, so we’ll need to pip install that first.


[guestshell@guestshell ~]$ sudo -E pip install ciscosparkapi

Now I create  “scripts” folder in the bootflash to store this and other future scripts.


[guestshell@guestshell ~]$ mkdir /bootflash/scripts

Because this directory is on bootflash, I could create the script from my local machine and upload it using any available method to get it onto the box.  For now, I’m just going to use “vi” from within Guest Shell to create the script.


[guestshell@guestshell ~]$ cat /bootflash/scripts/spark_checkin.py


from ciscosparkapi import CiscoSparkAPI

if __name__=='__main__':

    # Use ArgParse to retrieve command line parameters.

    from argparse import ArgumentParser

    parser = ArgumentParser("Spark Check In")

    # Retrieve the Spark Token and Destination Email


        "-t", "--token", help="Spark Authentication Token", required=True


    # Retrieve the Spark Token and Destination Email


        "-e", "--email", help="Email to Send to", required=True


    args = parser.parse_args()

    token = args.token

    email = args.email

    message = "**Alert:** Config Changed"

    api = CiscoSparkAPI(access_token=token)

    api.messages.create(toPersonEmail=email, markdown=message)

Before I tie it into EEM, let’s test it real quick to make sure it works.  The script uses the common “argparse” module for Python to take in command line arguments for the token, email to send to, and message to send.


[guestshell@guestshell ~]$ python /bootflash/scripts/spark_checkin.py -t OTJjNGM1MGItZjUUyZjM0Y2ViYzc5Mjg3MGUzNTQtYTM0 -e hapresto@cisco.com

And I do indeed get the message in Spark!




Step 3: Connecting to EEM


First I drop out of guest shell and get back into IOS.


[guestshell@guestshell ~]$ exit




Next I configure the EEM Applet to use the script.


dev4431-1#config t

dev4431-1(config)#event manager applet GUESTSHELL-CONFIG-CHANGE-TO-SPARK

dev4431-1(config-applet)#event syslog pattern "%SYS-5-CONFIG_I: Configured from"

dev4431-1(config-applet)#action 0.0 cli command "en"

dev4431-1(config-applet)#action 1.0 cli command "guestshell run python /bootflash/scripts/spark_checkin.py -t OTJjNGM1MGItZjUUyZjM0Y2ViYzc5Mjg3MGUzNTQtYTM0 -e hapresto@cisco.com"




Now each time I make a configuration change, I receive the notification in Cisco Spark.  This is a very basic implementation of the “Chat Ops” idea, but highlights how quick and easy this type of thing can be leveraged with very little time, or programming skill needed.


With the power of Python, I could use ncclient and NETCONF to leverage the model drive programmability options under the hood as an alternative to the CLI options we looked at earlier this post.


Summing Up!


Wow... I hope you found this article enjoyable and got you thinking about how you might leverage this new capability of IOS-XE.  If you’d like to test out the spark_checkin.py code a little closer you can find it, along with many other Python samples posted in on GitHub in the https://github.com/CiscoDevNet/python_code_samples_network repository.


If this kind of thing has you interested, be sure to join us at Cisco Live 2017 in Vegas.  We've several sessions in DEVNET discussing the new programmability features of IOS-XE and all our platforms.  A few suggestions to take a look at include:


DEVNET-1694 - Supercharge the Network with Python On IOS-XE

DEVNET-2556 - DevNet Workshop - Dive into Leveraging Python on IOS-XE

DEVNET-1695 - Application Hosting in IOS-XE

DEVNET-2557 - DevNet Workshop - Hand On - Application Hosting in IOS-XE

DEVNET-2589 - DevNet Workshop - Hands-On - Solving Problems with Application Hosting and Guestshell

DEVNET-2102 - DevNet Workshop - Network Programmability with NXOS Using Guest Shell


Also, we've got new Learning Labs and Sandboxes planned to provide more great hands on options and info for you at anytime.


What will you use this new feature for?  Leave a note in the comments, or tweet me @hfpreston

The need for Device Independent Solutions

Controlling and monitoring your Contact Center via a simple and device free interface has been a big challenge for supervisors and system administrators. The Agents themselves would like to achieve tasks that can be done from any device.

The Cisco Contact Centers have rich REST API that are available for any developer to use for create the solutions that are desired. But it has always been a challenge to create solutions that are device independent. Browser based applications are one alternative, but they are a constant challenge to port to various browsers and their versions.


With the introduction of Cisco Spark Messaging, we now have an alternative that is truly device independent. Cisco Spark is an always-on secure way to communicate within an organization. It has a single consistent interface across mobile devices and desktops, and can be used to control and manage your appliances in any on-premises contact center





The architecture to deliver the mobile experience for a Cisco on-premises contact center is based on using the Spark Messaging platform on the devices talking to the Contact Center APIs via a Node.JS application in the middle. The Node.JS can be setup in the DMZ so that the on-premises systems do not have to be exposed to the external internet.

Spark Contact Center.jpg

The Node.JS software can be installed and run on most operating systems and is easy to setup and manage. The javascript files that run in the Node.JS environment are simple text and can be edited using any text editor.





You can get more information about Node.JS here https://nodejs.org/en/

The Node.JS software can be installed and run on most operating systems and is easy to setup and manage. The javascript files that run in the Node.JS environment are simple text and can be edited using any text editor.

A Node.JS community provides JavaScript libraries in the form of Node Packages to ease deployment and development of scripts. For this step we would need the Node package for Cisco Spark to be able to leverage the Spark APIs.

Install the Cisco Spark JavaScript SDK via the NPM

The Cisco Spark API can be easily deployed using a Node Package. For details of how to get access to this and deploy, see here:




Create a New Room

The Spark Messaging platform is based on the concept of rooms that are the way to communicate with a person or an application. The rooms can be controlled by the System administrators and provide a safe and secure way to control the flow of information.

For this step in the process, we will create a Spark room that will be the point of communication.

Easiest way is to use the API https://api.ciscospark.com/v1/rooms to create a new room.

The Spark developer forum allows the creation of rooms directly from their website here:https://developer.ciscospark.com/endpoint-rooms-post.html


or create using the following HTTP commands





      "title": "AnilMediaSenseTest" <Use your Own>


Response 200 /success


      "id": "… Room ID…",
      "title": "AnilMediaSenseTest",
      "type": "group",
      "isLocked": false,
      "lastActivity": "2016-11-28T05:24:34.806Z",
      "creatorId": "…Creator ID…",
      "created": "2016-11-28T05:24:34.739Z"




Create a New JavaScript


I named mine as BasicSparkWriteMessage.js. The code is also available in GitHub at:



// First define all the required packages

var spark = require('ciscospark');


//Get all the rooms

// Max 1000 rooms in the array

  1. spark.rooms.list({max: 1000})



    console.log ('DEBUG: Rooms Found: ', rooms.length );

        for (var i = 0 ; i < rooms.items.length ; i++)


       // Going through the rooms one by one

       console.log ('DEBUG: Room: ', rooms.items[i].title);


       // Check if you found the room you are looking for

                if ( rooms.items[i].title === 'AnilMediaSenseTest' )


           // Room found

           console.log ('DEBUG: Found Room ' );


                        // Now write a message out to this room

           return spark.messages.create(


              text: 'I am running now!',

                                roomId: rooms.items[i].id







    console.log ('DEBUG: Message Sent');


// Catch any errors



    console.log ('ERROR: ', reason);





Execute the Script

The script can be run from the command line. It needs your token information to run. The Token is available from the spark developer portal here: https://developer.ciscospark.com/#

Use the following command to run the script:


CISCOSPARK_ACCESS_TOKEN=<Your Token> node BasicSparkWriteMessage.js


The ouput of the script on my computer looks like this

spark-store: constructing boundedStorage

spark-store: retrieving Credentials:authorization

storage: getting binding for `Credentials`

memory-store-adapter: returning binding

spark-store: retrieving Device:@

storage: getting binding for `Device`

memory-store-adapter: returning binding

storage: made binding for `Credentials`

storage: made binding for `Device`

plugin-storage(Device): waiting to init key `@`

plugin-storage(Device): initing `@`

spark-store: retrieving Device:@

storage: getting binding for `Device`

storage: found binding for `Device`

memory-store-adapter: reading `authorization`

memory-store-adapter: reading `@`

plugin-storage(Credentials): waiting to init key `authorization`

plugin-storage(Credentials): initing `authorization`

spark-store: retrieving Credentials:authorization

one flight: attempted to invoke _getBinding while previous invocation still in flight

memory-store-adapter: reading `@`

memory-store-adapter: reading `authorization`

storage(Credentials): no data for `authorization`, continuing

storage(Device): no data for `@`, continuing

plugin-storage(Device): no data for `@`, continuing

plugin-storage(Credentials): no data for `authorization`, continuing

DEBUG: Rooms Found:  191

DEBUG: Room:  AnilMediaSenseTest

DEBUG: Found Room

plugin-storage(Device): waiting to init key `@`

plugin-storage(Device): already inited `@`

plugin-storage(Credentials): waiting to init key `authorization`

plugin-storage(Credentials): already inited `authorization`

DEBUG: Message Sent



Congratulations, you have created your first Node.JS script that was able to connect to the Cisco Spark Messaging system and send a message to a room that you identified.

This is the first step in the process. Once you have the basic ability to send messages down, now we can move on to the more complex steps of communicating information between the Spark rooms and the on-premises systems.



Node.JS install and documentation: https://nodejs.org/en/

Cisco Spark Node Manager download: https://www.npmjs.com/package/ciscospark

Cisco Spark Developer resources: https://developer.ciscospark.com/#

Source Code for Node.JS Scripts : https://github.com/anilve/CiscoOnPremRESTAccess


Updates from DevNet Create!

Posted by jkratky Apr 3, 2017

Codeproject-03(1).jpgWhile we are quickly working to fine-tune every detail to bring you #DevNetCreate, here's what you need to know!


What is DevNet Create?

  • IoT and Cloud Developer Conference
  • May 23-24 in San Francisco
  • 2 days full of amazing content
  • 2 session tracks: IoT & User Experience, Cloud & DevOps
  • 80 tech talks, hands-on learning, mini-hacks
  • Hosted by Cisco DevNet - while we are hosting the event, it's not a Cisco-specific show. The conference is meant for those in the industry that want to dig into the blurred lines between infrastructure and applications.

Who Are Our Key Speakers?


Want to Join Us?

  • Submit Your Session: Last Week for Call for Speakers!
    Call for Papers has been extended until April 07, 2017 23:59 PDT. We are looking for your session abstract submissions for DevNet Create.
  • Register Today! Early Bird rates apply until April 13th. Hurry, tickets are going quick and this event will sell out - don't miss out!


See you there!

JiveServlet.pngHave you heard about DevNet Create? We are launching a hands-on, inaugural industry conference for IoT, cloud, enterprise developers, and DevOps engineers. The conference is focused on bringing industry experts together and while it's hosted by Cisco DevNet, this event is not Cisco-only. In fact, it's quite the opposite - our focus is to bring together experts from all industries!


Join the brightest of the IoT, cloud and enterprise developers to bring clarity to the blurred lines between infrastructure and applications. Through two session tracks (IoT & User Experience and Cloud & DevOps), networking, keynotes, workshops, mini-hacks and learning labs, the conference offers top notch content combined with hands-on learning, to break down the barriers between infrastructure and applications and help developers learn, code and connect and inspire.

DevNet Create Conference Details

When: May 23-24th

Where: Bespoke at Westfield San Francisco Centre
Get the latest updates: @DevNetCreate #DevNetCreate


What You Need to Know Now


Excited? We are! So save the date - we hope to see you there!

Check out the latest CUBEConversation with Jeff Frick (theCUBE) and Susie Wee (VP & CTO of DevNet, Cisco Systems) to insight about DevNet and #DevNetCreate, where we started, where we are going and why in the latest episode.



Hacking for the NYC Ports!

Posted by tmero Mar 2, 2017

You know what’s so great about hackathons? It’s always solving a problem in this world and making it a better place to live in.

NYC Ports and Logistics is a 48 hour hackathon located in, of course, the beautiful city of New York City that took place on January 20th, 2017 - January 22nd, 2017! The hackathon started off the day prior to the event where hackers were able to socialize and network with other hackers. Since a majority of them just met each other, it was important for them to find teammates with different skillsets to create a new application. Austin Hyland (my colleague) and I had a great time talking to different teams slowly forming and making sure they were all well formed.


There were over 125 participants (developers, business people, designers, domain experts, lawyers) building prototypes, rapid fire market validation and business model invention. (Information from the devpost website).

There were many sponsors, including Microsoft Azure, SendGrid, and Cisco DevNet. Of course, let’s not forget the wonderful venue sponsor Galvenize and Blender Workspace!


[image: Learn, Code, Inspire DevNet stickers using one of our phone lenses we gave out]

Cisco DevNet was very excited to have a booth and help out hackers using our APIs. (Tropo API and Cisco Spark API). We gave out a prize for expensive Meraki routers to the team who had the best use case of our APIs. The grand prize for the entire event was a $5000 cash prize!

The winner we chose was "LCL Enterprises". The app was about using hardware to keep track of LCL packages. They wanted to add the ability to send customers automated messages. For this hackathon they added coded examples of individualized messages when packages were shipped and broadcast messages when cargo arrived. Then they used HTTP to send variable data to the code and fire up the text messages. This piece was automated in the back end which was in Ruby on rails.


This was a great event, especially because it was ran by the organizer Daren McKelvey who was very organized and worked very hard to make sure it was a successful event. As a sponsor, one thing that stood out with Daren compared to other organizers is that he went out of his way to make sure each sponsor was content and had all the information they needed.

We hope to be there again next year!

...great session at CiscoLive Berlin on Python Network programming yesterday!  I promised to post the Python snippit that launches a browser that points to the DevNet Python repository that I've been building - including the Ubuntu VM that I used and all the code content that we covered yesterday (remember, the username and password for everything is vagrant, vagrant;).


Anyway, here is the link to the repository followed by the code snippit - you can either run it as its own script or 'feed' the statements into the Python shell one at a time to watch it in action.  Please let me know if you have any questions or comments - hope this helps!




Here is the link to the repository:


# https://cisco.box.com/v/DevNet1040GettingStarted

# Ubuntu VM username and passwords are vagrant, vagrant


                                     ###     Here is the code snippit to launch a browser   ###



just cut and paste the lines that come after the '###' into a file with a .py extension (you don't need to include the '#' symbols), then invoke from a command line - eg.  if you call the script 'name_of_my_program.py then


python name_of_my_program.py 




just start the Python IDLE shell and feed each line of code into the interpreter to watch it in action.....





import webbrowser                                                                          # webbrowser is a built-in python method


main_page = 'https://cisco.box.com/v/DevNet1040GettingStarted'      # just assign this string to the variable called main_page


webbrowser.open(main_page)                                                          # THIS is the statement that fires up the browser to your page





Filter Blog

By date:
By tag: