I see a few instances of people lost on the starting point for learning automation ( specifically automation of network ). This are mostly individuals that have never done programming but now are faced with the prospect of learning scripting and new tools. These individuals understand networking and it's concepts but are challenged when it comes to the terminology for automation.

 

I will attempt to demystify some of the concepts and terminology

There are primarily 3 different parts to automation

  • A programming interface to network device

     CLI ( and a some GUI ) have been the primary ways to configure a network device. There is now a 3rd way. This is called API ( application programming interface ). It basically means configuration can now be done from any software that knows how to use this API. This can be provided by the manufacturing vendor only. How extensive the API is determines how much can be accomplished via automation. For example a vendor may decide that he will provide API for creating a VLAN but there is no API to create OSPF config.

To invoke an API one must send the required config in a specific format. This is similar to the AV pair when doing AAA config.

 

     The industry wide standard for formatting is XML and JSON. These are just two different formats to make an API call.

If you look at XML or JSON format to do a simple configuration it runs into many lines with lots of "{,},< and > ". You have to get every one of them right to get the command sent properly. As you can imagine this is clunky and no programmer wants to spend time creating these.

This is where SDK's come in.

     SDK's are implementations of the interface.  Basically SDK's provide a simpler way to use API's. For example there can be a function in SDK that says "create-vlan <vlan-number> " that will create a vlan on a switch. In this case the developer doesn't need to format the string into JSON or XML. The SDK provides a function that will do it and send it to the switch. It should be obvious that different SDK's exist for different programming languages. Also, if API format changes then you will need a newer version of the SDK as well.

     REST (Representational State Transfer) is a HTTP method to communicate between applications. You can "talk" to a router/switch over http/https and the format of that "talk" will be in XML/JSON. For example a "show interface stats" API call would get you the interface statistics in JSON/XML format. This would be considered REST call. This means that the router would be running a web server that can interpret these requests and in most Cisco routers/switches need to be first turned "ON" by allowing this format of communication.

 

  • The automation scripting language

This is the programming language. A programming language is the format that a computer can interpret and execute. To convert the language into machine understandable 0's and 1's you need a compiler or interpreter. There have been many programming languages over the years. The popular ones used for network automation are python and java. Powershell is another popular scripting language

 

  • A development environment

Programming can get very complex. There can be many libraries and millions of lines of code. To manage this , a development environment where code can be organised, saved and quickly started is used. There are softwares created by different vendors for this and some popular examples are Eclipse and Netbeans. Note that the development environment supports one or more programming language. Eclipse supports python, java and many more programming languages.

 

Coming back to the task of automaton, where does one start ?

1. Choose a IDE ( integrated development environment or development environment ) - Eclipse is a good free choice.

2. Choose a programming language - For network automation go with Python.

3. Understand API's and check if SDK's exist. Most programming languages allow for API calls to be made using REST.