Skip to content

Commit

Permalink
Refactor(anta.cli): Make anta nrfu text --skip-error a proper flag
Browse files Browse the repository at this point in the history
  • Loading branch information
gmuloc committed Jul 24, 2023
1 parent 707d125 commit 10f6061
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion anta/cli/nrfu/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def json(ctx: click.Context, tags: Optional[List[str]], output: Optional[pathlib
@click.pass_context
@click.option("--tags", "-t", help="List of tags using comma as separator: tag1,tag2,tag3", type=str, required=False, callback=parse_tags)
@click.option("--search", "-s", help="Regular expression to search in both name and test", type=str, required=False)
@click.option("--skip-error/--no-skip-error", help="Hide tests in errors due to connectivity issue", default=False, show_default=True, required=False)
@click.option("--skip-error", help="Hide tests in errors due to connectivity issue", default=False, is_flag=True, show_default=True, required=False)
def text(ctx: click.Context, tags: Optional[List[str]], search: Optional[str], skip_error: bool) -> None:
"""ANTA command to check network states with text result"""
print_settings(ctx)
Expand Down
11 changes: 4 additions & 7 deletions docs/cli/nrfu.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,10 @@ Usage: anta nrfu text [OPTIONS]
ANTA command to check network states with text result

Options:
-t, --tags TEXT List of tags using comma as separator:
tag1,tag2,tag3
-s, --search TEXT Regular expression to search in both name
and test
--skip-error / --no-skip-error Hide tests in errors due to connectivity
issue [default: no-skip-error]
--help Show this message and exit.
-t, --tags TEXT List of tags using comma as separator: tag1,tag2,tag3
-s, --search TEXT Regular expression to search in both name and test
--skip-error Hide tests in errors due to connectivity issue
--help Show this message and exit.
```

The `--tags` option allows to target specific devices in your inventory, while the `--search` option permits filtering based on a regular expression pattern in both the hostname and the test name.
Expand Down

0 comments on commit 10f6061

Please sign in to comment.