From 128e67f168cf6897a5a65c0c34096aa054a68f71 Mon Sep 17 00:00:00 2001 From: Alex Kudlov Date: Fri, 3 Jan 2025 17:22:18 +0000 Subject: [PATCH 1/5] jinja updates --- .../docs/tables/monitor-connectivity.md | 8 ++++++++ .../j2templates/eos/monitor-connectivity.j2 | 6 ++++++ .../pyavd/_eos_cli_config_gen/schema/__init__.py | 10 ++++++++++ .../schema/eos_cli_config_gen.schema.yml | 14 ++++++++++++++ .../monitor_connectivity.schema.yml | 14 ++++++++++++++ 5 files changed, 52 insertions(+) diff --git a/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/monitor-connectivity.md b/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/monitor-connectivity.md index 4f72231f84a..5fb4aa7f4ca 100644 --- a/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/monitor-connectivity.md +++ b/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/monitor-connectivity.md @@ -22,6 +22,7 @@ | [      local_interfaces](## "monitor_connectivity.hosts.[].local_interfaces") | String | | | | | | [      address_only](## "monitor_connectivity.hosts.[].address_only") | Boolean | | `True` | | When address-only is configured, the source IP of the packet is set to the interface
IP but the packet may exit the device via a different interface.
When set to `false`, the probe uses the interface to exit the device. | | [      url](## "monitor_connectivity.hosts.[].url") | String | | | | | + | [      icmp_echo_size](## "monitor_connectivity.hosts.[].icmp_echo_size") | Integer | | | Min: 36
Max: 18024 | Size of ICMP probe in bytes. | | [  vrfs](## "monitor_connectivity.vrfs") | List, items: Dictionary | | | | | | [    - name](## "monitor_connectivity.vrfs.[].name") | String | Required, Unique | | | VRF Name. | | [      description](## "monitor_connectivity.vrfs.[].description") | String | | | | | @@ -37,6 +38,7 @@ | [          local_interfaces](## "monitor_connectivity.vrfs.[].hosts.[].local_interfaces") | String | | | | | | [          address_only](## "monitor_connectivity.vrfs.[].hosts.[].address_only") | Boolean | | `True` | | When address-only is configured, the source IP of the packet is set to the interface
IP but the packet may exit the device via a different interface.
When set to `false`, the probe uses the interface to exit the device. | | [          url](## "monitor_connectivity.vrfs.[].hosts.[].url") | String | | | | | + | [          icmp_echo_size](## "monitor_connectivity.vrfs.[].hosts.[].icmp_echo_size") | Integer | | | Min: 36
Max: 18024 | Size of ICMP probe in bytes. | === "YAML" @@ -69,6 +71,9 @@ # When set to `false`, the probe uses the interface to exit the device. address_only: url: + + # Size of ICMP probe in bytes. + icmp_echo_size: vrfs: # VRF Name. @@ -96,4 +101,7 @@ # When set to `false`, the probe uses the interface to exit the device. address_only: url: + + # Size of ICMP probe in bytes. + icmp_echo_size: ``` diff --git a/python-avd/pyavd/_eos_cli_config_gen/j2templates/eos/monitor-connectivity.j2 b/python-avd/pyavd/_eos_cli_config_gen/j2templates/eos/monitor-connectivity.j2 index 12144fff8da..d317426673c 100644 --- a/python-avd/pyavd/_eos_cli_config_gen/j2templates/eos/monitor-connectivity.j2 +++ b/python-avd/pyavd/_eos_cli_config_gen/j2templates/eos/monitor-connectivity.j2 @@ -50,6 +50,9 @@ monitor connectivity {% if host.url is arista.avd.defined %} url {{ host.url }} {% endif %} +{% if host.icmp_echo_size is arista.avd.defined %} + icmp echo size {{ host.icmp_echo_size }} +{% endif %} {% endif %} {% endfor %} {% endif %} @@ -95,6 +98,9 @@ monitor connectivity {% if host.url is arista.avd.defined %} url {{ host.url }} {% endif %} +{% if host.icmp_echo_size is arista.avd.defined %} + icmp echo size {{ host.icmp_echo_size }} +{% endif %} {% endif %} {% endfor %} {% endif %} diff --git a/python-avd/pyavd/_eos_cli_config_gen/schema/__init__.py b/python-avd/pyavd/_eos_cli_config_gen/schema/__init__.py index 2e50cbc1579..6a8bedefba6 100644 --- a/python-avd/pyavd/_eos_cli_config_gen/schema/__init__.py +++ b/python-avd/pyavd/_eos_cli_config_gen/schema/__init__.py @@ -24295,6 +24295,7 @@ class HostsItem(AvdModel): "local_interfaces": {"type": str}, "address_only": {"type": bool, "default": True}, "url": {"type": str}, + "icmp_echo_size": {"type": int}, "_custom_data": {"type": dict}, } name: str @@ -24313,6 +24314,8 @@ class HostsItem(AvdModel): Default value: `True` """ url: str | None + icmp_echo_size: int | None + """Size of ICMP probe in bytes.""" _custom_data: dict[str, Any] if TYPE_CHECKING: @@ -24326,6 +24329,7 @@ def __init__( local_interfaces: str | None | UndefinedType = Undefined, address_only: bool | UndefinedType = Undefined, url: str | None | UndefinedType = Undefined, + icmp_echo_size: int | None | UndefinedType = Undefined, _custom_data: dict[str, Any] | UndefinedType = Undefined, ) -> None: """ @@ -24346,6 +24350,7 @@ def __init__( When set to `false`, the probe uses the interface to exit the device. url: url + icmp_echo_size: Size of ICMP probe in bytes. _custom_data: _custom_data """ @@ -24405,6 +24410,7 @@ class HostsItem(AvdModel): "local_interfaces": {"type": str}, "address_only": {"type": bool, "default": True}, "url": {"type": str}, + "icmp_echo_size": {"type": int}, "_custom_data": {"type": dict}, } name: str @@ -24423,6 +24429,8 @@ class HostsItem(AvdModel): Default value: `True` """ url: str | None + icmp_echo_size: int | None + """Size of ICMP probe in bytes.""" _custom_data: dict[str, Any] if TYPE_CHECKING: @@ -24436,6 +24444,7 @@ def __init__( local_interfaces: str | None | UndefinedType = Undefined, address_only: bool | UndefinedType = Undefined, url: str | None | UndefinedType = Undefined, + icmp_echo_size: int | None | UndefinedType = Undefined, _custom_data: dict[str, Any] | UndefinedType = Undefined, ) -> None: """ @@ -24456,6 +24465,7 @@ def __init__( When set to `false`, the probe uses the interface to exit the device. url: url + icmp_echo_size: Size of ICMP probe in bytes. _custom_data: _custom_data """ diff --git a/python-avd/pyavd/_eos_cli_config_gen/schema/eos_cli_config_gen.schema.yml b/python-avd/pyavd/_eos_cli_config_gen/schema/eos_cli_config_gen.schema.yml index d3e7c577fcc..518f3d126df 100644 --- a/python-avd/pyavd/_eos_cli_config_gen/schema/eos_cli_config_gen.schema.yml +++ b/python-avd/pyavd/_eos_cli_config_gen/schema/eos_cli_config_gen.schema.yml @@ -8421,6 +8421,13 @@ keys: default: true url: type: str + icmp_echo_size: + type: int + description: Size of ICMP probe in bytes. + convert_types: + - str + min: 36 + max: 18024 vrfs: type: list primary_key: name @@ -8481,6 +8488,13 @@ keys: default: true url: type: str + icmp_echo_size: + type: int + description: Size of ICMP probe in bytes. + convert_types: + - str + min: 36 + max: 18024 monitor_layer1: type: dict description: Enable SYSLOG messages on transceiver SMBus communication failures. diff --git a/python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/monitor_connectivity.schema.yml b/python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/monitor_connectivity.schema.yml index 545cea7a9e5..f632684ac39 100644 --- a/python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/monitor_connectivity.schema.yml +++ b/python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/monitor_connectivity.schema.yml @@ -60,6 +60,13 @@ keys: default: true url: type: str + icmp_echo_size: + type: int + description: Size of ICMP probe in bytes. + convert_types: + - str + min: 36 + max: 18024 vrfs: type: list primary_key: name @@ -115,3 +122,10 @@ keys: default: true url: type: str + icmp_echo_size: + type: int + description: Size of ICMP probe in bytes. + convert_types: + - str + min: 36 + max: 18024 From ec11fdf8989fd22ba422de0972f7ed1dcfca6e6b Mon Sep 17 00:00:00 2001 From: Alex Kudlov Date: Tue, 7 Jan 2025 14:55:11 +0000 Subject: [PATCH 2/5] molecule update --- .../molecule/eos_cli_config_gen/documentation/devices/host1.md | 2 ++ .../avd/molecule/eos_cli_config_gen/intended/configs/host1.cfg | 2 ++ .../inventory/host_vars/host1/monitor-connectivity.yml | 2 ++ 3 files changed, 6 insertions(+) diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/host1.md b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/host1.md index d84487ab92c..35a682b7004 100644 --- a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/host1.md +++ b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/host1.md @@ -2844,6 +2844,7 @@ monitor connectivity local-interfaces VRF_HOST_SET address-only ip 10.10.20.1 url https://server2.local.com + icmp echo size 1300 ! vrf yellow interval 5 @@ -2871,6 +2872,7 @@ monitor connectivity server3_connectivity_monitor local-interfaces HOST_SET ip 10.10.10.3 + icmp echo size 1200 ! host server4 ``` diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/host1.cfg b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/host1.cfg index e213b30b800..1c1baf36ce2 100644 --- a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/host1.cfg +++ b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/host1.cfg @@ -3936,6 +3936,7 @@ monitor connectivity local-interfaces VRF_HOST_SET address-only ip 10.10.20.1 url https://server2.local.com + icmp echo size 1300 ! vrf yellow interval 5 @@ -3963,6 +3964,7 @@ monitor connectivity server3_connectivity_monitor local-interfaces HOST_SET ip 10.10.10.3 + icmp echo size 1200 ! host server4 ! diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/host1/monitor-connectivity.yml b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/host1/monitor-connectivity.yml index 7c11abd5eb3..eb067e1844e 100644 --- a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/host1/monitor-connectivity.yml +++ b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/host1/monitor-connectivity.yml @@ -27,6 +27,7 @@ monitor_connectivity: ip: 10.10.10.3 local_interfaces: HOST_SET address_only: false + icmp_echo_size: 1200 - name: server4 vrfs: - name: red @@ -43,6 +44,7 @@ monitor_connectivity: ip: 10.10.20.1 local_interfaces: VRF_HOST_SET url: https://server2.local.com + icmp_echo_size: 1300 - name: blue local_interfaces: VRF_GLOBAL_SET address_only: false From 80abaebc1abf2e5b2b8c33f12b42bca5251dd9f9 Mon Sep 17 00:00:00 2001 From: Alex Kudlov Date: Tue, 7 Jan 2025 16:58:56 +0000 Subject: [PATCH 3/5] change ordering --- .../documentation/devices/host1.md | 2 +- .../intended/configs/host1.cfg | 2 +- .../host_vars/host1/monitor-connectivity.yml | 4 +-- .../docs/tables/monitor-connectivity.md | 16 +++++------ .../j2templates/eos/monitor-connectivity.j2 | 12 ++++---- .../_eos_cli_config_gen/schema/__init__.py | 20 ++++++------- .../schema/eos_cli_config_gen.schema.yml | 28 +++++++++---------- .../monitor_connectivity.schema.yml | 28 +++++++++---------- 8 files changed, 56 insertions(+), 56 deletions(-) diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/host1.md b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/host1.md index 35a682b7004..edba5ac4600 100644 --- a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/host1.md +++ b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/host1.md @@ -2843,8 +2843,8 @@ monitor connectivity server2_connectivity_monitor local-interfaces VRF_HOST_SET address-only ip 10.10.20.1 - url https://server2.local.com icmp echo size 1300 + url https://server2.local.com ! vrf yellow interval 5 diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/host1.cfg b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/host1.cfg index 1c1baf36ce2..4b7bda44335 100644 --- a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/host1.cfg +++ b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/intended/configs/host1.cfg @@ -3935,8 +3935,8 @@ monitor connectivity server2_connectivity_monitor local-interfaces VRF_HOST_SET address-only ip 10.10.20.1 - url https://server2.local.com icmp echo size 1300 + url https://server2.local.com ! vrf yellow interval 5 diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/host1/monitor-connectivity.yml b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/host1/monitor-connectivity.yml index eb067e1844e..0381352c604 100644 --- a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/host1/monitor-connectivity.yml +++ b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/inventory/host_vars/host1/monitor-connectivity.yml @@ -25,9 +25,9 @@ monitor_connectivity: - name: server3 description: server3_connectivity_monitor ip: 10.10.10.3 + icmp_echo_size: 1200 local_interfaces: HOST_SET address_only: false - icmp_echo_size: 1200 - name: server4 vrfs: - name: red @@ -42,9 +42,9 @@ monitor_connectivity: - name: server2 description: server2_connectivity_monitor ip: 10.10.20.1 + icmp_echo_size: 1300 local_interfaces: VRF_HOST_SET url: https://server2.local.com - icmp_echo_size: 1300 - name: blue local_interfaces: VRF_GLOBAL_SET address_only: false diff --git a/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/monitor-connectivity.md b/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/monitor-connectivity.md index 5fb4aa7f4ca..83ca33f58df 100644 --- a/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/monitor-connectivity.md +++ b/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/monitor-connectivity.md @@ -19,10 +19,10 @@ | [    - name](## "monitor_connectivity.hosts.[].name") | String | Required, Unique | | | Host Name. | | [      description](## "monitor_connectivity.hosts.[].description") | String | | | | | | [      ip](## "monitor_connectivity.hosts.[].ip") | String | | | | | + | [      icmp_echo_size](## "monitor_connectivity.hosts.[].icmp_echo_size") | Integer | | | Min: 36
Max: 18024 | Size of ICMP probe in bytes. | | [      local_interfaces](## "monitor_connectivity.hosts.[].local_interfaces") | String | | | | | | [      address_only](## "monitor_connectivity.hosts.[].address_only") | Boolean | | `True` | | When address-only is configured, the source IP of the packet is set to the interface
IP but the packet may exit the device via a different interface.
When set to `false`, the probe uses the interface to exit the device. | | [      url](## "monitor_connectivity.hosts.[].url") | String | | | | | - | [      icmp_echo_size](## "monitor_connectivity.hosts.[].icmp_echo_size") | Integer | | | Min: 36
Max: 18024 | Size of ICMP probe in bytes. | | [  vrfs](## "monitor_connectivity.vrfs") | List, items: Dictionary | | | | | | [    - name](## "monitor_connectivity.vrfs.[].name") | String | Required, Unique | | | VRF Name. | | [      description](## "monitor_connectivity.vrfs.[].description") | String | | | | | @@ -35,10 +35,10 @@ | [        - name](## "monitor_connectivity.vrfs.[].hosts.[].name") | String | Required, Unique | | | Host name. | | [          description](## "monitor_connectivity.vrfs.[].hosts.[].description") | String | | | | | | [          ip](## "monitor_connectivity.vrfs.[].hosts.[].ip") | String | | | | | + | [          icmp_echo_size](## "monitor_connectivity.vrfs.[].hosts.[].icmp_echo_size") | Integer | | | Min: 36
Max: 18024 | Size of ICMP probe in bytes. | | [          local_interfaces](## "monitor_connectivity.vrfs.[].hosts.[].local_interfaces") | String | | | | | | [          address_only](## "monitor_connectivity.vrfs.[].hosts.[].address_only") | Boolean | | `True` | | When address-only is configured, the source IP of the packet is set to the interface
IP but the packet may exit the device via a different interface.
When set to `false`, the probe uses the interface to exit the device. | | [          url](## "monitor_connectivity.vrfs.[].hosts.[].url") | String | | | | | - | [          icmp_echo_size](## "monitor_connectivity.vrfs.[].hosts.[].icmp_echo_size") | Integer | | | Min: 36
Max: 18024 | Size of ICMP probe in bytes. | === "YAML" @@ -64,6 +64,9 @@ - name: description: ip: + + # Size of ICMP probe in bytes. + icmp_echo_size: local_interfaces: # When address-only is configured, the source IP of the packet is set to the interface @@ -71,9 +74,6 @@ # When set to `false`, the probe uses the interface to exit the device. address_only: url: - - # Size of ICMP probe in bytes. - icmp_echo_size: vrfs: # VRF Name. @@ -94,6 +94,9 @@ - name: description: ip: + + # Size of ICMP probe in bytes. + icmp_echo_size: local_interfaces: # When address-only is configured, the source IP of the packet is set to the interface @@ -101,7 +104,4 @@ # When set to `false`, the probe uses the interface to exit the device. address_only: url: - - # Size of ICMP probe in bytes. - icmp_echo_size: ``` diff --git a/python-avd/pyavd/_eos_cli_config_gen/j2templates/eos/monitor-connectivity.j2 b/python-avd/pyavd/_eos_cli_config_gen/j2templates/eos/monitor-connectivity.j2 index d317426673c..049f1a2655a 100644 --- a/python-avd/pyavd/_eos_cli_config_gen/j2templates/eos/monitor-connectivity.j2 +++ b/python-avd/pyavd/_eos_cli_config_gen/j2templates/eos/monitor-connectivity.j2 @@ -47,12 +47,12 @@ monitor connectivity {% if host.ip is arista.avd.defined %} ip {{ host.ip }} {% endif %} -{% if host.url is arista.avd.defined %} - url {{ host.url }} -{% endif %} {% if host.icmp_echo_size is arista.avd.defined %} icmp echo size {{ host.icmp_echo_size }} {% endif %} +{% if host.url is arista.avd.defined %} + url {{ host.url }} +{% endif %} {% endif %} {% endfor %} {% endif %} @@ -95,12 +95,12 @@ monitor connectivity {% if host.ip is arista.avd.defined %} ip {{ host.ip }} {% endif %} -{% if host.url is arista.avd.defined %} - url {{ host.url }} -{% endif %} {% if host.icmp_echo_size is arista.avd.defined %} icmp echo size {{ host.icmp_echo_size }} {% endif %} +{% if host.url is arista.avd.defined %} + url {{ host.url }} +{% endif %} {% endif %} {% endfor %} {% endif %} diff --git a/python-avd/pyavd/_eos_cli_config_gen/schema/__init__.py b/python-avd/pyavd/_eos_cli_config_gen/schema/__init__.py index 239d95c44f3..b54cc106f17 100644 --- a/python-avd/pyavd/_eos_cli_config_gen/schema/__init__.py +++ b/python-avd/pyavd/_eos_cli_config_gen/schema/__init__.py @@ -24308,16 +24308,18 @@ class HostsItem(AvdModel): "name": {"type": str}, "description": {"type": str}, "ip": {"type": str}, + "icmp_echo_size": {"type": int}, "local_interfaces": {"type": str}, "address_only": {"type": bool, "default": True}, "url": {"type": str}, - "icmp_echo_size": {"type": int}, "_custom_data": {"type": dict}, } name: str """Host Name.""" description: str | None ip: str | None + icmp_echo_size: int | None + """Size of ICMP probe in bytes.""" local_interfaces: str | None address_only: bool """ @@ -24330,8 +24332,6 @@ class HostsItem(AvdModel): Default value: `True` """ url: str | None - icmp_echo_size: int | None - """Size of ICMP probe in bytes.""" _custom_data: dict[str, Any] if TYPE_CHECKING: @@ -24342,10 +24342,10 @@ def __init__( name: str | UndefinedType = Undefined, description: str | None | UndefinedType = Undefined, ip: str | None | UndefinedType = Undefined, + icmp_echo_size: int | None | UndefinedType = Undefined, local_interfaces: str | None | UndefinedType = Undefined, address_only: bool | UndefinedType = Undefined, url: str | None | UndefinedType = Undefined, - icmp_echo_size: int | None | UndefinedType = Undefined, _custom_data: dict[str, Any] | UndefinedType = Undefined, ) -> None: """ @@ -24358,6 +24358,7 @@ def __init__( name: Host Name. description: description ip: ip + icmp_echo_size: Size of ICMP probe in bytes. local_interfaces: local_interfaces address_only: When address-only is configured, the source IP of the packet is set to the interface @@ -24366,7 +24367,6 @@ def __init__( When set to `false`, the probe uses the interface to exit the device. url: url - icmp_echo_size: Size of ICMP probe in bytes. _custom_data: _custom_data """ @@ -24423,16 +24423,18 @@ class HostsItem(AvdModel): "name": {"type": str}, "description": {"type": str}, "ip": {"type": str}, + "icmp_echo_size": {"type": int}, "local_interfaces": {"type": str}, "address_only": {"type": bool, "default": True}, "url": {"type": str}, - "icmp_echo_size": {"type": int}, "_custom_data": {"type": dict}, } name: str """Host name.""" description: str | None ip: str | None + icmp_echo_size: int | None + """Size of ICMP probe in bytes.""" local_interfaces: str | None address_only: bool """ @@ -24445,8 +24447,6 @@ class HostsItem(AvdModel): Default value: `True` """ url: str | None - icmp_echo_size: int | None - """Size of ICMP probe in bytes.""" _custom_data: dict[str, Any] if TYPE_CHECKING: @@ -24457,10 +24457,10 @@ def __init__( name: str | UndefinedType = Undefined, description: str | None | UndefinedType = Undefined, ip: str | None | UndefinedType = Undefined, + icmp_echo_size: int | None | UndefinedType = Undefined, local_interfaces: str | None | UndefinedType = Undefined, address_only: bool | UndefinedType = Undefined, url: str | None | UndefinedType = Undefined, - icmp_echo_size: int | None | UndefinedType = Undefined, _custom_data: dict[str, Any] | UndefinedType = Undefined, ) -> None: """ @@ -24473,6 +24473,7 @@ def __init__( name: Host name. description: description ip: ip + icmp_echo_size: Size of ICMP probe in bytes. local_interfaces: local_interfaces address_only: When address-only is configured, the source IP of the packet is set to the interface @@ -24481,7 +24482,6 @@ def __init__( When set to `false`, the probe uses the interface to exit the device. url: url - icmp_echo_size: Size of ICMP probe in bytes. _custom_data: _custom_data """ diff --git a/python-avd/pyavd/_eos_cli_config_gen/schema/eos_cli_config_gen.schema.yml b/python-avd/pyavd/_eos_cli_config_gen/schema/eos_cli_config_gen.schema.yml index 4e0434c6b9d..2d787a5c887 100644 --- a/python-avd/pyavd/_eos_cli_config_gen/schema/eos_cli_config_gen.schema.yml +++ b/python-avd/pyavd/_eos_cli_config_gen/schema/eos_cli_config_gen.schema.yml @@ -8416,6 +8416,13 @@ keys: type: str ip: type: str + icmp_echo_size: + type: int + description: Size of ICMP probe in bytes. + convert_types: + - str + min: 36 + max: 18024 local_interfaces: type: str address_only: @@ -8429,13 +8436,6 @@ keys: default: true url: type: str - icmp_echo_size: - type: int - description: Size of ICMP probe in bytes. - convert_types: - - str - min: 36 - max: 18024 vrfs: type: list primary_key: name @@ -8482,6 +8482,13 @@ keys: type: str ip: type: str + icmp_echo_size: + type: int + description: Size of ICMP probe in bytes. + convert_types: + - str + min: 36 + max: 18024 local_interfaces: type: str address_only: @@ -8496,13 +8503,6 @@ keys: default: true url: type: str - icmp_echo_size: - type: int - description: Size of ICMP probe in bytes. - convert_types: - - str - min: 36 - max: 18024 monitor_layer1: type: dict description: Enable SYSLOG messages on transceiver SMBus communication failures. diff --git a/python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/monitor_connectivity.schema.yml b/python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/monitor_connectivity.schema.yml index f632684ac39..c669759cfbe 100644 --- a/python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/monitor_connectivity.schema.yml +++ b/python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/monitor_connectivity.schema.yml @@ -49,6 +49,13 @@ keys: type: str ip: type: str + icmp_echo_size: + type: int + description: Size of ICMP probe in bytes. + convert_types: + - str + min: 36 + max: 18024 local_interfaces: type: str address_only: @@ -60,13 +67,6 @@ keys: default: true url: type: str - icmp_echo_size: - type: int - description: Size of ICMP probe in bytes. - convert_types: - - str - min: 36 - max: 18024 vrfs: type: list primary_key: name @@ -111,6 +111,13 @@ keys: type: str ip: type: str + icmp_echo_size: + type: int + description: Size of ICMP probe in bytes. + convert_types: + - str + min: 36 + max: 18024 local_interfaces: type: str address_only: @@ -122,10 +129,3 @@ keys: default: true url: type: str - icmp_echo_size: - type: int - description: Size of ICMP probe in bytes. - convert_types: - - str - min: 36 - max: 18024 From 7445190a173bf46bc3eaaac2f104c505d97c5928 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 7 Jan 2025 17:02:02 +0000 Subject: [PATCH 4/5] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .../schema/schema_fragments/monitor_connectivity.schema.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/monitor_connectivity.schema.yml b/python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/monitor_connectivity.schema.yml index c669759cfbe..a796d50ffed 100644 --- a/python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/monitor_connectivity.schema.yml +++ b/python-avd/pyavd/_eos_cli_config_gen/schema/schema_fragments/monitor_connectivity.schema.yml @@ -117,7 +117,7 @@ keys: convert_types: - str min: 36 - max: 18024 + max: 18024 local_interfaces: type: str address_only: From 8c8fd5b192b759122796a95b041f33fb773fc842 Mon Sep 17 00:00:00 2001 From: Alex Kudlov Date: Fri, 10 Jan 2025 17:00:13 +0000 Subject: [PATCH 5/5] update documentation for Hosts --- .../documentation/devices/host1.md | 28 +++++++++---------- .../documentation/monitor-connectivity.j2 | 12 ++++---- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/host1.md b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/host1.md index 1a1c44e8a30..7a669e6b43e 100644 --- a/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/host1.md +++ b/ansible_collections/arista/avd/molecule/eos_cli_config_gen/documentation/devices/host1.md @@ -2753,12 +2753,12 @@ monitor server radius #### Host Parameters -| Host Name | Description | IPv4 Address | Probing Interface Set | Address Only | URL | -| --------- | ----------- | ------------ | --------------------- | ------------ | --- | -| server1 | server1_connectivity_monitor | 10.10.10.1 | HOST_SET | True | https://server1.local.com | -| server2 | server2_connectivity_monitor | 10.10.10.2 | HOST_SET | True | https://server2.local.com | -| server3 | server3_connectivity_monitor | 10.10.10.3 | HOST_SET | False | - | -| server4 | - | - | - | True | - | +| Host Name | Description | IPv4 Address | ICMP Echo Size | Probing Interface Set | Address Only | URL | +| --------- | ----------- | ------------ | -------------- | --------------------- | ------------ | --- | +| server1 | server1_connectivity_monitor | 10.10.10.1 | - | HOST_SET | True | https://server1.local.com | +| server2 | server2_connectivity_monitor | 10.10.10.2 | - | HOST_SET | True | https://server2.local.com | +| server3 | server3_connectivity_monitor | 10.10.10.3 | 1200 | HOST_SET | False | - | +| server4 | - | - | - | - | True | - | ### VRF Configuration @@ -2778,11 +2778,11 @@ monitor server radius ##### Host Parameters -| Host Name | Description | IPv4 Address | Probing Interface Set | Address Only | URL | -| --------- | ----------- | ------------ | --------------------- | ------------ | --- | -| server4 | server4_connectivity_monitor | 10.10.20.1 | VRF_GLOBAL_SET | False | https://server2.local.com | -| server5 | server5_connectivity_monitor | 10.10.20.11 | VRF_GLOBAL_SET | True | https://server5.local.com | -| server6 | - | - | - | True | - | +| Host Name | Description | IPv4 Address | ICMP Echo Size | Probing Interface Set | Address Only | URL | +| --------- | ----------- | ------------ | -------------- | --------------------- | ------------ | --- | +| server4 | server4_connectivity_monitor | 10.10.20.1 | - | VRF_GLOBAL_SET | False | https://server2.local.com | +| server5 | server5_connectivity_monitor | 10.10.20.11 | - | VRF_GLOBAL_SET | True | https://server5.local.com | +| server6 | - | - | - | - | True | - | #### Vrf red Configuration @@ -2795,9 +2795,9 @@ monitor server radius ##### Host Parameters -| Host Name | Description | IPv4 Address | Probing Interface Set | Address Only | URL | -| --------- | ----------- | ------------ | --------------------- | ------------ | --- | -| server2 | server2_connectivity_monitor | 10.10.20.1 | VRF_HOST_SET | True | https://server2.local.com | +| Host Name | Description | IPv4 Address | ICMP Echo Size | Probing Interface Set | Address Only | URL | +| --------- | ----------- | ------------ | -------------- | --------------------- | ------------ | --- | +| server2 | server2_connectivity_monitor | 10.10.20.1 | 1300 | VRF_HOST_SET | True | https://server2.local.com | #### Vrf yellow Configuration diff --git a/python-avd/pyavd/_eos_cli_config_gen/j2templates/documentation/monitor-connectivity.j2 b/python-avd/pyavd/_eos_cli_config_gen/j2templates/documentation/monitor-connectivity.j2 index a6d489ff4ac..ce739aa3fab 100644 --- a/python-avd/pyavd/_eos_cli_config_gen/j2templates/documentation/monitor-connectivity.j2 +++ b/python-avd/pyavd/_eos_cli_config_gen/j2templates/documentation/monitor-connectivity.j2 @@ -31,11 +31,11 @@ #### Host Parameters -| Host Name | Description | IPv4 Address | Probing Interface Set | Address Only | URL | -| --------- | ----------- | ------------ | --------------------- | ------------ | --- | +| Host Name | Description | IPv4 Address | ICMP Echo Size | Probing Interface Set | Address Only | URL | +| --------- | ----------- | ------------ | -------------- | --------------------- | ------------ | --- | {% for host in monitor_connectivity.hosts | arista.avd.natural_sort('name') %} {% if host.name is arista.avd.defined %} -| {{ host.name }} | {{ host.description | arista.avd.default('-') }} | {{ host.ip | arista.avd.default('-') }} | {{ host.local_interfaces | arista.avd.default('-') }} | {{ host.address_only | arista.avd.default(true) }} | {{ host.url | arista.avd.default('-') }} | +| {{ host.name }} | {{ host.description | arista.avd.default('-') }} | {{ host.ip | arista.avd.default('-') }} | {{ host.icmp_echo_size | arista.avd.default('-') }} | {{ host.local_interfaces | arista.avd.default('-') }} | {{ host.address_only | arista.avd.default(true) }} | {{ host.url | arista.avd.default('-') }} | {% endif %} {% endfor %} {% endif %} @@ -70,11 +70,11 @@ ##### Host Parameters -| Host Name | Description | IPv4 Address | Probing Interface Set | Address Only | URL | -| --------- | ----------- | ------------ | --------------------- | ------------ | --- | +| Host Name | Description | IPv4 Address | ICMP Echo Size | Probing Interface Set | Address Only | URL | +| --------- | ----------- | ------------ | -------------- | --------------------- | ------------ | --- | {% for host in vrf.hosts | arista.avd.natural_sort('name') %} {% if host.name is arista.avd.defined %} -| {{ host.name }} | {{ host.description | arista.avd.default('-') }} | {{ host.ip | arista.avd.default('-') }} | {{ host.local_interfaces | arista.avd.default('-') }} | {{ host.address_only | arista.avd.default(true) }} | {{ host.url | arista.avd.default('-') }} | +| {{ host.name }} | {{ host.description | arista.avd.default('-') }} | {{ host.ip | arista.avd.default('-') }} | {{ host.icmp_echo_size | arista.avd.default('-') }} | {{ host.local_interfaces | arista.avd.default('-') }} | {{ host.address_only | arista.avd.default(true) }} | {{ host.url | arista.avd.default('-') }} | {% endif %} {% endfor %} {% endif %}