Commit 1546aafa authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

Common - Tools - Object Factory:

- Added field "name" to json_endpoint() builder method
parent 13f1275d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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: