Skip to content

Conversation

@adriaan42
Copy link
Contributor

Split off #628 for easier review and discussion.

This removes the checks for "is the plugin of type hotplug.Plugin" from instance_create and instance_destroy, while keeping the rest of the code in controller.py as-is. To do this, some of the device related methods need noop-implementations in base.Plugin.

Notes:

  • base.Plugin seems to implement some device methods with actual logic (assign_free_devices, release_devices, _run_for_each_device, _call_device_script, _*_device_commands). Why are those not in hotplug.Plugin?
  • In create_instance, we could add checking and warnings if the user creates a base.Plugin instance and sets the devices= or devices_udev_regex= options. At the moment these options would be ignored silently (which is also ok I guess).

@adriaan42 adriaan42 force-pushed the adriaan/dynamic-non-device-plugin-instances branch from b4c28f6 to 0c9446e Compare February 28, 2025 07:45
@adriaan42 adriaan42 force-pushed the adriaan/dynamic-non-device-plugin-instances branch from 4ccee1f to 1c81bc0 Compare March 10, 2025 07:24
@adriaan42 adriaan42 force-pushed the adriaan/dynamic-non-device-plugin-instances branch from 1c81bc0 to 21bc0b4 Compare May 27, 2025 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant