2025-03-17 07:33:51 +01:00
|
|
|
# Copyright (c) 2023-2025 Arista Networks, Inc.
|
2025-02-05 11:32:35 +01:00
|
|
|
# Use of this source code is governed by the Apache License 2.0
|
|
|
|
# that can be found in the LICENSE file.
|
2025-02-05 11:39:09 +01:00
|
|
|
"""Tests for anta.tests.vxlan.py."""
|
|
|
|
|
2025-02-05 11:32:35 +01:00
|
|
|
from __future__ import annotations
|
|
|
|
|
2025-05-15 09:34:30 +02:00
|
|
|
import sys
|
|
|
|
from typing import TYPE_CHECKING, Any
|
2025-02-05 11:32:35 +01:00
|
|
|
|
2025-05-15 09:34:30 +02:00
|
|
|
from anta.models import AntaTest
|
|
|
|
from anta.result_manager.models import AntaTestStatus
|
2025-02-05 11:32:35 +01:00
|
|
|
from anta.tests.vxlan import VerifyVxlan1ConnSettings, VerifyVxlan1Interface, VerifyVxlanConfigSanity, VerifyVxlanVniBinding, VerifyVxlanVtep
|
2025-05-15 09:34:30 +02:00
|
|
|
from tests.units.anta_tests import AntaUnitTest, test
|
2025-02-05 11:32:35 +01:00
|
|
|
|
2025-05-15 09:34:30 +02:00
|
|
|
if sys.version_info >= (3, 10):
|
|
|
|
from typing import TypeAlias
|
|
|
|
else:
|
|
|
|
TypeAlias = type
|
|
|
|
|
|
|
|
|
|
|
|
AntaUnitTestDataDict: TypeAlias = dict[tuple[type[AntaTest], str], AntaUnitTest]
|
|
|
|
|
|
|
|
DATA: AntaUnitTestDataDict = {
|
|
|
|
(VerifyVxlan1Interface, "success"): {
|
2025-02-05 11:32:35 +01:00
|
|
|
"eos_data": [{"interfaceDescriptions": {"Vxlan1": {"lineProtocolStatus": "up", "interfaceStatus": "up"}}}],
|
2025-05-15 09:34:30 +02:00
|
|
|
"expected": {"result": AntaTestStatus.SUCCESS},
|
2025-02-05 11:32:35 +01:00
|
|
|
},
|
2025-05-15 09:34:30 +02:00
|
|
|
(VerifyVxlan1Interface, "skipped"): {
|
2025-02-05 11:32:35 +01:00
|
|
|
"eos_data": [{"interfaceDescriptions": {"Loopback0": {"lineProtocolStatus": "up", "interfaceStatus": "up"}}}],
|
2025-05-15 09:34:30 +02:00
|
|
|
"expected": {"result": AntaTestStatus.SKIPPED, "messages": ["Interface: Vxlan1 - Not configured"]},
|
2025-02-05 11:32:35 +01:00
|
|
|
},
|
2025-05-15 09:34:30 +02:00
|
|
|
(VerifyVxlan1Interface, "failure-down-up"): {
|
2025-02-05 11:32:35 +01:00
|
|
|
"eos_data": [{"interfaceDescriptions": {"Vxlan1": {"lineProtocolStatus": "down", "interfaceStatus": "up"}}}],
|
2025-05-15 09:34:30 +02:00
|
|
|
"expected": {"result": AntaTestStatus.FAILURE, "messages": ["Interface: Vxlan1 - Incorrect Line protocol status/Status - Expected: up/up Actual: down/up"]},
|
2025-02-05 11:32:35 +01:00
|
|
|
},
|
2025-05-15 09:34:30 +02:00
|
|
|
(VerifyVxlan1Interface, "failure-up-down"): {
|
2025-02-05 11:32:35 +01:00
|
|
|
"eos_data": [{"interfaceDescriptions": {"Vxlan1": {"lineProtocolStatus": "up", "interfaceStatus": "down"}}}],
|
2025-05-15 09:34:30 +02:00
|
|
|
"expected": {"result": AntaTestStatus.FAILURE, "messages": ["Interface: Vxlan1 - Incorrect Line protocol status/Status - Expected: up/up Actual: up/down"]},
|
2025-02-05 11:32:35 +01:00
|
|
|
},
|
2025-05-15 09:34:30 +02:00
|
|
|
(VerifyVxlan1Interface, "failure-down-down"): {
|
2025-02-05 11:32:35 +01:00
|
|
|
"eos_data": [{"interfaceDescriptions": {"Vxlan1": {"lineProtocolStatus": "down", "interfaceStatus": "down"}}}],
|
2025-05-15 09:34:30 +02:00
|
|
|
"expected": {
|
|
|
|
"result": AntaTestStatus.FAILURE,
|
|
|
|
"messages": ["Interface: Vxlan1 - Incorrect Line protocol status/Status - Expected: up/up Actual: down/down"],
|
|
|
|
},
|
2025-02-05 11:32:35 +01:00
|
|
|
},
|
2025-05-15 09:34:30 +02:00
|
|
|
(VerifyVxlanConfigSanity, "success"): {
|
2025-02-05 11:32:35 +01:00
|
|
|
"eos_data": [
|
|
|
|
{
|
|
|
|
"categories": {
|
|
|
|
"localVtep": {
|
|
|
|
"description": "Local VTEP Configuration Check",
|
|
|
|
"allCheckPass": True,
|
|
|
|
"detail": "",
|
|
|
|
"hasWarning": False,
|
|
|
|
"items": [
|
|
|
|
{"name": "Loopback IP Address", "checkPass": True, "hasWarning": False, "detail": ""},
|
|
|
|
{"name": "VLAN-VNI Map", "checkPass": True, "hasWarning": False, "detail": ""},
|
|
|
|
{"name": "Flood List", "checkPass": True, "hasWarning": False, "detail": ""},
|
|
|
|
{"name": "Routing", "checkPass": True, "hasWarning": False, "detail": ""},
|
|
|
|
{"name": "VNI VRF ACL", "checkPass": True, "hasWarning": False, "detail": ""},
|
|
|
|
{"name": "VRF-VNI Dynamic VLAN", "checkPass": True, "hasWarning": False, "detail": ""},
|
|
|
|
{"name": "Decap VRF-VNI Map", "checkPass": True, "hasWarning": False, "detail": ""},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
"remoteVtep": {
|
|
|
|
"description": "Remote VTEP Configuration Check",
|
|
|
|
"allCheckPass": True,
|
|
|
|
"detail": "",
|
|
|
|
"hasWarning": False,
|
|
|
|
"items": [{"name": "Remote VTEP", "checkPass": True, "hasWarning": False, "detail": ""}],
|
|
|
|
},
|
|
|
|
"pd": {
|
|
|
|
"description": "Platform Dependent Check",
|
|
|
|
"allCheckPass": True,
|
|
|
|
"detail": "",
|
|
|
|
"hasWarning": False,
|
|
|
|
"items": [
|
|
|
|
{"name": "VXLAN Bridging", "checkPass": True, "hasWarning": False, "detail": ""},
|
|
|
|
{"name": "VXLAN Routing", "checkPass": True, "hasWarning": False, "detail": "VXLAN Routing not enabled"},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
"cvx": {
|
|
|
|
"description": "CVX Configuration Check",
|
|
|
|
"allCheckPass": True,
|
|
|
|
"detail": "",
|
|
|
|
"hasWarning": False,
|
|
|
|
"items": [{"name": "CVX Server", "checkPass": True, "hasWarning": False, "detail": "Not in controller client mode"}],
|
|
|
|
},
|
|
|
|
"mlag": {
|
|
|
|
"description": "MLAG Configuration Check",
|
|
|
|
"allCheckPass": True,
|
|
|
|
"detail": "Run 'show mlag config-sanity' to verify MLAG config",
|
|
|
|
"hasWarning": False,
|
|
|
|
"items": [
|
|
|
|
{"name": "Peer VTEP IP", "checkPass": True, "hasWarning": False, "detail": ""},
|
|
|
|
{"name": "MLAG VTEP IP", "checkPass": True, "hasWarning": False, "detail": ""},
|
|
|
|
{"name": "Virtual VTEP IP", "checkPass": True, "hasWarning": False, "detail": ""},
|
|
|
|
{"name": "Peer VLAN-VNI", "checkPass": True, "hasWarning": False, "detail": ""},
|
|
|
|
{"name": "MLAG Inactive State", "checkPass": True, "hasWarning": False, "detail": ""},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
"warnings": [],
|
2025-05-15 09:34:30 +02:00
|
|
|
}
|
2025-02-05 11:32:35 +01:00
|
|
|
],
|
2025-05-15 09:34:30 +02:00
|
|
|
"expected": {"result": AntaTestStatus.SUCCESS},
|
2025-02-05 11:32:35 +01:00
|
|
|
},
|
2025-05-15 09:34:30 +02:00
|
|
|
(VerifyVxlanConfigSanity, "failure"): {
|
2025-02-05 11:32:35 +01:00
|
|
|
"eos_data": [
|
|
|
|
{
|
|
|
|
"categories": {
|
|
|
|
"localVtep": {
|
|
|
|
"description": "Local VTEP Configuration Check",
|
|
|
|
"allCheckPass": False,
|
|
|
|
"detail": "",
|
|
|
|
"hasWarning": True,
|
|
|
|
"items": [
|
|
|
|
{"name": "Loopback IP Address", "checkPass": True, "hasWarning": False, "detail": ""},
|
|
|
|
{"name": "VLAN-VNI Map", "checkPass": False, "hasWarning": False, "detail": "No VLAN-VNI mapping in Vxlan1"},
|
|
|
|
{"name": "Flood List", "checkPass": False, "hasWarning": True, "detail": "No VXLAN VLANs in Vxlan1"},
|
|
|
|
{"name": "Routing", "checkPass": True, "hasWarning": False, "detail": ""},
|
|
|
|
{"name": "VNI VRF ACL", "checkPass": True, "hasWarning": False, "detail": ""},
|
|
|
|
{"name": "VRF-VNI Dynamic VLAN", "checkPass": True, "hasWarning": False, "detail": ""},
|
|
|
|
{"name": "Decap VRF-VNI Map", "checkPass": True, "hasWarning": False, "detail": ""},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
"remoteVtep": {
|
|
|
|
"description": "Remote VTEP Configuration Check",
|
|
|
|
"allCheckPass": True,
|
|
|
|
"detail": "",
|
|
|
|
"hasWarning": False,
|
|
|
|
"items": [{"name": "Remote VTEP", "checkPass": True, "hasWarning": False, "detail": ""}],
|
|
|
|
},
|
|
|
|
"pd": {
|
|
|
|
"description": "Platform Dependent Check",
|
|
|
|
"allCheckPass": True,
|
|
|
|
"detail": "",
|
|
|
|
"hasWarning": False,
|
|
|
|
"items": [
|
|
|
|
{"name": "VXLAN Bridging", "checkPass": True, "hasWarning": False, "detail": ""},
|
|
|
|
{"name": "VXLAN Routing", "checkPass": True, "hasWarning": False, "detail": "VXLAN Routing not enabled"},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
"cvx": {
|
|
|
|
"description": "CVX Configuration Check",
|
|
|
|
"allCheckPass": True,
|
|
|
|
"detail": "",
|
|
|
|
"hasWarning": False,
|
|
|
|
"items": [{"name": "CVX Server", "checkPass": True, "hasWarning": False, "detail": "Not in controller client mode"}],
|
|
|
|
},
|
|
|
|
"mlag": {
|
|
|
|
"description": "MLAG Configuration Check",
|
|
|
|
"allCheckPass": True,
|
|
|
|
"detail": "Run 'show mlag config-sanity' to verify MLAG config",
|
|
|
|
"hasWarning": False,
|
|
|
|
"items": [
|
|
|
|
{"name": "Peer VTEP IP", "checkPass": True, "hasWarning": False, "detail": ""},
|
|
|
|
{"name": "MLAG VTEP IP", "checkPass": True, "hasWarning": False, "detail": ""},
|
|
|
|
{"name": "Virtual VTEP IP", "checkPass": True, "hasWarning": False, "detail": ""},
|
|
|
|
{"name": "Peer VLAN-VNI", "checkPass": True, "hasWarning": False, "detail": ""},
|
|
|
|
{"name": "MLAG Inactive State", "checkPass": True, "hasWarning": False, "detail": ""},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
"warnings": ["Your configuration contains warnings. This does not mean misconfigurations. But you may wish to re-check your configurations."],
|
2025-05-15 09:34:30 +02:00
|
|
|
}
|
2025-02-05 11:32:35 +01:00
|
|
|
],
|
2025-05-15 09:34:30 +02:00
|
|
|
"expected": {"result": AntaTestStatus.FAILURE, "messages": ["Vxlan Category: localVtep - Config sanity check is not passing"]},
|
2025-02-05 11:32:35 +01:00
|
|
|
},
|
2025-05-15 09:34:30 +02:00
|
|
|
(VerifyVxlanConfigSanity, "skipped"): {
|
2025-02-05 11:32:35 +01:00
|
|
|
"eos_data": [{"categories": {}}],
|
2025-05-15 09:34:30 +02:00
|
|
|
"expected": {"result": AntaTestStatus.SKIPPED, "messages": ["VXLAN is not configured"]},
|
2025-02-05 11:32:35 +01:00
|
|
|
},
|
2025-05-15 09:34:30 +02:00
|
|
|
(VerifyVxlanVniBinding, "success"): {
|
2025-02-05 11:32:35 +01:00
|
|
|
"eos_data": [
|
|
|
|
{
|
|
|
|
"vxlanIntfs": {
|
|
|
|
"Vxlan1": {
|
|
|
|
"vniBindings": {
|
2025-05-15 09:34:30 +02:00
|
|
|
"10020": {"vlan": 20, "dynamicVlan": False, "source": "static", "interfaces": {"Ethernet31": {"dot1q": 0}, "Vxlan1": {"dot1q": 20}}}
|
2025-02-05 11:32:35 +01:00
|
|
|
},
|
2025-05-15 09:34:30 +02:00
|
|
|
"vniBindingsToVrf": {"500": {"vrfName": "TEST", "vlan": 1199, "source": "evpn"}, "600": {"vrfName": "PROD", "vlan": 1198, "source": "evpn"}},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2025-02-05 11:32:35 +01:00
|
|
|
],
|
2025-05-15 09:34:30 +02:00
|
|
|
"inputs": {"bindings": {10020: 20, 500: 1199, 600: "PROD"}},
|
|
|
|
"expected": {"result": AntaTestStatus.SUCCESS},
|
2025-02-05 11:32:35 +01:00
|
|
|
},
|
2025-05-15 09:34:30 +02:00
|
|
|
(VerifyVxlanVniBinding, "failure-no-binding"): {
|
2025-02-05 11:32:35 +01:00
|
|
|
"eos_data": [
|
|
|
|
{
|
|
|
|
"vxlanIntfs": {
|
|
|
|
"Vxlan1": {
|
|
|
|
"vniBindings": {
|
2025-05-15 09:34:30 +02:00
|
|
|
"10020": {"vlan": 20, "dynamicVlan": False, "source": "static", "interfaces": {"Ethernet31": {"dot1q": 0}, "Vxlan1": {"dot1q": 20}}}
|
2025-02-05 11:32:35 +01:00
|
|
|
},
|
|
|
|
"vniBindingsToVrf": {"500": {"vrfName": "PROD", "vlan": 1199, "source": "evpn"}},
|
2025-05-15 09:34:30 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2025-02-05 11:32:35 +01:00
|
|
|
],
|
|
|
|
"inputs": {"bindings": {10010: 10, 10020: 20, 500: 1199}},
|
2025-05-15 09:34:30 +02:00
|
|
|
"expected": {"result": AntaTestStatus.FAILURE, "messages": ["Interface: Vxlan1 VNI: 10010 - Binding not found"]},
|
|
|
|
},
|
|
|
|
(VerifyVxlanVniBinding, "failure-vrf-wrong-binding"): {
|
|
|
|
"eos_data": [
|
|
|
|
{
|
|
|
|
"vxlanIntfs": {
|
|
|
|
"Vxlan1": {
|
|
|
|
"vniBindings": {
|
|
|
|
"10020": {"vlan": 20, "dynamicVlan": False, "source": "static", "interfaces": {"Ethernet31": {"dot1q": 0}, "Vxlan1": {"dot1q": 20}}}
|
|
|
|
},
|
|
|
|
"vniBindingsToVrf": {"500": {"vrfName": "PROD", "vlan": 1199, "source": "evpn"}, "600": {"vrfName": "TEST", "vlan": 1199, "source": "evpn"}},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"inputs": {"bindings": {10020: 20, 500: 1199, 600: "PROD"}},
|
|
|
|
"expected": {"result": AntaTestStatus.FAILURE, "messages": ["Interface: Vxlan1 VNI: 600 - Wrong VRF binding - Expected: PROD Actual: TEST"]},
|
2025-02-05 11:32:35 +01:00
|
|
|
},
|
2025-05-15 09:34:30 +02:00
|
|
|
(VerifyVxlanVniBinding, "failure-wrong-binding"): {
|
2025-02-05 11:32:35 +01:00
|
|
|
"eos_data": [
|
|
|
|
{
|
|
|
|
"vxlanIntfs": {
|
|
|
|
"Vxlan1": {
|
|
|
|
"vniBindings": {
|
2025-05-15 09:34:30 +02:00
|
|
|
"10020": {"vlan": 30, "dynamicVlan": False, "source": "static", "interfaces": {"Ethernet31": {"dot1q": 0}, "Vxlan1": {"dot1q": 20}}}
|
2025-02-05 11:32:35 +01:00
|
|
|
},
|
|
|
|
"vniBindingsToVrf": {"500": {"vrfName": "PROD", "vlan": 1199, "source": "evpn"}},
|
2025-05-15 09:34:30 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2025-02-05 11:32:35 +01:00
|
|
|
],
|
|
|
|
"inputs": {"bindings": {10020: 20, 500: 1199}},
|
2025-05-15 09:34:30 +02:00
|
|
|
"expected": {"result": AntaTestStatus.FAILURE, "messages": ["Interface: Vxlan1 VNI: 10020 - Wrong VLAN binding - Expected: 20 Actual: 30"]},
|
2025-02-05 11:32:35 +01:00
|
|
|
},
|
2025-05-15 09:34:30 +02:00
|
|
|
(VerifyVxlanVniBinding, "failure-no-and-wrong-binding"): {
|
2025-02-05 11:32:35 +01:00
|
|
|
"eos_data": [
|
|
|
|
{
|
|
|
|
"vxlanIntfs": {
|
|
|
|
"Vxlan1": {
|
|
|
|
"vniBindings": {
|
2025-05-15 09:34:30 +02:00
|
|
|
"10020": {"vlan": 30, "dynamicVlan": False, "source": "static", "interfaces": {"Ethernet31": {"dot1q": 0}, "Vxlan1": {"dot1q": 20}}}
|
2025-02-05 11:32:35 +01:00
|
|
|
},
|
|
|
|
"vniBindingsToVrf": {"500": {"vrfName": "PROD", "vlan": 1199, "source": "evpn"}},
|
2025-05-15 09:34:30 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2025-02-05 11:32:35 +01:00
|
|
|
],
|
|
|
|
"inputs": {"bindings": {10010: 10, 10020: 20, 500: 1199}},
|
|
|
|
"expected": {
|
2025-05-15 09:34:30 +02:00
|
|
|
"result": AntaTestStatus.FAILURE,
|
|
|
|
"messages": ["Interface: Vxlan1 VNI: 10010 - Binding not found", "Interface: Vxlan1 VNI: 10020 - Wrong VLAN binding - Expected: 20 Actual: 30"],
|
2025-02-05 11:32:35 +01:00
|
|
|
},
|
|
|
|
},
|
2025-05-15 09:34:30 +02:00
|
|
|
(VerifyVxlanVniBinding, "failure-wrong-vni-vrf-binding"): {
|
|
|
|
"eos_data": [
|
|
|
|
{
|
|
|
|
"vxlanIntfs": {
|
|
|
|
"Vxlan1": {
|
|
|
|
"vniBindings": {
|
|
|
|
"10020": {"vlan": 30, "dynamicVlan": False, "source": "static", "interfaces": {"Ethernet31": {"dot1q": 0}, "Vxlan1": {"dot1q": 20}}}
|
|
|
|
},
|
|
|
|
"vniBindingsToVrf": {"500": {"vrfName": "PROD", "vlan": 1199, "source": "evpn"}},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"inputs": {"bindings": {10020: "PROD", 500: 30}},
|
|
|
|
"expected": {
|
|
|
|
"result": AntaTestStatus.FAILURE,
|
|
|
|
"messages": ["Interface: Vxlan1 VNI: 10020 - Binding not found", "Interface: Vxlan1 VNI: 500 - Wrong VLAN binding - Expected: 30 Actual: 1199"],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
(VerifyVxlanVniBinding, "skipped"): {
|
2025-02-05 11:32:35 +01:00
|
|
|
"eos_data": [{"vxlanIntfs": {}}],
|
|
|
|
"inputs": {"bindings": {10020: 20, 500: 1199}},
|
2025-05-15 09:34:30 +02:00
|
|
|
"expected": {"result": AntaTestStatus.SKIPPED, "messages": ["Interface: Vxlan1 - Not configured"]},
|
2025-02-05 11:32:35 +01:00
|
|
|
},
|
2025-05-15 09:34:30 +02:00
|
|
|
(VerifyVxlanVtep, "success"): {
|
2025-02-05 11:32:35 +01:00
|
|
|
"eos_data": [{"vteps": {}, "interfaces": {"Vxlan1": {"vteps": ["10.1.1.5", "10.1.1.6"]}}}],
|
|
|
|
"inputs": {"vteps": ["10.1.1.5", "10.1.1.6"]},
|
2025-05-15 09:34:30 +02:00
|
|
|
"expected": {"result": AntaTestStatus.SUCCESS},
|
2025-02-05 11:32:35 +01:00
|
|
|
},
|
2025-05-15 09:34:30 +02:00
|
|
|
(VerifyVxlanVtep, "failure-missing-vtep"): {
|
2025-02-05 11:32:35 +01:00
|
|
|
"eos_data": [{"vteps": {}, "interfaces": {"Vxlan1": {"vteps": ["10.1.1.5", "10.1.1.6"]}}}],
|
|
|
|
"inputs": {"vteps": ["10.1.1.5", "10.1.1.6", "10.1.1.7"]},
|
2025-05-15 09:34:30 +02:00
|
|
|
"expected": {"result": AntaTestStatus.FAILURE, "messages": ["The following VTEP peer(s) are missing from the Vxlan1 interface: 10.1.1.7"]},
|
2025-02-05 11:32:35 +01:00
|
|
|
},
|
2025-05-15 09:34:30 +02:00
|
|
|
(VerifyVxlanVtep, "failure-no-vtep"): {
|
2025-02-05 11:32:35 +01:00
|
|
|
"eos_data": [{"vteps": {}, "interfaces": {"Vxlan1": {"vteps": []}}}],
|
|
|
|
"inputs": {"vteps": ["10.1.1.5", "10.1.1.6"]},
|
2025-05-15 09:34:30 +02:00
|
|
|
"expected": {"result": AntaTestStatus.FAILURE, "messages": ["The following VTEP peer(s) are missing from the Vxlan1 interface: 10.1.1.5, 10.1.1.6"]},
|
2025-02-05 11:32:35 +01:00
|
|
|
},
|
2025-05-15 09:34:30 +02:00
|
|
|
(VerifyVxlanVtep, "failure-no-input-vtep"): {
|
2025-02-05 11:32:35 +01:00
|
|
|
"eos_data": [{"vteps": {}, "interfaces": {"Vxlan1": {"vteps": ["10.1.1.5"]}}}],
|
|
|
|
"inputs": {"vteps": []},
|
2025-05-15 09:34:30 +02:00
|
|
|
"expected": {"result": AntaTestStatus.FAILURE, "messages": ["Unexpected VTEP peer(s) on Vxlan1 interface: 10.1.1.5"]},
|
2025-02-05 11:32:35 +01:00
|
|
|
},
|
2025-05-15 09:34:30 +02:00
|
|
|
(VerifyVxlanVtep, "failure-missmatch"): {
|
2025-02-05 11:32:35 +01:00
|
|
|
"eos_data": [{"vteps": {}, "interfaces": {"Vxlan1": {"vteps": ["10.1.1.6", "10.1.1.7", "10.1.1.8"]}}}],
|
|
|
|
"inputs": {"vteps": ["10.1.1.5", "10.1.1.6"]},
|
|
|
|
"expected": {
|
2025-05-15 09:34:30 +02:00
|
|
|
"result": AntaTestStatus.FAILURE,
|
2025-02-05 11:32:35 +01:00
|
|
|
"messages": [
|
2025-03-17 07:33:51 +01:00
|
|
|
"The following VTEP peer(s) are missing from the Vxlan1 interface: 10.1.1.5",
|
|
|
|
"Unexpected VTEP peer(s) on Vxlan1 interface: 10.1.1.7, 10.1.1.8",
|
2025-02-05 11:32:35 +01:00
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
2025-05-15 09:34:30 +02:00
|
|
|
(VerifyVxlanVtep, "skipped"): {
|
2025-02-05 11:32:35 +01:00
|
|
|
"eos_data": [{"vteps": {}, "interfaces": {}}],
|
|
|
|
"inputs": {"vteps": ["10.1.1.5", "10.1.1.6", "10.1.1.7"]},
|
2025-05-15 09:34:30 +02:00
|
|
|
"expected": {"result": AntaTestStatus.SKIPPED, "messages": ["Interface: Vxlan1 - Not configured"]},
|
2025-02-05 11:32:35 +01:00
|
|
|
},
|
2025-05-15 09:34:30 +02:00
|
|
|
(VerifyVxlan1ConnSettings, "success"): {
|
2025-02-05 11:32:35 +01:00
|
|
|
"eos_data": [{"interfaces": {"Vxlan1": {"srcIpIntf": "Loopback1", "udpPort": 4789}}}],
|
|
|
|
"inputs": {"source_interface": "Loopback1", "udp_port": 4789},
|
2025-05-15 09:34:30 +02:00
|
|
|
"expected": {"result": AntaTestStatus.SUCCESS},
|
2025-02-05 11:32:35 +01:00
|
|
|
},
|
2025-05-15 09:34:30 +02:00
|
|
|
(VerifyVxlan1ConnSettings, "skipped"): {
|
2025-02-05 11:32:35 +01:00
|
|
|
"eos_data": [{"interfaces": {}}],
|
|
|
|
"inputs": {"source_interface": "Loopback1", "udp_port": 4789},
|
2025-05-15 09:34:30 +02:00
|
|
|
"expected": {"result": AntaTestStatus.SKIPPED, "messages": ["Interface: Vxlan1 - Not configured"]},
|
2025-02-05 11:32:35 +01:00
|
|
|
},
|
2025-05-15 09:34:30 +02:00
|
|
|
(VerifyVxlan1ConnSettings, "failure-wrong-interface"): {
|
2025-02-05 11:32:35 +01:00
|
|
|
"eos_data": [{"interfaces": {"Vxlan1": {"srcIpIntf": "Loopback10", "udpPort": 4789}}}],
|
|
|
|
"inputs": {"source_interface": "lo1", "udp_port": 4789},
|
2025-05-15 09:34:30 +02:00
|
|
|
"expected": {"result": AntaTestStatus.FAILURE, "messages": ["Interface: Vxlan1 - Incorrect Source interface - Expected: Loopback1 Actual: Loopback10"]},
|
2025-02-05 11:32:35 +01:00
|
|
|
},
|
2025-05-15 09:34:30 +02:00
|
|
|
(VerifyVxlan1ConnSettings, "failure-wrong-port"): {
|
2025-02-05 11:32:35 +01:00
|
|
|
"eos_data": [{"interfaces": {"Vxlan1": {"srcIpIntf": "Loopback10", "udpPort": 4789}}}],
|
|
|
|
"inputs": {"source_interface": "Lo1", "udp_port": 4780},
|
|
|
|
"expected": {
|
2025-05-15 09:34:30 +02:00
|
|
|
"result": AntaTestStatus.FAILURE,
|
2025-02-05 11:32:35 +01:00
|
|
|
"messages": [
|
2025-03-17 07:33:51 +01:00
|
|
|
"Interface: Vxlan1 - Incorrect Source interface - Expected: Loopback1 Actual: Loopback10",
|
|
|
|
"Interface: Vxlan1 - Incorrect UDP port - Expected: 4780 Actual: 4789",
|
2025-02-05 11:32:35 +01:00
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
2025-05-15 09:34:30 +02:00
|
|
|
}
|