Commit 8cf56de5 authored by Waleed Akbar's avatar Waleed Akbar
Browse files

Add NETCONF pluggable device driver and improve unsubscribe logging

parent 0ed903a6
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -255,6 +255,7 @@ enum DeviceDriverEnum {
  DEVICEDRIVER_GNMI_NOKIA_SRLINUX = 19;
  DEVICEDRIVER_OPENROADM = 20;
  DEVICEDRIVER_RESTCONF_OPENCONFIG = 21;
  DEVICEDRIVER_NETCONF_OC_PLUGGABLE = 22;
}

enum DeviceOperationalStatusEnum {
+6 −3
Original line number Diff line number Diff line
@@ -223,10 +223,13 @@ class TelemetryBackendService(GenericGrpcService):
                if stop_event:
                    stop_event.set()
                    LOGGER.info(f"Job {job_id} terminated.")
                    if self.device_collector is not None:
                        if self.device_collector.UnsubscribeState(job_id):
                            LOGGER.info(f"Unsubscribed from collector: {job_id}")
                        else:
                            LOGGER.warning(f"Failed to unsubscribe from collector: {job_id}")
                    else:
                        LOGGER.warning(f"No device collector found to unsubscribe for job: {job_id}. Collector object is None.")
                else:
                    LOGGER.warning(f"Job {job_id} not found in active jobs.")
        except:
+1 −1
Original line number Diff line number Diff line
@@ -64,7 +64,7 @@ if LOAD_ALL_DEVICE_DRIVERS:
            {
                # Pluggable host devices (packet-router with NETCONF/OpenConfig driver)
                FilterFieldEnum.DEVICE_TYPE: DeviceTypeEnum.PACKET_ROUTER,
                FilterFieldEnum.DRIVER     : DeviceDriverEnum.DEVICEDRIVER_OPENCONFIG,
                FilterFieldEnum.DRIVER     : DeviceDriverEnum.DEVICEDRIVER_NETCONF_OC_PLUGGABLE,
            }
        ])
    )