Posts

Showing posts from July, 2019

DevNet 106: Network Automation Using Genie/PyATS

Image
                             Network Automation Using Genie/PyATS Create testbed yaml file: devices:     IOSv-L2-1:         type: "IOSv"         os: "ios"         alias: ios-1         tacacs:             login_prompt: 'login:'             password_prompt: 'Password:'             username: admin         passwords:             tacacs: cisco             enable: cisco        ...

DevNet 105: Network Automation Using Nornir

Image
Network Automation Using Nornir : Topology: Create hosts.yaml file: --- IOSv-L2-1: hostname: '192.168.17.3' port: 22 username: 'admin' password: 'cisco' platform: 'cisco_ios' groups: - 'cisco_ios' IOSv-L2-2: hostname: '192.168.17.4' port: 22 username: 'admin' password: 'cisco' platform: 'cisco_ios' groups: - 'cisco_ios' Create group.yaml file: --- # groups.yaml file cisco_ios: platform: 'cisco_ios' First Lab  by Nornir: Create simple python script: from nornir import InitNornir nr = InitNornir() Now let's  execute Python program and inspect the inventory:  root@kali:/home/nornir# python3 -m pdb simple_test.py > /home/nornir/simple_test.py(1)<module>() -> from nornir import InitNornir (Pdb) list 1 -> from nornir import InitNornir 2 nr = InitNornir() [EOF] (Pdb) n...