INNER CODE UNIT · Python

get_rebalancing_job_status

gyptazy/ProxLB · proxlb/models/balancing.py:211

    def get_rebalancing_job_status(self, proxmox_api: any, proxlb_data: Dict[str, Any], guest_name: str, guest_current_node: str, job_id: int, retry_counter: int = 1) -> bool:
        """
        Monitors the status of a rebalancing job on a Proxmox node until it completes or a timeout is reached.

        Args:
            proxmox_api (object): The Proxmox API client instance.
            proxlb_data (dict): The ProxLB configuration data.
            guest_name (str): The name of the guest (virtual machine) being rebalanced.
            guest_current_node (str): The current node where the guest is running.
            job_id (str): The ID of the rebalancing job to monitor.
            retry_counter (int, optional): The current retry count. Defaults to 1.

        Returns:
            bool: True if the job completed successfully, False otherwise.
        """
        logger.debug("Starting: get_rebalancing_job_status.")
        job = proxmox_api.nodes(guest_current_node).tasks(job_id).status().get()

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…