From a3922b358aaedcaecb1f7c3529a1fb06c4457938 Mon Sep 17 00:00:00 2001 From: Aaron Thomas Date: Mon, 18 Apr 2022 14:08:18 +0100 Subject: [PATCH 1/6] Implementation of a TS Agent class for UserID --- panos/objects.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/panos/objects.py b/panos/objects.py index 2aedc449..d7821e79 100644 --- a/panos/objects.py +++ b/panos/objects.py @@ -1274,3 +1274,29 @@ def _setup(self): ) self._params = tuple(params) + +class TSAgent(VersionedPanObject): + """Terminal Server Agent Object. + Component of UserID to map users to traffic on terminal servers. + + Args: + name (str): Name of TS Agent Client + disabled (bool): Whether TS Agent is enabled + host (str): IP address of the host where TS Agent is installed + port (str): Port of the TS Agent + """ + ROOT = Root.VSYS + SUFFIX = ENTRY + + def _setup(self): + # xpaths + self._xpaths.add_profile(value="/ts-agent") + + # params + params = [] + + params.append(VersionedParamPath("host", path="host")) + params.append(VersionedParamPath("disabled", path="disabled")) + params.append(VersionedParamPath("port", path="port")) + + self._params = tuple(params) \ No newline at end of file From 50ff43a5889397cfb955f1b61eefa8af142347ac Mon Sep 17 00:00:00 2001 From: Aaron Thomas Date: Mon, 18 Apr 2022 18:34:49 +0100 Subject: [PATCH 2/6] Update objects.py --- panos/objects.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/panos/objects.py b/panos/objects.py index d7821e79..41350707 100644 --- a/panos/objects.py +++ b/panos/objects.py @@ -1299,4 +1299,5 @@ def _setup(self): params.append(VersionedParamPath("disabled", path="disabled")) params.append(VersionedParamPath("port", path="port")) - self._params = tuple(params) \ No newline at end of file + self._params = tuple(params) + From c5827362151f5000aa00d659db84bcf93c8284ed Mon Sep 17 00:00:00 2001 From: Aaron Thomas Date: Sun, 8 May 2022 21:41:11 +0100 Subject: [PATCH 3/6] Update objects.py --- panos/objects.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/panos/objects.py b/panos/objects.py index 41350707..7f763715 100644 --- a/panos/objects.py +++ b/panos/objects.py @@ -1275,15 +1275,15 @@ def _setup(self): self._params = tuple(params) -class TSAgent(VersionedPanObject): +class TerminalServerAgent(VersionedPanObject): """Terminal Server Agent Object. Component of UserID to map users to traffic on terminal servers. Args: - name (str): Name of TS Agent Client - disabled (bool): Whether TS Agent is enabled - host (str): IP address of the host where TS Agent is installed - port (str): Port of the TS Agent + name (str): Name of Terminal Server Agent Client + disabled (bool): Whether Terminal Server Agent is enabled + host (str): IP address of the host where Terminal Server Agent is installed + port (str): Port of the Terminal Server Agent """ ROOT = Root.VSYS SUFFIX = ENTRY From f76ed4aeb0fed86ddf315f52219a23bec9dd9b40 Mon Sep 17 00:00:00 2001 From: Aaron Thomas Date: Sun, 8 May 2022 21:48:55 +0100 Subject: [PATCH 4/6] TerminalServerAgent Class Implementation --- panos/objects.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/panos/objects.py b/panos/objects.py index d7821e79..dc5964bf 100644 --- a/panos/objects.py +++ b/panos/objects.py @@ -1275,15 +1275,15 @@ def _setup(self): self._params = tuple(params) -class TSAgent(VersionedPanObject): +class TerminalServerAgent(VersionedPanObject): """Terminal Server Agent Object. Component of UserID to map users to traffic on terminal servers. Args: - name (str): Name of TS Agent Client + name (str): Name of Terminal Server Agent Client disabled (bool): Whether TS Agent is enabled - host (str): IP address of the host where TS Agent is installed - port (str): Port of the TS Agent + host (str): IP address of the host where Terminal Server Agent is installed + port (str): Port of the Terminal Server Agent """ ROOT = Root.VSYS SUFFIX = ENTRY From 0aadd7e1be7aaeba95c803cd6e2f4252d30b2f7d Mon Sep 17 00:00:00 2001 From: Aaron Thomas Date: Wed, 11 May 2022 19:52:52 +0100 Subject: [PATCH 5/6] Firewall & VSYS updated with TerminalServerAgent --- panos/device.py | 1 + panos/firewall.py | 1 + 2 files changed, 2 insertions(+) diff --git a/panos/device.py b/panos/device.py index d3b6f2a2..2e2df6eb 100644 --- a/panos/device.py +++ b/panos/device.py @@ -140,6 +140,7 @@ class Vsys(VersionedPanObject): "objects.DynamicUserGroup", "objects.Region", "objects.Edl", + "objects.TerminalServerAgent", "policies.Rulebase", "network.EthernetInterface", "network.AggregateInterface", diff --git a/panos/firewall.py b/panos/firewall.py index 49c8ae3a..ca49c6a4 100644 --- a/panos/firewall.py +++ b/panos/firewall.py @@ -94,6 +94,7 @@ class Firewall(PanDevice): "objects.DynamicUserGroup", "objects.Region", "objects.Edl", + "objects.TerminalServerAgent", "policies.Rulebase", "network.EthernetInterface", "network.AggregateInterface", From b2b13676844577629c915b918e2b0c6e283020ac Mon Sep 17 00:00:00 2001 From: Aaron Thomas Date: Sat, 4 Mar 2023 21:00:49 +0000 Subject: [PATCH 6/6] Completed Tests Successfully --- panos/objects.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/panos/objects.py b/panos/objects.py index f9044808..aba245f7 100644 --- a/panos/objects.py +++ b/panos/objects.py @@ -1295,8 +1295,8 @@ def _setup(self): # params params = [] - params.append(VersionedParamPath("host", path="host")) params.append(VersionedParamPath("disabled", path="disabled")) + params.append(VersionedParamPath("host", path="host")) params.append(VersionedParamPath("port", path="port")) self._params = tuple(params)