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

feat: Add new HIP options to security rules #355

Merged
merged 2 commits into from
Jul 7, 2021
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: 12 additions & 0 deletions panos/policies.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ class SecurityRule(VersionedPanObject):
target (list): Apply this policy to the listed firewalls only
(applies to panorama/device groups only)
uuid (str): (PAN-OS 9.0+) The UUID for this rule.
source_devices (list): (PAN-OS 10.0+) Host devices subject to the
policy.
destination_devices (list): (PAN-OS 10.0+) Destination devices
subject to the policy.

"""

Expand Down Expand Up @@ -222,6 +226,14 @@ def _setup(self):

params.append(VersionedParamPath("uuid", exclude=True))
params[-1].add_profile("9.0.0", vartype="attrib", path="uuid")
params.append(
VersionedParamPath("source_devices", default=["any",], exclude=True)
)
params[-1].add_profile("10.0.0", vartype="member", path="source-hip")
params.append(
VersionedParamPath("destination_devices", default=["any",], exclude=True)
)
params[-1].add_profile("10.0.0", vartype="member", path="destination-hip")

self._params = tuple(params)

Expand Down