Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Dec 13, 2024
1 parent 0e6dc49 commit bb86ad6
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 16 deletions.
2 changes: 1 addition & 1 deletion docs/advanced_usages/as-python-lib.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ The [AntaInventory](../api/inventory.md#anta.inventory.AntaInventory) class is a
```

> [!NOTE]
> __How to create your inventory file__
> **How to create your inventory file**
>
> Please visit this [dedicated section](../usage-inventory-catalog.md) for how to use inventory and catalog files.
Expand Down
16 changes: 8 additions & 8 deletions docs/advanced_usages/custom-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,12 @@ Full AntaTest API documentation is available in the [API documentation section](
heading_level: 10

> [!NOTE]
> __Logger object__
> **Logger object**
>
> ANTA already provides comprehensive logging at every steps of a test execution. The [AntaTest](../api/models.md#anta.models.AntaTest) class also provides a `logger` attribute that is a Python logger specific to the test instance. See [Python documentation](https://docs.python.org/3/library/logging.html) for more information.
> [!NOTE]
> __AntaDevice object__
> **AntaDevice object**
>
> Even if `device` is not a private attribute, you should not need to access this object in your code.
Expand Down Expand Up @@ -198,13 +198,13 @@ class <YourTestName>(AntaTest):
```

> [!TIP]
> __Command revision and version__
> **Command revision and version**
>
> * Most of EOS commands return a JSON structure according to a model (some commands may not be modeled hence the necessity to use `text` outformat sometimes.
> * The model can change across time (adding feature, ... ) and when the model is changed in a non backward-compatible way, the **revision** number is bumped. The initial model starts with **revision** 1.
> * A **revision** applies to a particular CLI command whereas a **version** is global to an eAPI call. The **version** is internally translated to a specific **revision** for each CLI command in the RPC call. The currently supported **version** values are `1` and `latest`.
> * A **revision takes precedence over a version** (e.g. if a command is run with version="latest" and revision=1, the first revision of the model is returned)
> * By default, eAPI returns the first revision of each model to ensure that when upgrading, integrations with existing tools are not broken. This is done by using by default `version=1` in eAPI calls.
> - Most of EOS commands return a JSON structure according to a model (some commands may not be modeled hence the necessity to use `text` outformat sometimes.
> - The model can change across time (adding feature, ... ) and when the model is changed in a non backward-compatible way, the **revision** number is bumped. The initial model starts with **revision** 1.
> - A **revision** applies to a particular CLI command whereas a **version** is global to an eAPI call. The **version** is internally translated to a specific **revision** for each CLI command in the RPC call. The currently supported **version** values are `1` and `latest`.
> - A **revision takes precedence over a version** (e.g. if a command is run with version="latest" and revision=1, the first revision of the model is returned)
> - By default, eAPI returns the first revision of each model to ensure that when upgrading, integrations with existing tools are not broken. This is done by using by default `version=1` in eAPI calls.
>
> By default, ANTA uses `version="latest"` in AntaCommand, but when developing tests, the revision MUST be provided when the outformat of the command is `json`. As explained earlier, this is to ensure that the eAPI always returns the same output model and that the test remains always valid from the day it was created. For some commands, you may also want to run them with a different revision or version.
>
Expand Down
2 changes: 1 addition & 1 deletion docs/cli/exec.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ ANTA uses SCP to download files from devices and will not trust unknown SSH host
The configuration `aaa authorization exec default` must be present on devices to be able to use SCP.
> [!CAUTION]
> __Deprecation__
> **Deprecation**
>
> ANTA can automatically configure `aaa authorization exec default local` using the `anta exec collect-tech-support --configure` option but this option is deprecated and will be removed in ANTA 2.0.0.
Expand Down
7 changes: 4 additions & 3 deletions docs/cli/inv-from-ansible.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,12 @@ Options:
```

> [!WARNING]warning
> * `anta get from-ansible` does not support inline vaulted variables, comment them out to generate your inventory.
>
> * If the vaulted variable is necessary to build the inventory (e.g. `ansible_host`), it needs to be unvaulted for `from-ansible` command to work."
> - `anta get from-ansible` does not support inline vaulted variables, comment them out to generate your inventory.
>
> * The current implementation only considers devices directly attached to a specific Ansible group and does not support inheritance when using the `--ansible-group` option.
> - If the vaulted variable is necessary to build the inventory (e.g. `ansible_host`), it needs to be unvaulted for `from-ansible` command to work."
>
> - The current implementation only considers devices directly attached to a specific Ansible group and does not support inheritance when using the `--ansible-group` option.
By default, if user does not provide `--output` file, anta will save output to configured anta inventory (`anta --inventory`). If the output file has content, anta will ask user to overwrite when running in interactive console. This mechanism can be controlled by triggers in case of CI usage: `--overwrite` to force anta to overwrite file. If not set, anta will exit

Expand Down
2 changes: 1 addition & 1 deletion docs/cli/tag-management.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ anta.tests.interfaces:
> A tag used to filter a test can also be a device name
> [!TIP]
> __Use different input values for a specific test__
> **Use different input values for a specific test**
>
> Leverage tags to define different input values for a specific test. See the `VerifyUptime` example above.

Expand Down
2 changes: 1 addition & 1 deletion docs/contribution.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ Success: no issues found in 82 source files
## Unit tests with Pytest

To keep high quality code, we require to provide a __Pytest__ for every tests implemented in ANTA.
To keep high quality code, we require to provide a **Pytest** for every tests implemented in ANTA.

All submodule should have its own pytest section under `tests/units/anta_tests/<submodule-name>.py`.

Expand Down
2 changes: 1 addition & 1 deletion docs/usage-inventory-catalog.md
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ custom.tests.system:
```

> [!TIP]
> __How to create custom tests__
> **How to create custom tests**
>
> To create your custom tests, you should refer to this [documentation](advanced_usages/custom-tests.md)

Expand Down

0 comments on commit bb86ad6

Please sign in to comment.