- 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.
- SQL Server 從入門到項目實踐(超值版)
- CockroachDB權威指南
- 零基礎學C++程序設計
- Mastering Selenium WebDriver
- React.js Essentials
- Mastering Swift 2
- 零基礎學MQL:基于EA的自動化交易編程
- Learning AndEngine
- Kinect for Windows SDK Programming Guide
- QGIS By Example
- 從Excel到Python:用Python輕松處理Excel數據(第2版)
- Java語言程序設計教程
- FFmpeg開發實戰:從零基礎到短視頻上線
- Learning WordPress REST API
- 自己動手構建編程語言:如何設計編譯器、解釋器和DSL