Merge lp://staging/~andreserl/maas/fix_ipmi_lp1234880_trunk into lp://staging/~maas-committers/maas/trunk

Proposed by Andres Rodriguez
Status: Merged
Approved by: Andres Rodriguez
Approved revision: no longer in the source branch.
Merged at revision: 1726
Proposed branch: lp://staging/~andreserl/maas/fix_ipmi_lp1234880_trunk
Merge into: lp://staging/~maas-committers/maas/trunk
Diff against target: 77 lines (+23/-9)
2 files modified
etc/maas/templates/commissioning-user-data/snippets/maas_ipmi_autodetect.py (+20/-7)
etc/maas/templates/commissioning-user-data/snippets/maas_signal.py (+3/-2)
To merge this branch: bzr merge lp://staging/~andreserl/maas/fix_ipmi_lp1234880_trunk
Reviewer Review Type Date Requested Status
Julian Edwards (community) Approve
Review via email: mp+192614@code.staging.launchpad.net

Commit message

Fix ipmi version autodetection

To post a comment you must log in.
Revision history for this message
Julian Edwards (julian-edwards) wrote :

30 +def get_ipmi_version():
31 + (status, output) = commands.getstatusoutput('ipmi-locate')
32 + show_re = re.compile('(IPMI\ Version:) (\d\.\d)')
33 + res = show_re.search(output)
34 + return res.group(2)

If getstatusoutput fails or ipmi-locate fails to find anything here, then the "res" object is None and you'll blow up calling group(2).

review: Needs Fixing
Revision history for this message
Andres Rodriguez (andreserl) wrote :

Done!

Revision history for this message
Julian Edwards (julian-edwards) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.