Commit 4a4c9dae authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

Common - Type Checkers - Assertions:

- Corrected definition of endpoint
parent 2f3891fd
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -472,7 +472,7 @@ def validate_topology(message, num_devices=None, num_links=None):

def validate_endpoint(message):
    assert isinstance(message, dict)
    assert len(message.keys()) == 4
    assert len(message.keys()) == 6
    assert 'endpoint_id' in message
    validate_endpoint_id(message['endpoint_id'])
    assert 'name' in message
@@ -482,6 +482,10 @@ def validate_endpoint(message):
    assert 'kpi_sample_types' in message
    assert isinstance(message['kpi_sample_types'], list)
    for kpi_sample_type in message['kpi_sample_types']: validate_kpi_sample_types_enum(kpi_sample_type)
    assert 'endpoint_location' in message
    # TODO: validate "endpoint_location"
    assert 'capabilities' in message
    # TODO: validate "capabilities"

def validate_component(component):
    assert isinstance(component, dict)