diff mbox series

[1/2] command: Add ping command

Message ID 20221220100709.402769-1-richard.purdie@linuxfoundation.org
State Accepted, archived
Commit fd3359de0b9f18fac187a629df203be0b2c87545
Headers show
Series [1/2] command: Add ping command | expand

Commit Message

Richard Purdie Dec. 20, 2022, 10:07 a.m. UTC
Add a simple ping command so the UI can check the server is still there.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 lib/bb/command.py | 6 ++++++
 1 file changed, 6 insertions(+)
diff mbox series

Patch

diff --git a/lib/bb/command.py b/lib/bb/command.py
index c9571f63d8..0208e30ec4 100644
--- a/lib/bb/command.py
+++ b/lib/bb/command.py
@@ -166,6 +166,12 @@  class CommandsSync:
     These must not influence any running synchronous command.
     """
 
+    def ping(self, command, params):
+        """
+        Allow a UI to check the server is still alive
+        """
+        return "Still alive!"
+
     def stateShutdown(self, command, params):
         """
         Trigger cooker 'shutdown' mode