Merge lp:~andreserl/maas/maas_ipmi_autodetection into lp:maas/trunk
| Status: | Merged |
|---|---|
| Approved by: | Andres Rodriguez on 2012-10-04 |
| Approved revision: | 1157 |
| Merged at revision: | 1157 |
| Proposed branch: | lp:~andreserl/maas/maas_ipmi_autodetection |
| Merge into: | lp:maas/trunk |
| Diff against target: |
242 lines (+166/-1) 1 file modified
etc/maas/commissioning-user-data (+166/-1) |
| To merge this branch: | bzr merge lp:~andreserl/maas/maas_ipmi_autodetection |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Scott Moser | Approve on 2012-10-04 | ||
| Julian Edwards (community) | 2012-10-04 | Approve on 2012-10-04 | |
|
Review via email:
|
|||
Commit Message
IPMI autodetection during commissioning
| Julian Edwards (julian-edwards) wrote : | # |
>Other thing is less severe, but more stlylish.
>put the actual stuff you're doing in the 'main' routine.
>
>rather than outside (aptget, loadmodules)...
Andres is doing it correctly IMO. Refactoring into small, well-defined functions makes debugging easier, testing easier and writing easier.
Alas, there are no tests. How can I convince you guys to write tests?
| Scott Moser (smoser) wrote : | # |
I'm not saying there should not be functions. but that they should be called from main.
On Oct 3, 2012, at 8:44 PM, Julian Edwards <email address hidden> wrote:
>> Other thing is less severe, but more stlylish.
>> put the actual stuff you're doing in the 'main' routine.
>>
>> rather than outside (aptget, loadmodules)...
>
> Andres is doing it correctly IMO. Refactoring into small, well-defined functions makes debugging easier, testing easier and writing easier.
>
> Alas, there are no tests. How can I convince you guys to write tests?
> --
> https:/
> You are reviewing the proposed merge of lp:~andreserl/maas/maas_ipmi_autodetection into lp:maas.
>
- 1157. By Andres Rodriguez on 2012-10-04
-
Address recommendations by smoser
| Julian Edwards (julian-edwards) wrote : | # |
<roaksoax> bigjools: I addressed smoser's suggedstions, could you please :)? https:/
<bigjools> roaksoax: you might as well land it, I'll approve. It's hard to make suggestions at this stage because anything I would change would be quite substantial I think. I don't want to block you.


48 + fargs=" --power- type=ipmi --power- parameters= $power_ settings" autodetect] "
49 + signal $fargs WORKING "finished [maas-ipmi-
That is wrong.
shell will incorrectly expand that to not do what you want on line 49 (plus, its up for shell expansion).
Correct way is:
signal "--power-type=ipmi" "--power- parameters= ${power_ settings} " WORKING "finished [maas-ipmi- autodetect] "
Other thing is less severe, but more stlylish.
put the actual stuff you're doing in the 'main' routine.
rather than outside (aptget, loadmodules)...