diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 08:35:51 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 08:35:51 +0000 |
commit | 641d0d615623d4818993e1967fc96af1eefc4605 (patch) | |
tree | c40f205eb559c8a495489262190a0be4f1829740 /docs/advanced_usages/caching.md | |
parent | Adding upstream version 0.13.0. (diff) | |
download | anta-641d0d615623d4818993e1967fc96af1eefc4605.tar.xz anta-641d0d615623d4818993e1967fc96af1eefc4605.zip |
Adding upstream version 0.14.0.upstream/0.14.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'docs/advanced_usages/caching.md')
-rw-r--r-- | docs/advanced_usages/caching.md | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/advanced_usages/caching.md b/docs/advanced_usages/caching.md index cec2467..ce4a787 100644 --- a/docs/advanced_usages/caching.md +++ b/docs/advanced_usages/caching.md @@ -47,7 +47,7 @@ There might be scenarios where caching is not wanted. You can disable caching in ```bash anta --disable-cache --username arista --password arista nrfu table ``` -2. Caching can be disabled per device, network or range by setting the `disable_cache` key to `True` when definining the ANTA [Inventory](../usage-inventory-catalog.md#create-an-inventory-file) file: +2. Caching can be disabled per device, network or range by setting the `disable_cache` key to `True` when defining the ANTA [Inventory](../usage-inventory-catalog.md#create-an-inventory-file) file: ```yaml anta_inventory: hosts: @@ -71,7 +71,7 @@ There might be scenarios where caching is not wanted. You can disable caching in ``` This approach effectively disables caching for **ALL** commands sent to devices targeted by the `disable_cache` key. -3. For tests developpers, caching can be disabled for a specific [`AntaCommand`](../advanced_usages/as-python-lib.md#antacommand-class) or [`AntaTemplate`](../advanced_usages/as-python-lib.md#antatemplate-class) by setting the `use_cache` attribute to `False`. That means the command output will always be collected on the device and therefore, never use caching. +3. For tests developers, caching can be disabled for a specific [`AntaCommand`](../advanced_usages/as-python-lib.md#antacommand-class) or [`AntaTemplate`](../advanced_usages/as-python-lib.md#antatemplate-class) by setting the `use_cache` attribute to `False`. That means the command output will always be collected on the device and therefore, never use caching. ### Disable caching in a child class of `AntaDevice` @@ -82,6 +82,6 @@ class AnsibleEOSDevice(AntaDevice): """ Implementation of an AntaDevice using Ansible HttpApi plugin for EOS. """ - def __init__(self, name: str, connection: ConnectionBase, tags: list = None) -> None: + def __init__(self, name: str, connection: ConnectionBase, tags: set = None) -> None: super().__init__(name, tags, disable_cache=True) ``` |