Implement DUT lease extension by calling the device lease service
This commit introduces the functionality to extend DUT leases by calling the
device lease service.
The `lease_keeper` function is updated to call the `_extend_lease` function
when a lease is about to expire. This prevents the lease from expiring
during a long-running bisection task.
This commit also includes the following changes:
- Refactored gRPC calls to a generic `_grpc` function.
- Added unit tests for `lease_keeper` and `query_lease_status`.
- Fixed various pylint and formatting issues.
- Removed unused functions.
BUG=b:394220130
TEST=Ran ./run_tests.sh
Change-Id: I42118261cf73c8910f01ce94da9057ecedc3d9aa
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/bisect-kit/+/7015871
Tested-by: Yoshiki Iguchi <[email protected]>
Reviewed-by: Ryo Hashimoto <[email protected]>
Commit-Queue: Yoshiki Iguchi <[email protected]>
7 files changed