From 1546aafacbcbba4a8387fd75a2d264f59dea71c4 Mon Sep 17 00:00:00 2001 From: gifrerenom <lluis.gifre@cttc.es> Date: Sat, 11 May 2024 13:53:59 +0000 Subject: [PATCH] Common - Tools - Object Factory: - Added field "name" to json_endpoint() builder method --- src/common/tools/object_factory/EndPoint.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/common/tools/object_factory/EndPoint.py b/src/common/tools/object_factory/EndPoint.py index 85a5d4494..faf1accd3 100644 --- a/src/common/tools/object_factory/EndPoint.py +++ b/src/common/tools/object_factory/EndPoint.py @@ -43,13 +43,14 @@ def json_endpoint_ids( def json_endpoint( device_id : Dict, endpoint_uuid : str, endpoint_type : str, topology_id : Optional[Dict] = None, - kpi_sample_types : List[int] = [], location : Optional[Dict] = None + name : Optional[str] = None, kpi_sample_types : List[int] = [], location : Optional[Dict] = None ): result = { 'endpoint_id': json_endpoint_id(device_id, endpoint_uuid, topology_id=topology_id), 'endpoint_type': endpoint_type, } + if name is not None: result['name'] = name if kpi_sample_types is not None and len(kpi_sample_types) > 0: result['kpi_sample_types'] = copy.deepcopy(kpi_sample_types) if location is not None: -- GitLab