[PR #86] [MERGED] Clean up SSH backends and add local backend. #168

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/86
Author: @reitermarkus
Created: 1/31/2022
Status: Merged
Merged: 3/10/2022
Merged by: @jhollowe

Base: developHead: local-backend


📝 Commits (10+)

  • 6514f57 Run CI on forks, except coverage.
  • e3560b8 Don't require importing the project in setup.py.
  • ff4627a Clean up and DRY SSH backend code.
  • 1a4c382 Add local backend.
  • a51fa85 Add changelog entry for local backend and SSH backend refactoring.
  • 3453f4d Show better error when specifying host with local backend.
  • 07281a1 Revert "Don't require importing the project in setup.py."
  • 40e5808 Fix pre-commit failures
  • ad68721 Small refactors
  • aff5de2 Fix formatting issue for older python versions

📊 Changes

16 files changed (+453 additions, -271 deletions)

View changed files

📝 .github/workflows/ci.yaml (+6 -2)
📝 .vscode/settings.json (+1 -0)
📝 CHANGELOG.md (+6 -0)
📝 proxmoxer/backends/command_base.py (+53 -14)
proxmoxer/backends/local.py (+20 -0)
📝 proxmoxer/backends/openssh.py (+23 -40)
📝 proxmoxer/backends/ssh_paramiko.py (+15 -43)
📝 proxmoxer/core.py (+15 -6)
📝 setup.py (+3 -0)
📝 test_requirements.txt (+1 -1)
📝 tests/base/base_suite.py (+50 -56)
📝 tests/https_tests.py (+1 -1)
📝 tests/known_issues.json (+205 -65)
tests/local_tests.py (+34 -0)
📝 tests/openssh_tests.py (+8 -12)
📝 tests/paramiko_tests.py (+12 -31)

📄 Description

Refactored and DRY'd the SSH backends and added a local backend as discussed in https://github.com/proxmoxer/proxmoxer/issues/76. Also improved argument handling by properly escaping shell commands passed to SSH backends since subprocess.Popen expects a list of args.

Closes https://github.com/proxmoxer/proxmoxer/issues/76.


🔄 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/86 **Author:** [@reitermarkus](https://github.com/reitermarkus) **Created:** 1/31/2022 **Status:** ✅ Merged **Merged:** 3/10/2022 **Merged by:** [@jhollowe](https://github.com/jhollowe) **Base:** `develop` ← **Head:** `local-backend` --- ### 📝 Commits (10+) - [`6514f57`](https://github.com/proxmoxer/proxmoxer/commit/6514f57808b39ebc688df3c8eb3374ac9c0bc9ad) Run CI on forks, except coverage. - [`e3560b8`](https://github.com/proxmoxer/proxmoxer/commit/e3560b811197818f58f7d5a503df312d5269b91a) Don't require importing the project in `setup.py`. - [`ff4627a`](https://github.com/proxmoxer/proxmoxer/commit/ff4627a70cd2a5698c96f71bd39cca798e2da2ba) Clean up and DRY SSH backend code. - [`1a4c382`](https://github.com/proxmoxer/proxmoxer/commit/1a4c382039f4806ce1423f6eeeceb15bee314e9b) Add `local` backend. - [`a51fa85`](https://github.com/proxmoxer/proxmoxer/commit/a51fa8568cb20bd4464574c74438da42702b02f4) Add changelog entry for `local` backend and SSH backend refactoring. - [`3453f4d`](https://github.com/proxmoxer/proxmoxer/commit/3453f4d18f69204f1ed4c34bc8acebd0af167433) Show better error when specifying `host` with `local` backend. - [`07281a1`](https://github.com/proxmoxer/proxmoxer/commit/07281a11fc917fe8a7433aed71599b27865165c4) Revert "Don't require importing the project in `setup.py`." - [`40e5808`](https://github.com/proxmoxer/proxmoxer/commit/40e580849019c0962dd9dfc7f3a136f10ab8a9bb) Fix pre-commit failures - [`ad68721`](https://github.com/proxmoxer/proxmoxer/commit/ad687211a2a485f218041cef90f18bd1e13c068d) Small refactors - [`aff5de2`](https://github.com/proxmoxer/proxmoxer/commit/aff5de269793cb8ec8025b8e763a87a9e41ab180) Fix formatting issue for older python versions ### 📊 Changes **16 files changed** (+453 additions, -271 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/ci.yaml` (+6 -2) 📝 `.vscode/settings.json` (+1 -0) 📝 `CHANGELOG.md` (+6 -0) 📝 `proxmoxer/backends/command_base.py` (+53 -14) ➕ `proxmoxer/backends/local.py` (+20 -0) 📝 `proxmoxer/backends/openssh.py` (+23 -40) 📝 `proxmoxer/backends/ssh_paramiko.py` (+15 -43) 📝 `proxmoxer/core.py` (+15 -6) 📝 `setup.py` (+3 -0) 📝 `test_requirements.txt` (+1 -1) 📝 `tests/base/base_suite.py` (+50 -56) 📝 `tests/https_tests.py` (+1 -1) 📝 `tests/known_issues.json` (+205 -65) ➕ `tests/local_tests.py` (+34 -0) 📝 `tests/openssh_tests.py` (+8 -12) 📝 `tests/paramiko_tests.py` (+12 -31) </details> ### 📄 Description Refactored and DRY'd the SSH backends and added a `local` backend as discussed in https://github.com/proxmoxer/proxmoxer/issues/76. Also improved argument handling by properly escaping shell commands passed to SSH backends since `subprocess.Popen` expects a list of args. Closes https://github.com/proxmoxer/proxmoxer/issues/76. --- <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#168
No description provided.