Skip to content
Snippets Groups Projects
Commit 96f54ae3 authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

Tests:

- Corrected new definition of endpoint descriptors in tests and components
parent 6efeac2c
No related branches found
No related tags found
2 merge requests!142Release TeraFlowSDN 2.1,!137Pre-release CI/CD fixes - Service - PathComp
...@@ -19,12 +19,13 @@ from common.tools.object_factory.Context import json_context, json_context_id ...@@ -19,12 +19,13 @@ from common.tools.object_factory.Context import json_context, json_context_id
from common.tools.object_factory.Device import ( from common.tools.object_factory.Device import (
json_device_connect_rules, json_device_emulated_connect_rules, json_device_emulated_packet_router_disabled, json_device_connect_rules, json_device_emulated_connect_rules, json_device_emulated_packet_router_disabled,
json_device_connect_rules, json_device_id, json_device_p4_disabled, json_device_connect_rules, json_device_id, json_device_p4_disabled,
json_device_emulated_tapi_disabled, json_device_id, json_device_packetrouter_disabled, json_device_tapi_disabled, json_endpoint_descriptor) json_device_emulated_tapi_disabled, json_device_id, json_device_packetrouter_disabled, json_device_tapi_disabled)
from common.tools.object_factory.Service import ( from common.tools.object_factory.Service import (
get_service_uuid, json_service_l3nm_planned,json_service_p4_planned) get_service_uuid, json_service_l3nm_planned,json_service_p4_planned)
from common.tools.object_factory.ConfigRule import ( from common.tools.object_factory.ConfigRule import (
json_config_rule_set, json_config_rule_delete) json_config_rule_set, json_config_rule_delete)
from common.tools.object_factory.EndPoint import json_endpoint, json_endpoint_ids, json_endpoints, json_endpoint_id from common.tools.object_factory.EndPoint import json_endpoint, json_endpoint_ids, json_endpoints, json_endpoint_id
from common.tools.object_factory.EndPoint import json_endpoint_descriptor
from common.tools.object_factory.Link import get_link_uuid, json_link, json_link_id from common.tools.object_factory.Link import get_link_uuid, json_link, json_link_id
from common.tools.object_factory.Topology import json_topology, json_topology_id from common.tools.object_factory.Topology import json_topology, json_topology_id
from common.proto.kpi_sample_types_pb2 import KpiSampleType from common.proto.kpi_sample_types_pb2 import KpiSampleType
......
...@@ -17,8 +17,8 @@ from common.Constants import DEFAULT_CONTEXT_UUID, DEFAULT_TOPOLOGY_UUID ...@@ -17,8 +17,8 @@ from common.Constants import DEFAULT_CONTEXT_UUID, DEFAULT_TOPOLOGY_UUID
from common.tools.object_factory.Context import json_context, json_context_id from common.tools.object_factory.Context import json_context, json_context_id
from common.tools.object_factory.Device import ( from common.tools.object_factory.Device import (
json_device_connect_rules, json_device_emulated_connect_rules, json_device_emulated_packet_router_disabled, json_device_connect_rules, json_device_emulated_connect_rules, json_device_emulated_packet_router_disabled,
json_device_emulated_tapi_disabled, json_device_id, json_device_packetrouter_disabled, json_device_tapi_disabled, json_endpoint_descriptor) json_device_emulated_tapi_disabled, json_device_id, json_device_packetrouter_disabled, json_device_tapi_disabled)
from common.tools.object_factory.EndPoint import json_endpoint, json_endpoint_id from common.tools.object_factory.EndPoint import json_endpoint, json_endpoint_descriptor, json_endpoint_id
from common.tools.object_factory.Link import json_link, json_link_id from common.tools.object_factory.Link import json_link, json_link_id
from common.tools.object_factory.Topology import json_topology, json_topology_id from common.tools.object_factory.Topology import json_topology, json_topology_id
from common.proto.kpi_sample_types_pb2 import KpiSampleType from common.proto.kpi_sample_types_pb2 import KpiSampleType
...@@ -63,16 +63,18 @@ except ImportError: ...@@ -63,16 +63,18 @@ except ImportError:
#USE_REAL_DEVICES = False # Uncomment to force to use emulated devices #USE_REAL_DEVICES = False # Uncomment to force to use emulated devices
def json_endpoint_ids(device_id : Dict, endpoint_descriptors : List[Tuple[str, str, List[int]]]): def json_endpoint_ids(device_id : Dict, endpoint_descriptors : List[Dict]]):
return [ return [
json_endpoint_id(device_id, ep_uuid, topology_id=None) json_endpoint_id(device_id, ep_data['uuid'], topology_id=None)
for ep_uuid, _, _ in endpoint_descriptors for ep_data in endpoint_descriptors
] ]
def json_endpoints(device_id : Dict, endpoint_descriptors : List[Tuple[str, str, List[int]]]): def json_endpoints(device_id : Dict, endpoint_descriptors : List[Dict]]):
return [ return [
json_endpoint(device_id, ep_uuid, ep_type, topology_id=None, kpi_sample_types=ep_sample_types) json_endpoint(
for ep_uuid, ep_type, ep_sample_types in endpoint_descriptors device_id, ep_data['uuid'], ep_data['type'], topology_id=None,
kpi_sample_types=ep_data['sample_types'])
for ep_data in endpoint_descriptors
] ]
def get_link_uuid(a_device_id : Dict, a_endpoint_id : Dict, z_device_id : Dict, z_endpoint_id : Dict) -> str: def get_link_uuid(a_device_id : Dict, a_endpoint_id : Dict, z_device_id : Dict, z_endpoint_id : Dict) -> str:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment