From b2ed49543dca64a55355f63ad8746d040932b879 Mon Sep 17 00:00:00 2001 From: Shannon Byrnes Date: Sun, 17 Mar 2024 16:14:14 -0700 Subject: [PATCH] wip --- .../workshop_exercise/1_netmiko_show_interfaces_raw.py | 4 ++-- .../workshop_exercise/2_netmiko_show_interfaces_textfsm.py | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/1-reading-network-configuration/workshop_exercise/1_netmiko_show_interfaces_raw.py b/1-reading-network-configuration/workshop_exercise/1_netmiko_show_interfaces_raw.py index cc43e79..81f64b7 100644 --- a/1-reading-network-configuration/workshop_exercise/1_netmiko_show_interfaces_raw.py +++ b/1-reading-network-configuration/workshop_exercise/1_netmiko_show_interfaces_raw.py @@ -4,8 +4,8 @@ username = "fill me in!" password = "fill me in!" device_type = "fill me in!" -hosts = ["x.x.x.x", "y.y.y.y"] -command_to_run = "show int brief" +hosts = ["x.x.x.x", "y.y.y.y", "z.z.z.z"] +command_to_run = "show lldp neighbors" for host in hosts: # Create a variable that represents an SSH connection to our router. diff --git a/1-reading-network-configuration/workshop_exercise/2_netmiko_show_interfaces_textfsm.py b/1-reading-network-configuration/workshop_exercise/2_netmiko_show_interfaces_textfsm.py index 0d746bb..1d91594 100644 --- a/1-reading-network-configuration/workshop_exercise/2_netmiko_show_interfaces_textfsm.py +++ b/1-reading-network-configuration/workshop_exercise/2_netmiko_show_interfaces_textfsm.py @@ -2,13 +2,12 @@ # pip install --user netmiko import json from netmiko import Netmiko -from pprint import pprint username = "fill me in!" password = "fill me in!" device_type = "fill me in!" hosts = ["x.x.x.x", "y.y.y.y"] -command_to_run = "show int brief" +command_to_run = "show lldp neighbors" for host in hosts: # Create a variable that represents an SSH connection to our router.