Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
sbyrnes committed Mar 18, 2024
1 parent 2744728 commit 57c3e52
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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}')}")
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 57c3e52

Please sign in to comment.