Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow dynamic instances of non-hotplug plugins #735

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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).

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