官术网_书友最值得收藏!

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.

主站蜘蛛池模板: 霍邱县| 边坝县| 沙雅县| 新干县| 安乡县| 南昌市| 卢氏县| 泰安市| 响水县| 稷山县| 策勒县| 田阳县| 丰城市| 尖扎县| 蒲江县| 永平县| 镇平县| 二连浩特市| 怀仁县| 随州市| 偏关县| 于田县| 林口县| 广丰县| 邢台县| 江陵县| 镇远县| 棋牌| 辛集市| 长宁区| 项城市| 三亚市| 凤翔县| 河曲县| 松原市| 敦化市| 石阡县| 台中县| 龙南县| 社旗县| 无棣县|