Check Readiness Module

class emulations.check_readiness.DockerLogsThread(container)

Bases: Thread

A thread class for displaying Docker logs.

This class is used to create a thread that displays the logs of a specified container. It provides methods to start the thread, stop it gracefully, and check if it has stopped.

Attributes:

  • container: The Docker container object.

run()

Run the thread.

This method displays the logs of the specified container and terminates the log process when the thread is stopped.

stop()

Stop the thread gracefully.

This method sets the internal stop event to stop the thread.

stopped()

Check if the thread has stopped.

Returns: True if the thread has stopped, False otherwise.

emulations.check_readiness.check_kubectl_ready(container)

Check the readiness of a Kubernetes container.

This function checks the readiness of a Kubernetes container by executing the "kubectl get all" command repeatedly and waiting for the "ClusterIP" status to appear in the output.

Parameters:

  • container: The Mininet Docker container object running Kubernetes.

Returns: None

emulations.check_readiness.check_rabbitmq_process()

Check the status of the RabbitMQ server process.

This function checks if the RabbitMQ server process is running inside a specified Docker container.

Returns: None

This module provides functions to check the readiness of Docker containers and processes running inside them, as well as to display Docker container logs.