Merge lp:~andreserl/maas/lp1073462_fence_cdu_power_type into lp:~maas-committers/maas/trunk
Proposed by
Andres Rodriguez
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Raphaël Badin | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 1410 | ||||
Proposed branch: | lp:~andreserl/maas/lp1073462_fence_cdu_power_type | ||||
Merge into: | lp:~maas-committers/maas/trunk | ||||
Diff against target: |
148 lines (+93/-0) 5 files modified
src/maasserver/models/node.py (+1/-0) src/maasserver/power_parameters.py (+20/-0) src/provisioningserver/enum.py (+4/-0) src/provisioningserver/power/templates/fence_cdu.template (+54/-0) src/provisioningserver/power/tests/test_poweraction.py (+14/-0) |
||||
To merge this branch: | bzr merge lp:~andreserl/maas/lp1073462_fence_cdu_power_type | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jeroen T. Vermeulen (community) | Approve | ||
Review via email: mp+140504@code.launchpad.net |
Commit message
Add fence_cdu power type for SentrySwitch CDU's.
To post a comment you must log in.
Looks very nice.
Two small notes:
1. In python, when we have to line-break the arguments to a function call, we start doing so right after the opening parenthesis, so that the arguments start on a line of their own.
So instead of:
call_ function( one_argument,
another_ argument, final_argument)
...we say:
call_function(
one_argument, another_argument,
final_ argument)
2. It would be nice if the test explained (in a comment, doesn't need to be very long) how the error condition happens. As I understand it, you substitute "echo" for the power command, and when that command gets called, you get something that isn't recognized as a power state.
I think I probably did this myself at some point. But reading it back now, I realize it's not obvious. So for the sake of whoever maintains the code next, it would be helpful to point out this subtlety.
Jeroen