Commit 2a4c76fa authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

Merge branch 'develop' of ssh://gifrerenom_labs.etsi.org/tfs/controller into...

Merge branch 'develop' of ssh://gifrerenom_labs.etsi.org/tfs/controller into feat/408-cttc-compute-optical-connection-candidates
parents 071e06ef 5b9d5731
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -260,6 +260,7 @@ enum DeviceDriverEnum {
  DEVICEDRIVER_GNMI_NOKIA_SRLINUX = 19;
  DEVICEDRIVER_OPENROADM = 20;
  DEVICEDRIVER_RESTCONF_OPENCONFIG = 21;
  DEVICEDRIVER_CUSTOM_IPOWDM = 22;
}

enum DeviceOperationalStatusEnum {
+2 −1
Original line number Diff line number Diff line
@@ -59,7 +59,8 @@ def validate_device_driver_enum(message):
        'DEVICEDRIVER_RYU',
        'DEVICEDRIVER_GNMI_NOKIA_SRLINUX',
        'DEVICEDRIVER_OPENROADM',
        'DEVICEDRIVER_GNMI_OPENCONFIG',
        'DEVICEDRIVER_RESTCONF_OPENCONFIG',
        'DEVICEDRIVER_CUSTOM_IPOWDM',
    ]

def validate_device_operational_status_enum(message):
+1 −0
Original line number Diff line number Diff line
@@ -44,6 +44,7 @@ class ORM_DeviceDriverEnum(enum.Enum):
    GNMI_NOKIA_SRLINUX    = DeviceDriverEnum.DEVICEDRIVER_GNMI_NOKIA_SRLINUX
    OPENROADM             = DeviceDriverEnum.DEVICEDRIVER_OPENROADM
    RESTCONF_OPENCONFIG   = DeviceDriverEnum.DEVICEDRIVER_RESTCONF_OPENCONFIG
    CUSTOM_IPOWDM         = DeviceDriverEnum.DEVICEDRIVER_CUSTOM_IPOWDM

grpc_to_enum__device_driver = functools.partial(
    grpc_to_enum, DeviceDriverEnum, ORM_DeviceDriverEnum)
+11 −0
Original line number Diff line number Diff line
@@ -270,3 +270,14 @@ 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
    DRIVERS.append(
        (CustomIpowdmDriver, [
            {
                FilterFieldEnum.DEVICE_TYPE: [
                    DeviceTypeEnum.PACKET_ROUTER
                ],
                FilterFieldEnum.DRIVER     : DeviceDriverEnum.DEVICEDRIVER_CUSTOM_IPOWDM,
            }
        ]))
+21 −0
Original line number Diff line number Diff line
# 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.

from device.service.driver_api._Driver import RESOURCE_ENDPOINTS, RESOURCE_INTERFACES, RESOURCE_NETWORK_INSTANCES

SPECIAL_RESOURCE_MAPPINGS = {
    RESOURCE_ENDPOINTS        : '/endpoints',
    RESOURCE_INTERFACES       : '/interfaces',
    RESOURCE_NETWORK_INSTANCES: '/net-instances',
}
Loading