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

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.

主站蜘蛛池模板: 本溪| 普宁市| 岑巩县| 崇文区| 岳西县| 平武县| 陆河县| 德保县| 泾川县| 千阳县| 宜州市| 衡东县| 明水县| 东至县| 襄汾县| 伊宁市| 霸州市| 韩城市| 苍南县| 集安市| 大竹县| 长子县| 伊宁县| 丽水市| 南江县| 阿巴嘎旗| 湘西| 鹤山市| 镇原县| 涞水县| 珠海市| 福州市| 滕州市| 鄂州市| 贡嘎县| 米脂县| 基隆市| 读书| 阿城市| 东丰县| 北宁市|