From 2ed949a7a4283acc07d30b106e2cc51dcbbcc73b Mon Sep 17 00:00:00 2001 From: cooperwinser Date: Mon, 9 Dec 2024 11:53:19 +1100 Subject: [PATCH 1/3] Fix: allow integer values in extCommunityListRaw field for Arista BGP parsing --- hyperglass/models/parsing/arista_eos.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hyperglass/models/parsing/arista_eos.py b/hyperglass/models/parsing/arista_eos.py index 2b00e01..f2a0174 100644 --- a/hyperglass/models/parsing/arista_eos.py +++ b/hyperglass/models/parsing/arista_eos.py @@ -2,6 +2,7 @@ # Standard Library import typing as t +from typing import Union from datetime import datetime # Third Party @@ -64,7 +65,7 @@ class AristaRouteDetail(_AristaBase): origin: str label_stack: t.List = [] - ext_community_list: t.List[str] = [] + ext_community_list_raw: t.List[Union[str, int]] = [] ext_community_list_raw: t.List[str] = [] community_list: t.List[str] = [] large_community_list: t.List[str] = [] From 7135ec3c9c2da37ee93388ff7fc21f57936047a9 Mon Sep 17 00:00:00 2001 From: cooperwinser Date: Mon, 9 Dec 2024 12:08:25 +1100 Subject: [PATCH 2/3] Fix: allow integer values in extCommunityListRaw field for Arista BGP parsing --- hyperglass/models/parsing/arista_eos.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hyperglass/models/parsing/arista_eos.py b/hyperglass/models/parsing/arista_eos.py index f2a0174..9cdf7ad 100644 --- a/hyperglass/models/parsing/arista_eos.py +++ b/hyperglass/models/parsing/arista_eos.py @@ -65,8 +65,8 @@ class AristaRouteDetail(_AristaBase): origin: str label_stack: t.List = [] + ext_community_list: t.List[str] = [] ext_community_list_raw: t.List[Union[str, int]] = [] - ext_community_list_raw: t.List[str] = [] community_list: t.List[str] = [] large_community_list: t.List[str] = [] From c369af439dc1c3d85927b9958f1ca7261a0f552f Mon Sep 17 00:00:00 2001 From: cooperwinser Date: Sat, 17 May 2025 23:34:15 +1000 Subject: [PATCH 3/3] Removed Union import --- hyperglass/models/parsing/arista_eos.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hyperglass/models/parsing/arista_eos.py b/hyperglass/models/parsing/arista_eos.py index 9cdf7ad..6f41ad1 100644 --- a/hyperglass/models/parsing/arista_eos.py +++ b/hyperglass/models/parsing/arista_eos.py @@ -2,7 +2,6 @@ # Standard Library import typing as t -from typing import Union from datetime import datetime # Third Party @@ -66,7 +65,7 @@ class AristaRouteDetail(_AristaBase): origin: str label_stack: t.List = [] ext_community_list: t.List[str] = [] - ext_community_list_raw: t.List[Union[str, int]] = [] + ext_community_list_raw: t.List[t.Union[str, int]] = [] community_list: t.List[str] = [] large_community_list: t.List[str] = []