You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I am new to Python coding and I was trying to add an interface to zone. Here is my code but it generates error. TIA
from panos.firewall import Firewall
from panos.network import EthernetInterface
fw = Firewall("192.168.47.151", "admin", "Rummenigge@11")
ethernet1_1 = EthernetInterface(
name="ethernet1/1",
comment="test",
mode="layer3",
zone="TRUST"
)
fw.add(ethernet1_1)
ethernet1_1.apply()
ethernet1_2 = EthernetInterface(
name="ethernet1/2",
comment="test",
mode="layer3",
zone="UNTRUST"
)
fw.add(ethernet1_2)
ethernet1_2.apply()
fw.commit()
Error:
Traceback (most recent call last):
File "/network-programmability/SCRIPTS/Python/PA add interface.py", line 7, in
ethernet1_1 = EthernetInterface(
File "/home/hany/.local/lib/python3.10/site-packages/panos/base.py", line 3321, in init
super(VsysOperations, self).init(*args, **kwargs)
File "/home/hany/.local/lib/python3.10/site-packages/panos/base.py", line 2468, in init
raise ValueError('No param "{0}" exists'.format(name))
ValueError: No param "zone" exists
Beta Was this translation helpful? Give feedback.
All reactions