31 - Introducing Network Programmability Protocols Flashcards
Scripting can be used to gather data or modify configurations. While using a language like Python allows an administration to perform manual programming, there are tools that can be used specifically for configuration __ and __.
automation, management
When there is a defined manual workflow to perform a set of tasks, proper tools should be used to automate it. It does not make sense to spend an hour performing a change. This change could take just a few minutes by using a properly engineered tool. This process is where Open Source tools such as __, __, __, and __ can dramatically reduce the number of manual interactions with the network.
Puppet, Chef, Ansible, SaltStack
What are some features of Puppet?
o Created in 2005
o Manages systems in a declarative manner. You define the state the target system should be in without worrying how it happens
o Written in Ruby
o Agent-based – software agent needs to be installed on devices you want to manage
What are some features of Chef?
o Same model as Puppet
o Based in Ruby, uses a declarative mode
o Agent based
o Refers to automation instruction as recipes
What are some features of Ansible?
o Alternative to Puppet and Chef
o Written in Python
o Agentless – can integrate and automate any device using any API
o Integrations can use REST, APIs, NETCONF, SSH or even SNMP
o Playbooks are Ansible sets of tasks used to automate devices
What are some features of SaltStack?
o Open source
o Python based
o Developed by Thomas S Hatch and originally released in 2011
o Designed to be easily moulded to divergent enterprise IT use cases through a highly modular and easily extensible design
o Uses a module design that creates Python modules to handle aspects of the available salt systems
___is a data exchange format and open standard. It is easy for humans to read and write and is easy for machines to parse and generate. It is based on a subset of JavaScript and is a text format that is completely language independent.
JavaScript Object Notation (JSON)
JSON is best known for the __ syntax because JSON objects always begin and end with a __.
curly brace
JSON is extremely popular, not only because it is easy to read, but for Python programmers, it natively maps into Python as a Python __. So if you understand __, you understand JSON, and vice versa.
dictionary, dictionaries
On a nexus switch, you can __ commands to JSON to see what output looks like as a JSON object. The data returned with JSON gives a descriptor for every value that is returned, allow for easy interpretation of the data. Management systems will have a much easier job using any data value that is returned with the JSON data than the normal output that an admin see via CLI.
pipe
Although using JSON __ have not been extremely popular for network APIs, it is important to understand that there are ways to model and define constraints of JSON objects using a JSON-schema document
schemas
What is a data model?
- Describe a constrained set of data in the form of a schema language
- Use well-define parameters to standardise the representation of data from a network device so the output among various platforms in the same
- Not used to actually send information to devices and instead rely on protocols such as NETCONF and RESTCONF.
- Device config can be validated against a data model to check if the changes are a valid for the device before committing the changes
Data models can define attributes and answers such as:
- What is the range of a valid VLAN ID?
- Can a VLAN name have spaces in it?
- Should the value be a string or an integer
One misconception is that data models are used to __ data to/from a device. This is not the case. Instead, protocols such a NETCONF/RESTCONF send JSON and XML encoded documents that simply adhere to a given model.
send
___ is a formal contract language with rich syntax and semantics on which you can build applications. It provides these rich semantics that offer constraints, but also provides re-usable structures that can be used between __ models.
Yet Another Next Generation (YANG)
What are some features of YANG?
- Modelling language
- Initially build for NETCONF
- Now also used by RESTCONF
- Models configurations and operational state data
- Provides syntax and semantics
- Utilises reusable data structures
There are different types of YANG models. Notably, there are __ standard and __ specific models.
industry, vendor/platform
What is an industry standard YANG model?
- Standard definition
- Come from various working groups (IETF, ITO, OpenConfig etc)
- Focus is to create vendor and platform independent models