Skip to content

Commit

Permalink
Merge branch 'devel' into deprecation-placeholder
Browse files Browse the repository at this point in the history
  • Loading branch information
MaheshGSLAB authored Jul 30, 2024
2 parents 5caaa80 + b282b6c commit efa742d
Show file tree
Hide file tree
Showing 154 changed files with 504 additions and 344 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/pull-request-management.yml
Original file line number Diff line number Diff line change
Expand Up @@ -343,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
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
20 changes: 15 additions & 5 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 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
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ tasks:
copy:
content: "{{ lookup('template','documentation/fabric-documentation.j2') | arista.avd.add_md_toc(skip_lines=3) }}"
dest: "{{ fabric_dir }}/{{ fabric_name }}-documentation.md"
mode: 0664
mode: "0o664"
```
## Return Values
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ The `arista.avd.eos_designs_structured_config` module is an Ansible Action Plugi
| <samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;list_merge</samp> | str | False | append | | Merge strategy for lists |
| <samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;strip_empty_keys</samp> | bool | False | True | | Filter out keys from the generated output if value is null/none/undefined<br>Only applies to templates. |
| <samp>dest</samp> | str | False | None | | Destination path. If set, the output facts will also be written to this path.<br>Autodetects data format based on file suffix. &#39;.yml&#39;, &#39;.yaml&#39; -&gt; YAML, default -&gt; JSON |
| <samp>mode</samp> | str | False | None | | File mode (ex. 0664) for dest file. See &#39;ansible.builtin.copy&#39; module for details. |
| <samp>mode</samp> | str | False | None | | File mode (ex. &#34;0o664&#34;) for dest file. See &#39;ansible.builtin.copy&#39; module for details. |
| <samp>template_output</samp> | bool | False | None | | If true, the output data will be run through another jinja2 rendering before returning.<br>This is to resolve any input values with inline jinja using variables/facts set by the input templates. |
| <samp>conversion_mode</samp> | str | False | debug | Valid values:<br>- <code>error</code><br>- <code>warning</code><br>- <code>info</code><br>- <code>debug</code><br>- <code>quiet</code><br>- <code>disabled</code> | Run data conversion in either &#34;error&#34;, &#34;warning&#34;, &#34;info&#34;, &#34;debug&#34;, &#34;quiet&#34; or &#34;disabled&#34; mode.<br>Conversion will perform type conversion of input variables as defined in the schema.<br>Conversion is intended to help the user to identify minor issues with the input data, while still allowing the data to be validated.<br>During conversion, messages will be generated with information about the host(s) and key(s) which required conversion.<br>conversion_mode:disabled means that conversion will not run.<br>conversion_mode:error will produce error messages and fail the task.<br>conversion_mode:warning will produce warning messages.<br>conversion_mode:info will produce regular log messages.<br>conversion_mode:debug will produce hidden messages viewable with -v.<br>conversion_mode:quiet will not produce any messages. |
| <samp>validation_mode</samp> | str | False | warning | Valid values:<br>- <code>error</code><br>- <code>warning</code><br>- <code>info</code><br>- <code>debug</code><br>- <code>disabled</code> | Run validation in either &#34;error&#34;, &#34;warning&#34;, &#34;info&#34;, &#34;debug&#34; or &#34;disabled&#34; mode.<br>Validation will validate the input variables according to the schema.<br>During validation, messages will be generated with information about the host(s) and key(s) which failed validation.<br>validation_mode:disabled means that validation will not run.<br>validation_mode:error will produce error messages and fail the task.<br>validation_mode:warning will produce warning messages.<br>validation_mode:info will produce regular log messages.<br>validation_mode:debug will produce hidden messages viewable with -v. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ For Markdown files the plugin can also run md_toc on the output before writing t
arista.avd.validate_and_template:
template: "eos-device-documentation.j2"
dest: "{{ devices_dir }}/{{ inventory_hostname }}.md"
mode: 0664
mode: "0o664"
schema: "{{ lookup('ansible.builtin.file', role_schema_path) | from_yaml }}"
conversion_mode: "{{ avd_data_conversion_mode }}"
validation_mode: "{{ avd_data_validation_mode }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Set facts from YAML produced by Jinja2 templates
| <samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;strip_empty_keys</samp> | bool | False | True | | Filter out keys from the generated output if value is null/none/undefined. Only applies to templates. |
| <samp>debug</samp> | bool | False | None | | Output list &#39;avd_yaml_templates_to_facts_debug&#39; with timestamps of each performed action. |
| <samp>dest</samp> | str | False | None | | Destination path. If set, the output facts will also be written to this path.<br>Autodetects data format based on file suffix. &#39;.yml&#39;, &#39;.yaml&#39; -&gt; YAML, default -&gt; JSON |
| <samp>mode</samp> | str | False | None | | File mode (ex. 0664) for dest file. See &#39;ansible.builtin.copy&#39; module for details. |
| <samp>mode</samp> | str | False | None | | File mode (ex. &#34;0o664&#34;) for dest file. See &#39;ansible.builtin.copy&#39; module for details. |
| <samp>template_output</samp> | bool | False | None | | If true, the output data will be run through another jinja2 rendering before returning.<br>This is to resolve any input values with inline jinja using variables/facts set by the input templates. |
| <samp>conversion_mode</samp> | str | False | debug | Valid values:<br>- <code>error</code><br>- <code>warning</code><br>- <code>info</code><br>- <code>debug</code><br>- <code>quiet</code><br>- <code>disabled</code> | Run data conversion in either &#34;error&#34;, &#34;warning&#34;, &#34;info&#34;, &#34;debug&#34;, &#34;quiet&#34; or &#34;disabled&#34; mode.<br>Conversion will perform type conversion of input variables as defined in the schema.<br>Conversion is intended to help the user to identify minor issues with the input data, while still allowing the data to be validated.<br>During conversion, messages will be generated with information about the host(s) and key(s) which required conversion.<br>conversion_mode:disabled means that conversion will not run.<br>conversion_mode:error will produce error messages and fail the task.<br>conversion_mode:warning will produce warning messages.<br>conversion_mode:info will produce regular log messages.<br>conversion_mode:debug will produce hidden messages viewable with -v.<br>conversion_mode:quiet will not produce any messages. |
| <samp>validation_mode</samp> | str | False | warning | Valid values:<br>- <code>error</code><br>- <code>warning</code><br>- <code>info</code><br>- <code>debug</code><br>- <code>disabled</code> | Run validation in either &#34;error&#34;, &#34;warning&#34;, &#34;info&#34;, &#34;debug&#34; or &#34;disabled&#34; mode.<br>Validation will validate the input variables according to the schema.<br>During validation, messages will be generated with information about the host(s) and key(s) which failed validation.<br>validation_mode:disabled means that validation will not run.<br>validation_mode:error will produce error messages and fail the task.<br>validation_mode:warning will produce warning messages.<br>validation_mode:info will produce regular log messages.<br>validation_mode:debug will produce hidden messages viewable with -v. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ leaf:
mgmt_ip: 172.16.100.110/24
uplink_switch_interfaces: [Ethernet98/1, Ethernet98/1]


#### Override for vEOS/cEOS Lab Caveats ####
p2p_uplinks_mtu: 1500

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ servers:
mode: access
spanning_tree_portfast: edge


# Start of definitions for DC2 (identical to DC1)

# Name of the defined server.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@ l3leaf:
- Ethernet3
- Ethernet3
evpn_gateway:
# Define remote peers of the EVPN VXLAN Gateway. If the hostname can be found in the inventory, ip_address and BGP ASN will be automatically populated. Manual override takes precedence. If the peer's hostname can not be found in the inventory, ip_address and bgp_as must be defined.
# Define remote peers of the EVPN VXLAN Gateway.
# If the hostname can be found in the inventory, ip_address and BGP ASN will be automatically populated.
# Manual override takes precedence. If the peer's hostname can not be found in the inventory, ip_address and bgp_as must be defined.
remote_peers:
- hostname: dc2-leaf2a
- name: dc1-leaf2b
Expand All @@ -106,7 +108,9 @@ l3leaf:
- Ethernet4
- Ethernet4
evpn_gateway:
# Define remote peers of the EVPN VXLAN Gateway. If the hostname can be found in the inventory, ip_address and BGP ASN will be automatically populated. Manual override takes precedence. If the peer's hostname can not be found in the inventory, ip_address and bgp_as must be defined.
# Define remote peers of the EVPN VXLAN Gateway.
# If the hostname can be found in the inventory, ip_address and BGP ASN will be automatically populated.
# Manual override takes precedence. If the peer's hostname can not be found in the inventory, ip_address and bgp_as must be defined.
remote_peers:
- hostname: dc2-leaf2b
# L2 Leaf switch group
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@ l3leaf:
- Ethernet3
- Ethernet3
evpn_gateway:
# Define remote peers of the EVPN VXLAN Gateway. If the hostname can be found in the inventory, ip_address and BGP ASN will be automatically populated. Manual override takes precedence. If the peer's hostname can not be found in the inventory, ip_address and bgp_as must be defined.
# Define remote peers of the EVPN VXLAN Gateway.
# If the hostname can be found in the inventory, ip_address and BGP ASN will be automatically populated.
# Manual override takes precedence. If the peer's hostname can not be found in the inventory, ip_address and bgp_as must be defined.
remote_peers:
- hostname: dc1-leaf2a
- name: dc2-leaf2b
Expand All @@ -106,7 +108,9 @@ l3leaf:
- Ethernet4
- Ethernet4
evpn_gateway:
# Define remote peers of the EVPN VXLAN Gateway. If the hostname can be found in the inventory, ip_address and BGP ASN will be automatically populated. Manual override takes precedence. If the peer's hostname can not be found in the inventory, ip_address and bgp_as must be defined.
# Define remote peers of the EVPN VXLAN Gateway.
# If the hostname can be found in the inventory, ip_address and BGP ASN will be automatically populated.
# Manual override takes precedence. If the peer's hostname can not be found in the inventory, ip_address and bgp_as must be defined.
remote_peers:
- hostname: dc1-leaf2b

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ l3leaf:
- Ethernet4
- Ethernet4


# L2 Leaf switch group
l2leaf:
defaults:
Expand Down
4 changes: 3 additions & 1 deletion ansible_collections/arista/avd/meta/runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ plugin_routing:
generate_route_target:
deprecation:
removal_version: 5.0.0
warning_text: Use the builtin `ansible.builtin.regex_replace` filter instead like `{{ <short_esi> | ansible.builtin.regex_replace('(\\d{2})(\\d{2}):(\\d{2})(\\d{2}):(\\d{2})(\\d{2})', '\\1:\\2:\\3:\\4:\\5:\\6') }}`
warning_text: >-
Use the builtin `ansible.builtin.regex_replace` filter instead like
`{{ <short_esi> | ansible.builtin.regex_replace('(\\d{2})(\\d{2}):(\\d{2})(\\d{2}):(\\d{2})(\\d{2})', '\\1:\\2:\\3:\\4:\\5:\\6') }}`
modules:
deploy_to_cv:
deprecation:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
intended_strict_tags: "{{ lookup('file', structured_config_dir ~ '/strict_tags/' ~ intended_tag_device ~ '.yml')|from_yaml }}"
intended_value_tags: "{{ lookup('file', structured_config_dir ~ '/change_tags/' ~ intended_tag_device ~ '.yml')|from_yaml }}"


tasks:
- name: Generate random string
ansible.builtin.set_fact:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ port_profiles:
mode: trunk
vlans: "210-211"


servers:

- name: server01
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ all:
TOOLS:
hosts:
# TODO - Fix Failures in Centos images
# fatal: [centos8-systemd]: FAILED! => {"changed": false, "cmd": "/bin/systemctl", "msg": "Failed to connect to bus: No such file or directory", "rc": 1, "stderr": "Failed to connect to bus: No such file or directory\n", "stderr_lines": ["Failed to connect to bus: No such file or directory"], "stdout": "", "stdout_lines": []}
# fatal: [centos7-systemd]: FAILED! => {"changed": false, "msg": "Service is in unknown state", "status": {}}
# centos7-systemd:
# centos8-systemd:
ubuntu20-04:
Expand Down
Loading

0 comments on commit efa742d

Please sign in to comment.