Uninett / nav

Network Administration Visualized
GNU General Public License v3.0
181 stars 38 forks source link

plugins paloaltoarp.py - Entries node not found at element [0][4] #2924

Closed ajgibbon-tu closed 4 months ago

ajgibbon-tu commented 4 months ago

https://github.com/Uninett/nav/blob/2206edfdaa0f9770fcd7b5fc7edeb595938faf75/python/nav/ipdevpoll/plugins/paloaltoarp.py#L141 In the xml returned from our paloalto firewalls element 4 returns the "max" node not "entries" I've used "entries = root[0][3]" to return data.

lunkwill42 commented 4 months ago

Would you be able to look at this, @Slenderman00 ?

Slenderman00 commented 4 months ago

@ajgibbon-tu could you provide me with the output of this curl -kG https://[Device IP]/api/?type=op&cmd=%3Cshow%3E%3Carp%3E%3Centry+name+%3D+%27all%27%2F%3E%3C%2Farp%3E%3C%2Fshow%3E&key=[API KEY]

ajgibbon-tu commented 4 months ago

export.txt Hi, will this suffice.

I've shortened and obfuscated as I'd rather not display our IP ranges here? I think the issue is purely down to the elements not being in a fixed order in the xml file. We have more than one Palo firewall, out of the two I've checked, the entries node has come back as element 3.

Slenderman00 commented 4 months ago

@ajgibbon-tu The issue has been solved. #2925

lunkwill42 commented 4 months ago

Fixed by #2925. ETA in NAV 5.10.1

ajgibbon-tu commented 4 months ago

works great in my environment, many thanks