Commit 713675f2 authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

Merge branch 'feat/422-tid-enhance-ietf-l2-nbi' into 'develop'

Resolve "(TID) Enhance IETF L2 NBI"

See merge request !485
parents 1201f716 9d90777a
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -33,6 +33,10 @@ BEARER_MAPPINGS = {
    'OSM-E2E:r1:Ethernet11': ('r1', 'Ethernet11', None, None, 0, '172.17.1.1', 24, None, None),
    'OSM-E2E:r3:Ethernet11': ('r3', 'Ethernet11', None, None, 0, '172.17.3.1', 24, None, None),

    # NSC tests
    'SDP1': ('r1', 'Ethernet10', None, None, 0, '172.16.1.10', 24, None, None),
    'SDP2': ('r3', 'Ethernet10', None, None, 0, '172.16.2.10', 24, None, None),

    # SNS4SNS'26
    'SNS4SNS26:SiteA': ('router-1', 'Ethernet10', None, None, 0, '192.168.251.5', 24, None, None),
    'SNS4SNS26:SiteB': ('router-3', 'Ethernet10', None, None, 0, '192.168.252.5', 24, None, None),
+12 −14
Original line number Diff line number Diff line
@@ -171,18 +171,16 @@ def process_site_network_access(
        availability       = None

        service_bandwidth_bps = 0
        service_input_bandwidth = network_access_service.get('svc-input-bandwidth')
        if service_input_bandwidth is not None:
            service_input_bandwidth = float(service_input_bandwidth)
            service_bandwidth_bps = max(service_bandwidth_bps, service_input_bandwidth)

        service_output_bandwidth = network_access_service.get('svc-output-bandwidth')
        if service_output_bandwidth is not None:
            service_output_bandwidth = float(service_output_bandwidth)
            if service_bandwidth_bps is None:
                service_bandwidth_bps = service_output_bandwidth
            else:
                service_bandwidth_bps = max(service_bandwidth_bps, service_output_bandwidth)

        svc_bandwidth = network_access_service.get("svc-bandwidth", {})
        bandwidth_list = svc_bandwidth.get("bandwidth", [])

        for bandwidth_entry in bandwidth_list:
            cir = bandwidth_entry.get("cir")

            if cir is not None:
                cir = float(cir)
                service_bandwidth_bps = max(service_bandwidth_bps, cir)

        if service_bandwidth_bps > 1.e-12:
            max_bandwidth_gbps = service_bandwidth_bps / 1.e9
@@ -201,11 +199,11 @@ def process_site_network_access(

            qos_profile_class_direction = qos_profile_class['direction']
            qos_profile_class_direction = qos_profile_class_direction.replace('ietf-l2vpn-svc:', '')
            if qos_profile_class_direction != 'both':
            if qos_profile_class_direction != 'bidirectional':
                MSG = 'Site Network Access QoS Class Direction: {:s}'
                raise NotImplementedError(MSG.format(str(qos_profile_class['direction'])))

            max_e2e_latency_ms = float(qos_profile_class['latency']['latency-boundary'])
            max_e2e_latency_ms = float(qos_profile_class['frame-delay']['delay-bound'])
            availability       = float(qos_profile_class['bandwidth']['guaranteed-bw-percent'])

        network_access_diversity = network_access.get('access-diversity', {})