From c6dfbf6de2c9e70ef2f4082708d47ab0ed60ab68 Mon Sep 17 00:00:00 2001 From: Horia Gunica <43091730+horiagunica@users.noreply.github.com> Date: Wed, 21 May 2025 09:57:59 +0300 Subject: [PATCH 1/3] fix: Added check for commit_response text parsing (#557) --- panos/base.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/panos/base.py b/panos/base.py index d8505e91..083cc3e2 100644 --- a/panos/base.py +++ b/panos/base.py @@ -4900,7 +4900,7 @@ def _commit( except AttributeError: if exception: raise err.PanCommitNotNeeded("Commit not needed", pan_device=self) - else: + elif commit_response.find("./msg/line") is not None: # By getting here, there was no "./result/job" in the commit response, # and there was no exception raised either, so capture the response message commit_response_msg = commit_response.find("./msg/line").text @@ -4921,6 +4921,7 @@ def _commit( "messages": [commit_response_msg], } return log_collector_group_push_result + else: return if not sync: # Don't synchronize, just return From 66db30e339be6866e109ebb9c3cb95d3ecba0fc0 Mon Sep 17 00:00:00 2001 From: rgangam-PAN <103026777+rgangam-PAN@users.noreply.github.com> Date: Tue, 3 Jun 2025 16:56:50 +0530 Subject: [PATCH 2/3] fix: bgp peer properties no longer flipped (#583) --- panos/network.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/panos/network.py b/panos/network.py index 1a9e1ad3..a45fb5dc 100644 --- a/panos/network.py +++ b/panos/network.py @@ -3046,9 +3046,10 @@ def _setup(self): ) params.append( VersionedParamPath( - "export_nexthop", - path="type/{type}/export-nexthop", - values=("resolve", "use-self"), + "remove_private_as", + condition={"type": "ebgp"}, + path="type/{type}/remove-private-as", + vartype="yesno", ) ) params.append( @@ -3061,10 +3062,9 @@ def _setup(self): ) params.append( VersionedParamPath( - "remove_private_as", - condition={"type": "ebgp"}, - path="type/{type}/remove-private-as", - vartype="yesno", + "export_nexthop", + path="type/{type}/export-nexthop", + values=("resolve", "use-self"), ) ) From cecf2dfba9896707b5bb3b9d6217ab2fc9e74691 Mon Sep 17 00:00:00 2001 From: Adam Baumeister <32481037+adambaumeister@users.noreply.github.com> Date: Thu, 5 Jun 2025 09:41:20 +1000 Subject: [PATCH 3/3] chore: Update bgp object docstring (#596) --- panos/network.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/panos/network.py b/panos/network.py index a45fb5dc..d68a4152 100644 --- a/panos/network.py +++ b/panos/network.py @@ -3017,10 +3017,9 @@ class BgpPeerGroup(VersionedPanObject): aggregated_confed_as_path (bool): the peers understand aggregated confederation AS path soft_reset_with_stored_info (bool): soft reset with stored info type (str): peer group type I('ebgp')/I('ibgp')/I('ebgp-confed')/I('ibgp-confed') - export_nexthop (str): export locally resolved nexthop I('resolve')/I('use-self') - import_nexthop (str): override nexthop with peer address I('original')/I('use-peer'), only with 'ebgp' remove_private_as (bool): remove private AS when exporting route, only with 'ebgp' - + import_nexthop (str): override nexthop with peer address I('original')/I('use-peer'), only with 'ebgp' + export_nexthop (str): export locally resolved nexthop I('resolve')/I('use-self') """ SUFFIX = ENTRY