diff --git a/lab-2/3_netmiko_update_description_to_lldp_neighbors.py b/lab-2/3_netmiko_textfsm_update_description_to_lldp_neighbors.py similarity index 93% rename from lab-2/3_netmiko_update_description_to_lldp_neighbors.py rename to lab-2/3_netmiko_textfsm_update_description_to_lldp_neighbors.py index 65637a5..8310b02 100644 --- a/lab-2/3_netmiko_update_description_to_lldp_neighbors.py +++ b/lab-2/3_netmiko_textfsm_update_description_to_lldp_neighbors.py @@ -60,5 +60,6 @@ f"description -> {neighbor_name}, {neighbor_interface}" ] + print(f"Before:{connection.send_command(f'show run int {my_interface}')}") connection.send_config_set(configuration) - print(connection.send_command(f"show run int {my_interface}")) + print(f"After:{connection.send_command(f'show run int {my_interface}')}") diff --git a/lab-2/4_netmiko_seek_helper_addrs.py b/lab-2/4_netmiko_ciscoconfparse_update_helper_addrs.py similarity index 94% rename from lab-2/4_netmiko_seek_helper_addrs.py rename to lab-2/4_netmiko_ciscoconfparse_update_helper_addrs.py index 7820a4b..43824db 100644 --- a/lab-2/4_netmiko_seek_helper_addrs.py +++ b/lab-2/4_netmiko_ciscoconfparse_update_helper_addrs.py @@ -18,8 +18,8 @@ # Get the output for "show run". This will be raw and unformatted. raw_config = connection.send_command("show run") - # Turn this giant singular string of output into a list of lines. - parser = CiscoConfParse(config=raw_config) + # Turn this giant singular string of output into a list of lines and give it to CiscoConfParse. + parser = CiscoConfParse(config=raw_config.split("\n"), ignore_blank_lines=False) for intf in parser.find_objects("^interface .*"): # Get the interface name.