Merging upstream version 1.3.0.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
5b922100c9
commit
8a6a3342fc
337 changed files with 16571 additions and 4891 deletions
|
@ -2,7 +2,7 @@
|
|||
anta_title: ANTA check commands
|
||||
---
|
||||
<!--
|
||||
~ Copyright (c) 2023-2024 Arista Networks, Inc.
|
||||
~ Copyright (c) 2023-2025 Arista Networks, Inc.
|
||||
~ Use of this source code is governed by the Apache License 2.0
|
||||
~ that can be found in the LICENSE file.
|
||||
-->
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
anta_title: ANTA debug commands
|
||||
---
|
||||
<!--
|
||||
~ Copyright (c) 2023-2024 Arista Networks, Inc.
|
||||
~ Copyright (c) 2023-2025 Arista Networks, Inc.
|
||||
~ Use of this source code is governed by the Apache License 2.0
|
||||
~ that can be found in the LICENSE file.
|
||||
-->
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
anta_title: Executing Commands on Devices
|
||||
---
|
||||
<!--
|
||||
~ Copyright (c) 2023-2024 Arista Networks, Inc.
|
||||
~ Copyright (c) 2023-2025 Arista Networks, Inc.
|
||||
~ Use of this source code is governed by the Apache License 2.0
|
||||
~ that can be found in the LICENSE file.
|
||||
-->
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
anta_title: Retrieving Inventory Information
|
||||
---
|
||||
<!--
|
||||
~ Copyright (c) 2023-2024 Arista Networks, Inc.
|
||||
~ Copyright (c) 2023-2025 Arista Networks, Inc.
|
||||
~ Use of this source code is governed by the Apache License 2.0
|
||||
~ that can be found in the LICENSE file.
|
||||
-->
|
||||
|
@ -11,7 +11,7 @@ The ANTA CLI offers multiple commands to access data from your local inventory.
|
|||
|
||||
## List devices in inventory
|
||||
|
||||
This command will list all devices available in the inventory. Using the `--tags` option, you can filter this list to only include devices with specific tags (visit [this page](tag-management.md) to learn more about tags). The `--connected` option allows to display only the devices where a connection has been established.
|
||||
This command will list all devices available in the inventory. Using the `--tags` option, you can filter this list to only include devices with specific tags (visit [this page](tag-management.md) to learn more about tags). The `--connected` option allows to display only the devices where a connection has been established.
|
||||
|
||||
### Command overview
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
anta_title: Retrieving Tests information
|
||||
---
|
||||
<!--
|
||||
~ Copyright (c) 2023-2024 Arista Networks, Inc.
|
||||
~ Copyright (c) 2023-2025 Arista Networks, Inc.
|
||||
~ Use of this source code is governed by the Apache License 2.0
|
||||
~ that can be found in the LICENSE file.
|
||||
-->
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
anta_title: Create an Inventory from Ansible inventory
|
||||
---
|
||||
<!--
|
||||
~ Copyright (c) 2023-2024 Arista Networks, Inc.
|
||||
~ Copyright (c) 2023-2025 Arista Networks, Inc.
|
||||
~ Use of this source code is governed by the Apache License 2.0
|
||||
~ that can be found in the LICENSE file.
|
||||
-->
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
anta_title: Create an Inventory from CloudVision
|
||||
---
|
||||
<!--
|
||||
~ Copyright (c) 2023-2024 Arista Networks, Inc.
|
||||
~ Copyright (c) 2023-2025 Arista Networks, Inc.
|
||||
~ Use of this source code is governed by the Apache License 2.0
|
||||
~ that can be found in the LICENSE file.
|
||||
-->
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
anta_title: Execute Network Readiness For Use (NRFU) Testing
|
||||
---
|
||||
<!--
|
||||
~ Copyright (c) 2023-2024 Arista Networks, Inc.
|
||||
~ Copyright (c) 2023-2025 Arista Networks, Inc.
|
||||
~ Use of this source code is governed by the Apache License 2.0
|
||||
~ that can be found in the LICENSE file.
|
||||
-->
|
||||
|
@ -48,12 +48,7 @@ The `text` subcommand provides a straightforward text report for each test execu
|
|||
### Command overview
|
||||
|
||||
```bash
|
||||
Usage: anta nrfu text [OPTIONS]
|
||||
|
||||
ANTA command to check network states with text result.
|
||||
|
||||
Options:
|
||||
--help Show this message and exit.
|
||||
--8<-- "anta_nrfu_text_help.txt"
|
||||
```
|
||||
|
||||
### Example
|
||||
|
@ -71,13 +66,7 @@ The `table` command under the `anta nrfu` namespace offers a clear and organized
|
|||
### Command overview
|
||||
|
||||
```bash
|
||||
Usage: anta nrfu table [OPTIONS]
|
||||
|
||||
ANTA command to check network states with table result.
|
||||
|
||||
Options:
|
||||
--group-by [device|test] Group result by test or device.
|
||||
--help Show this message and exit.
|
||||
--8<-- "anta_nrfu_table_help.txt"
|
||||
```
|
||||
|
||||
The `--group-by` option show a summarized view of the test results per host or per test.
|
||||
|
@ -125,15 +114,7 @@ The JSON rendering command in NRFU testing will generate an output of all test r
|
|||
### Command overview
|
||||
|
||||
```bash
|
||||
anta nrfu json --help
|
||||
Usage: anta nrfu json [OPTIONS]
|
||||
|
||||
ANTA command to check network state with JSON result.
|
||||
|
||||
Options:
|
||||
-o, --output FILE Path to save report as a JSON file [env var:
|
||||
ANTA_NRFU_JSON_OUTPUT]
|
||||
--help Show this message and exit.
|
||||
--8<-- "anta_nrfu_json_help.txt"
|
||||
```
|
||||
|
||||
The `--output` option allows you to save the JSON report as a file. If specified, no output will be displayed in the terminal. This is useful for further processing or integration with other tools.
|
||||
|
@ -153,15 +134,7 @@ The `csv` command in NRFU testing is useful for generating a CSV file with all t
|
|||
### Command overview
|
||||
|
||||
```bash
|
||||
anta nrfu csv --help
|
||||
Usage: anta nrfu csv [OPTIONS]
|
||||
|
||||
ANTA command to check network states with CSV result.
|
||||
|
||||
Options:
|
||||
--csv-output FILE Path to save report as a CSV file [env var:
|
||||
ANTA_NRFU_CSV_CSV_OUTPUT]
|
||||
--help Show this message and exit.
|
||||
--8<-- "anta_nrfu_csv_help.txt"
|
||||
```
|
||||
|
||||
### Example
|
||||
|
@ -175,16 +148,7 @@ The `md-report` command in NRFU testing generates a comprehensive Markdown repor
|
|||
### Command overview
|
||||
|
||||
```bash
|
||||
anta nrfu md-report --help
|
||||
|
||||
Usage: anta nrfu md-report [OPTIONS]
|
||||
|
||||
ANTA command to check network state with Markdown report.
|
||||
|
||||
Options:
|
||||
--md-output FILE Path to save the report as a Markdown file [env var:
|
||||
ANTA_NRFU_MD_REPORT_MD_OUTPUT; required]
|
||||
--help Show this message and exit.
|
||||
--8<-- "anta_nrfu_mdreport_help.txt"
|
||||
```
|
||||
|
||||
### Example
|
||||
|
@ -198,17 +162,7 @@ ANTA offers a CLI option for creating custom reports. This leverages the Jinja2
|
|||
### Command overview
|
||||
|
||||
```bash
|
||||
anta nrfu tpl-report --help
|
||||
Usage: anta nrfu tpl-report [OPTIONS]
|
||||
|
||||
ANTA command to check network state with templated report
|
||||
|
||||
Options:
|
||||
-tpl, --template FILE Path to the template to use for the report [env var:
|
||||
ANTA_NRFU_TPL_REPORT_TEMPLATE; required]
|
||||
-o, --output FILE Path to save report as a file [env var:
|
||||
ANTA_NRFU_TPL_REPORT_OUTPUT]
|
||||
--help Show this message and exit.
|
||||
--8<-- "anta_nrfu_tplreport_help.txt"
|
||||
```
|
||||
|
||||
The `--template` option is used to specify the Jinja2 template file for generating the custom report.
|
||||
|
@ -231,7 +185,7 @@ The template `./custom_template.j2` is a simple Jinja2 template:
|
|||
{% endfor %}
|
||||
```
|
||||
|
||||
The Jinja2 template has access to all `TestResult` elements and their values, as described in this [documentation](../api/result_manager_models.md#anta.result_manager.models.TestResult).
|
||||
The Jinja2 template has access to all `TestResult` elements and their values, as described in this [documentation](../api/result.md#anta.result_manager.models.TestResult).
|
||||
|
||||
You can also save the report result to a file using the `--output` option:
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
anta_title: Overview of ANTA's Command-Line Interface (CLI)
|
||||
---
|
||||
<!--
|
||||
~ Copyright (c) 2023-2024 Arista Networks, Inc.
|
||||
~ Copyright (c) 2023-2025 Arista Networks, Inc.
|
||||
~ Use of this source code is governed by the Apache License 2.0
|
||||
~ that can be found in the LICENSE file.
|
||||
-->
|
||||
|
@ -52,17 +52,24 @@ anta nrfu
|
|||
|
||||
Below are the environment variables usable with the `anta nrfu` command:
|
||||
|
||||
| Variable Name | Purpose | Required |
|
||||
| ------------- | ------- |----------|
|
||||
| ANTA_USERNAME | The username to use in the inventory to connect to devices. | Yes |
|
||||
| ANTA_PASSWORD | The password to use in the inventory to connect to devices. | Yes |
|
||||
| ANTA_INVENTORY | The path to the inventory file. | Yes |
|
||||
| ANTA_CATALOG | The path to the catalog file. | Yes |
|
||||
| ANTA_PROMPT | The value to pass to the prompt for password is password is not provided | No |
|
||||
| ANTA_INSECURE | Whether or not using insecure mode when connecting to the EOS devices HTTP API. | No |
|
||||
| ANTA_DISABLE_CACHE | A variable to disable caching for all ANTA tests (enabled by default). | No |
|
||||
| ANTA_ENABLE | Whether it is necessary to go to enable mode on devices. | No |
|
||||
| ANTA_ENABLE_PASSWORD | The optional enable password, when this variable is set, ANTA_ENABLE or `--enable` is required. | No |
|
||||
| Variable Name | Purpose | Required | Default |
|
||||
| ------------- | ------- |----------| ------- |
|
||||
| ANTA_USERNAME | The username to use in the inventory to connect to devices. | Yes | - |
|
||||
| ANTA_PASSWORD | The password to use in the inventory to connect to devices. | Yes | - |
|
||||
| ANTA_INVENTORY | The path to the inventory file. | Yes | - |
|
||||
| ANTA_CATALOG | The path to the catalog file. | Yes | - |
|
||||
| ANTA_ENABLE_PASSWORD | The optional enable password, when this variable is set, ANTA_ENABLE or `--enable` is required. | No | - |
|
||||
| ANTA_ENABLE | Whether it is necessary to go to enable mode on devices. | No | False |
|
||||
| ANTA_PROMPT | Prompt for passwords if they are not provided. | No | False |
|
||||
| ANTA_TIMEOUT | The global timeout value for API calls. | No | 30.0 |
|
||||
| ANTA_INSECURE | Whether or not using insecure mode when connecting to the EOS devices HTTP API. | No | False |
|
||||
| ANTA_DISABLE_CACHE | A variable to disable caching for all ANTA tests (enabled by default). | No | False |
|
||||
| ANTA_INVENTORY_FORMAT | Format of the inventory file. `json` or `yaml`. | No | `yaml` |
|
||||
| ANTA_CATALOG_FORMAT | Format of the catalog file. `json` or `yaml`. | No | `yaml` |
|
||||
| ANTA_TAGS | A list of tags to filter which tests to run on which devices. | No | - |
|
||||
| ANTA_NRFU_IGNORE_STATUS | Exit code will always be 0. | No | False |
|
||||
| ANTA_NRFU_IGNORE_ERROR | Exit code will be 0 if all tests succeeded or 1 if any test failed. | No | False |
|
||||
| ANTA_NRFU_DRY_RUN | Run `anta nrfu` command but stop before running the tests. | No | False |
|
||||
|
||||
> [!NOTE]
|
||||
> Caching can be disabled with the global parameter `--disable-cache`. For more details about how caching is implemented in ANTA, please refer to [Caching in ANTA](../advanced_usages/caching.md).
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<!--
|
||||
~ Copyright (c) 2023-2024 Arista Networks, Inc.
|
||||
~ Copyright (c) 2023-2025 Arista Networks, Inc.
|
||||
~ Use of this source code is governed by the Apache License 2.0
|
||||
~ that can be found in the LICENSE file.
|
||||
-->
|
||||
|
@ -64,15 +64,14 @@ Tags can be defined in the test catalog to restrict tests to tagged devices:
|
|||
anta.tests.system:
|
||||
- VerifyUptime:
|
||||
minimum: 10
|
||||
filters:
|
||||
tags: ['spine']
|
||||
filters: tags: [spine]
|
||||
- VerifyUptime:
|
||||
minimum: 9
|
||||
filters:
|
||||
tags: ['leaf']
|
||||
tags: [leaf]
|
||||
- VerifyReloadCause:
|
||||
filters:
|
||||
tags: ['spine', 'leaf']
|
||||
tags: [spine, leaf]
|
||||
- VerifyCoredump:
|
||||
- VerifyAgentLogs:
|
||||
- VerifyCPUUtilization:
|
||||
|
@ -83,13 +82,13 @@ anta.tests.system:
|
|||
anta.tests.mlag:
|
||||
- VerifyMlagStatus:
|
||||
filters:
|
||||
tags: ['leaf']
|
||||
tags: [leaf]
|
||||
|
||||
anta.tests.interfaces:
|
||||
- VerifyL3MTU:
|
||||
mtu: 1500
|
||||
filters:
|
||||
tags: ['spine']
|
||||
tags: [spine]
|
||||
```
|
||||
|
||||
> [!TIP]
|
||||
|
@ -204,35 +203,7 @@ As most ANTA commands accommodate tag filtering, this command is useful for enum
|
|||
### Command overview
|
||||
|
||||
```bash
|
||||
Usage: anta get tags [OPTIONS]
|
||||
|
||||
Get list of configured tags in user inventory.
|
||||
|
||||
Options:
|
||||
-u, --username TEXT Username to connect to EOS [env var: ANTA_USERNAME;
|
||||
required]
|
||||
-p, --password TEXT Password to connect to EOS that must be provided. It
|
||||
can be prompted using '--prompt' option. [env var:
|
||||
ANTA_PASSWORD]
|
||||
--enable-password TEXT Password to access EOS Privileged EXEC mode. It can
|
||||
be prompted using '--prompt' option. Requires '--
|
||||
enable' option. [env var: ANTA_ENABLE_PASSWORD]
|
||||
--enable Some commands may require EOS Privileged EXEC mode.
|
||||
This option tries to access this mode before sending
|
||||
a command to the device. [env var: ANTA_ENABLE]
|
||||
-P, --prompt Prompt for passwords if they are not provided. [env
|
||||
var: ANTA_PROMPT]
|
||||
--timeout FLOAT Global API timeout. This value will be used for all
|
||||
devices. [env var: ANTA_TIMEOUT; default: 30.0]
|
||||
--insecure Disable SSH Host Key validation. [env var:
|
||||
ANTA_INSECURE]
|
||||
--disable-cache Disable cache globally. [env var:
|
||||
ANTA_DISABLE_CACHE]
|
||||
-i, --inventory FILE Path to the inventory YAML file. [env var:
|
||||
ANTA_INVENTORY; required]
|
||||
--tags TEXT List of tags using comma as separator:
|
||||
tag1,tag2,tag3. [env var: ANTA_TAGS]
|
||||
--help Show this message and exit.
|
||||
--8<-- anta_get_tags_help.txt
|
||||
```
|
||||
|
||||
### Example
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue