From 9e17a02acaa16a7c7e2369be98eb6642cf09f804 Mon Sep 17 00:00:00 2001 From: Hanno Hecker Date: Thu, 7 Sep 2017 11:15:08 +0200 Subject: [PATCH] make search argument optional so we can easily search for anything from a team fixes #69 --- zmon_cli/client.py | 3 --- zmon_cli/cmds/search.py | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/zmon_cli/client.py b/zmon_cli/client.py index e16045b..3aee1bc 100644 --- a/zmon_cli/client.py +++ b/zmon_cli/client.py @@ -646,9 +646,6 @@ def search(self, q, limit: int=None, teams: list=None) -> dict: "grafana_dashboards": [{"id": "123", "title": "ZMON grafana", "team": ""}], } """ - if not q: - raise ZmonArgumentError('No search query value!') - if teams and type(teams) not in (list, tuple): raise ZmonArgumentError('"teams" should be a list!') diff --git a/zmon_cli/cmds/search.py b/zmon_cli/cmds/search.py index 89ea9be..75dfb5a 100644 --- a/zmon_cli/cmds/search.py +++ b/zmon_cli/cmds/search.py @@ -7,7 +7,7 @@ @cli.command() -@click.argument('search_query') +@click.argument('search_query', default="") @click.option('--team', '-t', multiple=True, required=False, help='Filter search by team. Multiple teams filtering is supported.') @click.option('--limit', '-l', multiple=False, required=False,