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
16 changes: 16 additions & 0 deletions ocp_resources/user_defined_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,22 @@ def to_dict(self) -> None:

# End of generated code

def wait_for_network_ready(self, timeout: int = 30) -> None:
"""
Wait for the network to be ready.

Args:
timeout (int, optional): Maximum time to wait in seconds. Defaults to 30.

Raises:
TimeoutExpiredError: If the network is not ready within the specified timeout.
"""
self.wait_for_condition(
condition=self.Condition.NETWORK_READY,
status=self.Condition.Status.TRUE,
timeout=timeout,
)


class Layer2UserDefinedNetwork(UserDefinedNetwork):
"""
Expand Down
1 change: 1 addition & 0 deletions ocp_resources/utils/resource_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class Condition:
RECONCILE_COMPLETE: str = "ReconcileComplete"
READY: str = "Ready"
FAILING: str = "Failing"
NETWORK_READY = "NetworkReady"

class Status:
TRUE: str = "True"
Expand Down