From 738c2ea34e6ec8e5f13dde72f41a734a7948e685 Mon Sep 17 00:00:00 2001 From: Denys Fedoryshchenko Date: Wed, 13 Nov 2024 08:23:11 +0200 Subject: [PATCH] feat(cli/event): Implement promisc flag We have API promisc flag for pub/sub events, and it is useful to have it available in cli too, to listen for all events on api instance. Signed-off-by: Denys Fedoryshchenko --- kernelci/cli/event.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kernelci/cli/event.py b/kernelci/cli/event.py index c632cc4134..daef5b6ab2 100644 --- a/kernelci/cli/event.py +++ b/kernelci/cli/event.py @@ -27,13 +27,14 @@ def kci_event(): @kci_event.command(secrets=True) @click.argument('channel') +@click.option('--promisc', help="Subscribe to all users", is_flag=True) @Args.config @Args.api @catch_error -def subscribe(config, api, channel, secrets): +def subscribe(config, api, channel, secrets, promisc): """Subscribe to a Pub/Sub channel""" api = get_api(config, api, secrets) - sub_id = api.subscribe(channel) + sub_id = api.subscribe(channel, promisc) click.echo(sub_id)