Commit e3b5b066 authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

Service component:

- Handle NCE controller
- Allow hierarchy of underlay controllers
parent fa494a92
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -59,12 +59,14 @@ CONTROLLER_DEVICE_TYPES = {
    DeviceTypeEnum.IETF_SLICE,
    DeviceTypeEnum.IP_SDN_CONTROLLER,
    DeviceTypeEnum.MICROWAVE_RADIO_SYSTEM,
    DeviceTypeEnum.NCE,
    DeviceTypeEnum.OPEN_LINE_SYSTEM,
    DeviceTypeEnum.OPENFLOW_RYU_CONTROLLER,
    DeviceTypeEnum.TERAFLOWSDN_CONTROLLER,
}
EXPANSION_CONTROLLER_DEVICE_TYPES = {
    DeviceTypeEnum.IETF_SLICE,
    DeviceTypeEnum.NCE,
    DeviceTypeEnum.OPENFLOW_RYU_CONTROLLER,
}

@@ -274,9 +276,12 @@ class TaskExecutor:
        controller_uuid = device.controller_id.device_uuid.uuid
        if len(controller_uuid) == 0: return None
        controller = self.get_device(DeviceId(**json_device_id(controller_uuid)))
        controller_uuid = controller.device_id.device_uuid.uuid
        if controller is None: raise Exception('Device({:s}) not found'.format(str(controller_uuid)))
        if len(controller.controller_id.device_uuid.uuid) == 0:
            return controller
        else:
            # in case controller is an under-underlay controller
            return self.get_device_controller(controller)

    def get_devices_from_connection(
        self, connection : Connection, exclude_managed_by_controller : bool = False