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

Device component - gNMI OpenConfig Driver:

- Fixed methods of unitary test
parent 488b04dc
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -133,7 +133,7 @@ def test_configure_l2vpn_vpls(drivers: Dict[str, GnmiOpenConfigDriver]) -> None:
    """Fallback validation: create a VLAN in default VRF and attach core/access interfaces."""
    for router in ROUTERS:
        driver = drivers[router['name']]
        vlan_res = vlan('default', VLAN_ID, members=[], vlan_name='tfs-vlan')
        vlan_res = vlan('default', VLAN_ID, vlan_name='tfs-vlan')
        if_access = interface(router['access_interface'], VLAN_ID, enabled=True, vlan_id=VLAN_ID,
                              ipv4_address=None, ipv4_prefix=None)
        if_core = interface(router['core_interface'], VLAN_ID, enabled=True, vlan_id=VLAN_ID,
+1 −4
Original line number Diff line number Diff line
@@ -110,14 +110,11 @@ def connection_point_endpoint_remote(
    }
    return str_path, str_data

def vlan(ni_name: str, vlan_id: int, members=None, vlan_name: str = None) -> Tuple[str, Dict]:
    if members is None:
        members = []
def vlan(ni_name: str, vlan_id: int, vlan_name: str = None) -> Tuple[str, Dict]:
    str_path = '/network_instance[{:s}]/vlan[{:d}]'.format(ni_name, vlan_id)
    str_data = {
        'name': ni_name,
        'vlan_id': vlan_id,
        'vlan_name': vlan_name,
        'members': members,
    }
    return str_path, str_data