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

Service component - L3NM gNMI OpenConfig:

- Fixed management of MTUs
- Code styling
parent 1009c6eb
Loading
Loading
Loading
Loading
+12 −15
Original line number Diff line number Diff line
@@ -102,9 +102,6 @@ def _network_instance_interface(ni_name : str, interface : str, sub_interface_in
    data = {'name': ni_name, 'id': sub_interface_name, 'interface': interface, 'subinterface': sub_interface_index}
    return path, data

def _interface_switched_vlan(interface : str) -> Tuple[str, Dict]:
    path = '/interface[{:s}]/ethernet/switched-vlan'.format(interface)
    return path, {}

class EndpointComposer:
    def __init__(self, endpoint_uuid : str) -> None:
@@ -127,7 +124,7 @@ class EndpointComposer:
        vlan_id = _safe_int(json_settings.get('vlan_id', json_settings.get('vlan-id')))
        self._add_vlan_id(vlan_id)
        mtu = _safe_int(json_settings.get('mtu'))
        if mtu is not None:
        if mtu is not None and mtu > 0:
            self.mtu = mtu

    def configure(self, endpoint_obj : Optional[EndPoint], settings : Optional[TreeNode]) -> None: