question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Using `?` to get all possible lists of commands in a router but not running it

See original GitHub issue

Inside a router, if we type ? after a command, it gives us a list of all possible subcommands.

output = net_connect.send_command("show {} ?".format(input_cmd))
output = output.split('\n')

If I do this, it gives me a list of all commands that can be followed by input_cmd. However, using send_command also runs the command. In the actual router, if I do show ___ ? it gives me a list of possible commands but does not run it. In netmiko, it gives me the list of all possible commands and then runs the command (e.g. show aaa) with out the ?.

is there a way to get around this issue?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
ktbyerscommented, Aug 1, 2019

@whyjay17 It should behave the same way it behaves on the CLI i.e. show you the next command available in your context (and help on those next commands) and then repaint the current command just prior the question mark.

So yes the command should NOT have been executed.

Regards, Kirk

0reactions
whyjay17commented, Aug 1, 2019

Thanks @ktbyers! It solved my issue!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Basic Router Commands and Tasks - Cisco
All the commands that are entered on a router are stored in the current running configuration that is maintained in RAM. This command...
Read more >
Cisco Troubleshooting Commands at Your Service
Learn most common issues that network admins face every day and the Cisco troubleshooting commands that help them to overcome those issues.
Read more >
Cisco Commands Cheat Sheet: Top 5 for Network Admin
A Cisco commands cheat sheet for network admin including show running config, show IP interface brief, and more. Study these important Cisco ...
Read more >
10 commands you should master when working with the Cisco ...
#8: show ip route. The show ip route command is used to show the router's routing table. This is the list of all...
Read more >
Cisco Router Show Commands Cheat Sheet - Comparitech
at the command prompt, you will get a list of all available commands in the operating system. If you type a command and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found