diff --git a/ansible_collections/arista/avd/extensions/molecule/digital_twin/digital_twin/documentation/devices/digital-twin-cv-instance-1.md b/ansible_collections/arista/avd/extensions/molecule/digital_twin/digital_twin/documentation/devices/digital-twin-cv-instance-1.md new file mode 100644 index 00000000000..9f2974e08b7 --- /dev/null +++ b/ansible_collections/arista/avd/extensions/molecule/digital_twin/digital_twin/documentation/devices/digital-twin-cv-instance-1.md @@ -0,0 +1,226 @@ +# digital-twin-cv-instance-1 + +## Table of Contents + +- [Management](#management) + - [Management Interfaces](#management-interfaces) + - [NTP](#ntp) + - [Management API HTTP](#management-api-http) +- [Authentication](#authentication) + - [Enable Password](#enable-password) +- [Monitoring](#monitoring) + - [TerminAttr Daemon](#terminattr-daemon) +- [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) +- [Routing](#routing) + - [Service Routing Protocols Model](#service-routing-protocols-model) + - [IP Routing](#ip-routing) + - [IPv6 Routing](#ipv6-routing) + - [Static Routes](#static-routes) +- [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 | 192.168.1.10/32 | 192.168.1.254 | + +##### 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 192.168.1.10/32 +``` + +### NTP + +#### NTP Summary + +##### NTP Local Interface + +| Interface | VRF | +| --------- | --- | +| Management1 | MGMT | + +##### NTP Servers + +NTP servers VRF: MGMT + +| Server | Preferred | Burst | iBurst | Version | Min Poll | Max Poll | Local-interface | Source Address | Key | +| ------ | --------- | ----- | ------ | ------- | -------- | -------- | --------------- | -------------- | --- | +| 0.pool.ntp.org | True | - | - | - | - | - | - | - | - | + +#### NTP Device Configuration + +```eos +! +ntp local-interface vrf MGMT Management1 +ntp server vrf MGMT 0.pool.ntp.org prefer +``` + +### 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 + +## Monitoring + +### TerminAttr Daemon + +#### TerminAttr Daemon Summary + +| CV Compression | CloudVision Servers | VRF | Authentication | Smash Excludes | Ingest Exclude | Bypass AAA | +| -------------- | ------------------- | --- | -------------- | -------------- | -------------- | ---------- | +| gzip | 10.20.30.40:9910 | MGMT | token,/tmp/token | ale,flexCounter,hardware,kni,pulse,strata | - | False | + +#### TerminAttr Daemon Device Configuration + +```eos +! +daemon TerminAttr + exec /usr/bin/TerminAttr -cvaddr=10.20.30.40:9910 -cvauth=token,/tmp/token -cvvrf=MGMT -smashexcludes=ale,flexCounter,hardware,kni,pulse,strata -taillogs -cvsourceintf=Management1 + no shutdown +``` + +## 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 +``` + +## 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 | False | +| MGMT | False | + +#### IP Routing Device Configuration + +```eos +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 | 192.168.1.254 | - | 1 | - | - | - | + +#### Static Routes Device Configuration + +```eos +! +ip route vrf MGMT 0.0.0.0/0 192.168.1.254 +``` + +## 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 +``` diff --git a/ansible_collections/arista/avd/extensions/molecule/digital_twin/digital_twin/documentation/fabric/DIGITAL_TWIN-documentation.md b/ansible_collections/arista/avd/extensions/molecule/digital_twin/digital_twin/documentation/fabric/DIGITAL_TWIN-documentation.md index ad840b2b0d5..23cc6c5650e 100644 --- a/ansible_collections/arista/avd/extensions/molecule/digital_twin/digital_twin/documentation/fabric/DIGITAL_TWIN-documentation.md +++ b/ansible_collections/arista/avd/extensions/molecule/digital_twin/digital_twin/documentation/fabric/DIGITAL_TWIN-documentation.md @@ -22,6 +22,7 @@ | DIGITAL_TWIN | l2leaf | digital-twin-adjust-oob-mgmt-3 | - | vEOS-lab | Provisioned | - | | DIGITAL_TWIN | l2leaf | digital-twin-adjust-oob-mgmt-4 | 192.168.1.4/32 | custom-platform | Provisioned | - | | DIGITAL_TWIN | l2leaf | digital-twin-cloudeos-no-mgmt | - | CloudEOS | Provisioned | - | +| DIGITAL_TWIN | l2leaf | digital-twin-cv-instance-1 | 192.168.1.10/32 | vEOS-lab | Provisioned | - | | DIGITAL_TWIN | l2spine | digital-twin-default-interfaces-digital-twin-platform | 10.10.10.100/24 | vEOS-lab | Provisioned | - | | DIGITAL_TWIN | l2leaf | digital-twin-default-interfaces-original-platform | 10.10.10.101/24 | vEOS-lab | Provisioned | - | | DIGITAL_TWIN | l2leaf | digital-twin-enforce-eapi-1 | 192.168.0.1/32 | vEOS-lab | Provisioned | - | diff --git a/ansible_collections/arista/avd/extensions/molecule/digital_twin/digital_twin/documentation/fabric/DIGITAL_TWIN-topology.yml b/ansible_collections/arista/avd/extensions/molecule/digital_twin/digital_twin/documentation/fabric/DIGITAL_TWIN-topology.yml index f762e3dc190..67fe874fcec 100644 --- a/ansible_collections/arista/avd/extensions/molecule/digital_twin/digital_twin/documentation/fabric/DIGITAL_TWIN-topology.yml +++ b/ansible_collections/arista/avd/extensions/molecule/digital_twin/digital_twin/documentation/fabric/DIGITAL_TWIN-topology.yml @@ -18,6 +18,10 @@ nodes: - digital-twin-cloudeos-no-mgmt: node_type: cloudeos version: 4.33.2F +- digital-twin-cv-instance-1: + node_type: veos + ip_addr: 192.168.1.10/32 + version: 4.33.1.1F - digital-twin-default-interfaces-digital-twin-platform: node_type: veos ip_addr: 10.10.10.100/24 diff --git a/ansible_collections/arista/avd/extensions/molecule/digital_twin/digital_twin/intended/configs/digital-twin-cv-instance-1.cfg b/ansible_collections/arista/avd/extensions/molecule/digital_twin/digital_twin/intended/configs/digital-twin-cv-instance-1.cfg new file mode 100644 index 00000000000..f58adfa5e78 --- /dev/null +++ b/ansible_collections/arista/avd/extensions/molecule/digital_twin/digital_twin/intended/configs/digital-twin-cv-instance-1.cfg @@ -0,0 +1,38 @@ +! +no enable password +no aaa root +! +daemon TerminAttr + exec /usr/bin/TerminAttr -cvaddr=10.20.30.40:9910 -cvauth=token,/tmp/token -cvvrf=MGMT -smashexcludes=ale,flexCounter,hardware,kni,pulse,strata -taillogs -cvsourceintf=Management1 + no shutdown +! +vlan internal order ascending range 1006 1199 +! +transceiver qsfp default-mode 4x10G +! +service routing protocols model multi-agent +! +hostname digital-twin-cv-instance-1 +! +vrf instance MGMT +! +management api http-commands + protocol https + no shutdown + ! + vrf MGMT + no shutdown +! +interface Management1 + description OOB_MANAGEMENT + no shutdown + vrf MGMT + ip address 192.168.1.10/32 +no ip routing vrf MGMT +! +ip route vrf MGMT 0.0.0.0/0 192.168.1.254 +! +ntp local-interface vrf MGMT Management1 +ntp server vrf MGMT 0.pool.ntp.org prefer +! +end diff --git a/ansible_collections/arista/avd/extensions/molecule/digital_twin/digital_twin/intended/structured_configs/digital-twin-cv-instance-1.yml b/ansible_collections/arista/avd/extensions/molecule/digital_twin/digital_twin/intended/structured_configs/digital-twin-cv-instance-1.yml new file mode 100644 index 00000000000..c77ead60bca --- /dev/null +++ b/ansible_collections/arista/avd/extensions/molecule/digital_twin/digital_twin/intended/structured_configs/digital-twin-cv-instance-1.yml @@ -0,0 +1,65 @@ +aaa_root: + disabled: true +config_end: true +daemon_terminattr: + cvaddrs: + - 10.20.30.40:9910 + cvauth: + method: token + token_file: /tmp/token + cvsourceintf: Management1 + cvvrf: MGMT + disable_aaa: false + smashexcludes: ale,flexCounter,hardware,kni,pulse,strata +enable_password: + disabled: true +hostname: digital-twin-cv-instance-1 +ip_igmp_snooping: + globally_enabled: true +management_api_http: + enable_https: true + enable_vrfs: + - name: MGMT +management_interfaces: +- name: Management1 + description: OOB_MANAGEMENT + shutdown: false + vrf: MGMT + ip_address: 192.168.1.10/32 + type: oob + gateway: 192.168.1.254 +metadata: + is_deployed: true + platform: vEOS-lab + fabric_name: DIGITAL_TWIN + validate_hardware: + enabled: false + digital_twin: + environment: act + node_type: veos + ip_addr: 192.168.1.10/32 + version: 4.33.1.1F + username: cvpadmin + password: cvp123! +ntp: + local_interface: + name: Management1 + vrf: MGMT + servers: + - name: 0.pool.ntp.org + preferred: true + vrf: MGMT +service_routing_protocols_model: multi-agent +static_routes: +- vrf: MGMT + prefix: 0.0.0.0/0 + next_hop: 192.168.1.254 +transceiver_qsfp_default_mode_4x10: true +vlan_internal_order: + allocation: ascending + range: + beginning: 1006 + ending: 1199 +vrfs: +- name: MGMT + ip_routing: false diff --git a/ansible_collections/arista/avd/extensions/molecule/digital_twin/documentation/devices/digital-twin-cv-instance-1.md b/ansible_collections/arista/avd/extensions/molecule/digital_twin/documentation/devices/digital-twin-cv-instance-1.md new file mode 100644 index 00000000000..e691bc1ee9e --- /dev/null +++ b/ansible_collections/arista/avd/extensions/molecule/digital_twin/documentation/devices/digital-twin-cv-instance-1.md @@ -0,0 +1,226 @@ +# digital-twin-cv-instance-1 + +## Table of Contents + +- [Management](#management) + - [Management Interfaces](#management-interfaces) + - [NTP](#ntp) + - [Management API HTTP](#management-api-http) +- [Authentication](#authentication) + - [Enable Password](#enable-password) +- [Monitoring](#monitoring) + - [TerminAttr Daemon](#terminattr-daemon) +- [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) +- [Routing](#routing) + - [Service Routing Protocols Model](#service-routing-protocols-model) + - [IP Routing](#ip-routing) + - [IPv6 Routing](#ipv6-routing) + - [Static Routes](#static-routes) +- [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 | 192.168.1.10/32 | 192.168.1.254 | + +##### 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 192.168.1.10/32 +``` + +### NTP + +#### NTP Summary + +##### NTP Local Interface + +| Interface | VRF | +| --------- | --- | +| Management1 | MGMT | + +##### NTP Servers + +NTP servers VRF: MGMT + +| Server | Preferred | Burst | iBurst | Version | Min Poll | Max Poll | Local-interface | Source Address | Key | +| ------ | --------- | ----- | ------ | ------- | -------- | -------- | --------------- | -------------- | --- | +| 0.pool.ntp.org | True | - | - | - | - | - | - | - | - | + +#### NTP Device Configuration + +```eos +! +ntp local-interface vrf MGMT Management1 +ntp server vrf MGMT 0.pool.ntp.org prefer +``` + +### 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 + +## Monitoring + +### TerminAttr Daemon + +#### TerminAttr Daemon Summary + +| CV Compression | CloudVision Servers | VRF | Authentication | Smash Excludes | Ingest Exclude | Bypass AAA | +| -------------- | ------------------- | --- | -------------- | -------------- | -------------- | ---------- | +| gzip | 192.168.200.11:9910 | MGMT | token,/tmp/token | ale,flexCounter,hardware,kni,pulse,strata | - | False | + +#### TerminAttr Daemon Device Configuration + +```eos +! +daemon TerminAttr + exec /usr/bin/TerminAttr -cvaddr=192.168.200.11:9910 -cvauth=token,/tmp/token -cvvrf=MGMT -smashexcludes=ale,flexCounter,hardware,kni,pulse,strata -taillogs -cvsourceintf=Management1 + no shutdown +``` + +## 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 +``` + +## 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 | False | +| MGMT | False | + +#### IP Routing Device Configuration + +```eos +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 | 192.168.1.254 | - | 1 | - | - | - | + +#### Static Routes Device Configuration + +```eos +! +ip route vrf MGMT 0.0.0.0/0 192.168.1.254 +``` + +## 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 +``` diff --git a/ansible_collections/arista/avd/extensions/molecule/digital_twin/documentation/fabric/DIGITAL_TWIN-documentation.md b/ansible_collections/arista/avd/extensions/molecule/digital_twin/documentation/fabric/DIGITAL_TWIN-documentation.md index 1ea89c0aa54..f05f1157791 100644 --- a/ansible_collections/arista/avd/extensions/molecule/digital_twin/documentation/fabric/DIGITAL_TWIN-documentation.md +++ b/ansible_collections/arista/avd/extensions/molecule/digital_twin/documentation/fabric/DIGITAL_TWIN-documentation.md @@ -22,6 +22,7 @@ | DIGITAL_TWIN | l2leaf | digital-twin-adjust-oob-mgmt-3 | - | - | Provisioned | - | | DIGITAL_TWIN | l2leaf | digital-twin-adjust-oob-mgmt-4 | 192.168.1.4/32 | custom-platform | Provisioned | - | | DIGITAL_TWIN | l2leaf | digital-twin-cloudeos-no-mgmt | - | CloudEOS | Provisioned | - | +| DIGITAL_TWIN | l2leaf | digital-twin-cv-instance-1 | 192.168.1.10/32 | - | Provisioned | - | | DIGITAL_TWIN | l2spine | digital-twin-default-interfaces-digital-twin-platform | 10.10.10.100/24 | CUSTOM_PLATFORM | Provisioned | - | | DIGITAL_TWIN | l2leaf | digital-twin-default-interfaces-original-platform | 10.10.10.101/24 | CUSTOM_PLATFORM | Provisioned | - | | DIGITAL_TWIN | l2leaf | digital-twin-enforce-eapi-1 | 192.168.0.1/32 | - | Provisioned | - | diff --git a/ansible_collections/arista/avd/extensions/molecule/digital_twin/intended/configs/digital-twin-cv-instance-1.cfg b/ansible_collections/arista/avd/extensions/molecule/digital_twin/intended/configs/digital-twin-cv-instance-1.cfg new file mode 100644 index 00000000000..7580b8dda7f --- /dev/null +++ b/ansible_collections/arista/avd/extensions/molecule/digital_twin/intended/configs/digital-twin-cv-instance-1.cfg @@ -0,0 +1,38 @@ +! +no enable password +no aaa root +! +daemon TerminAttr + exec /usr/bin/TerminAttr -cvaddr=192.168.200.11:9910 -cvauth=token,/tmp/token -cvvrf=MGMT -smashexcludes=ale,flexCounter,hardware,kni,pulse,strata -taillogs -cvsourceintf=Management1 + no shutdown +! +vlan internal order ascending range 1006 1199 +! +transceiver qsfp default-mode 4x10G +! +service routing protocols model multi-agent +! +hostname digital-twin-cv-instance-1 +! +vrf instance MGMT +! +management api http-commands + protocol https + no shutdown + ! + vrf MGMT + no shutdown +! +interface Management1 + description OOB_MANAGEMENT + no shutdown + vrf MGMT + ip address 192.168.1.10/32 +no ip routing vrf MGMT +! +ip route vrf MGMT 0.0.0.0/0 192.168.1.254 +! +ntp local-interface vrf MGMT Management1 +ntp server vrf MGMT 0.pool.ntp.org prefer +! +end diff --git a/ansible_collections/arista/avd/extensions/molecule/digital_twin/intended/structured_configs/digital-twin-cv-instance-1.yml b/ansible_collections/arista/avd/extensions/molecule/digital_twin/intended/structured_configs/digital-twin-cv-instance-1.yml new file mode 100644 index 00000000000..d24bf5aa329 --- /dev/null +++ b/ansible_collections/arista/avd/extensions/molecule/digital_twin/intended/structured_configs/digital-twin-cv-instance-1.yml @@ -0,0 +1,55 @@ +aaa_root: + disabled: true +config_end: true +daemon_terminattr: + cvaddrs: + - 192.168.200.11:9910 + cvauth: + method: token + token_file: /tmp/token + cvsourceintf: Management1 + cvvrf: MGMT + disable_aaa: false + smashexcludes: ale,flexCounter,hardware,kni,pulse,strata +enable_password: + disabled: true +hostname: digital-twin-cv-instance-1 +ip_igmp_snooping: + globally_enabled: true +management_api_http: + enable_https: true + enable_vrfs: + - name: MGMT +management_interfaces: +- name: Management1 + description: OOB_MANAGEMENT + shutdown: false + vrf: MGMT + ip_address: 192.168.1.10/32 + type: oob + gateway: 192.168.1.254 +metadata: + is_deployed: true + fabric_name: DIGITAL_TWIN +ntp: + local_interface: + name: Management1 + vrf: MGMT + servers: + - name: 0.pool.ntp.org + preferred: true + vrf: MGMT +service_routing_protocols_model: multi-agent +static_routes: +- vrf: MGMT + prefix: 0.0.0.0/0 + next_hop: 192.168.1.254 +transceiver_qsfp_default_mode_4x10: true +vlan_internal_order: + allocation: ascending + range: + beginning: 1006 + ending: 1199 +vrfs: +- name: MGMT + ip_routing: false diff --git a/ansible_collections/arista/avd/extensions/molecule/digital_twin/inventory/host_vars/digital-twin-cv-instance-1.yml b/ansible_collections/arista/avd/extensions/molecule/digital_twin/inventory/host_vars/digital-twin-cv-instance-1.yml new file mode 100644 index 00000000000..1c18aff7759 --- /dev/null +++ b/ansible_collections/arista/avd/extensions/molecule/digital_twin/inventory/host_vars/digital-twin-cv-instance-1.yml @@ -0,0 +1,29 @@ +--- +# Test that digital_twin.fabric.cv_settings overrides global cv_settings for daemon_terminattr in Digital Twin mode. +type: l2leaf + +l2leaf: + nodes: + - name: digital-twin-cv-instance-1 + id: 1 + mgmt_ip: 192.168.1.10/32 + mgmt_gateway: 192.168.1.254 + +digital_twin: + environment: act + fabric: + cv_settings: + onprem_clusters: + - name: dev + servers: + - name: 10.20.30.40 + +cv_settings: + onprem_clusters: + - name: production + servers: + - name: 192.168.200.11 + +ntp_settings: + servers: + - name: 0.pool.ntp.org diff --git a/ansible_collections/arista/avd/extensions/molecule/digital_twin/inventory/hosts.yml b/ansible_collections/arista/avd/extensions/molecule/digital_twin/inventory/hosts.yml index 7e28726a5d8..7638b06a745 100644 --- a/ansible_collections/arista/avd/extensions/molecule/digital_twin/inventory/hosts.yml +++ b/ansible_collections/arista/avd/extensions/molecule/digital_twin/inventory/hosts.yml @@ -35,6 +35,7 @@ all: digital-twin-enforce-eapi-4: digital-twin-veos-no-mgmt: digital-twin-cloudeos-no-mgmt: + digital-twin-cv-instance-1: # Test case to confirm that ACT topology file gets rendered without an empty iterable for the links DIGITAL_TWIN_SINGLE_SWITCH_FABRIC: children: diff --git a/ansible_collections/arista/avd/roles/eos_designs/docs/tables/cloudvision-settings.md b/ansible_collections/arista/avd/roles/eos_designs/docs/tables/cloudvision-settings.md index 9150729ffbb..c448fc6a7eb 100644 --- a/ansible_collections/arista/avd/roles/eos_designs/docs/tables/cloudvision-settings.md +++ b/ansible_collections/arista/avd/roles/eos_designs/docs/tables/cloudvision-settings.md @@ -38,6 +38,36 @@ | [cvp_ingestauth_key](## "cvp_ingestauth_key") removed | String | | | | This key was removed. Support was removed in AVD version 6.0.0. | | [cvp_instance_ips](## "cvp_instance_ips") removed | List | | | | This key was removed. Support was removed in AVD version 6.0.0. Use cv_settings instead. | | [cvp_token_file](## "cvp_token_file") removed | String | | | | This key was removed. Support was removed in AVD version 6.0.0. Use cv_settings instead. | + | [digital_twin](## "digital_twin") | Dictionary | | | | PREVIEW: This option is marked as "preview", meaning the data models or generated configuration can change at any time.
Global settings to configure the Digital Twin of the Fabric. | + | [  fabric](## "digital_twin.fabric") | Dictionary | Required | | | Settings for Digital Twin fabric devices. | + | [    cv_settings](## "digital_twin.fabric.cv_settings") | Dictionary | | | | CloudVision settings for Digital Twin deployment.
When set, overrides the global `cv_settings` for devices in Digital Twin mode. | + | [      cvaas](## "digital_twin.fabric.cv_settings.cvaas") | Dictionary | | | | State streaming to CloudVision-as-a-Service. | + | [        enabled](## "digital_twin.fabric.cv_settings.cvaas.enabled") | Boolean | Required | | | Enable streaming to CVaaS.
When enabled it will stream to 'apiserver.arista.io:443' using the VRF obtained from `default_mgmt_method` unless overridden under `clusters`. | + | [        clusters](## "digital_twin.fabric.cv_settings.cvaas.clusters") | List, items: Dictionary | | `[{'name': 'cvaas'}]` | | | + | [          - name](## "digital_twin.fabric.cv_settings.cvaas.clusters.[].name") | String | Required, Unique | | Pattern: `[a-zA-Z0-9-_]+` | Short name for the CVaaS cluster. Required here, but only used when configuring multiple clusters. | + | [            region](## "digital_twin.fabric.cv_settings.cvaas.clusters.[].region") | String | | `auto` | Valid Values:
- auto
- us-central1-a
- us-central1-b
- us-central1-c
- us-4
- apnortheast-1
- euwest-2
- eu-3
- ausoutheast-1
- na-northeast1-b
- uk-1
- india-1
- staging
- dev
- play | Optionally set the region to stream to.
The "auto" region will use 'apiserver.arista.io:443' which will redirect to the correct region based on the device's serial number.
"staging", "dev" and "play" are for internal Arista use. | + | [            vrf](## "digital_twin.fabric.cv_settings.cvaas.clusters.[].vrf") | String | | `use_default_mgmt_method_vrf` | | The VRF used to connect to CloudVision.
The value will be interpreted according to these rules:
- `use_mgmt_interface_vrf` will configure the VRF set with `mgmt_interface_vrf` and configure the `mgmt_interface` as the source interface.
An error will be raised if `mgmt_ip` or `ipv6_mgmt_ip` are not configured for the device.
- `use_inband_mgmt_vrf` will configure the VRF set with `inband_mgmt_vrf` and configure the `inband_mgmt_interface` as the source interface.
An error will be raised if inband management is not configured for the device.
- `use_default_mgmt_method_vrf` will configure the VRF and source-interface for one of the two options above depending on the value of `default_mgmt_method`.
- Any other string will be used directly as the VRF name. | + | [            token_file](## "digital_twin.fabric.cv_settings.cvaas.clusters.[].token_file") | String | | `/tmp/cv-onboarding-token` | | Path to the onboarding token used for certificate based authentication.
The path is on the EOS device and the token file must be copied to the device first. | + | [            source_interface](## "digital_twin.fabric.cv_settings.cvaas.clusters.[].source_interface") | String | | | | Source-interface used to connect to CloudVision.
If not set, the source interface may be set automatically when VRF is set to `use_mgmt_interface_vrf`, `use_inband_mgmt_vrf` or `use_default_mgmt_method_vrf`. | + | [      onprem_clusters](## "digital_twin.fabric.cv_settings.onprem_clusters") | List, items: Dictionary | | | | On-premise CloudVision clusters. | + | [        - name](## "digital_twin.fabric.cv_settings.onprem_clusters.[].name") | String | Required, Unique | | Pattern: `[a-zA-Z0-9-_]+` | Short name for the cluster. Required here, but only used when configuring multiple clusters. | + | [          servers](## "digital_twin.fabric.cv_settings.onprem_clusters.[].servers") | List, items: Dictionary | Required | | Min Length: 1
Max Length: 3 | CloudVision servers that makes up one cluster. | + | [            - name](## "digital_twin.fabric.cv_settings.onprem_clusters.[].servers.[].name") | String | Required, Unique | | | Server IP address or FQDN.
Note: It is currently recommended to use IP address because of limitations with Image transfers from CloudVision. | + | [              port](## "digital_twin.fabric.cv_settings.onprem_clusters.[].servers.[].port") | Integer | | `9910` | | | + | [          vrf](## "digital_twin.fabric.cv_settings.onprem_clusters.[].vrf") | String | | `use_default_mgmt_method_vrf` | | The VRF used to connect to CloudVision.
The value will be interpreted according to these rules:
- `use_mgmt_interface_vrf` will configure the VRF set with `mgmt_interface_vrf` and configure the `mgmt_interface` as the source interface.
An error will be raised if `mgmt_ip` or `ipv6_mgmt_ip` are not configured for the device.
- `use_inband_mgmt_vrf` will configure the VRF set with `inband_mgmt_vrf` and configure the `inband_mgmt_interface` as the source interface.
An error will be raised if inband management is not configured for the device.
- `use_default_mgmt_method_vrf` will configure the VRF and source-interface for one of the two options above depending on the value of `default_mgmt_method`.
- Any other string will be used directly as the VRF name. | + | [          token_file](## "digital_twin.fabric.cv_settings.onprem_clusters.[].token_file") | String | | `/tmp/token` | | Path to the onboarding token used for certificate based authentication.
The path is on the EOS device and the token file must be copied to the device first. | + | [          source_interface](## "digital_twin.fabric.cv_settings.onprem_clusters.[].source_interface") | String | | | | Source-interface used to connect to CloudVision.
If not set, the source interface may be set automatically when VRF is set to `use_mgmt_interface_vrf`, `use_inband_mgmt_vrf` or `use_default_mgmt_method_vrf`. | + | [      terminattr](## "digital_twin.fabric.cv_settings.terminattr") | Dictionary | | | | Specific settings for the TerminAttr daemon. | + | [        ingestexclude](## "digital_twin.fabric.cv_settings.terminattr.ingestexclude") | String | | | | Exclude paths from Sysdb on the ingest side.
e.g. "/Sysdb/cell/1/agent,/Sysdb/cell/2/agent"
| + | [        smashexcludes](## "digital_twin.fabric.cv_settings.terminattr.smashexcludes") | String | | `ale,flexCounter,hardware,kni,pulse,strata` | | Exclude paths from the shared memory table.
e.g. "ale,flexCounter,hardware,kni,pulse,strata"
| + | [        disable_aaa](## "digital_twin.fabric.cv_settings.terminattr.disable_aaa") | Boolean | | `False` | | Disable AAA authorization and accounting.
When setting this flag, all commands pushed from CloudVision are applied directly to the CLI without authorization.
| + | [        cvtargetconfigs](## "digital_twin.fabric.cv_settings.terminattr.cvtargetconfigs") | List, items: String | | | Min Length: 1 | Set the target configuration path(s) for dynamic device configuration from CloudVision.
Used for MSS (Multi-Domain Segmentation Service) integrations.
| + | [          - <str>](## "digital_twin.fabric.cv_settings.terminattr.cvtargetconfigs.[]") | String | | | | | + | [        flowdns](## "digital_twin.fabric.cv_settings.terminattr.flowdns") | Boolean | | | | Enable DNS resolution for flow records (TerminAttr default is true).
Set to false to disable DNS lookups on sFlow/IPFIX flow records.
| + | [        custom_cv_options](## "digital_twin.fabric.cv_settings.terminattr.custom_cv_options") | List, items: Dictionary | | | | TerminAttr CLI options not covered by the schema.
Each entry renders as `-=` when `value` is set, or `-` when `value` is omitted.
Options are appended at the end of the TerminAttr exec command line after all other flags.
| + | [          - flag](## "digital_twin.fabric.cv_settings.terminattr.custom_cv_options.[].flag") | String | Required | | Min Length: 1
Pattern: `^(?!-)(?!.*[\s=]).+$` | TerminAttr CLI flag name without the leading dash.
| + | [            value](## "digital_twin.fabric.cv_settings.terminattr.custom_cv_options.[].value") | String | | | | Flag value. If omitted, the flag is rendered without a value (e.g. `-someflag`).
If set, the flag is rendered as `-flag=value`.
| + | [      set_source_interfaces](## "digital_twin.fabric.cv_settings.set_source_interfaces") | Boolean | | `True` | | Automatically set source interface when VRF is set to `use_mgmt_interface_vrf`, `use_inband_mgmt_vrf` or `use_default_mgmt_method_vrf`.
Can be set to `false` to avoid changes when migrating from the old `cv_instances` model. | | [terminattr_disable_aaa](## "terminattr_disable_aaa") removed | Boolean | | | | This key was removed. Support was removed in AVD version 6.0.0. Use cv_settings instead. | | [terminattr_ingestexclude](## "terminattr_ingestexclude") removed | String | | | | This key was removed. Support was removed in AVD version 6.0.0. Use cv_settings instead. | | [terminattr_ingestgrpcurl_port](## "terminattr_ingestgrpcurl_port") removed | Integer | | | | This key was removed. Support was removed in AVD version 6.0.0. Use cv_settings instead. | @@ -154,4 +184,121 @@ # Automatically set source interface when VRF is set to `use_mgmt_interface_vrf`, `use_inband_mgmt_vrf` or `use_default_mgmt_method_vrf`. # Can be set to `false` to avoid changes when migrating from the old `cv_instances` model. set_source_interfaces: + + # PREVIEW: This option is marked as "preview", meaning the data models or generated configuration can change at any time. + # Global settings to configure the Digital Twin of the Fabric. + digital_twin: + + # Settings for Digital Twin fabric devices. + fabric: # required + + # CloudVision settings for Digital Twin deployment. + # When set, overrides the global `cv_settings` for devices in Digital Twin mode. + cv_settings: + + # State streaming to CloudVision-as-a-Service. + cvaas: + + # Enable streaming to CVaaS. + # When enabled it will stream to 'apiserver.arista.io:443' using the VRF obtained from `default_mgmt_method` unless overridden under `clusters`. + enabled: + clusters: # default=[{'name': 'cvaas'}] + + # Short name for the CVaaS cluster. Required here, but only used when configuring multiple clusters. + - name: + + # Optionally set the region to stream to. + # The "auto" region will use 'apiserver.arista.io:443' which will redirect to the correct region based on the device's serial number. + # "staging", "dev" and "play" are for internal Arista use. + region: + + # The VRF used to connect to CloudVision. + # The value will be interpreted according to these rules: + # - `use_mgmt_interface_vrf` will configure the VRF set with `mgmt_interface_vrf` and configure the `mgmt_interface` as the source interface. + # An error will be raised if `mgmt_ip` or `ipv6_mgmt_ip` are not configured for the device. + # - `use_inband_mgmt_vrf` will configure the VRF set with `inband_mgmt_vrf` and configure the `inband_mgmt_interface` as the source interface. + # An error will be raised if inband management is not configured for the device. + # - `use_default_mgmt_method_vrf` will configure the VRF and source-interface for one of the two options above depending on the value of `default_mgmt_method`. + # - Any other string will be used directly as the VRF name. + vrf: + + # Path to the onboarding token used for certificate based authentication. + # The path is on the EOS device and the token file must be copied to the device first. + token_file: + + # Source-interface used to connect to CloudVision. + # If not set, the source interface may be set automatically when VRF is set to `use_mgmt_interface_vrf`, `use_inband_mgmt_vrf` or `use_default_mgmt_method_vrf`. + source_interface: + + # On-premise CloudVision clusters. + onprem_clusters: + + # Short name for the cluster. Required here, but only used when configuring multiple clusters. + - name: + + # CloudVision servers that makes up one cluster. + servers: # 1-3 items; required + + # Server IP address or FQDN. + # Note: It is currently recommended to use IP address because of limitations with Image transfers from CloudVision. + - name: + port: + + # The VRF used to connect to CloudVision. + # The value will be interpreted according to these rules: + # - `use_mgmt_interface_vrf` will configure the VRF set with `mgmt_interface_vrf` and configure the `mgmt_interface` as the source interface. + # An error will be raised if `mgmt_ip` or `ipv6_mgmt_ip` are not configured for the device. + # - `use_inband_mgmt_vrf` will configure the VRF set with `inband_mgmt_vrf` and configure the `inband_mgmt_interface` as the source interface. + # An error will be raised if inband management is not configured for the device. + # - `use_default_mgmt_method_vrf` will configure the VRF and source-interface for one of the two options above depending on the value of `default_mgmt_method`. + # - Any other string will be used directly as the VRF name. + vrf: + + # Path to the onboarding token used for certificate based authentication. + # The path is on the EOS device and the token file must be copied to the device first. + token_file: + + # Source-interface used to connect to CloudVision. + # If not set, the source interface may be set automatically when VRF is set to `use_mgmt_interface_vrf`, `use_inband_mgmt_vrf` or `use_default_mgmt_method_vrf`. + source_interface: + + # Specific settings for the TerminAttr daemon. + terminattr: + + # Exclude paths from Sysdb on the ingest side. + # e.g. "/Sysdb/cell/1/agent,/Sysdb/cell/2/agent" + ingestexclude: + + # Exclude paths from the shared memory table. + # e.g. "ale,flexCounter,hardware,kni,pulse,strata" + smashexcludes: + + # Disable AAA authorization and accounting. + # When setting this flag, all commands pushed from CloudVision are applied directly to the CLI without authorization. + disable_aaa: + + # Set the target configuration path(s) for dynamic device configuration from CloudVision. + # Used for MSS (Multi-Domain Segmentation Service) integrations. + cvtargetconfigs: # >=1 items + - + + # Enable DNS resolution for flow records (TerminAttr default is true). + # Set to false to disable DNS lookups on sFlow/IPFIX flow records. + flowdns: + + # TerminAttr CLI options not covered by the schema. + # Each entry renders as `-=` when `value` is set, or `-` when `value` is omitted. + # Options are appended at the end of the TerminAttr exec command line after all other flags. + custom_cv_options: + + # TerminAttr CLI flag name without the leading dash. + - flag: =1; required> + + # Flag value. If omitted, the flag is rendered without a value (e.g. `-someflag`). + # If set, the flag is rendered as `-flag=value`. + value: + + # Automatically set source interface when VRF is set to `use_mgmt_interface_vrf`, `use_inband_mgmt_vrf` or `use_default_mgmt_method_vrf`. + # Can be set to `false` to avoid changes when migrating from the old `cv_instances` model. + set_source_interfaces: ``` diff --git a/python-avd/pyavd/_eos_designs/schema/__init__.py b/python-avd/pyavd/_eos_designs/schema/__init__.py index af584e817b1..b63fd12dc7c 100644 --- a/python-avd/pyavd/_eos_designs/schema/__init__.py +++ b/python-avd/pyavd/_eos_designs/schema/__init__.py @@ -18389,12 +18389,567 @@ class DigitalTwin(AvdModel): class Fabric(AvdModel): """Subclass of AvdModel.""" + class CvSettings(AvdModel): + """Subclass of AvdModel.""" + + class Cvaas(AvdModel): + """Subclass of AvdModel.""" + + class ClustersItem(AvdModel): + """Subclass of AvdModel.""" + + Region: TypeAlias = Literal[ + "auto", + "us-central1-a", + "us-central1-b", + "us-central1-c", + "us-4", + "apnortheast-1", + "euwest-2", + "eu-3", + "ausoutheast-1", + "na-northeast1-b", + "uk-1", + "india-1", + "staging", + "dev", + "play", + ] + _fields: ClassVar[dict] = { + "name": {"type": str}, + "region": {"type": str, "default": "auto"}, + "vrf": {"type": str, "default": "use_default_mgmt_method_vrf"}, + "token_file": {"type": str, "default": "/tmp/cv-onboarding-token"}, + "source_interface": {"type": str}, + } + name: str + """Short name for the CVaaS cluster. Required here, but only used when configuring multiple clusters.""" + region: Region + """ + Optionally set the region to stream to. + The "auto" region will use 'apiserver.arista.io:443' which + will redirect to the correct region based on the device's serial number. + "staging", "dev" and "play" + are for internal Arista use. + + Default value: `"auto"` + """ + vrf: str + """ + The VRF used to connect to CloudVision. + The value will be interpreted according to these rules: + - + `use_mgmt_interface_vrf` will configure the VRF set with `mgmt_interface_vrf` and configure the + `mgmt_interface` as the source interface. + An error will be raised if `mgmt_ip` or `ipv6_mgmt_ip` + are not configured for the device. + - `use_inband_mgmt_vrf` will configure the VRF set with + `inband_mgmt_vrf` and configure the `inband_mgmt_interface` as the source interface. + An error will + be raised if inband management is not configured for the device. + - `use_default_mgmt_method_vrf` + will configure the VRF and source-interface for one of the two options above depending on the value + of `default_mgmt_method`. + - Any other string will be used directly as the VRF name. + + Default value: `"use_default_mgmt_method_vrf"` + """ + token_file: str + """ + Path to the onboarding token used for certificate based authentication. + The path is on the EOS + device and the token file must be copied to the device first. + + Default value: `"/tmp/cv-onboarding-token"` + """ + source_interface: str | None + """ + Source-interface used to connect to CloudVision. + If not set, the source interface may be set + automatically when VRF is set to `use_mgmt_interface_vrf`, `use_inband_mgmt_vrf` or + `use_default_mgmt_method_vrf`. + """ + + if TYPE_CHECKING: + + def __init__( + self, + *, + name: str | UndefinedType = Undefined, + region: Region | UndefinedType = Undefined, + vrf: str | UndefinedType = Undefined, + token_file: str | UndefinedType = Undefined, + source_interface: str | UndefinedType | None = Undefined, + ) -> None: + """ + ClustersItem. + + + Subclass of AvdModel. + + Args: + name: Short name for the CVaaS cluster. Required here, but only used when configuring multiple clusters. + region: + Optionally set the region to stream to. + The "auto" region will use 'apiserver.arista.io:443' which + will redirect to the correct region based on the device's serial number. + "staging", "dev" and "play" + are for internal Arista use. + vrf: + The VRF used to connect to CloudVision. + The value will be interpreted according to these rules: + - + `use_mgmt_interface_vrf` will configure the VRF set with `mgmt_interface_vrf` and configure the + `mgmt_interface` as the source interface. + An error will be raised if `mgmt_ip` or `ipv6_mgmt_ip` + are not configured for the device. + - `use_inband_mgmt_vrf` will configure the VRF set with + `inband_mgmt_vrf` and configure the `inband_mgmt_interface` as the source interface. + An error will + be raised if inband management is not configured for the device. + - `use_default_mgmt_method_vrf` + will configure the VRF and source-interface for one of the two options above depending on the value + of `default_mgmt_method`. + - Any other string will be used directly as the VRF name. + token_file: + Path to the onboarding token used for certificate based authentication. + The path is on the EOS + device and the token file must be copied to the device first. + source_interface: + Source-interface used to connect to CloudVision. + If not set, the source interface may be set + automatically when VRF is set to `use_mgmt_interface_vrf`, `use_inband_mgmt_vrf` or + `use_default_mgmt_method_vrf`. + + """ + + class Clusters(AvdIndexedList[str, ClustersItem]): + """Subclass of AvdIndexedList with `ClustersItem` items. Primary key is `name` (`str`).""" + + _primary_key: ClassVar[str] = "name" + + Clusters._item_type = ClustersItem + + _fields: ClassVar[dict] = { + "enabled": {"type": bool}, + "clusters": {"type": Clusters, "default": lambda cls: coerce_type([{"name": "cvaas"}], target_type=cls)}, + } + enabled: bool + """ + Enable streaming to CVaaS. + When enabled it will stream to 'apiserver.arista.io:443' using the VRF + obtained from `default_mgmt_method` unless overridden under `clusters`. + """ + clusters: Clusters + """ + Subclass of AvdIndexedList with `ClustersItem` items. Primary key is `name` (`str`). + + Default value: `lambda cls: coerce_type([{"name": "cvaas"}], target_type=cls)` + """ + + if TYPE_CHECKING: + + def __init__(self, *, enabled: bool | UndefinedType = Undefined, clusters: Clusters | UndefinedType = Undefined) -> None: + """ + Cvaas. + + + Subclass of AvdModel. + + Args: + enabled: + Enable streaming to CVaaS. + When enabled it will stream to 'apiserver.arista.io:443' using the VRF + obtained from `default_mgmt_method` unless overridden under `clusters`. + clusters: Subclass of AvdIndexedList with `ClustersItem` items. Primary key is `name` (`str`). + + """ + + class OnpremClustersItem(AvdModel): + """Subclass of AvdModel.""" + + class ServersItem(AvdModel): + """Subclass of AvdModel.""" + + _fields: ClassVar[dict] = {"name": {"type": str}, "port": {"type": int, "default": 9910}} + name: str + """ + Server IP address or FQDN. + Note: It is currently recommended to use IP address because of + limitations with Image transfers from CloudVision. + """ + port: int + """Default value: `9910`""" + + if TYPE_CHECKING: + + def __init__(self, *, name: str | UndefinedType = Undefined, port: int | UndefinedType = Undefined) -> None: + """ + ServersItem. + + + Subclass of AvdModel. + + Args: + name: + Server IP address or FQDN. + Note: It is currently recommended to use IP address because of + limitations with Image transfers from CloudVision. + port: port + + """ + + class Servers(AvdIndexedList[str, ServersItem]): + """Subclass of AvdIndexedList with `ServersItem` items. Primary key is `name` (`str`).""" + + _primary_key: ClassVar[str] = "name" + + Servers._item_type = ServersItem + + _fields: ClassVar[dict] = { + "name": {"type": str}, + "servers": {"type": Servers}, + "vrf": {"type": str, "default": "use_default_mgmt_method_vrf"}, + "token_file": {"type": str, "default": "/tmp/token"}, + "source_interface": {"type": str}, + } + name: str + """Short name for the cluster. Required here, but only used when configuring multiple clusters.""" + servers: Servers + """ + CloudVision servers that makes up one cluster. + + Subclass of AvdIndexedList with `ServersItem` items. + Primary key is `name` (`str`). + """ + vrf: str + """ + The VRF used to connect to CloudVision. + The value will be interpreted according to these rules: + - + `use_mgmt_interface_vrf` will configure the VRF set with `mgmt_interface_vrf` and configure the + `mgmt_interface` as the source interface. + An error will be raised if `mgmt_ip` or `ipv6_mgmt_ip` + are not configured for the device. + - `use_inband_mgmt_vrf` will configure the VRF set with + `inband_mgmt_vrf` and configure the `inband_mgmt_interface` as the source interface. + An error will + be raised if inband management is not configured for the device. + - `use_default_mgmt_method_vrf` + will configure the VRF and source-interface for one of the two options above depending on the value + of `default_mgmt_method`. + - Any other string will be used directly as the VRF name. + + Default value: `"use_default_mgmt_method_vrf"` + """ + token_file: str + """ + Path to the onboarding token used for certificate based authentication. + The path is on the EOS + device and the token file must be copied to the device first. + + Default value: `"/tmp/token"` + """ + source_interface: str | None + """ + Source-interface used to connect to CloudVision. + If not set, the source interface may be set + automatically when VRF is set to `use_mgmt_interface_vrf`, `use_inband_mgmt_vrf` or + `use_default_mgmt_method_vrf`. + """ + + if TYPE_CHECKING: + + def __init__( + self, + *, + name: str | UndefinedType = Undefined, + servers: Servers | UndefinedType = Undefined, + vrf: str | UndefinedType = Undefined, + token_file: str | UndefinedType = Undefined, + source_interface: str | UndefinedType | None = Undefined, + ) -> None: + """ + OnpremClustersItem. + + + Subclass of AvdModel. + + Args: + name: Short name for the cluster. Required here, but only used when configuring multiple clusters. + servers: + CloudVision servers that makes up one cluster. + + Subclass of AvdIndexedList with `ServersItem` items. + Primary key is `name` (`str`). + vrf: + The VRF used to connect to CloudVision. + The value will be interpreted according to these rules: + - + `use_mgmt_interface_vrf` will configure the VRF set with `mgmt_interface_vrf` and configure the + `mgmt_interface` as the source interface. + An error will be raised if `mgmt_ip` or `ipv6_mgmt_ip` + are not configured for the device. + - `use_inband_mgmt_vrf` will configure the VRF set with + `inband_mgmt_vrf` and configure the `inband_mgmt_interface` as the source interface. + An error will + be raised if inband management is not configured for the device. + - `use_default_mgmt_method_vrf` + will configure the VRF and source-interface for one of the two options above depending on the value + of `default_mgmt_method`. + - Any other string will be used directly as the VRF name. + token_file: + Path to the onboarding token used for certificate based authentication. + The path is on the EOS + device and the token file must be copied to the device first. + source_interface: + Source-interface used to connect to CloudVision. + If not set, the source interface may be set + automatically when VRF is set to `use_mgmt_interface_vrf`, `use_inband_mgmt_vrf` or + `use_default_mgmt_method_vrf`. + + """ + + class OnpremClusters(AvdIndexedList[str, OnpremClustersItem]): + """Subclass of AvdIndexedList with `OnpremClustersItem` items. Primary key is `name` (`str`).""" + + _primary_key: ClassVar[str] = "name" + + OnpremClusters._item_type = OnpremClustersItem + + class Terminattr(AvdModel): + """Subclass of AvdModel.""" + + class Cvtargetconfigs(AvdList[str]): + """Subclass of AvdList with `str` items.""" + + Cvtargetconfigs._item_type = str + + class CustomCvOptionsItem(AvdModel): + """Subclass of AvdModel.""" + + _fields: ClassVar[dict] = {"flag": {"type": str}, "value": {"type": str}} + flag: str + """TerminAttr CLI flag name without the leading dash.""" + value: str | None + """ + Flag value. If omitted, the flag is rendered without a value (e.g. `-someflag`). + If set, the flag is + rendered as `-flag=value`. + """ + + if TYPE_CHECKING: + + def __init__(self, *, flag: str | UndefinedType = Undefined, value: str | UndefinedType | None = Undefined) -> None: + """ + CustomCvOptionsItem. + + + Subclass of AvdModel. + + Args: + flag: TerminAttr CLI flag name without the leading dash. + value: + Flag value. If omitted, the flag is rendered without a value (e.g. `-someflag`). + If set, the flag is + rendered as `-flag=value`. + + """ + + class CustomCvOptions(AvdList[CustomCvOptionsItem]): + """Subclass of AvdList with `CustomCvOptionsItem` items.""" + + CustomCvOptions._item_type = CustomCvOptionsItem + + _fields: ClassVar[dict] = { + "ingestexclude": {"type": str}, + "smashexcludes": {"type": str, "default": "ale,flexCounter,hardware,kni,pulse,strata"}, + "disable_aaa": {"type": bool, "default": False}, + "cvtargetconfigs": {"type": Cvtargetconfigs}, + "flowdns": {"type": bool}, + "custom_cv_options": {"type": CustomCvOptions}, + } + ingestexclude: str | None + """ + Exclude paths from Sysdb on the ingest side. + e.g. "/Sysdb/cell/1/agent,/Sysdb/cell/2/agent" + """ + smashexcludes: str + """ + Exclude paths from the shared memory table. + e.g. "ale,flexCounter,hardware,kni,pulse,strata" + + Default value: `"ale,flexCounter,hardware,kni,pulse,strata"` + """ + disable_aaa: bool + """ + Disable AAA authorization and accounting. + When setting this flag, all commands pushed from + CloudVision are applied directly to the CLI without authorization. + + Default value: `False` + """ + cvtargetconfigs: Cvtargetconfigs + """ + Set the target configuration path(s) for dynamic device configuration from CloudVision. + Used for MSS + (Multi-Domain Segmentation Service) integrations. + + + Subclass of AvdList with `str` items. + """ + flowdns: bool | None + """ + Enable DNS resolution for flow records (TerminAttr default is true). + Set to false to disable DNS + lookups on sFlow/IPFIX flow records. + """ + custom_cv_options: CustomCvOptions + """ + TerminAttr CLI options not covered by the schema. + Each entry renders as `-=` when + `value` is set, or `-` when `value` is omitted. + Options are appended at the end of the + TerminAttr exec command line after all other flags. + + + Subclass of AvdList with `CustomCvOptionsItem` + items. + """ + + if TYPE_CHECKING: + + def __init__( + self, + *, + ingestexclude: str | UndefinedType | None = Undefined, + smashexcludes: str | UndefinedType = Undefined, + disable_aaa: bool | UndefinedType = Undefined, + cvtargetconfigs: Cvtargetconfigs | UndefinedType = Undefined, + flowdns: bool | UndefinedType | None = Undefined, + custom_cv_options: CustomCvOptions | UndefinedType = Undefined, + ) -> None: + """ + Terminattr. + + + Subclass of AvdModel. + + Args: + ingestexclude: + Exclude paths from Sysdb on the ingest side. + e.g. "/Sysdb/cell/1/agent,/Sysdb/cell/2/agent" + smashexcludes: + Exclude paths from the shared memory table. + e.g. "ale,flexCounter,hardware,kni,pulse,strata" + disable_aaa: + Disable AAA authorization and accounting. + When setting this flag, all commands pushed from + CloudVision are applied directly to the CLI without authorization. + cvtargetconfigs: + Set the target configuration path(s) for dynamic device configuration from CloudVision. + Used for MSS + (Multi-Domain Segmentation Service) integrations. + + + Subclass of AvdList with `str` items. + flowdns: + Enable DNS resolution for flow records (TerminAttr default is true). + Set to false to disable DNS + lookups on sFlow/IPFIX flow records. + custom_cv_options: + TerminAttr CLI options not covered by the schema. + Each entry renders as `-=` when + `value` is set, or `-` when `value` is omitted. + Options are appended at the end of the + TerminAttr exec command line after all other flags. + + + Subclass of AvdList with `CustomCvOptionsItem` + items. + + """ + + _fields: ClassVar[dict] = { + "cvaas": {"type": Cvaas}, + "onprem_clusters": {"type": OnpremClusters}, + "terminattr": {"type": Terminattr}, + "set_source_interfaces": {"type": bool, "default": True}, + } + cvaas: Cvaas + """ + State streaming to CloudVision-as-a-Service. + + Subclass of AvdModel. + """ + onprem_clusters: OnpremClusters + """ + On-premise CloudVision clusters. + + Subclass of AvdIndexedList with `OnpremClustersItem` items. + Primary key is `name` (`str`). + """ + terminattr: Terminattr + """ + Specific settings for the TerminAttr daemon. + + Subclass of AvdModel. + """ + set_source_interfaces: bool + """ + Automatically set source interface when VRF is set to `use_mgmt_interface_vrf`, + `use_inband_mgmt_vrf` or `use_default_mgmt_method_vrf`. + Can be set to `false` to avoid changes when + migrating from the old `cv_instances` model. + + Default value: `True` + """ + + if TYPE_CHECKING: + + def __init__( + self, + *, + cvaas: Cvaas | UndefinedType = Undefined, + onprem_clusters: OnpremClusters | UndefinedType = Undefined, + terminattr: Terminattr | UndefinedType = Undefined, + set_source_interfaces: bool | UndefinedType = Undefined, + ) -> None: + """ + CvSettings. + + + Subclass of AvdModel. + + Args: + cvaas: + State streaming to CloudVision-as-a-Service. + + Subclass of AvdModel. + onprem_clusters: + On-premise CloudVision clusters. + + Subclass of AvdIndexedList with `OnpremClustersItem` items. + Primary key is `name` (`str`). + terminattr: + Specific settings for the TerminAttr daemon. + + Subclass of AvdModel. + set_source_interfaces: + Automatically set source interface when VRF is set to `use_mgmt_interface_vrf`, + `use_inband_mgmt_vrf` or `use_default_mgmt_method_vrf`. + Can be set to `false` to avoid changes when + migrating from the old `cv_instances` model. + + """ + _fields: ClassVar[dict] = { "act_os_version": {"type": str}, "act_username": {"type": str, "default": "cvpadmin"}, "act_password": {"type": str, "default": "cvp123!"}, "act_internet_access": {"type": bool, "default": False}, "act_ensure_eapi_access": {"type": bool, "default": False}, + "cv_settings": {"type": CvSettings}, } act_os_version: str | None """OS version for ACT Digital Twin fabric devices.""" @@ -18434,6 +18989,14 @@ class Fabric(AvdModel): Default value: `False` """ + cv_settings: CvSettings + """ + CloudVision settings for Digital Twin deployment. + When set, overrides the global `cv_settings` for + devices in Digital Twin mode. + + Subclass of AvdModel. + """ if TYPE_CHECKING: @@ -18445,6 +19008,7 @@ def __init__( act_password: str | UndefinedType = Undefined, act_internet_access: bool | UndefinedType = Undefined, act_ensure_eapi_access: bool | UndefinedType = Undefined, + cv_settings: CvSettings | UndefinedType = Undefined, ) -> None: """ Fabric. @@ -18472,6 +19036,12 @@ def __init__( default VRF and preserving this connectivity. This setting is only applicable to ACT `veos` and `cloudeos` node types. + cv_settings: + CloudVision settings for Digital Twin deployment. + When set, overrides the global `cv_settings` for + devices in Digital Twin mode. + + Subclass of AvdModel. """ diff --git a/python-avd/pyavd/_eos_designs/schema/eos_designs.schema.yml b/python-avd/pyavd/_eos_designs/schema/eos_designs.schema.yml index 7f5488d786c..4b38270ecf4 100644 --- a/python-avd/pyavd/_eos_designs/schema/eos_designs.schema.yml +++ b/python-avd/pyavd/_eos_designs/schema/eos_designs.schema.yml @@ -2343,6 +2343,13 @@ keys: This setting is only applicable to ACT `veos` and `cloudeos` node types.' default: false + cv_settings: + type: dict + $ref: eos_designs#/keys/cv_settings + description: 'CloudVision settings for Digital Twin deployment. + + When set, overrides the global `cv_settings` for devices in Digital + Twin mode.' use_default_interfaces_of_digital_twin_platform: type: bool default: false diff --git a/python-avd/pyavd/_eos_designs/schema/schema_fragments/digital_twin.schema.yml b/python-avd/pyavd/_eos_designs/schema/schema_fragments/digital_twin.schema.yml index 4d5426a152c..5cfe8b803c1 100644 --- a/python-avd/pyavd/_eos_designs/schema/schema_fragments/digital_twin.schema.yml +++ b/python-avd/pyavd/_eos_designs/schema/schema_fragments/digital_twin.schema.yml @@ -56,6 +56,12 @@ keys: Set this to `true` to enforce the required EOS configuration, guaranteeing eAPI over HTTPS is always enabled in the default VRF and preserving this connectivity. This setting is only applicable to ACT `veos` and `cloudeos` node types. default: false + cv_settings: + type: dict + $ref: "eos_designs#/keys/cv_settings" + description: |- + CloudVision settings for Digital Twin deployment. + When set, overrides the global `cv_settings` for devices in Digital Twin mode. use_default_interfaces_of_digital_twin_platform: type: bool default: false diff --git a/python-avd/pyavd/_eos_designs/structured_config/base/daemon_terminattr.py b/python-avd/pyavd/_eos_designs/structured_config/base/daemon_terminattr.py index 3a1e70d0dd6..1383d2571ee 100644 --- a/python-avd/pyavd/_eos_designs/structured_config/base/daemon_terminattr.py +++ b/python-avd/pyavd/_eos_designs/structured_config/base/daemon_terminattr.py @@ -30,7 +30,13 @@ def daemon_terminattr(self: AvdStructuredConfigBaseProtocol) -> None: flow_tracking_settings = self.inputs.flow_tracking_settings first_tracker_exported_to_cloudvision = next((tracker.name for tracker in flow_tracking_settings.trackers if tracker.export_to_cloudvision), None) - if not (cv_settings := self.inputs.cv_settings): + cv_settings = self.inputs.cv_settings + + # In Digital Twin mode, digital_twin.fabric.cv_settings overrides the global cv_settings. + if self.shared_utils.is_act_digital_twin and self.inputs.digital_twin.fabric.cv_settings: + cv_settings = self.inputs.digital_twin.fabric.cv_settings._cast_as(EosDesigns.CvSettings) + + if not cv_settings: self._validate_missing_cv_settings(first_tracker_exported_to_cloudvision) return