Merge lp://staging/~allenap/maas/xml-as-bytes--bug-1570609 into lp://staging/~maas-committers/maas/trunk

Proposed by Gavin Panella
Status: Merged
Approved by: Gavin Panella
Approved revision: no longer in the source branch.
Merged at revision: 4926
Proposed branch: lp://staging/~allenap/maas/xml-as-bytes--bug-1570609
Merge into: lp://staging/~maas-committers/maas/trunk
Diff against target: 211 lines (+40/-27)
2 files modified
src/provisioningserver/drivers/power/amt.py (+28/-14)
src/provisioningserver/drivers/power/tests/test_amt.py (+12/-13)
To merge this branch: bzr merge lp://staging/~allenap/maas/xml-as-bytes--bug-1570609
Reviewer Review Type Date Requested Status
Mike Pontillo (community) Approve
Andres Rodriguez (community) Approve
Blake Rouse Pending
Review via email: mp+292012@code.staging.launchpad.net

Commit message

Use @typed to untangle bytes/str problems in the AMT driver.

This ensures that XML output from wsman is parsed as bytes directly from source without any intermediate conversions.

To post a comment you must log in.
Revision history for this message
Andres Rodriguez (andreserl) wrote :

seems to be working for me. I just want to make sure Blake tests in his older NUC's that use amttool instead. So let's have blake test this branch too please!

review: Approve
Revision history for this message
Mike Pontillo (mpontillo) wrote :

Ah, I totally missed that you already did this branch. Nice job. I can test it quickly as I think my NUCs still use amttool.

Revision history for this message
Mike Pontillo (mpontillo) wrote :

I tested with AMT version 8.1.57 as follows:

In [1]: import provisioningserver.drivers.power.amt as amt
In [2]: driver = amt.AMTPowerDriver()
In [3]: driver.power_off(None, {'ip_address': '172.16.100.251', 'power_pass': 'xxx'})
In [4]: driver.power_on(None, {'ip_address': '172.16.100.251', 'power_pass': 'xxx', 'boot_mode': 'local'})
In [9]: driver.power_query(None, {'ip_address': '172.16.100.251', 'power_pass': 'xxx', 'boot_mode': 'local'})
Out[9]: 'on'

I visually verified that it worked.

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.