From e791f8c6d424cc6b679ce6e9a0a4a45d78d1a759 Mon Sep 17 00:00:00 2001 From: Pavel Raunou Date: Wed, 17 Dec 2025 11:00:40 +0100 Subject: [PATCH 1/3] allow force commit without partial commit --- panos/firewall.py | 3 +-- panos/panorama.py | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/panos/firewall.py b/panos/firewall.py index aafb7564..5e90d8df 100644 --- a/panos/firewall.py +++ b/panos/firewall.py @@ -590,8 +590,7 @@ def is_partial(self): self.admins, self.exclude_device_and_network, self.exclude_shared_objects, - self.exclude_policy_and_objects, - self.force, + self.exclude_policy_and_objects ] return any(x for x in pp_list) diff --git a/panos/panorama.py b/panos/panorama.py index 64600ecf..eb4f7e5c 100644 --- a/panos/panorama.py +++ b/panos/panorama.py @@ -989,8 +989,7 @@ def is_partial(self): self.log_collectors, self.log_collector_groups, self.exclude_device_and_network, - self.exclude_shared_objects, - self.force, + self.exclude_shared_objects ] return any(x for x in pp_list) From 8592c32eb173b108caa9e902e40858a723bb0ec7 Mon Sep 17 00:00:00 2001 From: Pavel Raunou Date: Wed, 17 Dec 2025 11:19:51 +0100 Subject: [PATCH 2/3] allow force commit without partial commit --- panos/firewall.py | 8 +++----- panos/panorama.py | 8 +++----- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/panos/firewall.py b/panos/firewall.py index 5e90d8df..bfa8f365 100644 --- a/panos/firewall.py +++ b/panos/firewall.py @@ -621,11 +621,9 @@ def element(self): ET.SubElement(partial, "shared-object").text = "excluded" if self.exclude_policy_and_objects: ET.SubElement(partial, "policy-and-objects").text = "excluded" + fe.append(partial) - if self.force: - fe = ET.SubElement(root, "force") - fe.append(partial) - else: - root.append(partial) + if self.force: + fe = ET.SubElement(root, "force") return root diff --git a/panos/panorama.py b/panos/panorama.py index eb4f7e5c..d935d101 100644 --- a/panos/panorama.py +++ b/panos/panorama.py @@ -1030,12 +1030,10 @@ def element(self): ET.SubElement(partial, "device-and-network").text = "excluded" if self.exclude_shared_objects: ET.SubElement(partial, "shared-object").text = "excluded" + root.append(partial) - if self.force: - fe = ET.SubElement(root, "force") - fe.append(partial) - else: - root.append(partial) + if self.force: + fe = ET.SubElement(root, "force") return root From 5daa4112026e30e323cfea3437a4afd3953fc10d Mon Sep 17 00:00:00 2001 From: Pavel Raunou Date: Wed, 17 Dec 2025 15:20:01 +0100 Subject: [PATCH 3/3] formatting fix --- panos/firewall.py | 2 +- panos/panorama.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/panos/firewall.py b/panos/firewall.py index bfa8f365..5349f019 100644 --- a/panos/firewall.py +++ b/panos/firewall.py @@ -590,7 +590,7 @@ def is_partial(self): self.admins, self.exclude_device_and_network, self.exclude_shared_objects, - self.exclude_policy_and_objects + self.exclude_policy_and_objects, ] return any(x for x in pp_list) diff --git a/panos/panorama.py b/panos/panorama.py index d935d101..16e36055 100644 --- a/panos/panorama.py +++ b/panos/panorama.py @@ -989,7 +989,7 @@ def is_partial(self): self.log_collectors, self.log_collector_groups, self.exclude_device_and_network, - self.exclude_shared_objects + self.exclude_shared_objects, ] return any(x for x in pp_list)