If you do an uninstall on the ZenPack it leaves components on the device. If you click on a component a ribbon error is displayed. The template also remains on the system.
Thanks for the report. I can easily replicate this. This kind of thing isn't a problem in most ZenPacks because they deliver their own device class which gets completely removed including any included devices if you remove the ZenPack. Because the RabbitMQ ZenPack just adds modeler plugins and monitoring templates to existing device classes, it doesn't benefit from the automatic cleanup.
Explicit cleanup needs to be added to the ZenPack's remove method.
Would inheriting ZenPackPersistence on the component classes work here at all? Wouldn't that clean up the components on uninstall?
I wasn't sure on the answer to that so I made inherited from ZenPackPersistence in RabbitMQComponent and implemented the contract. A quick test seems to indicate that it doesn't work. I haven't dug into why yet.
I looked around at some other analogous ZenPacks. Looks like the community RDBMS ZenPack removes all components properly when being uninstalled. Its remove() in __init__.py isn't very different than what is in the RabbtiMQ ZenPack - except that the components there are a relation to OperatingSystem, rather than Device.
Remove RabbitMQ components on ZenPack removal.