Skip to content

Commit

Permalink
Cut(eos_cli_config_gen): Remove automatic conversion of dict-of-dicts…
Browse files Browse the repository at this point in the history
… to lists
  • Loading branch information
ClausHolbechArista committed Aug 5, 2024
1 parent 23a02ac commit 01c192f
Show file tree
Hide file tree
Showing 87 changed files with 36 additions and 3,514 deletions.
29 changes: 28 additions & 1 deletion ansible_collections/arista/avd/docs/porting-guides/5.x.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,34 @@ built into `eos_designs`.

### Data model changes from "dict-of-dicts" to "list-of-dicts"

TODO: Removed type conversion
In AVD 4.0.0 and across both `eos_designs` and `eos_cli_config_gen`, *all* "dict-of-dicts" data models with user-defined keys were changed to "list-of-dicts".
In AVD 4.x inputs were auto-converted to the new data models.

As of AVD 5.0.0 the automatic conversion from dict-of-dicts has been removed, so it is required to update the input data to the new data models.

Errors will be raised for each data model not conforming to the list type when running AVD:

```sh
$ ansible-playbook playbook.yml
<...>
ERROR! [host1]: 'Validation Error: access_lists': {'ACL-01': {'sequence_numbers': {10: {'actio<...abbreviated...>4 any'}}}} is not of type 'list'
```

As an example, `ethernet_interfaces` was changed from:

```yaml
ethernet_intefaces:
Ethernet1: # <-- User defined key
<...>
```
to:
```yaml
ethernet_interfaces:
- name: Ethernet1 # <-- "name" here is called the "primary_key" which must have a unique value across all list elements
<...>
```
## Removal of Ansible plugins
Expand Down
7 changes: 6 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 @@ -41,7 +41,12 @@ See the [porting guide](../porting-guides/5.x.x.md#removal-of-ansible-plugins) f

### Data model changes from "dict-of-dicts" to "list-of-dicts"

TODO: Removed type conversion
In AVD 4.0.0 and across both `eos_designs` and `eos_cli_config_gen`, *all* "dict-of-dicts" data models with user-defined keys were changed to "list-of-dicts".
In AVD 4.x inputs were auto-converted to the new data models.

As of AVD 5.0.0 the automatic conversion from dict-of-dicts has been removed, so it is required to update the input data to the new data models.

See the [porting guide](../porting-guides/5.x.x.md#data-model-changes-from-dict-of-dicts-to-list-of-dicts) for details.

### All eos_designs and eos_cli_config_gen variables are always validated by schemas

Expand Down
Loading

0 comments on commit 01c192f

Please sign in to comment.