Skip to content

Commit

Permalink
Feat(eos_cli_config_gen): Add capability to disable address-only for …
Browse files Browse the repository at this point in the history
…connectivity monitors (#3867)

Co-authored-by: Claus Holbech <[email protected]>
  • Loading branch information
gmuloc and ClausHolbechArista authored Apr 16, 2024
1 parent 579e18c commit 668700a
Show file tree
Hide file tree
Showing 10 changed files with 306 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,21 +50,38 @@ interface Management1

#### Probing Configuration

| Enabled | Interval | Default Interface Set |
| ------- | -------- | --------------------- |
| True | 5 | GLOBAL_SET |
| Enabled | Interval | Default Interface Set | Address Only |
| ------- | -------- | --------------------- | ------------ |
| True | 5 | GLOBAL_SET | True |

#### Host Parameters

| Host Name | Description | IPv4 Address | Probing Interface Set | URL |
| --------- | ----------- | ------------ | --------------------- | --- |
| server1 | server1_connectivity_monitor | 10.10.10.1 | HOST_SET | https://server1.local.com |
| 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 | - |

### VRF Configuration

| Name | Description | Default Interface Set |
| ---- | ----------- | --------------------- |
| red | vrf_connectivity_monitor | VRF_GLOBAL_SET |
| Name | Description | Default Interface Set | Address Only |
| ---- | ----------- | --------------------- | ------------ |
| blue | - | VRF_GLOBAL_SET | False |
| red | vrf_connectivity_monitor | VRF_GLOBAL_SET | True |

#### Vrf blue Configuration

##### Interface Sets

| Name | Interfaces |
| ---- | ---------- |
| VRF_GLOBAL_SET | Vlan21-24, Vlan29-32 |

##### Host Parameters

| Host Name | Description | IPv4 Address | Probing Interface Set | Address Only | URL |
| --------- | ----------- | ------------ | --------------------- | ------------ | --- |
| server4 | server4_connectivity_monitor | 10.10.20.1 | VRF_HOST_SET | False | https://server2.local.com |

#### Vrf red Configuration

Expand All @@ -77,9 +94,9 @@ interface Management1

##### Host Parameters

| Host Name | Description | IPv4 Address | Probing Interface Set | URL |
| --------- | ----------- | ------------ | --------------------- | --- |
| server2 | server2_connectivity_monitor | 10.10.20.1 | VRF_HOST_SET | https://server2.local.com |
| 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 |

### Monitor Connectivity Device Configuration

Expand All @@ -98,6 +115,29 @@ monitor connectivity
local-interfaces HOST_SET address-only
ip 10.10.10.1
url https://server1.local.com
!
host server2
description
server2_connectivity_monitor
local-interfaces HOST_SET address-only
ip 10.10.10.2
url https://server2.local.com
!
host server3
description
server3_connectivity_monitor
local-interfaces HOST_SET
ip 10.10.10.3
vrf blue
interface set VRF_GLOBAL_SET Vlan21-24, Vlan29-32
local-interfaces VRF_GLOBAL_SET default
!
host server4
description
server4_connectivity_monitor
local-interfaces VRF_HOST_SET
ip 10.10.20.1
url https://server2.local.com
vrf red
interface set VRF_GLOBAL_SET Vlan21-24, Vlan29-32
interface set VRF_HOST_SET Loopback12-14, 19-23
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,29 @@ monitor connectivity
local-interfaces HOST_SET address-only
ip 10.10.10.1
url https://server1.local.com
!
host server2
description
server2_connectivity_monitor
local-interfaces HOST_SET address-only
ip 10.10.10.2
url https://server2.local.com
!
host server3
description
server3_connectivity_monitor
local-interfaces HOST_SET
ip 10.10.10.3
vrf blue
interface set VRF_GLOBAL_SET Vlan21-24, Vlan29-32
local-interfaces VRF_GLOBAL_SET default
!
host server4
description
server4_connectivity_monitor
local-interfaces VRF_HOST_SET
ip 10.10.20.1
url https://server2.local.com
vrf red
interface set VRF_GLOBAL_SET Vlan21-24, Vlan29-32
interface set VRF_HOST_SET Loopback12-14, 19-23
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,20 @@ monitor_connectivity:
description: server1_connectivity_monitor
ip: 10.10.10.1
local_interfaces: HOST_SET
address_only: true
url: https://server1.local.com
- name: server2
description: server2_connectivity_monitor
ip: 10.10.10.2
local_interfaces: HOST_SET
# This is default in AVD 4.x
# address_only: true
url: https://server2.local.com
- name: server3
description: server3_connectivity_monitor
ip: 10.10.10.3
local_interfaces: HOST_SET
address_only: false
vrfs:
- name: red
description: vrf_connectivity_monitor
Expand All @@ -29,3 +42,16 @@ monitor_connectivity:
ip: 10.10.20.1
local_interfaces: VRF_HOST_SET
url: https://server2.local.com
- name: blue
local_interfaces: VRF_GLOBAL_SET
address_only: false
interface_sets:
- name: VRF_GLOBAL_SET
interfaces: Vlan21-24, Vlan29-32
hosts:
- name: server4
description: server4_connectivity_monitor
ip: 10.10.20.1
address_only: false
local_interfaces: VRF_HOST_SET
url: https://server2.local.com
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;name</samp>](## "monitor_connectivity.interface_sets.[].name") | String | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;interfaces</samp>](## "monitor_connectivity.interface_sets.[].interfaces") | String | | | | Interface range(s) should be of same type, Ethernet, Loopback, Management etc.<br>Multiple interface ranges can be specified separated by ","<br> |
| [<samp>&nbsp;&nbsp;local_interfaces</samp>](## "monitor_connectivity.local_interfaces") | String | | | | |
| [<samp>&nbsp;&nbsp;address_only</samp>](## "monitor_connectivity.address_only") | Boolean | | `True` | | PREVIEW: This key is in preview.<br>When address-only is configured, the source IP of the packet is set to the interface<br>IP but the packet may exit the device via a different interface.<br>When set to `false`, the probe uses the interface to exit the device.<br>Not supported yet in EOS. |
| [<samp>&nbsp;&nbsp;hosts</samp>](## "monitor_connectivity.hosts") | List, items: Dictionary | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;name</samp>](## "monitor_connectivity.hosts.[].name") | String | | | | Host Name |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;description</samp>](## "monitor_connectivity.hosts.[].description") | String | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ip</samp>](## "monitor_connectivity.hosts.[].ip") | String | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local_interfaces</samp>](## "monitor_connectivity.hosts.[].local_interfaces") | String | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;address_only</samp>](## "monitor_connectivity.hosts.[].address_only") | Boolean | | `True` | | PREVIEW: This key is in preview.<br>When address-only is configured, the source IP of the packet is set to the interface<br>IP but the packet may exit the device via a different interface.<br>When set to `false`, the probe uses the interface to exit the device.<br>Not supported yet in EOS. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;url</samp>](## "monitor_connectivity.hosts.[].url") | String | | | | |
| [<samp>&nbsp;&nbsp;vrfs</samp>](## "monitor_connectivity.vrfs") | List, items: Dictionary | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;name</samp>](## "monitor_connectivity.vrfs.[].name") | String | Required, Unique | | | VRF Name |
Expand All @@ -27,11 +29,13 @@
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;name</samp>](## "monitor_connectivity.vrfs.[].interface_sets.[].name") | String | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;interfaces</samp>](## "monitor_connectivity.vrfs.[].interface_sets.[].interfaces") | String | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local_interfaces</samp>](## "monitor_connectivity.vrfs.[].local_interfaces") | String | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;address_only</samp>](## "monitor_connectivity.vrfs.[].address_only") | Boolean | | `True` | | PREVIEW: This key is in preview.<br>When address-only is configured, the source IP of the packet is set to the interface<br>IP but the packet may exit the device via a different interface.<br>When set to `false`, the probe uses the interface to exit the device.<br>Not supported yet in EOS. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;hosts</samp>](## "monitor_connectivity.vrfs.[].hosts") | List, items: Dictionary | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;name</samp>](## "monitor_connectivity.vrfs.[].hosts.[].name") | String | | | | Host name |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;description</samp>](## "monitor_connectivity.vrfs.[].hosts.[].description") | String | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ip</samp>](## "monitor_connectivity.vrfs.[].hosts.[].ip") | String | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;local_interfaces</samp>](## "monitor_connectivity.vrfs.[].hosts.[].local_interfaces") | String | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;address_only</samp>](## "monitor_connectivity.vrfs.[].hosts.[].address_only") | Boolean | | `True` | | PREVIEW: This key is in preview.<br>When address-only is configured, the source IP of the packet is set to the interface<br>IP but the packet may exit the device via a different interface.<br>When set to `false`, the probe uses the interface to exit the device.<br>Not supported yet in EOS. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;url</samp>](## "monitor_connectivity.vrfs.[].hosts.[].url") | String | | | | |

=== "YAML"
Expand All @@ -47,13 +51,27 @@
# Multiple interface ranges can be specified separated by ","
interfaces: <str>
local_interfaces: <str>

# PREVIEW: This key is in preview.
# 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.
# Not supported yet in EOS.
address_only: <bool; default=True>
hosts:

# Host Name
- name: <str>
description: <str>
ip: <str>
local_interfaces: <str>

# PREVIEW: This key is in preview.
# 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.
# Not supported yet in EOS.
address_only: <bool; default=True>
url: <str>
vrfs:

Expand All @@ -64,12 +82,26 @@
- name: <str>
interfaces: <str>
local_interfaces: <str>

# PREVIEW: This key is in preview.
# 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.
# Not supported yet in EOS.
address_only: <bool; default=True>
hosts:

# Host name
- name: <str>
description: <str>
ip: <str>
local_interfaces: <str>

# PREVIEW: This key is in preview.
# 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.
# Not supported yet in EOS.
address_only: <bool; default=True>
url: <str>
```

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 668700a

Please sign in to comment.