aboutsummaryrefslogtreecommitdiff
path: root/test_client.py
diff options
context:
space:
mode:
Diffstat (limited to 'test_client.py')
-rwxr-xr-xtest_client.py63
1 files changed, 47 insertions, 16 deletions
diff --git a/test_client.py b/test_client.py
index 72538c1..4a0f83a 100755
--- a/test_client.py
+++ b/test_client.py
@@ -43,38 +43,69 @@ def cli():
@cli.command()
-@click.argument("host", type=int)
-def start(host: int):
+def get_web_app_hosts():
"""Start a session on the RWA.Support.WebApp host with index HOST."""
- click.echo(f"Sending D-Bus request 'start': {host}")
- response = req.start(host)
+ click.echo("Sending D-Bus request 'get_web_app_hosts'")
+ response = req.get_web_app_hosts()
click.echo(f"Your response is: {response}")
@cli.command()
-@click.argument("pid", type=int)
-def stop(pid: int):
+@click.argument("host", type=str)
+def add_web_app_host(host: str):
+ """Start a session on the RWA.Support.WebApp host with index HOST."""
+ click.echo(f"Sending D-Bus request 'add_web_app_host': {host}")
+ response = req.add_web_app_host(host)
+ click.echo(f"Your response is: {response}")
+
+
+@cli.command()
+@click.argument("host", type=str)
+def remove_web_app_host(host: str):
+ """Start a session on the RWA.Support.WebApp host with index HOST."""
+ click.echo(f"Sending D-Bus request 'remove_web_app_host': {host}")
+ response = req.remove_web_app_host(host)
+ click.echo(f"Your response is: {response}")
+
+
+@cli.command()
+@click.argument("host_id", type=str)
+def start(host_id: str):
+ """Start a session on the RWA.Support.WebApp host with index HOST."""
+ click.echo(f"Sending D-Bus request 'start': {host_id}")
+ response = req.start(host_id)
+ click.echo(f"Your response is: {response}")
+
+
+@cli.command()
+@click.argument("host_id", type=str)
+@click.argument("session_id", type=int)
+def stop(host_id: str, session_id: int):
"""Stop the session with the pid PID."""
- click.echo(f"Sending D-Bus request 'stop' with PID {pid}")
- response = req.stop(pid)
+ click.echo(f"Sending D-Bus request 'stop' with host ID {host_id} and session ID {session_id}")
+ response = req.stop(host_id, session_id)
click.echo(f"Your response is: {response}")
@cli.command()
-@click.argument("pid", type=int)
-def status(pid: int):
+@click.argument("host_id", type=str)
+@click.argument("session_id", type=int)
+def status(host_id: str, session_id: int):
"""Get the status of the session with the pid PID."""
- click.echo(f"Sending D-Bus request 'status' with PID {pid}")
- response = req.status(pid)
+ click.echo(f"Sending D-Bus request 'status' with host ID {host_id} and session ID {session_id}")
+ response = req.status(host_id, session_id)
click.echo(f"Your response is: {response}")
@cli.command()
-@click.argument("pid", type=int)
-def refresh_status(pid: int):
+@click.argument("host_id", type=str)
+@click.argument("session_id", type=int)
+def refresh_status(host_id: str, session_id: int):
"""Refresh and get the status of the session with the pid PID."""
- click.echo(f"Sending D-Bus request 'refresh_status' with PID {pid}")
- response = req.refresh_status(pid)
+ click.echo(
+ f"Sending D-Bus request 'refresh_status' with host ID {host_id} and session ID {session_id}"
+ )
+ response = req.refresh_status(host_id, session_id)
click.echo(f"Your response is: {response}")