Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: DecryptionRule wrong xpath. #404

Merged
merged 7 commits into from
Jan 27, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion panos/policies.py
Original file line number Diff line number Diff line change
Expand Up @@ -834,6 +834,10 @@ class DecryptionRule(VersionedPanObject):
handshakes.
log_failed_tls_handshakes (bool): (PAN-OS 10.0+) Log failed TLS handshakes.
log_setting (str): (PAN-OS 10.0+) Log setting.
negate_target (bool): Target all but the listed target firewalls
(applies to panorama/device groups only)
target (list): Apply this policy to the listed firewalls only
(applies to panorama/device groups only)

"""

Expand All @@ -843,7 +847,7 @@ class DecryptionRule(VersionedPanObject):

def _setup(self):
# xpaths
self._xpaths.add_profile(value="/pbf/rules")
self._xpaths.add_profile(value="/decryption/rules")

# params
params = []
Expand Down Expand Up @@ -940,6 +944,12 @@ def _setup(self):
params[-1].add_profile(
"10.0.0", path="log-setting",
)
params.append(
VersionedParamPath("negate_target", path="target/negate", vartype="yesno")
)
params.append(
VersionedParamPath("target", path="target/devices", vartype="entry")
)

self._params = tuple(params)

Expand Down