Skip to content

Commit

Permalink
Merge branch 'devel' into isis_authentication
Browse files Browse the repository at this point in the history
  • Loading branch information
laxmikantchintakindi committed Jul 30, 2024
2 parents 6c2b50d + 132b4fc commit c942dba
Show file tree
Hide file tree
Showing 433 changed files with 7,434 additions and 1,080 deletions.
19 changes: 10 additions & 9 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
# Collapsing generated schemas from PR diff by default
/ansible_collections/arista/avd/roles/eos_cli_config_gen/schemas/eos_cli_config_gen.schema.yml linguist-generated=true -merge -diff
/ansible_collections/arista/avd/roles/eos_cli_config_gen/schemas/eos_cli_config_gen.jsonschema.json linguist-generated=true -merge -diff
/ansible_collections/arista/avd/roles/eos_cli_config_gen/schemas/eos_cli_config_gen.schema.pickle linguist-generated=true merge=union -diff -text
/ansible_collections/arista/avd/roles/eos_designs/schemas/eos_designs.schema.yml linguist-generated=true -merge -diff
/ansible_collections/arista/avd/roles/eos_designs/schemas/eos_designs.jsonschema.json linguist-generated=true -merge -diff
/ansible_collections/arista/avd/roles/eos_designs/schemas/eos_designs.schema.pickle linguist-generated=true merge=union -diff -text
/python-avd/pyavd/_eos_cli_config_gen/schema/eos_cli_config_gen.schema.yml linguist-generated=true -merge -diff
/python-avd/pyavd/_eos_cli_config_gen/schema/eos_cli_config_gen.jsonschema.json linguist-generated=true -merge -diff
/python-avd/pyavd/_eos_designs/schema/eos_designs.schema.yml linguist-generated=true -merge -diff
/python-avd/pyavd/_eos_designs/schema/eos_designs.jsonschema.json linguist-generated=true -merge -diff

# Collapsing generated tables from PR diff by default
/ansible_collections/arista/avd/roles/eos_cli_config_gen/tables/* linguist-generated=true -merge -diff
/ansible_collections/arista/avd/roles/eos_designs/tables/* linguist-generated=true -merge -diff
# Showing generated tables in PR diff by default by count as generated and automatically use the latest file on merge
/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/* linguist-generated=true -merge diff
/ansible_collections/arista/avd/roles/eos_designs/docs/tables/* linguist-generated=true -merge diff

# Collapsing generated plugins doc from PR diff by default
/ansible_collections/arista/avd/docs/plugins/* linguist-generated=true
Expand All @@ -19,3 +17,6 @@
# Excluding docs from stats for linguist
/ansible_collections/arista/avd/roles/*/docs/* linguist-documentation
/ansible_collections/arista/avd/docs/* linguist-documentation

# CV API files are generated from proto files
/python-avd/pyavd/_cv/api linguist-generated=true
4 changes: 2 additions & 2 deletions .github/workflows/new-cvp-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Run molecule action
env:
CVAAS_AAWG_CI: ${{ secrets.CVAAS_AAWG_CI }}
uses: arista-netdevops-community/action-molecule-avd@v1.7
uses: arista-netdevops-community/action-molecule-avd@v1.8.1
with:
molecule_parentdir: 'ansible_collections/arista/avd'
molecule_command: 'test'
Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:
- name: Run molecule action
env:
CVAAS_AAWG_CI: ${{ secrets.CVAAS_AAWG_CI }}
uses: arista-netdevops-community/action-molecule-avd@v1.7
uses: arista-netdevops-community/action-molecule-avd@v1.8.1
with:
molecule_parentdir: 'ansible_collections/arista/avd'
molecule_command: 'test'
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/pull-request-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ jobs:
source test-avd-pr-${{ github.event.pull_request.number }}/bin/activate
# Install all requirements including PyAVD
pip install "pyavd[ansible] @ git+${{ github.event.pull_request.head.repo.clone_url }}@${{ github.event.pull_request.head.ref }}#subdirectory=python-avd" --force
# Point Ansible collections path to the Python virtual environment
export ANSIBLE_COLLECTIONS_PATH=$VIRTUAL_ENV/ansible_collections
# Install Ansible collection
ansible-galaxy collection install git+${{ github.event.pull_request.head.repo.clone_url }}#/ansible_collections/arista/avd/,${{ github.event.pull_request.head.ref }} --force
# Optional: Install AVD examples
Expand Down
17 changes: 8 additions & 9 deletions .github/workflows/pull-request-management.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ jobs:
fail-fast: true
matrix:
python_version:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
Expand Down Expand Up @@ -141,7 +140,7 @@ jobs:
echo "ANSIBLE_FORCE_COLOR=1" >> $GITHUB_ENV
- uses: actions/checkout@v4
- name: Run molecule action
uses: arista-netdevops-community/action-molecule-avd@v1.7
uses: arista-netdevops-community/action-molecule-avd@v1.8.1
with:
molecule_parentdir: 'ansible_collections/arista/avd'
molecule_command: 'test'
Expand Down Expand Up @@ -176,7 +175,7 @@ jobs:
echo "ANSIBLE_FORCE_COLOR=1" >> $GITHUB_ENV
- uses: actions/checkout@v4
- name: Run molecule action
uses: arista-netdevops-community/action-molecule-avd@v1.7
uses: arista-netdevops-community/action-molecule-avd@v1.8.1
with:
molecule_parentdir: 'ansible_collections/arista/avd'
molecule_command: 'test'
Expand Down Expand Up @@ -247,7 +246,7 @@ jobs:
cat ${{ matrix.pip_requirements }}
if: matrix.pip_requirements == 'tmp-requirements-minimum.txt'
- name: Run molecule action
uses: arista-netdevops-community/action-molecule-avd@v1.7
uses: arista-netdevops-community/action-molecule-avd@v1.8.1
with:
molecule_parentdir: 'ansible_collections/arista/avd'
molecule_command: 'test'
Expand Down Expand Up @@ -286,7 +285,7 @@ jobs:
echo "ANSIBLE_FORCE_COLOR=1" >> $GITHUB_ENV
- uses: actions/checkout@v4
- name: Run molecule action
uses: arista-netdevops-community/action-molecule-avd@v1.7
uses: arista-netdevops-community/action-molecule-avd@v1.8.1
with:
molecule_parentdir: 'ansible_collections/arista/avd'
molecule_command: 'test'
Expand Down Expand Up @@ -326,7 +325,7 @@ jobs:
echo "ANSIBLE_FORCE_COLOR=1" >> $GITHUB_ENV
- uses: actions/checkout@v4
- name: Run molecule action
uses: arista-netdevops-community/action-molecule-avd@v1.7
uses: arista-netdevops-community/action-molecule-avd@v1.8.1
with:
molecule_parentdir: 'ansible_collections/arista/avd'
molecule_command: 'test'
Expand All @@ -344,8 +343,8 @@ jobs:
name: Run ansible-test sanity validation
runs-on: ubuntu-latest
needs: [ file-changes ]
#needs: [ molecule_eos_designs, molecule_cloudvision ]
#if: needs.cloudvision.status != 'failed' && needs.molecule_eos_designs.status != 'failed' && needs.file-changes.outputs.plugins == 'true'
# needs: [ molecule_eos_designs, molecule_cloudvision ]
# if: needs.cloudvision.status != 'failed' && needs.molecule_eos_designs.status != 'failed' && needs.file-changes.outputs.plugins == 'true'
steps:
- name: 'Set environment variables'
run: |
Expand Down Expand Up @@ -482,7 +481,7 @@ jobs:
needs.file-changes.outputs.pyavd == 'true'
strategy:
matrix:
python: ["3.9", "3.10", "3.11", "3.12"]
python: ["3.10", "3.11", "3.12"]
steps:
- name: 'Set environment variables'
run: |
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/pull-request-rn-labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# changed post merge
name: "Label for Release Notes"


on:
pull_request_target:
types:
Expand Down
55 changes: 38 additions & 17 deletions .github/yamllintrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
# Used by pre-commit. There is a similar file under the Ansible collection used by ansible-lint.
extends: default

yaml-files:
Expand All @@ -8,31 +9,51 @@ yaml-files:

rules:
braces:
level: warning
min-spaces-inside: 0
max-spaces-inside: 1
level: error
brackets:
level: warning
max-spaces-inside: 1
level: error
colons:
level: warning
max-spaces-after: -1
level: error
commas:
level: warning
comments: disable
comments-indentation: disable
max-spaces-after: -1
level: error
comments:
# prettier compatibility
min-spaces-from-content: 1
level: error
comments-indentation: false
document-start: disable
empty-lines:
level: warning
max: 1
level: error
ignore:
- /python-avd/pyavd/**/schema/*.schema.yml
- /python-avd/tests/pyavd/schema/
- /python-avd/tests/schema_tools/artifacts/*.schema.yml
hyphens:
level: warning
level: error
key-duplicates:
forbid-duplicated-merge-keys: true
line-length:
max: 160
ignore:
- /ansible_collections/arista/avd/molecule/**/intended/structured_configs/
- /ansible_collections/arista/avd/molecule/**/intended/structured_configs/cvp/
- /ansible_collections/arista/avd/examples/**/intended/structured_configs/cvp/
- /ansible_collections/arista/avd/changelogs/fragments_backup/
- /ansible_collections/arista/avd/tests/inventory/**/expected_output/
- /python-avd/pyavd/**/schema/
- /.github/workflows/
new-lines:
type: unix
indentation:
level: warning
level: error
indent-sequences: consistent
line-length:
max: 350
level: warning
allow-non-breakable-inline-mappings: true
octal-values:
forbid-implicit-octal: true
forbid-explicit-octal: true
truthy: disable

ignore: |
ansible_collections/arista/avd/molecule/Makefile
ansible_collections/arista/avd/molecule/README.md
21 changes: 10 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,16 @@ __pycache__/
*.pickle

# pyavd ignores
python-avd/build/
python-avd/dist/
python-avd/vendor/
python-avd/tests/pyavd/artifacts/
python-avd/pyavd.egg-info/
python-avd/.tox/
python-avd/.coverage
python-avd/.mypy_cache/
/python-avd/build/
/python-avd/dist/
/python-avd/vendor/
/python-avd/tests/pyavd/artifacts/
/python-avd/pyavd.egg-info/
/python-avd/.tox/
/python-avd/.coverage
/python-avd/.mypy_cache/
# Ignore cloned cloudvision-python repo created during generation of _cv/api
/python-avd/pyavd/_cv/cloudvision-apis/

# top level installers
/*.tar.gz
Expand All @@ -30,9 +32,6 @@ python-avd/.mypy_cache/
# ansible_collections/arista/avd/tests ignores
ansible_collections/arista/avd/tests/.mypy_cache/

# Ignore cloned cloudvision-python repo created during generation of cv_client/api
ansible_collections/arista/avd/plugins/plugin_utils/cv_client/cloudvision-apis/

# Development
## pyenv
.python-version
Expand Down
22 changes: 16 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -170,15 +170,19 @@ repos:

- id: docs-plugin-modules
name: Build documentation for collection modules and action plugins.
entry: ansible-doc-extractor --template ansible_collections/arista/avd/docs/templates/plugin-docs.j2 --markdown "ansible_collections/arista/avd/docs/plugins/Modules_and_action_plugins/"
entry: >-
ansible-doc-extractor --template ansible_collections/arista/avd/docs/templates/plugin-docs.j2
--markdown "ansible_collections/arista/avd/docs/plugins/Modules_and_action_plugins/"
language: python
types: [python]
additional_dependencies: ['ansible-doc-extractor>=0.1.10', 'ansible-core>=2.15.0,<2.18.0']
files: ansible_collections/arista/avd/plugins/modules/

- id: docs-plugin-filter
name: Build documentation for collection filter plugins.
entry: ansible-doc-extractor --template ansible_collections/arista/avd/docs/templates/plugin-docs.j2 --markdown "ansible_collections/arista/avd/docs/plugins/Filter_plugins/"
entry: >-
ansible-doc-extractor --template ansible_collections/arista/avd/docs/templates/plugin-docs.j2
--markdown "ansible_collections/arista/avd/docs/plugins/Filter_plugins/"
language: python
types_or: [python, yaml]
additional_dependencies: ['ansible-doc-extractor>=0.1.10', 'ansible-core>=2.15.0,<2.18.0']
Expand All @@ -187,23 +191,29 @@ repos:

- id: docs-plugin-lookup
name: Build documentation for collection lookup plugins.
entry: ansible-doc-extractor --template ansible_collections/arista/avd/docs/templates/plugin-docs.j2 --markdown "ansible_collections/arista/avd/docs/plugins/Lookup_plugins/"
entry: >-
ansible-doc-extractor --template ansible_collections/arista/avd/docs/templates/plugin-docs.j2
--markdown "ansible_collections/arista/avd/docs/plugins/Lookup_plugins/"
language: python
types: [python]
additional_dependencies: ['ansible-doc-extractor>=0.1.10', 'ansible-core>=2.15.0,<2.18.0']
files: ansible_collections/arista/avd/plugins/lookup/

- id: docs-plugin-test
name: Build documentation for collection test plugins.
entry: ansible-doc-extractor --template ansible_collections/arista/avd/docs/templates/plugin-docs.j2 --markdown "ansible_collections/arista/avd/docs/plugins/Test_plugins/"
entry: >-
ansible-doc-extractor --template ansible_collections/arista/avd/docs/templates/plugin-docs.j2
--markdown "ansible_collections/arista/avd/docs/plugins/Test_plugins/"
language: python
types: [python]
additional_dependencies: ['ansible-doc-extractor>=0.1.10', 'ansible-core>=2.15.0,<2.18.0']
files: ansible_collections/arista/avd/plugins/test/

- id: docs-plugin-vars
name: Build documentation for collection var plugins.
entry: ansible-doc-extractor --template ansible_collections/arista/avd/docs/templates/plugin-docs.j2 --markdown "ansible_collections/arista/avd/docs/plugins/Vars_plugins/"
entry: >-
ansible-doc-extractor --template ansible_collections/arista/avd/docs/templates/plugin-docs.j2
--markdown "ansible_collections/arista/avd/docs/plugins/Vars_plugins/"
language: python
types: [python]
additional_dependencies: ['ansible-doc-extractor>=0.1.10', 'ansible-core>=2.15.0,<2.18.0']
Expand All @@ -223,7 +233,7 @@ repos:
language: python
files: python-avd/pyavd/_eos_cli_config_gen/j2templates/
pass_filenames: false
additional_dependencies: ['Jinja2>=3.0.0', 'cryptography>=38.0.4', 'deepmerge>=1.1.0', 'PyYAML>=6.0.0', 'pydantic>=2.3.0', 'jsonschema>=4.10.3', 'referencing>=0.35.0']
additional_dependencies: ['Jinja2>=3.0.0', 'cryptography>=38.0.4', 'deepmerge>=1.1.0', 'jsonschema>=4.10.3']

- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.41.0
Expand Down
2 changes: 1 addition & 1 deletion .sonarcloud.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Python version
sonar.python.version=3.9, 3.10, 3.11, 3.12
sonar.python.version=3.10, 3.11, 3.12
# Exclude tests from source
sonar.exclusions=python-avd/tests/**
# Path to tests
Expand Down
33 changes: 24 additions & 9 deletions ansible_collections/arista/avd/.yamllint
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
---
# Based on ansible-lint config
# Based on ansible-lint config - https://ansible.readthedocs.io/projects/lint/rules/yaml/#yamllint-configuration
extends: default

rules:
braces:
min-spaces-inside: 0
max-spaces-inside: 1
level: error
brackets:
Expand All @@ -15,19 +16,33 @@ rules:
commas:
max-spaces-after: -1
level: error
comments: disable
comments-indentation: disable
comments:
# prettier compatibility
min-spaces-from-content: 1
level: error
comments-indentation: false
document-start: disable
empty-lines:
max: 3
max: 1
level: error
hyphens:
level: error
indentation: disable
key-duplicates: enable
line-length: disable
new-line-at-end-of-file: disable
key-duplicates:
forbid-duplicated-merge-keys: true
line-length:
max: 160
ignore:
- /molecule/**/intended/structured_configs/
- /molecule/**/intended/structured_configs/cvp/
- /examples/**/intended/structured_configs/cvp/
- /changelogs/fragments_backup/
- /tests/inventory/**/expected_output
new-lines:
type: unix
trailing-spaces: disable
indentation:
level: error
indent-sequences: consistent
octal-values:
forbid-implicit-octal: true
forbid-explicit-octal: true
truthy: disable
Loading

0 comments on commit c942dba

Please sign in to comment.