Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 17 additions & 5 deletions tests/network/bgp/evpn/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,12 @@
deploy_evpn_bridge,
deploy_evpn_l2_endpoint,
deploy_evpn_l3_endpoint,
deploy_evpn_l3_vrf,
Comment thread
servolkov marked this conversation as resolved.
evpn_workloads_active_connections,
teardown_evpn_bridge,
teardown_evpn_l2_endpoint,
teardown_evpn_l3_endpoint,
teardown_evpn_l3_vrf,
)
from tests.network.libs import cluster_user_defined_network as libcudn
from tests.network.libs.bgp import (
Expand Down Expand Up @@ -225,6 +227,8 @@ def evpn_bridge(
pod=frr_external_pod.pod,
local_vtep_ip=frr_external_pod.ipv4,
remote_vtep_ips=worker_ips,
l2_vni=EVPN_MAC_VRF_VNI,
l3_vni=EVPN_IP_VRF_VNI,
)
yield
teardown_evpn_bridge(pod=frr_external_pod.pod)
Expand All @@ -237,27 +241,35 @@ def external_l2_endpoint(
) -> Generator[EvpnEndpoint]:
endpoint = deploy_evpn_l2_endpoint(
pod=frr_external_pod.pod,
vni=EVPN_MAC_VRF_VNI,
endpoint_ips=[EXTERNAL_L2_ENDPOINT_IPV4, EXTERNAL_L2_ENDPOINT_IPV6],
mac_address=EXTERNAL_L2_ENDPOINT_MAC,
)
yield endpoint
teardown_evpn_l2_endpoint(pod=frr_external_pod.pod, vni=EVPN_MAC_VRF_VNI)
teardown_evpn_l2_endpoint(endpoint=endpoint)


@pytest.fixture(scope="module")
def external_l3_endpoint(
def external_l3_vrf(
evpn_bridge: None,
frr_external_pod: ExternalFrrPodInfo,
) -> Generator[None]:
deploy_evpn_l3_vrf(pod=frr_external_pod.pod, vni=EVPN_IP_VRF_VNI)
yield
teardown_evpn_l3_vrf(pod=frr_external_pod.pod)


@pytest.fixture(scope="module")
def external_l3_endpoint(
external_l3_vrf: None,
frr_external_pod: ExternalFrrPodInfo,
) -> Generator[EvpnEndpoint]:
endpoint = deploy_evpn_l3_endpoint(
pod=frr_external_pod.pod,
vni=EVPN_IP_VRF_VNI,
endpoint_ips=[EXTERNAL_L3_ENDPOINT_IPV4, EXTERNAL_L3_ENDPOINT_IPV6],
gateway_ips=[EXTERNAL_L3_GATEWAY_IPV4, EXTERNAL_L3_GATEWAY_IPV6],
)
yield endpoint
teardown_evpn_l3_endpoint(pod=frr_external_pod.pod)
teardown_evpn_l3_endpoint(endpoint=endpoint)


@pytest.fixture()
Expand Down
Loading