send_command returns incomplete output
See original GitHub issueex:
device = {'device_type':'cisco_ios'...
shell = ConnectHandler(**device)
shell.enable()
out = shell.send_command("write memory")
print(out)
returns:
Building configuration…
but the full output should be:
Building configuration… Compressed configuration from 543610 bytes to 149342 bytes[OK]
I tried a bit of a hack-around like so:
out = shell.send_command(self.args.cmd, max_loops=500)
out += shell.read_until_prompt()
which returns:
Building configuration… Compressed configuration from 543610 bytes to 149342 bytes[OK] my_host#
with the prompt at the end.
Is there a better way to collect all of the output from send_command before it returns, or is using a read_until method the correct solution? I guess i’m also a bit confused because “show version” returned a big multi-line block of output without any trouble.
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
CoreNFC NFCISO7816APDU sendCommand…
I have been able to detect the card send multiple apdu's to the card and get the card number and the purse balance...
Read more >send-command — AWS CLI 1.27.32 Command Reference
Enables Systems Manager to send command output to CloudWatch Logs. ... it validates the command inputs and returns a sample output JSON for...
Read more >send-command — AWS CLI 2.9.8 Command Reference
Enables Systems Manager to send command output to CloudWatch Logs. ... it validates the command inputs and returns a sample output JSON for...
Read more >Is there a way to check that ssm send_command is running ...
The return of the send_command is a dictionary which contains an id ... We can get also the output of the command and...
Read more >An error occurred when sending commands to the program ...
Article · 07/21/2022 · 6 minutes to read · 7 contributors · Applies to: Excel 2016, Excel 2013, Excel 2010, Microsoft Office Excel...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
README.md has been updated to show this solution. closing issue.
Sure.
Kirk
On Wed, Jun 15, 2016 at 10:20 AM, Lundy Bernard notifications@github.com wrote:
Kirk Byers CCIE #6243 emeritus ktbyers@twb-tech.com _http://pynet.twb-tech.com http://pynet.twb-tech.com/blog_ (415) 264-6270 Simplify your network management through automation