Skip to content

Commit

Permalink
fix: Legacy HA interface stubs removed
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
btorresgil committed Jul 23, 2021
1 parent 6162912 commit 8d44951
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
7 changes: 1 addition & 6 deletions panos/ha.py
Expand Up @@ -560,10 +560,5 @@ def _setup(self):

# stubs
self._stubs.add_profile(
"0.0.0",
"interface/ha1",
"interface/ha1-backup",
"interface/ha2",
"interface/ha2-backup",
"interface/ha3",
"0.0.0", "interface/ha1",
)
5 changes: 3 additions & 2 deletions tests/test_integration.py
Expand Up @@ -15,6 +15,7 @@
from unittest import mock
except ImportError:
import mock

import unittest
import xml.etree.ElementTree as ET

Expand Down Expand Up @@ -169,11 +170,11 @@ def test_element_str_from_highavailability_with_ha1_and_ha2_children(self):
b"<netmask>255.255.255.0</netmask><port>ethernet1/6</port>",
b"<gateway>10.5.1.2</gateway><link-speed>1000</link-speed>",
b"<link-duplex>auto</link-duplex><monitor-hold-time>7",
b"</monitor-hold-time></ha1><ha1-backup /><ha2>",
b"</monitor-hold-time></ha1><ha2>",
b"<ip-address>10.6.1.1</ip-address><netmask>255.255.255.0",
b"</netmask><port>ethernet1/7</port><gateway>10.6.1.2</gateway>",
b"<link-speed>1000</link-speed><link-duplex>auto</link-duplex>",
b"</ha2><ha2-backup /><ha3 /></interface></high-availability>",
b"</ha2></interface></high-availability>",
]
)

Expand Down

0 comments on commit 8d44951

Please sign in to comment.