sdague / amt

Python tools for interacting with Intel's AMT hardware control interfaces
Apache License 2.0
63 stars 30 forks source link

Feature request: support graceful power off and reboot #21

Open chenl opened 7 years ago

chenl commented 7 years ago

I read on https://software.intel.com/en-us/articles/intel-active-management-technology-start-here-guide-intel-amt-9 that there are several "new" power state codes. I tried to use these codes with this package to send graceful off and graceful reset (specifically codes 12 - graceful shutdown, and 14 - graceful reset), but instead I get this XML into my std out:

(I apologise in advance for pasting XML)

<?xml version="1.0" ?>
<a:Envelope xmlns:a="http://www.w3.org/2003/05/soap-envelope" xmlns:b="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:c="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd" xmlns:d="http://schemas.xmlsoap.org/ws/2005/02/trust" xmlns:e="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:f="http://schemas.dmtf.org/wbem/wsman/1/cimbinding.xsd" xmlns:g="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_PowerManagementService" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <a:Header>
    <b:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</b:To>
    <b:RelatesTo>uuid:05202c7a-dd61-4a1a-96e3-246359a58410</b:RelatesTo>
    <b:Action a:mustUnderstand="true">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_PowerManagementService/RequestPowerStateChangeResponse</b:Action>
    <b:MessageID>uuid:00000000-8086-8086-8086-000000000216</b:MessageID>
    <c:ResourceURI>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_PowerManagementService</c:ResourceURI>
  </a:Header>
  <a:Body>
    <g:RequestPowerStateChange_OUTPUT>
      <g:ReturnValue>2</g:ReturnValue>
    </g:RequestPowerStateChange_OUTPUT>
  </a:Body>
</a:Envelope>
onkelbeh commented 2 years ago

Tried the same, Doku says:

6) The method returns 'Unknown or Unspecified Error' (2) if the requested PowerState parameter is not supported. In Intel AMT Release 5.0 and earlier releases the method used to return 'NOT_SUPPORTED' (1).

onkelbeh commented 2 years ago

Found an (extended) fork: https://github.com/nomis/intel-amt, with soft-off and SSL support