Skip to content

Commit

Permalink
Remove convert_dicts plugin and clean up related schema tooling
Browse files Browse the repository at this point in the history
  • Loading branch information
ClausHolbechArista committed Aug 6, 2024
1 parent 592a52f commit 79a4c55
Show file tree
Hide file tree
Showing 386 changed files with 537 additions and 1,384 deletions.

This file was deleted.

81 changes: 76 additions & 5 deletions ansible_collections/arista/avd/docs/porting-guides/5.x.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,12 @@ The following ansible plugins have been removed from the `arista.avd` Ansible co

| Plugin type | Plugin name | Replacement |
| ----------- | ----------- | ----------- |
| Filter | `arista.avd.hash_passphrase` | Use `arista.avd.snmp_hash` instead |
| Filter | `arista.avd.generate_esi` | Use Jinja string concatenation instead like `{{ <esi_prefix> ~ <short_esi> }}` |
| Filter | `arista.avd.generate_lacp_id` | Use the builtin `replace` filter instead like `{{ <short_esi> \| replace(':', '.') }}` |
| Filter | `arista.avd.generate_route_target` | 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') }}` |
| Action plugin/Module | `arista.avd.deploy_to_cv` | Use `arista.avd.cv_workflow` instead |
| Filter | `arista.avd.convert_dicts` | The internal `arista.avd.convert_dicts` filter plugin is no longer used by AVD. The plugin is released as open source, so it can be copied and reused according to the license and copyright. |
| Filter | `arista.avd.hash_passphrase` | Use `arista.avd.snmp_hash` instead. |
| Filter | `arista.avd.generate_esi` | Use Jinja string concatenation instead like `{{ <esi_prefix> ~ <short_esi> }}`. |
| Filter | `arista.avd.generate_lacp_id` | Use the builtin `replace` filter instead like `{{ <short_esi> \| replace(':', '.') }}`. |
| Filter | `arista.avd.generate_route_target` | 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') }}`. |
| Action plugin/Module | `arista.avd.deploy_to_cv` | Use `arista.avd.cv_workflow` instead. |
| Action plugin/Module | `arista.avd.batch_template` | The internal `arista.avd.batch_template` action plugin is no longer used by AVD. The plugin is released as open source, so it can be copied and reused according to the license and copyright. |
| Action plugin/Module | `arista.avd.validate_and_template` | The internal `arista.avd.validate_and_template` action plugin is no longer used by AVD. The plugin is released as open source, so it can be copied and reused according to the license and copyright. |
| Action plugin/Module | `arista.avd.yaml_templates_to_facts` | The internal `arista.avd.yaml_templates_to_facts` action plugin is no longer used by AVD. The plugin is released as open source, so it can be copied and reused according to the license and copyright. |
Expand All @@ -89,6 +90,76 @@ The following data model keys have been removed from `eos_designs` in v5.0.0.
| svi_profiles[].ipv6_address_virtual | svi_profiles[].ipv6_address_virtuals |
| ptp | ptp_settings |

### custom_structured_configuration_prefix no longer accepts a string

Starting AVD 5.0.0, `custom_structured_configuration_prefix` only accepts a list of strings.
Previously it also accepted a string, which was autoconverted to a list.

```diff
- custom_structured_configuration_prefix: myprefix
+ custom_structured_configuration_prefix: ["myprefix"]
```

### default_overlay_address_families and overlay_address_families no longer accepts a string

Starting AVD 5.0.0, `node_type_keys[].default_overlay_address_families` and `<node_type_key>.defaults.overlay_address_families` only accept a list of strings.
Previously they also accepted a string, which was autoconverted to a list.

```diff
node_type_keys:
- key: my_node_type
type: my_node_type
- default_overlay_address_families: "evpn"
+ default_overlay_address_families: ["evpn"]
<node_type_key - ex. l3leaf>:
defaults:
- overlay_address_families: "vpn-ipv4"
+ overlay_address_families: ["vpn-ipv4"]
node_groups:
- group: mygroup
- overlay_address_families: "vpn-ipv4"
+ overlay_address_families: ["vpn-ipv4"]
nodes:
- name: leaf1
- overlay_address_families: "vpn-ipv6"
+ overlay_address_families: ["vpn-ipv6"]
nodes:
- name: leaf2
- overlay_address_families: "vpn-ipv6"
+ overlay_address_families: ["vpn-ipv6"]
```

#### mpls_route_servers no longer accepts a string

Starting AVD 5.0.0, `<node_type_key>.defaults.mpls_route_servers` only accepts a list of strings.
Previously it also accepted a string, which was autoconverted to a list.

```diff
node_type_keys:
- key: my_node_type
type: my_node_type
- mpls_route_servers: "10.10.10.10"
+ mpls_route_servers: ["10.10.10.10"]
<node_type_key - ex. l3leaf>:
defaults:
- mpls_route_servers: "10.10.10.10"
+ mpls_route_servers: ["10.10.10.10"]
node_groups:
- group: mygroup
- mpls_route_servers: "10.10.10.10"
+ mpls_route_servers: ["10.10.10.10"]
nodes:
- name: leaf1
- mpls_route_servers: "20.20.20.20"
+ mpls_route_servers: ["20.20.20.20"]
nodes:
- name: leaf2
- mpls_route_servers: "10.10.10.10"
+ mpls_route_servers: ["20.20.20.20"]
```

## Changes to role `arista.avd.eos_cli_config_gen`

TODO: Level 3 sections for each change with details on how to migrate
Expand Down
24 changes: 23 additions & 1 deletion ansible_collections/arista/avd/docs/release-notes/5.x.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ The following ansible plugins have been removed from the `arista.avd` Ansible co

Filters:

- `arista.avd.convert_dicts`
- `arista.avd.hash_passphrase`
- `arista.avd.generate_esi`
- `arista.avd.generate_lacp_id`
Expand All @@ -35,7 +36,7 @@ Action plugins / Modules:
- `arista.avd.batch_template`
- `arista.avd.validate_and_template`
- `arista.avd.yaml_templates_to_facts`
- `arista.avd._emit_warning
- `arista.avd._emit_warning`

See the [porting guide](../porting-guides/5.x.x.md#removal-of-ansible-plugins) for details.

Expand Down Expand Up @@ -80,6 +81,27 @@ for details.

TODO: add level4 sections for breaking changes outlining the change and referring to porting guide for migration.

#### custom_structured_configuration_prefix no longer accepts a string

Starting AVD 5.0.0, `custom_structured_configuration_prefix` only accepts a list of strings.
Previously it also accepted a string, which was autoconverted to a list.

See the [porting guide](../porting-guides/5.x.x.md#) for details.

#### default_overlay_address_families and overlay_address_families no longer accept a string

Starting AVD 5.0.0, `node_type_keys[].default_overlay_address_families` and `<node_type_key>.defaults.overlay_address_families` only accept a list of strings.
Previously they also accepted a string, which was autoconverted to a list.

See the [porting guide](../porting-guides/5.x.x.md#) for details.

#### mpls_route_servers no longer accepts a string

Starting AVD 5.0.0, `<node_type_key>.defaults.mpls_route_servers` only accepts a list of strings.
Previously it also accepted a string, which was autoconverted to a list.

See the [porting guide](../porting-guides/5.x.x.md#) for details.

#### Removal of schema in JSON format

The `eos_designs.jsonschema.json` is no longer generated. This schema was not being used and had never been complete.
Expand Down
1 change: 0 additions & 1 deletion ansible_collections/arista/avd/docs/semantic-versioning.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ All roles input variables follow SemVer. Any breaking changes will, at a minimum
| Plugins | Inputs Follow SemVer | Outputs Follow SemVer | Notes |
| ------- | :------------------: | :-------------------: | ----- |
| Filter: `add_md_toc` ||| |
| Filter: `convert_dicts` ||| |
| Filter: `decrypt` ||| |
| Filter: `default` ||| |
| Filter: `encrypt` ||| |
Expand Down
6 changes: 6 additions & 0 deletions ansible_collections/arista/avd/meta/runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
requires_ansible: '>=2.15.0,<2.18.0'
plugin_routing:
filter:
convert_dicts:
tombstone:
removal_version: 5.0.0
warning_text: |-
The internal 'arista.avd.convert_dicts' filter plugin is no longer used by AVD.
The plugin is released as open source, so it can be copied and reused according to the license and copyright.
hash_passphrase:
redirect: arista.avd.snmp_hash
tombstone:
Expand Down
105 changes: 0 additions & 105 deletions ansible_collections/arista/avd/plugins/filter/convert_dicts.py

This file was deleted.

Loading

0 comments on commit 79a4c55

Please sign in to comment.