[PR #90] [MERGED] Enable proper handling of QEMU exec commands #169

Closed
opened 2026-02-27 15:46:45 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/proxmoxer/proxmoxer/pull/90
Author: @jhollowe
Created: 3/11/2022
Status: Merged
Merged: 3/13/2022
Merged by: @jhollowe

Base: developHead: issue-89


📝 Commits (6)

  • b59f0f3 Fix error detection regex with non-string stderr
  • f54f81e Fix qemu agent exec command parsing
  • 8457328 Convert tests from openvz to qemu
  • 19acdc1 Add tests for command handling
  • 8c65c44 Scope command handling to only qemu agent exec
  • 9c80fab Fix bug with tests under Python 2.7

📊 Changes

5 files changed (+78 additions, -37 deletions)

View changed files

📝 proxmoxer/backends/command_base.py (+16 -1)
📝 proxmoxer/backends/https.py (+6 -5)
📝 test_requirements.txt (+1 -0)
📝 tests/base/base_suite.py (+43 -19)
📝 tests/https_tests.py (+12 -12)

📄 Description

All backends now correctly support passing commands with arguments to the Qemu guest agent to execute.
The commands can also be passed as strings or arrays.
They are ultimately exec'ed, not run in a shell, so wrapping in e.g. "bash -c 'COMMAND'" might be needed.

The alteration of the command argument is only applied to the .../agent/exec endpoint as to not interfere with other endpoints which also have a command argument.

fixes #89


🔄 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/proxmoxer/proxmoxer/pull/90 **Author:** [@jhollowe](https://github.com/jhollowe) **Created:** 3/11/2022 **Status:** ✅ Merged **Merged:** 3/13/2022 **Merged by:** [@jhollowe](https://github.com/jhollowe) **Base:** `develop` ← **Head:** `issue-89` --- ### 📝 Commits (6) - [`b59f0f3`](https://github.com/proxmoxer/proxmoxer/commit/b59f0f36bed125e7ad9851a90213bcb30c1862a5) Fix error detection regex with non-string stderr - [`f54f81e`](https://github.com/proxmoxer/proxmoxer/commit/f54f81ec1ec516f93b8fca0a85d3bee1532e4494) Fix qemu agent exec command parsing - [`8457328`](https://github.com/proxmoxer/proxmoxer/commit/8457328f774c885d9ceed80e721288828cde9e0f) Convert tests from openvz to qemu - [`19acdc1`](https://github.com/proxmoxer/proxmoxer/commit/19acdc1bf4bb93e8ab1e3334ea63a18004e882af) Add tests for command handling - [`8c65c44`](https://github.com/proxmoxer/proxmoxer/commit/8c65c447a34302dcb26c8aea9bede58cb42ddf67) Scope command handling to only qemu agent exec - [`9c80fab`](https://github.com/proxmoxer/proxmoxer/commit/9c80fab79f9e401290c83cb5829d02f534a66530) Fix bug with tests under Python 2.7 ### 📊 Changes **5 files changed** (+78 additions, -37 deletions) <details> <summary>View changed files</summary> 📝 `proxmoxer/backends/command_base.py` (+16 -1) 📝 `proxmoxer/backends/https.py` (+6 -5) 📝 `test_requirements.txt` (+1 -0) 📝 `tests/base/base_suite.py` (+43 -19) 📝 `tests/https_tests.py` (+12 -12) </details> ### 📄 Description All backends now correctly support passing commands with arguments to the Qemu guest agent to execute. The commands can also be passed as strings or arrays. They are ultimately exec'ed, not run in a shell, so wrapping in e.g. "bash -c 'COMMAND'" might be needed. The alteration of the `command` argument is only applied to the `.../agent/exec` endpoint as to not interfere with other endpoints which also have a `command` argument. fixes #89 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 15:46:45 +03:00
Sign in to join this conversation.
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/proxmoxer#169
No description provided.