This commit is contained in:
2022-03-28 10:20:00 -03:00
parent 2042178cbe
commit 9898920ab2
3 changed files with 46 additions and 6 deletions

View File

@ -10,8 +10,13 @@ pip install conn
```
import conn
router = conn.node("unique name","ip/hostname", user="username", password="password")
router.run("show run")
router.run(["term len 0","show run"])
print(router.output)
hasip = router.test("show ip int brief","1.1.1.1")
if hasip:
print("Router have ip 1.1.1.1")
else:
print("router don't have ip 1.1.1.1")
```
### Using manager configuration