Skip to content

Commit

Permalink
feat: ApplicationTag - tag predefined applications (#414)
Browse files Browse the repository at this point in the history
  • Loading branch information
btorresgil committed Feb 15, 2022
1 parent 6da581a commit cfee6e3
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 0 deletions.
1 change: 1 addition & 0 deletions panos/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ class Vsys(VersionedPanObject):
"objects.Tag",
"objects.ApplicationObject",
"objects.ApplicationGroup",
"objects.ApplicationTag",
"objects.ApplicationFilter",
"objects.ApplicationContainer",
"objects.ScheduleObject",
Expand Down
1 change: 1 addition & 0 deletions panos/firewall.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ class Firewall(PanDevice):
"objects.Tag",
"objects.ApplicationObject",
"objects.ApplicationGroup",
"objects.ApplicationTag",
"objects.ApplicationFilter",
"objects.ApplicationContainer",
"objects.ScheduleObject",
Expand Down
26 changes: 26 additions & 0 deletions panos/objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,32 @@ def _setup(self):
self._params = tuple(params)


class ApplicationTag(VersionedPanObject):
"""ApplicationTag Object
Applies an administrative tag to a predefined application
Args:
name (str): Name of predefined application
tags (list): Administrative tags
"""

ROOT = Root.VSYS
SUFFIX = ENTRY

def _setup(self):
# xpaths
self._xpaths.add_profile(value="/application-tag")

# params
params = []

params.append(VersionedParamPath("tags", path="tag", vartype="member"))

self._params = tuple(params)


class ApplicationFilter(VersionedPanObject):
"""ApplicationFilter Object
Expand Down
2 changes: 2 additions & 0 deletions panos/panorama.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ class DeviceGroup(VersionedPanObject):
"objects.ServiceGroup",
"objects.ApplicationObject",
"objects.ApplicationGroup",
"objects.ApplicationTag",
"objects.ApplicationFilter",
"objects.ScheduleObject",
"objects.SecurityProfileGroup",
Expand Down Expand Up @@ -428,6 +429,7 @@ class Panorama(base.PanDevice):
"objects.Tag",
"objects.ApplicationObject",
"objects.ApplicationGroup",
"objects.ApplicationTag",
"objects.ApplicationFilter",
"objects.ApplicationContainer",
"objects.ScheduleObject",
Expand Down

0 comments on commit cfee6e3

Please sign in to comment.