Push events for when virtual components are added and removed #34

Closed
opened 2025-08-11 10:08:52 +00:00 by Ponali · 1 comment
Ponali commented 2025-08-11 10:08:52 +00:00 (Migrated from github.com)

Let's say that Driver A virtually converts components from type A, to type B, and Driver B virtually converts components from type B to type C, and a component of type A (with id abc) gets inserted into the computer.

Driver A receives a real event going like this: [component_added, abc, typeA]. It contructs its own proxy that behaves like a type B proxy, and makes a type B virtual component from it.

Driver B, on the other hand, does not receive any event like [component_added, abc, typeB]. It doesn't know that the virtual component has been created, so it doesn't convert the virtual component from type B to type C.

A practical standpoint would have type A be tape_drive, type B be drive (unmanaged drive), and type C be filesystem (managed drive).

There needs to be an event pushed when adding/removing a virtual component, so that inserting a component can be virtually converted to one type, then again converted to another.
It would also be nice for these events to use traditional component_added and component_removed events, but have something like true at the 4th argument to indicate that the component that has been added is virtual.

Let's say that Driver A virtually converts components from type A, to type B, and Driver B virtually converts components from type B to type C, and a component of type A (with id `abc`) gets inserted into the computer. Driver A receives a real event going like this: [`component_added`, `abc`, `typeA`]. It contructs its own proxy that behaves like a type B proxy, and makes a type B virtual component from it. Driver B, on the other hand, does *not* receive any event like [`component_added`, `abc`, `typeB`]. It doesn't know that the virtual component has been created, so it doesn't convert the virtual component from type B to type C. A practical standpoint would have type A be `tape_drive`, type B be `drive` (unmanaged drive), and type C be `filesystem` (managed drive). There needs to be an event pushed when adding/removing a virtual component, so that inserting a component can be virtually converted to one type, then again converted to another. It would also be nice for these events to use traditional `component_added` and `component_removed` events, but have something like `true` at the 4th argument to indicate that the component that has been added is virtual.
WahPlus commented 2026-06-15 16:32:11 +00:00 (Migrated from github.com)

Fixed in b139e2da01

Fixed in b139e2da01b6c99278b281a92c816c17167b27fc
Sign in to join this conversation.