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.

Info returned by Palo Alto devices is partly missing

See original GitHub issue

Netmiko v2.3.3 Palo Alto Chassis 7080, 5260 (panos version 8.1.6)

I suspect the issue I’m seeing is similar to issue #719

For the example of sending “show system info”, in looking at the debug output I see this:

DEBUG:netmiko:read_channel: show 
user@chassis(passive)> show system 
user@chassis(passive)> show system info

and the only command output I get back from netmiko is “show”

So the paloalto is sending the prompt and erasing it several times before showing the output of the command

I fixed this on my system by adding the following to PaloAltoPanosBase session_preparation:

self.disable_paging(command=“set cli scripting-mode on”)

class PaloAltoPanosBase(BaseConnection):
    """
    Implement methods for interacting with PaloAlto devices.

    Disables `enable()` and `check_enable_mode()`
    methods.  Overrides several methods for PaloAlto-specific compatibility.
    """

    def session_preparation(self):
        """
        Prepare the session after the connection has been established.

        Disable paging (the '--more--' prompts).
        Set the base prompt for interaction ('>').
        """
        self._test_channel_read()
        self.set_base_prompt(delay_factor=20)
        self.disable_paging(command="set cli pager off")
        self.disable_paging(command="set cli scripting-mode on")
        # Clear the read buffer
        time.sleep(0.3 * self.global_delay_factor)
        self.clear_buffer()

Perhaps there is a better, or more general, work-around but this works for me so I figured I’d offer it up for wider review

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
carlmontanaricommented, Sep 23, 2019

@ktbyers do we want to have this set cli scripting-mode set in the pan device type? Or have an option to set this or something? How do you want to handle this one? I can crank out a quick PR on it if ya want!

1reaction
jesse-mcgrawcommented, Jul 26, 2019

It’s not official but one of the engineers I heard from says “that should be available for any hw on any currently supported sw… 6.x, 7.x, 8.x, 9.x”

Read more comments on GitHub >

github_iconTop Results From Across the Web

Device > Setup > Operations - Palo Alto Networks
Specify object, policy, device group, or template configurations to partially load ... To return to the default logo, remove your entry and.
Read more >
SYN-ACK Issues with Asymmetric Routing - Knowledge Base
Common issues for asymmetric routing are: Websites loading only partially; Applications not working. Cause. By default, the TCP reject non-SYN ...
Read more >
Cortex Data Lake Known Issues - Palo Alto Networks
View open issues with Cortex Data Lake.
Read more >
PAN-OS 10.1.5 Addressed Issues - Palo Alto Networks
Fixed an issue where log queries that included WildFire submission logs returned more slowly than expected. PAN-186402. (. PA-440 Series firewalls only. ) ......
Read more >
Fan/Power Supply information's are missing under ...
Fan/Power Supply information's are missing under Environmental tabs for the Managed-Firewalls ... The issue is due to Schema Mismatch and is a ...
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