-
Notifications
You must be signed in to change notification settings - Fork 281
Feat(eos_designs): Preview: Containerlab Digital Twin #6846
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ankudinov
wants to merge
58
commits into
aristanetworks:devel
Choose a base branch
from
ankudinov:clab-digital-twin
base: devel
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 47 commits
Commits
Show all changes
58 commits
Select commit
Hold shift + click to select a range
8ae5bc8
init clab digital twin
ankudinov 5b594bb
change clab filename
ankudinov aa78601
add clab name
ankudinov 67f0132
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 1ac0e51
add nodes and links
ankudinov 04beaed
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 9879b2b
add kinds and defaults
ankudinov ee45627
add containerlab mgmt
ankudinov b452824
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 372d23e
run digital twin tests
ankudinov 5f68708
Merge branch 'devel' into clab-digital-twin
ankudinov 91cbec7
generate topology with empty prefix
ankudinov d21d0c1
add todo for 5649
ankudinov 1f5e8eb
add startup configs
ankudinov ebe00f7
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] c839fd7
add / support to interface naming
ankudinov 64b9fe9
Merge branch 'clab-digital-twin' of https://github.com/ankudinov/avd …
ankudinov e7d11ad
fix mgmt, add docs, add .clab.yml to topo file
ankudinov c5c6012
fix the doc
ankudinov 7863d38
Merge branch 'devel' into clab-digital-twin
ankudinov 2ffc75a
[autofix.ci] apply automated fixes
autofix-ci[bot] c73b227
add digital_twin_containerlab to test_get_device_structured_config.py
ankudinov 444069d
Merge branch 'clab-digital-twin' of https://github.com/ankudinov/avd …
ankudinov d10df47
post conflict resolution fixes
ankudinov 4bf0bbe
remove redundant return
ankudinov 5c01918
switch set() to a set literal
ankudinov cd4289f
add error for empty and dhcp mgmt_ip
ankudinov ce4cf50
add cast to str to avoid None value case
ankudinov 1bbd520
[autofix.ci] apply automated fixes
autofix-ci[bot] d76f1b4
add test for containerlab_startup_config_filename
ankudinov 6c74903
add fail test for dhcp
ankudinov cc4aab4
add more negative tests for mgmt_ip
ankudinov 3c3f34d
fix assert for error match
ankudinov 7d181f0
add fail test for multiple subnets
ankudinov ed8cdb8
add interface mapping support
ankudinov c6ef562
ignoring negative scenarious in pytest
ankudinov d18f6db
moving negative tests to a dedicated dir
ankudinov a08292e
rerun digital_twin scenario
ankudinov ba527f1
run eos_designs-twodc-5stage-clos
ankudinov 4643c05
fix spelling error
ankudinov 5ab3fe0
add _normalize_yaml_data test
ankudinov d33a3c2
add clab topology ordering test and update generated example in docs
ankudinov 16463d5
Merge branch 'devel' into clab-digital-twin
ankudinov 2917078
fix disallowed name
ankudinov e1fa016
remove verified_topology_links
ankudinov cddba24
rerun digital_twin molecule tests
ankudinov c96a3ea
adding clab digital twin tests to pr management
ankudinov 101c024
change from > to mkdoc admonition
ankudinov 79c70b6
Test: Add coverage
gmuloc 0829118
Merge branch 'devel' into clab-digital-twin
gmuloc d612af9
Test: Add more coverage
gmuloc 59df530
Merge branch 'devel' into clab-digital-twin
gmuloc 447973a
remove containerlab_startup_config_filename
ankudinov 816f18d
[autofix.ci] apply automated fixes
autofix-ci[bot] 2a3c46b
add yaml linter exception for clab digital twin
ankudinov 7de2ff8
Merge branch 'devel' into clab-digital-twin
ankudinov 239928c
update clab topology name
ankudinov 0b7ec75
remove register: containerlab_topology_content
ankudinov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
...ensions/molecule/digital_twin/digital_twin/documentation/fabric/DIGITAL_TWIN-topology.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| --- | ||
| nodes: | ||
| - digital-twin-adjust-oob-mgmt-1: | ||
| node_type: veos | ||
|
|
||
1 change: 1 addition & 0 deletions
1
...tal_twin/digital_twin/documentation/fabric/DIGITAL_TWIN_SINGLE_SWITCH_FABRIC-topology.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| --- | ||
| nodes: | ||
| - digital-twin-single-switch-fabric-1: | ||
| node_type: veos | ||
|
|
||
24 changes: 24 additions & 0 deletions
24
ansible_collections/arista/avd/extensions/molecule/digital_twin_containerlab/converge.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| --- | ||
| - name: Converge | ||
| hosts: DIGITAL_TWIN_CONTAINERLAB | ||
| gather_facts: false | ||
| connection: local | ||
| vars: | ||
| output_dir_name: "digital_twin/intended" | ||
| documentation_dir_name: "digital_twin/documentation" | ||
| avd_digital_twin_mode: true | ||
| avd_ignore_requirements: true | ||
| eos_designs_documentation: | ||
| enable: false | ||
| topology_csv: false | ||
| p2p_links_csv: false | ||
| tasks: | ||
| - name: Generate intended variables in Containerlab Digital Twin mode | ||
| delegate_to: 127.0.0.1 | ||
| ansible.builtin.import_role: | ||
| name: arista.avd.eos_designs | ||
|
|
||
| - name: Generate intended EOS configs in Containerlab Digital Twin mode | ||
| delegate_to: 127.0.0.1 | ||
| ansible.builtin.import_role: | ||
| name: arista.avd.eos_cli_config_gen |
13 changes: 13 additions & 0 deletions
13
ansible_collections/arista/avd/extensions/molecule/digital_twin_containerlab/create.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| --- | ||
| - name: Configure local folders | ||
| hosts: DIGITAL_TWIN_CONTAINERLAB | ||
| gather_facts: false | ||
| connection: local | ||
| vars: | ||
| root_dir: '{{ playbook_dir }}' | ||
| tasks: | ||
| - name: Create local output folders | ||
| delegate_to: 127.0.0.1 | ||
| ansible.builtin.import_role: | ||
| name: arista.avd.build_output_folders | ||
| run_once: true |
18 changes: 18 additions & 0 deletions
18
ansible_collections/arista/avd/extensions/molecule/digital_twin_containerlab/destroy.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| --- | ||
| - name: Remove output folders | ||
| hosts: DIGITAL_TWIN_CONTAINERLAB | ||
| gather_facts: false | ||
| connection: local | ||
| tasks: | ||
| - name: Delete local folders | ||
| delegate_to: 127.0.0.1 | ||
| run_once: true | ||
| ansible.builtin.file: | ||
| path: "{{ root_dir }}/{{ item }}" | ||
| state: absent | ||
| with_items: | ||
| - documentation | ||
| - intended | ||
| - config_backup | ||
| - reports | ||
| - digital_twin |
304 changes: 304 additions & 0 deletions
304
...cule/digital_twin_containerlab/digital_twin/documentation/devices/dc1-leaf1a.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,304 @@ | ||
| # dc1-leaf1a | ||
|
|
||
| ## Table of Contents | ||
|
|
||
| - [Management](#management) | ||
| - [Management Interfaces](#management-interfaces) | ||
| - [Management API HTTP](#management-api-http) | ||
| - [Authentication](#authentication) | ||
| - [Enable Password](#enable-password) | ||
| - [Internal VLAN Allocation Policy](#internal-vlan-allocation-policy) | ||
| - [Internal VLAN Allocation Policy Summary](#internal-vlan-allocation-policy-summary) | ||
| - [Internal VLAN Allocation Policy Device Configuration](#internal-vlan-allocation-policy-device-configuration) | ||
| - [Interfaces](#interfaces) | ||
| - [Ethernet Interfaces](#ethernet-interfaces) | ||
| - [Loopback Interfaces](#loopback-interfaces) | ||
| - [Routing](#routing) | ||
| - [Service Routing Protocols Model](#service-routing-protocols-model) | ||
| - [IP Routing](#ip-routing) | ||
| - [IPv6 Routing](#ipv6-routing) | ||
| - [Static Routes](#static-routes) | ||
| - [Router BGP](#router-bgp) | ||
| - [Multicast](#multicast) | ||
| - [IP IGMP Snooping](#ip-igmp-snooping) | ||
| - [VRF Instances](#vrf-instances) | ||
| - [VRF Instances Summary](#vrf-instances-summary) | ||
| - [VRF Instances Device Configuration](#vrf-instances-device-configuration) | ||
|
|
||
| ## Management | ||
|
|
||
| ### Management Interfaces | ||
|
|
||
| #### Management Interfaces Summary | ||
|
|
||
| ##### IPv4 | ||
|
|
||
| | Management Interface | Description | Type | VRF | IP Address | Gateway | | ||
| | -------------------- | ----------- | ---- | --- | ---------- | ------- | | ||
| | Management1 | OOB_MANAGEMENT | oob | MGMT | 172.16.1.101/24 | 172.16.1.1 | | ||
|
|
||
| ##### IPv6 | ||
|
|
||
| | Management Interface | Description | Type | VRF | IPv6 Address | IPv6 Gateway | ND RA Disabled | ND RA RX Accept | ND Managed Config Flag | ND Other Config Flag | ND Cache | ND RA DNS Servers | | ||
| | -------------------- | ----------- | ---- | --- | ------------ | ------------ | -------------- | --------------- | ---------------------- | -------------------- | -------- | ----------------- | | ||
| | Management1 | OOB_MANAGEMENT | oob | MGMT | - | - | - | - | - | - | - | - | | ||
|
|
||
| #### Management Interfaces Device Configuration | ||
|
|
||
| ```eos | ||
| ! | ||
| interface Management1 | ||
| description OOB_MANAGEMENT | ||
| no shutdown | ||
| vrf MGMT | ||
| ip address 172.16.1.101/24 | ||
| ``` | ||
|
|
||
| ### Management API HTTP | ||
|
|
||
| #### Management API HTTP Summary | ||
|
|
||
| | HTTP | HTTPS | UNIX-Socket | Default Services | Session Timeout | | ||
| | ---- | ----- | ----------- | ---------------- | --------------- | | ||
| | False | True | - | - | 1440 minutes | | ||
|
|
||
| #### Management API VRF Access | ||
|
|
||
| | VRF Name | IPv4 ACL | IPv6 ACL | | ||
| | -------- | -------- | -------- | | ||
| | MGMT | - | - | | ||
|
|
||
| #### Management API HTTP Device Configuration | ||
|
|
||
| ```eos | ||
| ! | ||
| management api http-commands | ||
| protocol https | ||
| no shutdown | ||
| ! | ||
| vrf MGMT | ||
| no shutdown | ||
| ``` | ||
|
|
||
| ## Authentication | ||
|
|
||
| ### Enable Password | ||
|
|
||
| Enable password has been disabled | ||
|
|
||
| ## Internal VLAN Allocation Policy | ||
|
|
||
| ### Internal VLAN Allocation Policy Summary | ||
|
|
||
| | Policy Allocation | Range Beginning | Range Ending | | ||
| | ----------------- | --------------- | ------------ | | ||
| | ascending | 1006 | 1199 | | ||
|
|
||
| ### Internal VLAN Allocation Policy Device Configuration | ||
|
|
||
| ```eos | ||
| ! | ||
| vlan internal order ascending range 1006 1199 | ||
| ``` | ||
|
|
||
| ## Interfaces | ||
|
|
||
| ### Ethernet Interfaces | ||
|
|
||
| #### Ethernet Interfaces Summary | ||
|
|
||
| ##### L2 | ||
|
|
||
| | Interface | Description | Mode | VLANs | Native VLAN | Trunk Group | Channel-Group | | ||
| | --------- | ----------- | ---- | ----- | ----------- | ----------- | ------------- | | ||
|
|
||
| *Inherited from Port-Channel Interface | ||
|
|
||
| ##### IPv4 | ||
|
|
||
| | Interface | Description | Channel Group | IP Address | VRF | MTU | Shutdown | ACL In | ACL Out | | ||
| | --------- | ----------- | ------------- | ---------- | --- | --- | -------- | ------ | ------- | | ||
| | Ethernet1 | P2P_dc1-spine1_Ethernet1 | - | 10.255.255.1/31 | default | 9214 | False | - | - | | ||
| | Ethernet1/2 | P2P_dc1-spine2_Ethernet1/2 | - | 10.255.255.3/31 | default | 9214 | False | - | - | | ||
|
|
||
| #### Ethernet Interfaces Device Configuration | ||
|
|
||
| ```eos | ||
| ! | ||
| interface Ethernet1 | ||
| description P2P_dc1-spine1_Ethernet1 | ||
| no shutdown | ||
| mtu 9214 | ||
| no switchport | ||
| ip address 10.255.255.1/31 | ||
| ! | ||
| interface Ethernet1/2 | ||
| description P2P_dc1-spine2_Ethernet1/2 | ||
| no shutdown | ||
| mtu 9214 | ||
| no switchport | ||
| ip address 10.255.255.3/31 | ||
| ``` | ||
|
|
||
| ### Loopback Interfaces | ||
|
|
||
| #### Loopback Interfaces Summary | ||
|
|
||
| ##### IPv4 | ||
|
|
||
| | Interface | Description | VRF | IP Address | | ||
| | --------- | ----------- | --- | ---------- | | ||
| | Loopback0 | ROUTER_ID | default | 10.255.1.1/32 | | ||
|
|
||
| ##### IPv6 | ||
|
|
||
| | Interface | Description | VRF | IPv6 Addresses | | ||
| | --------- | ----------- | --- | -------------- | | ||
| | Loopback0 | ROUTER_ID | default | - | | ||
|
|
||
| #### Loopback Interfaces Device Configuration | ||
|
|
||
| ```eos | ||
| ! | ||
| interface Loopback0 | ||
| description ROUTER_ID | ||
| no shutdown | ||
| ip address 10.255.1.1/32 | ||
| ``` | ||
|
|
||
| ## Routing | ||
|
|
||
| ### Service Routing Protocols Model | ||
|
|
||
| Multi agent routing protocol model enabled | ||
|
|
||
| ```eos | ||
| ! | ||
| service routing protocols model multi-agent | ||
| ``` | ||
|
|
||
| ### IP Routing | ||
|
|
||
| #### IP Routing Summary | ||
|
|
||
| | VRF | Routing Enabled | | ||
| | --- | --------------- | | ||
| | default | True | | ||
| | MGMT | False | | ||
|
|
||
| #### IP Routing Device Configuration | ||
|
|
||
| ```eos | ||
| ! | ||
| ip routing | ||
| no ip routing vrf MGMT | ||
| ``` | ||
|
|
||
| ### IPv6 Routing | ||
|
|
||
| #### IPv6 Routing Summary | ||
|
|
||
| | VRF | Routing Enabled | | ||
| | --- | --------------- | | ||
| | default | False | | ||
| | MGMT | false | | ||
|
|
||
| ### Static Routes | ||
|
|
||
| #### Static Routes Summary | ||
|
|
||
| | VRF | Destination Prefix | Next Hop IP | Exit interface | Administrative Distance | Tag | Route Name | Metric | | ||
| | --- | ------------------ | ----------- | -------------- | ----------------------- | --- | ---------- | ------ | | ||
| | MGMT | 0.0.0.0/0 | 172.16.1.1 | - | 1 | - | - | - | | ||
|
|
||
| #### Static Routes Device Configuration | ||
|
|
||
| ```eos | ||
| ! | ||
| ip route vrf MGMT 0.0.0.0/0 172.16.1.1 | ||
| ``` | ||
|
|
||
| ### Router BGP | ||
|
|
||
| ASN Notation: asplain | ||
|
|
||
| #### Router BGP Summary | ||
|
|
||
| | BGP AS | Router ID | | ||
| | ------ | --------- | | ||
| | 65101 | 10.255.1.1 | | ||
|
|
||
| | BGP Tuning | | ||
| | ---------- | | ||
| | no bgp default ipv4-unicast | | ||
| | maximum-paths 4 | | ||
|
|
||
| #### Router BGP Peer Groups | ||
|
|
||
| ##### IPv4-UNDERLAY-PEERS | ||
|
|
||
| | Settings | Value | | ||
| | -------- | ----- | | ||
| | Address Family | ipv4 | | ||
| | Send community | all | | ||
| | Maximum routes | 256000 | | ||
|
|
||
| #### BGP Neighbors | ||
|
|
||
| | Neighbor | Remote AS | VRF | Shutdown | Send-community | Maximum-routes | Allowas-in | BFD | RIB Pre-Policy Retain | Route-Reflector Client | Passive | TTL Max Hops | | ||
| | -------- | --------- | --- | -------- | -------------- | -------------- | ---------- | --- | --------------------- | ---------------------- | ------- | ------------ | | ||
| | 10.255.255.0 | 65100 | default | - | Inherited from peer group IPv4-UNDERLAY-PEERS | Inherited from peer group IPv4-UNDERLAY-PEERS | - | - | - | - | - | - | | ||
| | 10.255.255.2 | 65100 | default | - | Inherited from peer group IPv4-UNDERLAY-PEERS | Inherited from peer group IPv4-UNDERLAY-PEERS | - | - | - | - | - | - | | ||
|
|
||
| #### Router BGP Device Configuration | ||
|
|
||
| ```eos | ||
| ! | ||
| router bgp 65101 | ||
| router-id 10.255.1.1 | ||
| no bgp default ipv4-unicast | ||
| maximum-paths 4 | ||
| neighbor IPv4-UNDERLAY-PEERS peer group | ||
| neighbor IPv4-UNDERLAY-PEERS send-community | ||
| neighbor IPv4-UNDERLAY-PEERS maximum-routes 256000 | ||
| neighbor 10.255.255.0 peer group IPv4-UNDERLAY-PEERS | ||
| neighbor 10.255.255.0 remote-as 65100 | ||
| neighbor 10.255.255.0 description dc1-spine1_Ethernet1 | ||
| neighbor 10.255.255.2 peer group IPv4-UNDERLAY-PEERS | ||
| neighbor 10.255.255.2 remote-as 65100 | ||
| neighbor 10.255.255.2 description dc1-spine2_Ethernet1/2 | ||
| redistribute connected | ||
| ! | ||
| address-family ipv4 | ||
| neighbor IPv4-UNDERLAY-PEERS activate | ||
| ``` | ||
|
|
||
| ## Multicast | ||
|
|
||
| ### IP IGMP Snooping | ||
|
|
||
| #### IP IGMP Snooping Summary | ||
|
|
||
| | IGMP Snooping | Fast Leave | Interface Restart Query | Proxy | Restart Query Interval | Robustness Variable | | ||
| | ------------- | ---------- | ----------------------- | ----- | ---------------------- | ------------------- | | ||
| | Enabled | - | - | - | - | - | | ||
|
|
||
| #### IP IGMP Snooping Device Configuration | ||
|
|
||
| ```eos | ||
| ``` | ||
|
|
||
| ## VRF Instances | ||
|
|
||
| ### VRF Instances Summary | ||
|
|
||
| | VRF Name | IP Routing | | ||
| | -------- | ---------- | | ||
| | MGMT | disabled | | ||
|
|
||
| ### VRF Instances Device Configuration | ||
|
|
||
| ```eos | ||
| ! | ||
| vrf instance MGMT | ||
| ``` |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we have a digital_twin folder inside a digital_twin folder
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Outer digital_twin references the name of the scenario/fabric that we picked (it could have been anything else overall). Inner digital_twin is a dedicated folder containing digital_twin artifacts (at lest for ACT mode) but is also tunable (via output_dir_name and documentation_dir_name vars)