Helper classes: lifecycle hooks and access pattern

good point, I missed that.

Should helpers have _on_stop() hooks even without being full capabilities?

definitely, 100%. Simple oversight

yes driver should be a public attribute for sure

I considered this, but ran into some problems:

  • which object should own these subsystems that are not capabilities: Device or Driver?
  • I don’t like Device owning universal capabilities on the one hand, and subsystems (necessarily device specific) on the other hand. Driver is naturally specific to a device
  • I think the Device functionaries should be accessed through either capabilities or drivers. Device.do_something really mixes the responsibilities. I think Device should only manage its resource model, capabilities and its driver.