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

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.

主站蜘蛛池模板: 犍为县| 共和县| 全椒县| 驻马店市| 金寨县| 东乌珠穆沁旗| 彭山县| 剑河县| 永宁县| 绥阳县| 荔波县| 莱芜市| 左云县| 鹤庆县| 兰坪| 邮箱| 郯城县| 海口市| 海晏县| 元朗区| 双柏县| 彭泽县| 通江县| 许昌市| 高台县| 日土县| 三明市| 临夏县| 朝阳区| 类乌齐县| 扬州市| 腾冲县| 沙河市| 临汾市| 天台县| 高台县| 唐河县| 广水市| 搜索| 乃东县| 许昌市|