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.

Netmiko output blank - paloalto_panos

See original GitHub issue

Hi,

I run Netmiko for bulk packet captures in AWS. It works well but there is never output when using the Palo Alto (paloalto_panos) device type. Output for Cisco works well. An example would be:

from netmiko import ConnectHandler

print("Connecting to Palo Alto to show clock")

virtual_palo = {
	'device_type': 'paloalto_panos',
	'host':   '192.168.1.100',
	'username': 'automationadmin',
	'password': 'ciscothenpalo123',
}
net_connect = ConnectHandler(**virtual_palo)


output = net_connect.send_command('show clock')
print(output)

print("Connecting to Cisco Switch to show clock")

cisco_switch = {
	'device_type': 'cisco_ios',
	'host':   '192.168.1.101',
	'username': 'automationadmin',
	'password': 'ciscothenpalo123',
}
net_connect = ConnectHandler(**cisco_switch)


output = net_connect.send_command('show clock')
print(output)

This is just an example by the way, I don’t run the scripts to show the clock 😃. The output would be:

python3 test_script.py
Connecting to Palo Alto to show clock

Connecting to Cisco Switch to show clock
10:18:46.830 BST Tue Jul 19 2022

You see the issue. By the way this is my Netmiko version:

pip show netmiko
Name: netmiko
Version: 4.1.1
Summary: Multi-vendor library to simplify legacy CLI connections to network devices
Home-page: https://github.com/ktbyers/netmiko
Author: Kirk Byers
Author-email: ktbyers@twb-tech.com
License: MIT
Location: /usr/local/lib/python3.9/site-packages
Requires: ntc-templates, paramiko, pyserial, pyyaml, scp, setuptools, tenacity, textfsm

PAN-OS:

vm-license: VM-100
vm-cap-tier: 6.5 GB
vm-cpu-count: 2
vm-memory: 7857036
vm-mode: Amazon AWS
cloud-mode: cloud
sw-version: 10.1.5-h1

Any help would be great thanks.

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
ktbyerscommented, Jul 22, 2022

I am going to re-open this issue (as it does indicate there is an underlying Netmiko bug which should be fixed).

1reaction
nathaniel-millscommented, Jul 22, 2022

Current workarounds:

output = net_connect.send_command('show clock', expect_string=r">")
print(output)

Or:

output = net_connect.send_command_timing('show clock')
print(output)
Read more comments on GitHub >

github_iconTop Results From Across the Web

Netmiko output blank - LIVEcommunity - 509264
Solved: Hi, I run Netmiko for bulk packet captures in AWS. It works well but there is never output when using the Palo...
Read more >
salt.modules.netmiko_mod
Execution module to interface the connection with a remote network device. It is flexible enough to execute the commands both when running under...
Read more >
Using Netmiko to execute show commands on virtual Cisco ...
Netmiko is multi-vendor networking Python library and is based on Paramiko ... IOS-XR), Juniper Junos, Linux, Palo Alto PanOS, and others.
Read more >
netmiko.paloalto.paloalto_panos API documentation
:param verbose: Enable additional messages to standard output. :param global_delay_factor: Multiplication factor affecting Netmiko delays (default: 1).
Read more >
python - Netmiko - no output from device
Can you try adding global_delay_factor=4 the following to your ConnectHandler: from netmiko import ConnectHandler from getpass import ...
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