INNER CODE UNIT · Python
Balancing
gyptazy/ProxLB · proxlb/models/balancing.py:22
class Balancing:
"""
The balancing class is responsible for processing workloads on Proxmox clusters.
The previously generated data (hold in proxlb_data) will processed and guests and
other supported types will be moved across Proxmox clusters based on the defined
values by an operator.
Methods:
__init__(self, proxmox_api: any, proxlb_data: Dict[str, Any]):
Initializes the Balancing class with the provided ProxLB data and initiates the rebalancing
process for guests.
exec_rebalancing_vm(self, proxmox_api: any, proxlb_data: Dict[str, Any], guest_name: str) -> None:
Executes the rebalancing of a virtual machine (VM) to a new node within the cluster. Logs the migration
process and handles exceptions.
exec_rebalancing_ct(self, proxmox_api: any, proxlb_data: Dict[str, Any], guest_name: str) -> None:
Executes the rebalancing of a container (CT) to a new node within the cluster. Logs the migration