Merging upstream version 1.1.0.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
50f8dbf7e8
commit
2044ea6182
196 changed files with 10121 additions and 3780 deletions
|
@ -1,11 +1,12 @@
|
|||
---
|
||||
anta_title: ANTA debug commands
|
||||
---
|
||||
<!--
|
||||
~ Copyright (c) 2023-2024 Arista Networks, Inc.
|
||||
~ Use of this source code is governed by the Apache License 2.0
|
||||
~ that can be found in the LICENSE file.
|
||||
-->
|
||||
|
||||
# ANTA debug commands
|
||||
|
||||
The ANTA CLI includes a set of debugging tools, making it easier to build and test ANTA content. This functionality is accessed via the `debug` subcommand and offers the following options:
|
||||
|
||||
- Executing a command on a device from your inventory and retrieving the result.
|
||||
|
@ -14,7 +15,7 @@ The ANTA CLI includes a set of debugging tools, making it easier to build and te
|
|||
These tools are especially helpful in building the tests, as they give a visual access to the output received from the eAPI. They also facilitate the extraction of output content for use in unit tests, as described in our [contribution guide](../contribution.md).
|
||||
|
||||
!!! warning
|
||||
The `debug` tools require a device from your inventory. Thus, you MUST use a valid [ANTA Inventory](../usage-inventory-catalog.md#create-an-inventory-file).
|
||||
The `debug` tools require a device from your inventory. Thus, you must use a valid [ANTA Inventory](../usage-inventory-catalog.md#device-inventory).
|
||||
|
||||
## Executing an EOS command
|
||||
|
||||
|
@ -52,8 +53,6 @@ Options:
|
|||
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]
|
||||
--ofmt [json|text] EOS eAPI format to use. can be text or json
|
||||
-v, --version [1|latest] EOS eAPI version
|
||||
-r, --revision INTEGER eAPI command revision
|
||||
|
@ -97,8 +96,9 @@ Usage: anta debug run-template [OPTIONS] PARAMS...
|
|||
Takes a list of arguments (keys followed by a value) to build a dictionary
|
||||
used as template parameters.
|
||||
|
||||
Example: ------- anta debug run-template -d leaf1a -t 'show vlan {vlan_id}'
|
||||
vlan_id 1
|
||||
Example
|
||||
-------
|
||||
anta debug run-template -d leaf1a -t 'show vlan {vlan_id}' vlan_id 1
|
||||
|
||||
Options:
|
||||
-u, --username TEXT Username to connect to EOS [env var:
|
||||
|
@ -125,8 +125,6 @@ Options:
|
|||
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]
|
||||
--ofmt [json|text] EOS eAPI format to use. can be text or json
|
||||
-v, --version [1|latest] EOS eAPI version
|
||||
-r, --revision INTEGER eAPI command revision
|
||||
|
@ -161,11 +159,12 @@ Run templated command 'show vlan {vlan_id}' with {'vlan_id': '10'} on DC1-LEAF1A
|
|||
'sourceDetail': ''
|
||||
}
|
||||
```
|
||||
!!! warning
|
||||
If multiple arguments of the same key are provided, only the last argument value will be kept in the template parameters.
|
||||
|
||||
### Example of multiple arguments
|
||||
|
||||
!!! warning
|
||||
If multiple arguments of the same key are provided, only the last argument value will be kept in the template parameters.
|
||||
|
||||
```bash
|
||||
anta -log DEBUG debug run-template --template "ping {dst} source {src}" dst "8.8.8.8" src Loopback0 --device DC1-SPINE1
|
||||
> {'dst': '8.8.8.8', 'src': 'Loopback0'}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue