CLI has been the primary interface to interact with network devices, used to manage, operate and troubleshoot the network device throughout its lifecycle. CLI is a very comprehensive interface to leverage, but has limitations when used as the interface for automation:
- The CLI was designed as a human-readable interface, returning unstructured text data to the operator.
- This unstructured text data requires post-processing (screen scraping) to transcode to machine-friendly formatting.
- CLI does not return error/exit codes which can be programmatically acted upon.
- CLI is a single-threaded serial interface, reducing the ability to manipulate multiple objects at the same time.
"Screen Scraping" is the process of using text-processing tools or interpreters to examine the results of CLI commands executed via script. This approach was developed as a means to provide some rudimentary levels of automation, but has several drawbacks:
- Requires domain-specific scripting skills and often requires the use of regular expressions.
- Increased operational costs due to script repository maintenance, particularly with CLI syntax changes.
- Lack of interoperability / applicability across heterogeneous network devices.