mirror of
https://github.com/cvk98/Proxmox-host-maintenance-mode.git
synced 2026-04-25 12:35:50 +03:00
[PR #2] [CLOSED] Fixes a KeyError when the cluster contains pools #4
Labels
No labels
documentation
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/Proxmox-host-maintenance-mode#4
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/cvk98/Proxmox-host-maintenance-mode/pull/2
Author: @Cylindric
Created: 5/18/2022
Status: ❌ Closed
Base:
main← Head:main📝 Commits (2)
6932c2cAdd some supporting files6731ea5Fix error when cluster contains pools📊 Changes
3 files changed (+13 additions, -0 deletions)
View changed files
➕
.gitignore(+3 -0)📝
maintenance-mode.py(+2 -0)➕
requirements.txt(+8 -0)📄 Description
When a cluster has one or more pools configured, they are returned in the
/api2/json/cluster/resourcesendpoint along with the list of VMs. This causes aKeyError, as thepoolobjects do not have astatusfield.This fix checks for and ignores pools.
I also added a
requirements.txt.For example:
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.