Commit 8d38579b authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

Merge branch 'feat/365-cttc-new-mikrotik-routeros-sbi-driver-for-l2-evpns' into 'develop'

Resolve "(CTTC) New MikroTik RouterOS SBI Driver for L2 EVPNs"

Closes #365

See merge request !419
parents faf0105a a569205e
Loading
Loading
Loading
Loading
+1 −0
Changes for proto/context.proto: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -261,6 +261,7 @@ enum DeviceDriverEnum {
  DEVICEDRIVER_OPENROADM = 20;
  DEVICEDRIVER_RESTCONF_OPENCONFIG = 21;
  DEVICEDRIVER_CUSTOM_IPOWDM = 22;
  DEVICEDRIVER_MIKROTIK_ROUTEROS = 23;
}

enum DeviceOperationalStatusEnum {
+24 −0
Changes for scripts/run_tests_locally-device-mikrotik-routeros.sh: 24 added lines, 0 removed lines.
Original line number Diff line number Diff line
#!/bin/bash
# Copyright 2022-2026 ETSI SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.


PROJECTDIR=`pwd`

cd $PROJECTDIR/src
RCFILE=$PROJECTDIR/coverage/.coveragerc

# Run unitary tests and analyze coverage of code at same time
coverage run --rcfile=$RCFILE --append -m pytest --log-level=INFO -o log_cli=true --verbose \
     tests/mikrotik_routeros/test_bgp.py
+1 −0
Changes for src/context/service/database/models/enums/DeviceDriver.py: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@ class ORM_DeviceDriverEnum(enum.Enum):
    OPENROADM             = DeviceDriverEnum.DEVICEDRIVER_OPENROADM
    RESTCONF_OPENCONFIG   = DeviceDriverEnum.DEVICEDRIVER_RESTCONF_OPENCONFIG
    CUSTOM_IPOWDM         = DeviceDriverEnum.DEVICEDRIVER_CUSTOM_IPOWDM
    MIKROTIK_ROUTEROS     = DeviceDriverEnum.DEVICEDRIVER_MIKROTIK_ROUTEROS

grpc_to_enum__device_driver = functools.partial(
    grpc_to_enum, DeviceDriverEnum, ORM_DeviceDriverEnum)
+17 −1
Changes for src/device/service/drivers/__init__.py: 17 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -270,8 +270,10 @@ if LOAD_ALL_DEVICE_DRIVERS:
                FilterFieldEnum.DRIVER : DeviceDriverEnum.DEVICEDRIVER_RESTCONF_OPENCONFIG,
            }
        ]))

if LOAD_ALL_DEVICE_DRIVERS:
    from .custom_ipowdm.CustomIpowdmDriver import CustomIpowdmDriver # pylint: disable=wrong-import-position
    # pylint: disable=wrong-import-position
    from .custom_ipowdm.CustomIpowdmDriver import CustomIpowdmDriver
    DRIVERS.append(
        (CustomIpowdmDriver, [
            {
@@ -282,3 +284,17 @@ if LOAD_ALL_DEVICE_DRIVERS:
                FilterFieldEnum.DRIVER : DeviceDriverEnum.DEVICEDRIVER_CUSTOM_IPOWDM,
            }
        ]))

if LOAD_ALL_DEVICE_DRIVERS:
    # pylint: disable=wrong-import-position
    from .mikrotik.MikrotikRouterOSDriver import MikrotikRouterOSDriver
    DRIVERS.append(
        (MikrotikRouterOSDriver, [
            {
                FilterFieldEnum.DEVICE_TYPE: [
                    DeviceTypeEnum.PACKET_ROUTER,
                    DeviceTypeEnum.EMULATED_PACKET_ROUTER
                ],
                FilterFieldEnum.DRIVER : DeviceDriverEnum.DEVICEDRIVER_MIKROTIK_ROUTEROS,
            }
        ]))
+830 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading