Commit 1ddd68dd authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

NBI component - IETF L3VPN:

- Added missing data files
- Updated test files
- Corrected config rules to store address of neighbor devices
parent b2bc478e
Loading
Loading
Loading
Loading
+8 −6
Original line number Diff line number Diff line
@@ -55,7 +55,7 @@ def process_vpn_service(

def update_service_endpoint(
    service_uuid : str, site_id : str, device_uuid : str, endpoint_uuid : str,
    vlan_tag : int, ipv4_address : str, ipv4_prefix_length : int,
    vlan_tag : int, ipv4_address : str, neighbor_ipv4_address : str, ipv4_prefix_length : int,
    capacity_gbps : Optional[float] = None, e2e_latency_ms : Optional[float] = None,
    availability : Optional[float] = None, mtu : Optional[int] = None,
    static_routing : Optional[Dict[Tuple[str, str], str]] = None,
@@ -96,6 +96,7 @@ def update_service_endpoint(
    field_updates = {}
    if vlan_tag              is not None: field_updates['vlan_tag'        ] = (vlan_tag,              True)
    if ipv4_address          is not None: field_updates['ip_address'      ] = (ipv4_address,          True)
    if neighbor_ipv4_address is not None: field_updates['neighbor_address'] = (neighbor_ipv4_address, True)
    if ipv4_prefix_length    is not None: field_updates['prefix_length'   ] = (ipv4_prefix_length,    True)
    update_config_rule_custom(config_rules, endpoint_settings_key, field_updates)

@@ -131,7 +132,7 @@ def process_site_network_access(
        raise NotImplementedError(MSG.format(str(ipv4_allocation['address-allocation-type'])))
    ipv4_allocation_addresses = ipv4_allocation['addresses']
    ipv4_provider_address = ipv4_allocation_addresses['provider-address']
    #ipv4_customer_address = ipv4_allocation_addresses['customer-address']
    ipv4_customer_address = ipv4_allocation_addresses['customer-address']
    ipv4_prefix_length    = ipv4_allocation_addresses['prefix-length'   ]

    vlan_tag = None
@@ -176,7 +177,8 @@ def process_site_network_access(
        availability       = qos_profile_class['bandwidth']['guaranteed-bw-percent']

    exc = update_service_endpoint(
        service_uuid, site_id, device_uuid, endpoint_uuid, vlan_tag, ipv4_provider_address, ipv4_prefix_length,
        service_uuid, site_id, device_uuid, endpoint_uuid,
        vlan_tag, ipv4_customer_address, ipv4_provider_address, ipv4_prefix_length,
        capacity_gbps=service_bandwidth_gbps, e2e_latency_ms=max_e2e_latency_ms, availability=availability,
        mtu=service_mtu, static_routing=site_static_routing
    )
+413 −0

File added.

Preview size limit exceeded, changes collapsed.

+6 −6

File changed.

Preview size limit exceeded, changes collapsed.

+6 −6

File changed.

Preview size limit exceeded, changes collapsed.