[PR #86] [MERGED] Fix: Submit XML method update #84

Closed
opened 2026-02-27 23:18:59 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/sophos/sophos-firewall-sdk/pull/86
Author: @mamullen13316
Created: 11/13/2024
Status: Merged
Merged: 11/13/2024
Merged by: @mamullen13316

Base: mainHead: submit_xml_fix


📝 Commits (2)

  • 3342f58 fix: allow exclusion of set operation in submit_xml method
  • e4f4f42 version: update to v0.1.57

📊 Changes

2 files changed (+6 additions, -2 deletions)

View changed files

📝 pyproject.toml (+1 -1)
📝 sophosfirewall_python/api_client.py (+5 -1)

📄 Description

  • minor fix to allow exclusion of the set operation in the XML payload of the submit_xml method. This is to solve a specific problem where the remove method doesn't work because the content to be removed is nested deeper than the first level. With this fix, the set_operation argument can be set to None so that the set operation is excluded from the XML payload. Then the payload of the object to be removed can be included, for example
payload = '''
<Remove>
       <AuthenticationServers>
           <RADIUSServer>
               <ServerName>{{ name }}</ServerName>
           </RADIUSServer>
       </AuthenticationServers>
   </Remove
'''

fw.submit_xml(template_data=payload, template_vars=template_vars, set_operation=None)


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/sophos/sophos-firewall-sdk/pull/86 **Author:** [@mamullen13316](https://github.com/mamullen13316) **Created:** 11/13/2024 **Status:** ✅ Merged **Merged:** 11/13/2024 **Merged by:** [@mamullen13316](https://github.com/mamullen13316) **Base:** `main` ← **Head:** `submit_xml_fix` --- ### 📝 Commits (2) - [`3342f58`](https://github.com/sophos/sophos-firewall-sdk/commit/3342f58d43c0a57f5367caca4db388b0226d4612) fix: allow exclusion of set operation in submit_xml method - [`e4f4f42`](https://github.com/sophos/sophos-firewall-sdk/commit/e4f4f4297e5e562d3703c11974f784dcc3b7d26b) version: update to v0.1.57 ### 📊 Changes **2 files changed** (+6 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `pyproject.toml` (+1 -1) 📝 `sophosfirewall_python/api_client.py` (+5 -1) </details> ### 📄 Description - minor fix to allow exclusion of the `set operation` in the XML payload of the `submit_xml` method. This is to solve a specific problem where the `remove` method doesn't work because the content to be removed is nested deeper than the first level. With this fix, the `set_operation` argument can be set to None so that the set operation is excluded from the XML payload. Then the payload of the object to be removed can be included, for example ``` payload = ''' <Remove> <AuthenticationServers> <RADIUSServer> <ServerName>{{ name }}</ServerName> </RADIUSServer> </AuthenticationServers> </Remove ''' fw.submit_xml(template_data=payload, template_vars=template_vars, set_operation=None) ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem closed this issue 2026-02-27 23:18:59 +03:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/sophos-firewall-sdk#84
No description provided.