Skip to content

Commit

Permalink
Bump(pyavd): Move PyAVD out of beta (aristanetworks#3433)
Browse files Browse the repository at this point in the history
  • Loading branch information
ClausHolbechArista authored Dec 15, 2023
1 parent 43b3759 commit e0c42a4
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 26 deletions.
41 changes: 23 additions & 18 deletions ansible_collections/arista/avd/docs/pyavd.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,16 @@
~ that can be found in the LICENSE file.
-->

# pyavd
# PyAVD

!!! warning
pyavd is in beta phase. Please do not use for production. Everything is subject to change.

Pyavd is a python package providing some of the features from the `arista.avd` Ansible collection without requiring Ansible. Pyavd leverages the same logic as the Ansible collection, so the generated outputs should be exactly the same based on the same inputs.
PyAVD is a python package providing some of the features from the `arista.avd` Ansible collection without requiring Ansible. PyAVD leverages the same logic as the Ansible collection, so the generated outputs should be exactly the same based on the same inputs.

Pyavd does not provide any inventory or variable management, so pyavd cannot replace a full Ansible based solution by itself. Pyavd could serve as an element in larger framework.
PyAVD does not provide any inventory or variable management, so PyAVD cannot replace a full Ansible based solution by itself. PyAVD could serve as an element in larger framework.

Supported features:

- Validation of inputs based on the [`eos_designs` input schema](../roles/eos_designs/docs/input-variables.md).
- Generation of "avd_facts" and "structured config" to be used in other pyavd functions.
- Generation of "avd_facts" and "structured config" to be used in other PyAVD functions.
- Validation of "structured config" based on the [`eos_cli_config_gen` input schema](../roles/eos_cli_config_gen/docs/input-variables.md).
- Generation of device configuration.
- Generation of device documentation.
Expand All @@ -30,14 +27,22 @@ Feedback is very welcome. Please use [GitHub discussions](https://github.com/ari

## Known limitations

- No support for inline Jinja2 or custom Jinja2 templates.
- Input data and "structured_configs" will be in-place updated by various pyavd functions.
Make sure to deep copy the data first if modifications are not allowed.
- The logic uses the hostname as the unique identifier for each device, so overlapping hostnames will not work.
- For `get_avd_facts()`, `fabric_name` is not used or verified and may differ between devices.
All devices in the given inputs will be treated as one fabric.
- `hostname` must be set in "structured_config" for each device. `hostname` *will* be set correctly when using `get_structured_config()`.
- `get_device_structured_config()`, `get_device_config()` and `get_device_doc()` are not thread-safe, so avoid running them for the same device across multiple threads.
!!! warning

Input data and "structured_configs" will be in-place updated by various PyAVD functions.
Make sure to deep copy the data first if modifications are not allowed.

!!! warning

`get_device_structured_config()`, `get_device_config()` and `get_device_doc()` are not thread-safe, so avoid running them for the same device across multiple threads.

!!! note

- No support for inline Jinja2 or custom Jinja2 templates.
- The logic uses the hostname as the unique identifier for each device, so overlapping hostnames will not work.
- For `get_avd_facts()`, `fabric_name` is not used or verified and may differ between devices.
All devices in the given inputs will be treated as one fabric.
- `hostname` *must* be set in "structured_config" for each device. `hostname` *will* be set correctly when using `get_structured_config()`.

## Roadmap

Expand All @@ -47,13 +52,13 @@ Feedback is very welcome. Please use [GitHub discussions](https://github.com/ari
- Add examples
- Add more tests (current coverage is 85%)
- Add network state validation similar to `eos_validate_state`.
- Add cloudvision tag integrations
- Make pyavd the source of AVD logic and use as a dependency for the `arista.avd` Ansible collection.
- Add CloudVision tag integrations
- Make PyAVD the source of AVD logic and use as a dependency for the `arista.avd` Ansible collection.
- Explore support for custom Jinja2 templates.

## Installation

Install `pyavd`:
Install the `pyavd` Python package:

```sh
pip3 install pyavd
Expand Down
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ nav:
- Ansible User Guide: https://docs.ansible.com/ansible/latest/user_guide/index.html
- Release Notes: docs/release-notes/4.x.x.md
- Porting Guide: docs/porting-guides/4.x.x.md
- pyavd: docs/pyavd.md
- PyAVD: docs/pyavd.md
- AVD Dev Containers:
- Overview: docs/containers/overview.md
- About:
Expand Down
4 changes: 1 addition & 3 deletions python-avd/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@
~ that can be found in the LICENSE file.
-->

# pyavd
# PyAVD

Generate Arista Validated Designs (AVD) with Python.

pyavd is in beta phase. Please do not use for production. Everything is subject to change.

See [avd.arista.com](https://avd.arista.com/stable/docs/pyavd.html) for details.

## License
Expand Down
4 changes: 2 additions & 2 deletions python-avd/pyavd/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
""" Library for running Arista Validated Designs (AVD) in Python
"""

PYAVD_PRERELEASE = "b2" # Set this to aN or bN for alpha and beta releases of pyavd itself. Empty string when pyavd is released.
PYAVD_PRERELEASE = "" # Set this to aN or bN for alpha and beta releases of pyavd itself. Empty string when pyavd is released.

__author__ = "Arista Networks"
__copyright__ = "Copyright 2023 Arista Networks"
__license__ = "Apache 2.0"
__version__ = "4.5.0b2"
__version__ = "4.5.0"

__all__ = [
"get_avd_facts",
Expand Down
5 changes: 3 additions & 2 deletions python-avd/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@
name="pyavd"
dynamic = ["version", "dependencies", "optional-dependencies"]
authors=[{ name = "Arista Networks", email = "[email protected]"}]
description="Arista validated designs"
description="Arista Validated Designs"
readme = "README.md"
license = { file = "pyavd/LICENSE" }
classifiers = [
"Operating System :: OS Independent",
"Development Status :: 4 - Beta",
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Programming Language :: Python",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Software Development :: Testing",
]
Expand Down

0 comments on commit e0c42a4

Please sign in to comment.