Loading src/device/service/drivers/gnmi_openconfig/handlers/Interface.py +0 −5 Original line number Diff line number Diff line Loading @@ -24,11 +24,6 @@ MIN_MTU = 68 def _normalize_interface_type(if_type: str, sif_index: int) -> str: # In this driver, subinterfaces are modeled under the parent physical interface. # Requests coming from service handlers may still use l3ipvlan to express routed # subinterface intent, which needs to be translated to an Ethernet parent type. if if_type == 'l3ipvlan' and sif_index is not None: return 'iana-if-type:ethernetCsmacd' if ':' not in if_type: return 'iana-if-type:{:s}'.format(if_type) return if_type Loading src/device/tests/gnmi_openconfig/test_unitary_gnmi_openconfig_interface_handler.py +2 −2 Original line number Diff line number Diff line Loading @@ -18,7 +18,7 @@ from device.service.drivers.gnmi_openconfig.handlers.Interface import InterfaceH from device.service.drivers.gnmi_openconfig.handlers.YangHandler import YangHandler def test_compose_tagged_l3_subinterface_sets_parent_ethernet_type() -> None: def test_compose_tagged_l3_subinterface_keeps_l3ipvlan_type() -> None: handler = InterfaceHandler() yang_handler = YangHandler() try: Loading @@ -40,7 +40,7 @@ def test_compose_tagged_l3_subinterface_sets_parent_ethernet_type() -> None: yang_handler.destroy() json_data = json.loads(str_data) assert json_data['config']['type'] == 'iana-if-type:ethernetCsmacd' assert json_data['config']['type'] == 'iana-if-type:l3ipvlan' subinterface = json_data['subinterfaces']['subinterface'][0] assert subinterface['index'] == 125 Loading Loading
src/device/service/drivers/gnmi_openconfig/handlers/Interface.py +0 −5 Original line number Diff line number Diff line Loading @@ -24,11 +24,6 @@ MIN_MTU = 68 def _normalize_interface_type(if_type: str, sif_index: int) -> str: # In this driver, subinterfaces are modeled under the parent physical interface. # Requests coming from service handlers may still use l3ipvlan to express routed # subinterface intent, which needs to be translated to an Ethernet parent type. if if_type == 'l3ipvlan' and sif_index is not None: return 'iana-if-type:ethernetCsmacd' if ':' not in if_type: return 'iana-if-type:{:s}'.format(if_type) return if_type Loading
src/device/tests/gnmi_openconfig/test_unitary_gnmi_openconfig_interface_handler.py +2 −2 Original line number Diff line number Diff line Loading @@ -18,7 +18,7 @@ from device.service.drivers.gnmi_openconfig.handlers.Interface import InterfaceH from device.service.drivers.gnmi_openconfig.handlers.YangHandler import YangHandler def test_compose_tagged_l3_subinterface_sets_parent_ethernet_type() -> None: def test_compose_tagged_l3_subinterface_keeps_l3ipvlan_type() -> None: handler = InterfaceHandler() yang_handler = YangHandler() try: Loading @@ -40,7 +40,7 @@ def test_compose_tagged_l3_subinterface_sets_parent_ethernet_type() -> None: yang_handler.destroy() json_data = json.loads(str_data) assert json_data['config']['type'] == 'iana-if-type:ethernetCsmacd' assert json_data['config']['type'] == 'iana-if-type:l3ipvlan' subinterface = json_data['subinterfaces']['subinterface'][0] assert subinterface['index'] == 125 Loading