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

powerman: use singlet script if targeting one plug #170

Merged
merged 3 commits into from
Apr 4, 2024

Conversation

chu11
Copy link
Member

@chu11 chu11 commented Apr 3, 2024

Problem: When selecting a script to use for an action (i.e. power on) powerman may select the "all" or "ranged" script if they are available. This is done even if a single plug is targeted. There is nothing wrong with this, but may not be what users expect.

If the user is specifically targeting only one plug, select the singlet script over any other script.

Problem: When selecting a script to use for an action (i.e.  power on)
powerman may select the "all" or "ranged" script if they are available.
This is done even if a single plug is targeted.  There is nothing wrong
with this, but may not be what users expect.

If the user is specifically targeting only one plug, select the
singlet script over any other script.
Problem: The vpcd simulator does not support "ranged" scripts, which
limits its use in testing.

Add "ranged" script support in vpcd and at ranged scripts in vpc.dev.
Problem: There are no tests to ensure singlet vs ranged vs all scripts
are correctly chosen from a device file.

Modify / add tests via t0006-on-off-cycle.t.
@chu11
Copy link
Member Author

chu11 commented Apr 3, 2024

FYI based on conversation in #168

Copy link
Member

@garlick garlick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@mergify mergify bot merged commit 74d7f43 into chaos:master Apr 4, 2024
8 checks passed
@chu11 chu11 deleted the powerman_script_selection branch April 4, 2024 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants