def get_operation_status(self, barman_server: str,
                             operation_id: str) -> OperationStatus:
        """Get status of the operation which ID is *operation_id*.

        :param barman_server: name of the Barman server related with the
            operation.
        :param operation_id: ID of the operation to be checked.

        :returns: the status of the operation.
        """
        response = self._get_request(
            f"servers/{barman_server}/operations/{operation_id}",
        )

        status = response["status"]
        return OperationStatus[status]
Get status of the operation which ID is *operation_id*.

        :param barman_server: name of the Barman server related with the
            operation.
        :param operation_id: ID of the operation to be checked.

        :returns: the status of the operation.
        
patroni/scripts/barman/utils.py