From 830aea1866dd57239bd4c54c432fd7995bfc83be Mon Sep 17 00:00:00 2001 From: Shannon Byrnes Date: Sun, 17 Mar 2024 18:33:21 -0700 Subject: [PATCH] wip --- lab-2/4_netmiko_seek_helper_addrs.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lab-2/4_netmiko_seek_helper_addrs.py b/lab-2/4_netmiko_seek_helper_addrs.py index 4d112a2..9caf730 100644 --- a/lab-2/4_netmiko_seek_helper_addrs.py +++ b/lab-2/4_netmiko_seek_helper_addrs.py @@ -6,7 +6,7 @@ password = "clab@123" device_type = "cisco_xr" hosts = ["172.16.x.2", "172.16.x.3", "172.16.x.4"] # TODO -target_ip_helper = "fill me in!" +target_ip_helper = "fill me in!" # TODO for host in hosts: # Create a variable that represents an SSH connection to our router. @@ -35,7 +35,7 @@ continue # Get the last "word" in the line, which is the helper IP address. - ip = helper_address_line[-1] + ip = helper_address_line[-1].text if ip != target_ip_helper: print(f"Found old IP helper!:\n{intf}") @@ -48,7 +48,7 @@ # Let's observe: print(f"Running: {commands}") connection.send_config_set(commands) - new_interface_config = connection.send_command(f"show run int {intf_name}") - print(f"Post-configuration:\n{new_interface_config}") + print(f"Running: show run int {intf_name}") + print(connection.send_command(f"show run int {intf_name}")) print("Done!")