Commit 0f59626b authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

NBI component - IETF L2VPN connector:

- Fixed checks of site management type
parent 6c6788a0
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -264,9 +264,9 @@ def process_site_network_access(
def process_site(site : Dict, errors : List[Dict]) -> None:
    site_id = site['site-id']

    # this change is made for ECOC2025 demo purposes
    if site['management']['type'] != 'provider-managed':
    # if site['management']['type'] == 'customer-managed':
    site_management_type = site['management']['type']
    site_management_type = site_management_type.replace('ietf-l2vpn-svc:', '')
    if site_management_type != 'provider-managed':
        MSG = 'Site Management Type: {:s}'
        raise NotImplementedError(MSG.format(str(site['management']['type'])))

@@ -275,7 +275,9 @@ def process_site(site : Dict, errors : List[Dict]) -> None:
        process_site_network_access(site_id, network_access, errors)

def update_vpn(site : Dict, errors : List[Dict]) -> None:
    if site['management']['type'] != 'provider-managed':
    site_management_type = site['management']['type']
    site_management_type = site_management_type.replace('ietf-l2vpn-svc:', '')
    if site_management_type != 'provider-managed':
        MSG = 'Site Management Type: {:s}'
        raise NotImplementedError(MSG.format(str(site['management']['type'])))

+1 −1
Original line number Diff line number Diff line
@@ -151,7 +151,7 @@ class L2VPN_SiteNetworkAccesses(Resource):
                'sites': {'site': [{
                    'site-id': site_id,
                    'default-ce-vlan-id': 1,
                    'management': {'type': 'customer-managed'},
                    'management': {'type': 'provider-managed'},
                    'locations': {'location': [
                        {'location-id': location_ref}
                        for location_ref in location_refs