PaloAltoNetworks / pan-os-python

The PAN-OS SDK for Python is a package to help interact with Palo Alto Networks devices (including physical and virtualized Next-generation Firewalls and Panorama). The pan-os-python SDK is object oriented and mimics the traditional interaction with the device via the GUI or CLI/API.
https://pan-os-python.readthedocs.io
ISC License
340 stars 168 forks source link

network module docs for network.Dhcp doesn't contain info about defining/reading DHCP leases #494

Open gojun077 opened 1 year ago

gojun077 commented 1 year ago

Documentation link

https://pan-os-python.readthedocs.io/en/latest/module-network.html#panos.network.Dhcp

Describe the problem

In the Palo Alto Firewall Web UI, if you go into the Network -> DHCP tab, you can see a list of interfaces along with IP ranges and Reserved addresses. However in the documentation, there is a single parameter, name.

Is the documentation correct? Is there currently no way to get information on DHCP leases using panos? I created a firewall instance and retrieved info on dhcp, which correctly shows the Layer3Subinterface names but nothing else:

dhcp_list = network.Dhcp().refreshall(fw)
for d in dhcp_list:
    print(d.about())

Which returns the following

{'name': 'ae1.10'}
{'name': 'ae1.20'}
{'name': 'ae1.60'}
{'name': 'ae1.100'}
{'name': 'ae1.102'}

So only name parameter is implemented so far for network.Dhcp?

Suggested fix

welcome-to-palo-alto-networks[bot] commented 1 year ago

:tada: Thanks for opening your first issue here! Welcome to the community!