Skip to main content

A collection of cli scripts to use pyavd

Project description

PyAVD cli tools

A set of tools on top of PyAVD to process AVD configurations with python.

Quick start

Install with pip inside a virtual environment:

$> python -m venv .venv
$> source .venv/bin/activate
$> pip install pyavd==<pyavd version> pyavd-cli
$> pyavd-build -i inventory.yml -f FABRIC -v

pyavd-build

It "builds" EOS cli configs from AVD config. Similar to the process done by an ansible playbook that invokes the AVD roles eos_designs and eos_cli_config_gen.

It uses ansible Inventory Manager to read the AVD inventory so ansible features work out of the box. It supports inline jinja templates and custom interface description/ip addressing via python modules.

$> pyavd-build --help
usage: pyavd-build [-h] -i INVENTORY_PATH [-o CONFIG_OUTPUT_PATH] [--avd-facts-path AVD_FACTS_PATH] -f
                   FABRIC_GROUP_NAME [-l LIMIT] [-m MAX_WORKERS] [--strict] [--vault-id [VAULT_ID ...]] [-v]

Build AVD fabric.

options:
  -h, --help            show this help message and exit
  -i INVENTORY_PATH, --inventory-path INVENTORY_PATH
                        Path to the inventory file.
  -o CONFIG_OUTPUT_PATH, --config-output-path CONFIG_OUTPUT_PATH
                        Path to the output directory.
  --avd-facts-path AVD_FACTS_PATH
                        If provided AVD facts will be written to this path.
  -f FABRIC_GROUP_NAME, --fabric-group-name FABRIC_GROUP_NAME
                        Name of the fabric group.
  -l LIMIT, --limit LIMIT
                        Limit filter for inventory.
  -m MAX_WORKERS, --max-workers MAX_WORKERS
                        Maximum number of parallel workers.
  --strict              Use strict mode and fail if there is validation errors
  --vault-id [VAULT_ID ...]
                        Vault ID used to decrypt the inventory. Multiple vault IDs can be provided.
  -v, --verbose

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyavd_cli-0.1.6.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

pyavd_cli-0.1.6-py3-none-any.whl (14.2 kB view details)

Uploaded Python 3

File details

Details for the file pyavd_cli-0.1.6.tar.gz.

File metadata

  • Download URL: pyavd_cli-0.1.6.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for pyavd_cli-0.1.6.tar.gz
Algorithm Hash digest
SHA256 617bfff190c2cc227b41dd36c00d55082d06d0608c01312537476b828b760183
MD5 c5a722e88648eb0151adecdecc5fb51b
BLAKE2b-256 99f53bb22dc11bf935d9961e206fd421907a2ef6482e6eb5c9efecbc7f6c8755

See more details on using hashes here.

File details

Details for the file pyavd_cli-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: pyavd_cli-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 14.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for pyavd_cli-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 28e86d2357ecb816913a88d0a0626d9876f4027b5015a46bda931ecd97316428
MD5 28827ea2987893e6bb077dacdf5cb32c
BLAKE2b-256 34aa248b886099aec5c6940e2e70b1477e1fb69bc71d39d341bc44c75b5e4838

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page