Skip to content

extension: proxmox: rewrite in python3 - #13832

Draft
resmo wants to merge 1 commit into
apache:mainfrom
resmo:feature/ext-proxmox-py
Draft

extension: proxmox: rewrite in python3#13832
resmo wants to merge 1 commit into
apache:mainfrom
resmo:feature/ext-proxmox-py

Conversation

@resmo

@resmo resmo commented Aug 9, 2026

Copy link
Copy Markdown
Member

Description

this PR rewrites the proxmox extension from shell to modern python3 for better maintainability.

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • Build/CI
  • Test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

How did you try to break this feature and the system with this change?

Copilot AI lite review requested due to automatic review settings August 9, 2026 09:00
@boring-cyborg boring-cyborg Bot added the Python Warning... Python code Ahead! label Aug 9, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR rewrites the Proxmox extension implementation from a Bash script to a Python 3 script, aiming to improve maintainability and reduce reliance on shell tooling.

Changes:

  • Removed the legacy proxmox.sh Bash-based extension implementation.
  • Added a new proxmox.py Python-based implementation covering lifecycle actions (prepare/create/start/stop/reboot/delete/status/statuses), console retrieval, and snapshot operations.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
extensions/Proxmox/proxmox.sh Removed the previous Bash implementation of the Proxmox extension.
extensions/Proxmox/proxmox.py Added a Python implementation for Proxmox extension operations, including VM lifecycle, console access, and snapshot management.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +1 to +3
#!/usr/bin/env python3
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
Comment on lines +129 to +133
class ProxmoxManager:
def __init__(self, config_path: str, wait_time: int | None = None):
self.config_path = config_path
self.wait_time = (
wait_time if wait_time and wait_time > 0 else DEFAULT_WAIT_SECONDS
Comment on lines +50 to +52
def _is_mapping(value: Any) -> bool:
return isinstance(value, dict)

@codecov

codecov Bot commented Aug 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 3.41%. Comparing base (5a67f19) to head (0ef2aa1).
⚠️ Report is 2 commits behind head on main.

❗ There is a different number of reports uploaded between BASE (5a67f19) and HEAD (0ef2aa1). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (5a67f19) HEAD (0ef2aa1)
unittests 1 0
Additional details and impacted files
@@              Coverage Diff              @@
##               main   #13832       +/-   ##
=============================================
- Coverage     19.64%    3.41%   -16.24%     
=============================================
  Files          6368      487     -5881     
  Lines        574889    41867   -533022     
  Branches      70353     7912    -62441     
=============================================
- Hits         112962     1429   -111533     
+ Misses       449656    40238   -409418     
+ Partials      12271      200    -12071     
Flag Coverage Δ
uitests 3.41% <ø> (ø)
unittests ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component:extensions Python Warning... Python code Ahead!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants