- Mastering Python Networking
- Eric Chou
- 191字
- 2021-07-02 21:42:38
Idempotent network device interaction
The term idempotency has different meanings, depending on its context. But in this chapter's context, the term means when the client makes the same call to the device, the result should always be the same. I believe we can all agree that this is necessary. Imagine a time when each time you execute the script you get a different result back. This is a scary thought indeed and would render our automation effort useless.
Since Pexpect and Paramiko are blasting out a series of commands interactively, the chance of having a non-idempotent interaction is higher. Going back to the fact that the return results needed to be screen scraped for useful elements, the risk is much higher that something might have changed between the time we wrote the script to the time when the script is executed for the 100th time. For example, if the vendor makes a screen output change between releases, it might be okay for human engineers, but it will break your script.
If we need to rely on the script for production, we need the script to be idempotent as much as possible.
- 跟“龍哥”學(xué)C語言編程
- Windows Presentation Foundation Development Cookbook
- Silverlight魔幻銀燈
- Modern JavaScript Applications
- Mastering Drupal 8 Views
- Python編程實(shí)戰(zhàn)
- 小學(xué)生C++創(chuàng)意編程(視頻教學(xué)版)
- Keras深度學(xué)習(xí)實(shí)戰(zhàn)
- Node Cookbook(Second Edition)
- 從Power BI到Analysis Services:企業(yè)級數(shù)據(jù)分析實(shí)戰(zhàn)
- 創(chuàng)意UI Photoshop玩轉(zhuǎn)移動UI設(shè)計(jì)
- 深入淺出 HTTPS:從原理到實(shí)戰(zhàn)
- Beginning PHP
- Eclipse開發(fā)(學(xué)習(xí)筆記)
- VB語言程序設(shè)計(jì)教程(第2版)