Skip to content

Commit 8d44951

Browse files
committed
fix: Legacy HA interface stubs removed
Fixes #350 These stubs were required on older PAN-OS versions, but don't seem to be required any longer. Additionally, since AWS firewalls don't have ha1-backup, ha2-backup, or ha3 interfaces, these stubs actually cause an error on AWS VM-Series firewalls.
1 parent 6162912 commit 8d44951

2 files changed

Lines changed: 4 additions & 8 deletions

File tree

panos/ha.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -560,10 +560,5 @@ def _setup(self):
560560

561561
# stubs
562562
self._stubs.add_profile(
563-
"0.0.0",
564-
"interface/ha1",
565-
"interface/ha1-backup",
566-
"interface/ha2",
567-
"interface/ha2-backup",
568-
"interface/ha3",
563+
"0.0.0", "interface/ha1",
569564
)

tests/test_integration.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
from unittest import mock
1616
except ImportError:
1717
import mock
18+
1819
import unittest
1920
import xml.etree.ElementTree as ET
2021

@@ -169,11 +170,11 @@ def test_element_str_from_highavailability_with_ha1_and_ha2_children(self):
169170
b"<netmask>255.255.255.0</netmask><port>ethernet1/6</port>",
170171
b"<gateway>10.5.1.2</gateway><link-speed>1000</link-speed>",
171172
b"<link-duplex>auto</link-duplex><monitor-hold-time>7",
172-
b"</monitor-hold-time></ha1><ha1-backup /><ha2>",
173+
b"</monitor-hold-time></ha1><ha2>",
173174
b"<ip-address>10.6.1.1</ip-address><netmask>255.255.255.0",
174175
b"</netmask><port>ethernet1/7</port><gateway>10.6.1.2</gateway>",
175176
b"<link-speed>1000</link-speed><link-duplex>auto</link-duplex>",
176-
b"</ha2><ha2-backup /><ha3 /></interface></high-availability>",
177+
b"</ha2></interface></high-availability>",
177178
]
178179
)
179180

0 commit comments

Comments
 (0)