Loading src/context/service/ContextServiceServicerImpl.py +1 −3 Original line number Diff line number Diff line Loading @@ -124,9 +124,7 @@ class ContextServiceServicerImpl(ContextServiceServicer, ContextPolicyServiceSer @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def ListDevices(self, request : Empty, context : grpc.ServicerContext) -> DeviceList: devices = device_list_objs(self.db_engine) LOGGER.info('DEVICES: {:s}'.format(str(devices))) return DeviceList(devices=devices) return device_list_objs(self.db_engine) @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def GetDevice(self, request : ContextId, context : grpc.ServicerContext) -> Device: Loading src/context/service/database/Device.py +1 −0 Original line number Diff line number Diff line Loading @@ -64,6 +64,7 @@ def device_get(db_engine : Engine, request : DeviceId) -> Device: obj : Optional[DeviceModel] = session.query(DeviceModel)\ .options(selectinload(DeviceModel.endpoints))\ .options(selectinload(DeviceModel.config_rules))\ .options(selectinload(DeviceModel.components))\ .filter_by(device_uuid=device_uuid).one_or_none() return None if obj is None else obj.dump() obj = run_transaction(sessionmaker(bind=db_engine), callback) Loading src/device/service/drivers/openconfig/templates/Namespace.py +1 −1 File changed.Contains only whitespace changes. Show changes Loading
src/context/service/ContextServiceServicerImpl.py +1 −3 Original line number Diff line number Diff line Loading @@ -124,9 +124,7 @@ class ContextServiceServicerImpl(ContextServiceServicer, ContextPolicyServiceSer @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def ListDevices(self, request : Empty, context : grpc.ServicerContext) -> DeviceList: devices = device_list_objs(self.db_engine) LOGGER.info('DEVICES: {:s}'.format(str(devices))) return DeviceList(devices=devices) return device_list_objs(self.db_engine) @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def GetDevice(self, request : ContextId, context : grpc.ServicerContext) -> Device: Loading
src/context/service/database/Device.py +1 −0 Original line number Diff line number Diff line Loading @@ -64,6 +64,7 @@ def device_get(db_engine : Engine, request : DeviceId) -> Device: obj : Optional[DeviceModel] = session.query(DeviceModel)\ .options(selectinload(DeviceModel.endpoints))\ .options(selectinload(DeviceModel.config_rules))\ .options(selectinload(DeviceModel.components))\ .filter_by(device_uuid=device_uuid).one_or_none() return None if obj is None else obj.dump() obj = run_transaction(sessionmaker(bind=db_engine), callback) Loading
src/device/service/drivers/openconfig/templates/Namespace.py +1 −1 File changed.Contains only whitespace changes. Show changes