Skip to content

Commit

Permalink
Feat(eos_designs): Enforce unicity of region IDs and per-region site …
Browse files Browse the repository at this point in the history
…IDs for CV Pathfinder
  • Loading branch information
gmuloc authored and carlbuchmann committed Jun 19, 2024
1 parent faa4684 commit a1f30e4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions python-avd/pyavd/_eos_designs/schema/eos_designs.schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -701,6 +701,8 @@ keys:
description: Define the CV Pathfinder hierarchy.
type: list
primary_key: name
unique_keys:
- id
items:
type: dict
$ref: eos_cli_config_gen#/keys/router_adaptive_virtual_topology/keys/region
Expand All @@ -719,6 +721,8 @@ keys:
description: All sites are placed in a default zone "<region_name>-ZONE"
with ID 1.
primary_key: name
unique_keys:
- id
items:
type: dict
$ref: eos_cli_config_gen#/keys/router_adaptive_virtual_topology/keys/site
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ keys:
description: Define the CV Pathfinder hierarchy.
type: list
primary_key: name
unique_keys:
- id
items:
type: dict
$ref: "eos_cli_config_gen#/keys/router_adaptive_virtual_topology/keys/region"
Expand All @@ -31,6 +33,8 @@ keys:
description: |-
All sites are placed in a default zone "<region_name>-ZONE" with ID 1.
primary_key: name
unique_keys:
- id
items:
type: dict
$ref: "eos_cli_config_gen#/keys/router_adaptive_virtual_topology/keys/site"
Expand Down
2 changes: 1 addition & 1 deletion python-avd/pyavd/_schema/avd_meta_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@
},
"unique_keys": {
"type": "array",
"description": "List of types to auto-convert from.\nFor 'list of dicts' auto-conversion is supported from 'dict' if 'primary_key' is set on the list schema\nFor other list item types conversion from dict will use the keys as list items.",
"description": "List of keys or dot-notation path keys that must be unique in addition to primary_key.",
"items": {
"type": "string",
"$comment": "The regex here matches valid key names",
Expand Down

0 comments on commit a1f30e4

Please sign in to comment.