Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions ocp_resources/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,9 @@ class Status(Resource.Status):
@property
def kubelet_ready(self):
return any(
[
stat
for stat in self.instance.status.conditions
if stat["reason"] == "KubeletReady"
and stat["status"] == self.Condition.Status.TRUE
]
stat["reason"] == "KubeletReady"
and stat["status"] == self.Condition.Status.TRUE
for stat in self.instance.status.conditions
)

@property
Expand Down
3 changes: 1 addition & 2 deletions ocp_resources/virtual_machine_restore.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,7 @@ def wait_complete(self, status=True, timeout=TIMEOUT_4MINUTES):
wait_timeout=timeout,
sleep=1,
exceptions_dict=PROTOCOL_ERROR_EXCEPTION_DICT,
func=lambda: self.instance.get("status", {}).get("complete", None)
== status,
func=lambda: self.instance.get("status", {}).get("complete") == status,
)
for sample in samples:
if sample:
Expand Down
3 changes: 1 addition & 2 deletions ocp_resources/virtual_machine_snapshot.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,7 @@ def wait_ready_to_use(self, status=True, timeout=TIMEOUT_4MINUTES):
wait_timeout=timeout,
sleep=1,
exceptions_dict=PROTOCOL_ERROR_EXCEPTION_DICT,
func=lambda: self.instance.get("status", {}).get("readyToUse", None)
== status,
func=lambda: self.instance.get("status", {}).get("readyToUse") == status,
)
for sample in samples:
if sample:
Expand Down