about complex method invoke using wsmancli

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

about complex method invoke using wsmancli

Andy Zhao
Greetings expert,
  Recently I'm trying to use wsman cli to remotely control power up/down on Intel AMT workstation. There's a class named CIM_PowerManagementService in charge of this and the method name is RequestPowerStateChange.
  It seems that a simple "wsman invoke *** -a RequestPowerStateChange -k PowerState=2" will do, but there's extra key value pair required, according to MOF of CIM_PowerManagementService:
  "RequestPowerStateChange defines the desired power state "
          "of the managed element, and when the element should be "
          "put into that state. The RequestPowerStateChange method "
          "has five input parameters and a result code. \n"
          "- PowerState indicates the desired power state. \n"
          "- ManagedElement indicates the element whose state is "
          "set. This element SHOULD be associated to the service "
          "using the AssociatedPowerManagementService relationship. \n"
          "- Time indicates when the power state should be set, "
          "either as a regular date-time value or as an interval "
          "value (where the interval begins when the method "
          "invocation is received). \n"


 This may mean that I need an extra key "ManagedElement", which is defined as CIM_ManagedElement REF in MOF file. So could you suggest how to include this key value pair in wsmancli invoke? I'm now able to obtain it via enumerate but its in xml format:
<h:ServiceProvided>
            <b:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</b:Address>
            <b:ReferenceParameters>
              <c:ResourceURI>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_PowerManagementService</c:ResourceURI>
              <c:SelectorSet>
                <c:Selector Name="CreationClassName">CIM_PowerManagementService</c:Selector>
                <c:Selector Name="Name">Intel(r) AMT Power Management Service</c:Selector>
                <c:Selector Name="SystemCreationClassName">CIM_ComputerSystem</c:Selector>
                <c:Selector Name="SystemName">Intel(r) AMT</c:Selector>
              </c:SelectorSet>
            </b:ReferenceParameters>
          </h:ServiceProvided>



BR,
Andy


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
Openwsman-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openwsman-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: about complex method invoke using wsmancli

Tan, Lin

Hi Andy,

 

Use this one:

wsman invoke *** -a RequestPowerStateChange -k PowerState=2 –J power_on.xml

 

power_on.xml:

<p:RequestPowerStateChange_INPUT xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_Pow

erManagementService">        

  <p:PowerState>2</p:PowerState>       

  <p:ManagedElement>  

   <a:Address xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/

ws/2004/08/addressing/role/anonymous</a:Address>        

   <a:ReferenceParameters xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:w="http:/

/schemas.dmtf.org/wbem/wsman/1/wsman.xsd">     

    <w:ResourceURI>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem</w:ResourceU

RI>  

    <w:SelectorSet>  

     <w:Selector Name="Name">ManagedSystem</w:Selector>   

    </w:SelectorSet>

   </a:ReferenceParameters>

  </p:ManagedElement>

</p:RequestPowerStateChange_INPUT>

 

Tan

 

From: Andy Zhao [mailto:[hidden email]]
Sent: Friday, December 5, 2014 6:44 PM
To: [hidden email]
Subject: [Openwsman-devel] about complex method invoke using wsmancli

 

Greetings expert,
  Recently I'm trying to use wsman cli to remotely control power up/down on Intel AMT workstation. There's a class named CIM_PowerManagementService in charge of this and the method name is RequestPowerStateChange.
  It seems that a simple "wsman invoke *** -a RequestPowerStateChange -k PowerState=2" will do, but there's extra key value pair required, according to MOF of CIM_PowerManagementService:
  "RequestPowerStateChange defines the desired power state "
          "of the managed element, and when the element should be "
          "put into that state. The RequestPowerStateChange method "
          "has five input parameters and a result code. \n"
          "- PowerState indicates the desired power state. \n"
          "- ManagedElement indicates the element whose state is "
          "set. This element SHOULD be associated to the service "
          "using the AssociatedPowerManagementService relationship. \n"
          "- Time indicates when the power state should be set, "
          "either as a regular date-time value or as an interval "
          "value (where the interval begins when the method "
          "invocation is received). \n"


 This may mean that I need an extra key "ManagedElement", which is defined as CIM_ManagedElement REF in MOF file. So could you suggest how to include this key value pair in wsmancli invoke? I'm now able to obtain it via enumerate but its in xml format:
<h:ServiceProvided>
            <b:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</b:Address>
            <b:ReferenceParameters>
              <c:ResourceURI>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_PowerManagementService</c:ResourceURI>
              <c:SelectorSet>
                <c:Selector Name="CreationClassName">CIM_PowerManagementService</c:Selector>
                <c:Selector Name="Name">Intel(r) AMT Power Management Service</c:Selector>
                <c:Selector Name="SystemCreationClassName">CIM_ComputerSystem</c:Selector>
                <c:Selector Name="SystemName">Intel(r) AMT</c:Selector>
              </c:SelectorSet>
            </b:ReferenceParameters>
          </h:ServiceProvided>


BR,
Andy


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
Openwsman-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openwsman-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: about complex method invoke using wsmancli

Andy Zhao
Many thanks Tan. btw have you got any docs or links about whether/how to use "-J" arg in CLI while operating AMT via wsman? This invoke seems quite different from ones on google, which carry no -J arg.


BR,
Andy


---- On Sat, 06 Dec 2014 13:16:54 +0800 Lin Tan <[hidden email]> wrote ----

Hi Andy,

 

Use this one:

wsman invoke *** -a RequestPowerStateChange -k PowerState=2 –J power_on.xml

 

power_on.xml:

<p:RequestPowerStateChange_INPUT xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_Pow

erManagementService">        

  <p:PowerState>2</p:PowerState>       

  <p:ManagedElement>  

   <a:Address xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/

ws/2004/08/addressing/role/anonymous</a:Address>        

   <a:ReferenceParameters xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:w="http:/

/schemas.dmtf.org/wbem/wsman/1/wsman.xsd">     

    <w:ResourceURI>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem</w:ResourceU

RI>  

    <w:SelectorSet>  

     <w:Selector Name="Name">ManagedSystem</w:Selector>   

    </w:SelectorSet>

   </a:ReferenceParameters>

  </p:ManagedElement>

</p:RequestPowerStateChange_INPUT>

 

Tan

 

From: Andy Zhao [mailto:[hidden email]]
Sent: Friday, December 5, 2014 6:44 PM
To: [hidden email]
Subject: [Openwsman-devel] about complex method invoke using wsmancli

 

Greetings expert,
  Recently I'm trying to use wsman cli to remotely control power up/down on Intel AMT workstation. There's a class named CIM_PowerManagementService in charge of this and the method name is RequestPowerStateChange.
  It seems that a simple "wsman invoke *** -a RequestPowerStateChange -k PowerState=2" will do, but there's extra key value pair required, according to MOF of CIM_PowerManagementService:
  "RequestPowerStateChange defines the desired power state "
          "of the managed element, and when the element should be "
          "put into that state. The RequestPowerStateChange method "
          "has five input parameters and a result code. \n"
          "- PowerState indicates the desired power state. \n"
          "- ManagedElement indicates the element whose state is "
          "set. This element SHOULD be associated to the service "
          "using the AssociatedPowerManagementService relationship. \n"
          "- Time indicates when the power state should be set, "
          "either as a regular date-time value or as an interval "
          "value (where the interval begins when the method "
          "invocation is received). \n"


 This may mean that I need an extra key "ManagedElement", which is defined as CIM_ManagedElement REF in MOF file. So could you suggest how to include this key value pair in wsmancli invoke? I'm now able to obtain it via enumerate but its in xml format:
<h:ServiceProvided>
            <b:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</b:Address>
            <b:ReferenceParameters>
              <c:ResourceURI>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_PowerManagementService</c:ResourceURI>
              <c:SelectorSet>
                <c:Selector Name="CreationClassName">CIM_PowerManagementService</c:Selector>
                <c:Selector Name="Name">Intel(r) AMT Power Management Service</c:Selector>
                <c:Selector Name="SystemCreationClassName">CIM_ComputerSystem</c:Selector>
                <c:Selector Name="SystemName">Intel(r) AMT</c:Selector>
              </c:SelectorSet>
            </b:ReferenceParameters>
          </h:ServiceProvided>


BR,
Andy




------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
Openwsman-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openwsman-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: about complex method invoke using wsmancli

Tan, Lin

wsman invoke *** -a RequestPowerStateChange J power_on.xml

This should be correct.  For AMT, you should follow AMT_Implementation_and_reference_guide

https://software.intel.com/sites/manageability/AMT_Implementation_and_Reference_Guide/default.htm?turl=WordDocuments%2Fsupportforwsmanagementinintelamt.htm

But no specific docs about how to use AMT via wsman.

I know this is because I recently working on integrated AMT into OpenStack.

 

From: Andy Zhao [mailto:[hidden email]]
Sent: Tuesday, December 9, 2014 10:13 AM
To: Tan, Lin
Cc: [hidden email]
Subject: Re: RE: [Openwsman-devel] about complex method invoke using wsmancli

 

Many thanks Tan. btw have you got any docs or links about whether/how to use "-J" arg in CLI while operating AMT via wsman? This invoke seems quite different from ones on google, which carry no -J arg.


BR,
Andy

 

---- On Sat, 06 Dec 2014 13:16:54 +0800 Lin Tan <[hidden email]> wrote ----

Hi Andy,

 

Use this one:

wsman invoke *** -a RequestPowerStateChange -k PowerState=2 J power_on.xml

 

power_on.xml:

<p:RequestPowerStateChange_INPUT xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_Pow

erManagementService">        

  <p:PowerState>2</p:PowerState>       

  <p:ManagedElement>  

   <a:Address xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/

ws/2004/08/addressing/role/anonymous</a:Address>        

   <a:ReferenceParameters xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:w="http:/

/schemas.dmtf.org/wbem/wsman/1/wsman.xsd">     

    <w:ResourceURI>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem</w:ResourceU

RI>  

    <w:SelectorSet>  

     <w:Selector Name="Name">ManagedSystem</w:Selector>   

    </w:SelectorSet>

   </a:ReferenceParameters>

  </p:ManagedElement>

</p:RequestPowerStateChange_INPUT>

 

Tan

 

From: Andy Zhao [[hidden email]]
Sent: Friday, December 5, 2014 6:44 PM
To: [hidden email]
Subject: [Openwsman-devel] about complex method invoke using wsmancli

 

Greetings expert,
  Recently I'm trying to use wsman cli to remotely control power up/down on Intel AMT workstation. There's a class named CIM_PowerManagementService in charge of this and the method name is RequestPowerStateChange.
  It seems that a simple "wsman invoke *** -a RequestPowerStateChange -k PowerState=2" will do, but there's extra key value pair required, according to MOF of CIM_PowerManagementService:
  "RequestPowerStateChange defines the desired power state "
          "of the managed element, and when the element should be "
          "put into that state. The RequestPowerStateChange method "
          "has five input parameters and a result code. \n"
          "- PowerState indicates the desired power state. \n"
          "- ManagedElement indicates the element whose state is "
          "set. This element SHOULD be associated to the service "
          "using the AssociatedPowerManagementService relationship. \n"
          "- Time indicates when the power state should be set, "
          "either as a regular date-time value or as an interval "
          "value (where the interval begins when the method "
          "invocation is received). \n"


 This may mean that I need an extra key "ManagedElement", which is defined as CIM_ManagedElement REF in MOF file. So could you suggest how to include this key value pair in wsmancli invoke? I'm now able to obtain it via enumerate but its in xml format:
<h:ServiceProvided>
            <b:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</b:Address>
            <b:ReferenceParameters>
              <c:ResourceURI>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_PowerManagementService</c:ResourceURI>
              <c:SelectorSet>
                <c:Selector Name="CreationClassName">CIM_PowerManagementService</c:Selector>
                <c:Selector Name="Name">Intel(r) AMT Power Management Service</c:Selector>
                <c:Selector Name="SystemCreationClassName">CIM_ComputerSystem</c:Selector>
                <c:Selector Name="SystemName">Intel(r) AMT</c:Selector>
              </c:SelectorSet>
            </b:ReferenceParameters>
          </h:ServiceProvided>


BR,
Andy

 

 


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
Openwsman-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openwsman-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: about complex method invoke using wsmancli

Andy Zhao
Appreciate for your prompt reply. But it seems i just got a "2" return value which means "unknown error":

redarrow ODW [:~] 1026$ wsman *** invoke http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_PowerManagementService -a RequestPowerStateChange -k "PowerState=2" -J power_on.xml
<?xml version="1.0" encoding="UTF-8"?>
<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:20e27f99-09bf-19bf-8002-497829c1d3a0</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-000000000001</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>


Here's power_on.xml:

<p:RequestPowerStateChange_INPUT xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_PowerManagementService
">       
  <p:PowerState>2</p:PowerState>      
  <p:ManagedElement> 
   <a:Address xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/address
ing/role/anonymous</a:Address>       
   <a:ReferenceParameters xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:w="http://schemas.dmtf.org/
wbem/wsman/1/wsman.xsd">    
    <w:ResourceURI>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem</w:ResourceURI> 
    <w:SelectorSet> 
     <w:Selector Name="Name">ManagedSystem</w:Selector>  
    </w:SelectorSet>
   </a:ReferenceParameters>
  </p:ManagedElement>
</p:RequestPowerStateChange_INPUT>

Could you do me the last favor and look into what happened here? I've attached enumeration log of CIM_PowerManagementService.


---- On Tue, 09 Dec 2014 10:41:52 +0800 Tan<[hidden email]> wrote ----

wsman invoke *** -a RequestPowerStateChange J power_on.xml

This should be correct.  For AMT, you should follow AMT_Implementation_and_reference_guide

https://software.intel.com/sites/manageability/AMT_Implementation_and_Reference_Guide/default.htm?turl=WordDocuments/supportforwsmanagementinintelamt.htm

But no specific docs about how to use AMT via wsman.

I know this is because I recently working on integrated AMT into OpenStack.

 

From: Andy Zhao [mailto:[hidden email]]
Sent: Tuesday, December 9, 2014 10:13 AM
To: Tan, Lin
Cc: [hidden email]
Subject: Re: RE: [Openwsman-devel] about complex method invoke using wsmancli

 

Many thanks Tan. btw have you got any docs or links about whether/how to use "-J" arg in CLI while operating AMT via wsman? This invoke seems quite different from ones on google, which carry no -J arg.


BR,
Andy

 

---- On Sat, 06 Dec 2014 13:16:54 +0800 Lin Tan <[hidden email]> wrote ----

Hi Andy,

 

Use this one:

wsman invoke *** -a RequestPowerStateChange -k PowerState=2 J power_on.xml

 

power_on.xml:

<p:RequestPowerStateChange_INPUT xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_Pow

erManagementService">        

  <p:PowerState>2</p:PowerState>       

  <p:ManagedElement>  

   <a:Address xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/

ws/2004/08/addressing/role/anonymous</a:Address>        

   <a:ReferenceParameters xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:w="http:/

/schemas.dmtf.org/wbem/wsman/1/wsman.xsd">     

    <w:ResourceURI>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem</w:ResourceU

RI>  

    <w:SelectorSet>  

     <w:Selector Name="Name">ManagedSystem</w:Selector>   

    </w:SelectorSet>

   </a:ReferenceParameters>

  </p:ManagedElement>

</p:RequestPowerStateChange_INPUT>

 

Tan

 

From: Andy Zhao [[hidden email]]
Sent: Friday, December 5, 2014 6:44 PM
To: [hidden email]
Subject: [Openwsman-devel] about complex method invoke using wsmancli

 

Greetings expert,
  Recently I'm trying to use wsman cli to remotely control power up/down on Intel AMT workstation. There's a class named CIM_PowerManagementService in charge of this and the method name is RequestPowerStateChange.
  It seems that a simple "wsman invoke *** -a RequestPowerStateChange -k PowerState=2" will do, but there's extra key value pair required, according to MOF of CIM_PowerManagementService:
  "RequestPowerStateChange defines the desired power state "
          "of the managed element, and when the element should be "
          "put into that state. The RequestPowerStateChange method "
          "has five input parameters and a result code. \n"
          "- PowerState indicates the desired power state. \n"
          "- ManagedElement indicates the element whose state is "
          "set. This element SHOULD be associated to the service "
          "using the AssociatedPowerManagementService relationship. \n"
          "- Time indicates when the power state should be set, "
          "either as a regular date-time value or as an interval "
          "value (where the interval begins when the method "
          "invocation is received). \n"


 This may mean that I need an extra key "ManagedElement", which is defined as CIM_ManagedElement REF in MOF file. So could you suggest how to include this key value pair in wsmancli invoke? I'm now able to obtain it via enumerate but its in xml format:
<h:ServiceProvided>
            <b:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</b:Address>
            <b:ReferenceParameters>
              <c:ResourceURI>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_PowerManagementService</c:ResourceURI>
              <c:SelectorSet>
                <c:Selector Name="CreationClassName">CIM_PowerManagementService</c:Selector>
                <c:Selector Name="Name">Intel(r) AMT Power Management Service</c:Selector>
                <c:Selector Name="SystemCreationClassName">CIM_ComputerSystem</c:Selector>
                <c:Selector Name="SystemName">Intel(r) AMT</c:Selector>
              </c:SelectorSet>
            </b:ReferenceParameters>
          </h:ServiceProvided>


BR,
Andy

 

 




------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
Openwsman-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openwsman-devel

wsman_enum (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: about complex method invoke using wsmancli

Tan, Lin

Hi

try:

wsman *** invoke http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_PowerManagementService -a RequestPowerStateChange -J power_on.xml

without -k "PowerState=2", this is included in power_on.xml

 

Tan

From: Andy Zhao [mailto:[hidden email]]
Sent: Tuesday, December 9, 2014 11:03 AM
To: Tan, Lin
Cc: [hidden email]
Subject: RE: RE: [Openwsman-devel] about complex method invoke using wsmancli

 

Appreciate for your prompt reply. But it seems i just got a "2" return value which means "unknown error":

redarrow ODW [:~] 1026$ wsman *** invoke http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_PowerManagementService -a RequestPowerStateChange -k "PowerState=2" -J power_on.xml
<?xml version="1.0" encoding="UTF-8"?>
<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:20e27f99-09bf-19bf-8002-497829c1d3a0</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-000000000001</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>


Here's power_on.xml:

<p:RequestPowerStateChange_INPUT xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_PowerManagementService
">       
  <p:PowerState>2</p:PowerState>      
  <p:ManagedElement> 
   <a:Address xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/address
ing/role/anonymous</a:Address>       
   <a:ReferenceParameters xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:w="http://schemas.dmtf.org/
wbem/wsman/1/wsman.xsd
">    
    <w:ResourceURI>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem</w:ResourceURI
    <w:SelectorSet> 
     <w:Selector Name="Name">ManagedSystem</w:Selector>  
    </w:SelectorSet>
   </a:ReferenceParameters>
  </p:ManagedElement>
</p:RequestPowerStateChange_INPUT>

Could you do me the last favor and look into what happened here? I've attached enumeration log of CIM_PowerManagementService.

---- On Tue, 09 Dec 2014 10:41:52 +0800 Tan<[hidden email]> wrote ----

wsman invoke *** -a RequestPowerStateChange J power_on.xml

This should be correct.  For AMT, you should follow AMT_Implementation_and_reference_guide

https://software.intel.com/sites/manageability/AMT_Implementation_and_Reference_Guide/default.htm?turl=WordDocuments/supportforwsmanagementinintelamt.htm

But no specific docs about how to use AMT via wsman.

I know this is because I recently working on integrated AMT into OpenStack.

 

From: Andy Zhao [[hidden email]]
Sent: Tuesday, December 9, 2014 10:13 AM
To: Tan, Lin
Cc: [hidden email]
Subject: Re: RE: [Openwsman-devel] about complex method invoke using wsmancli

 

Many thanks Tan. btw have you got any docs or links about whether/how to use "-J" arg in CLI while operating AMT via wsman? This invoke seems quite different from ones on google, which carry no -J arg.


BR,
Andy

 

---- On Sat, 06 Dec 2014 13:16:54 +0800 Lin Tan <[hidden email]> wrote ----

Hi Andy,

 

Use this one:

wsman invoke *** -a RequestPowerStateChange -k PowerState=2 J power_on.xml

 

power_on.xml:

<p:RequestPowerStateChange_INPUT xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_Pow

erManagementService">        

  <p:PowerState>2</p:PowerState>       

  <p:ManagedElement>  

   <a:Address xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/

ws/2004/08/addressing/role/anonymous</a:Address>        

   <a:ReferenceParameters xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:w="http:/

/schemas.dmtf.org/wbem/wsman/1/wsman.xsd">     

    <w:ResourceURI>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem</w:ResourceU

RI>  

    <w:SelectorSet>  

     <w:Selector Name="Name">ManagedSystem</w:Selector>   

    </w:SelectorSet>

   </a:ReferenceParameters>

  </p:ManagedElement>

</p:RequestPowerStateChange_INPUT>

 

Tan

 

From: Andy Zhao [[hidden email]]
Sent: Friday, December 5, 2014 6:44 PM
To: [hidden email]
Subject: [Openwsman-devel] about complex method invoke using wsmancli

 

Greetings expert,
  Recently I'm trying to use wsman cli to remotely control power up/down on Intel AMT workstation. There's a class named CIM_PowerManagementService in charge of this and the method name is RequestPowerStateChange.
  It seems that a simple "wsman invoke *** -a RequestPowerStateChange -k PowerState=2" will do, but there's extra key value pair required, according to MOF of CIM_PowerManagementService:
  "RequestPowerStateChange defines the desired power state "
          "of the managed element, and when the element should be "
          "put into that state. The RequestPowerStateChange method "
          "has five input parameters and a result code. \n"
          "- PowerState indicates the desired power state. \n"
          "- ManagedElement indicates the element whose state is "
          "set. This element SHOULD be associated to the service "
          "using the AssociatedPowerManagementService relationship. \n"
          "- Time indicates when the power state should be set, "
          "either as a regular date-time value or as an interval "
          "value (where the interval begins when the method "
          "invocation is received). \n"


 This may mean that I need an extra key "ManagedElement", which is defined as CIM_ManagedElement REF in MOF file. So could you suggest how to include this key value pair in wsmancli invoke? I'm now able to obtain it via enumerate but its in xml format:
<h:ServiceProvided>
            <b:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</b:Address>
            <b:ReferenceParameters>
              <c:ResourceURI>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_PowerManagementService</c:ResourceURI>
              <c:SelectorSet>
                <c:Selector Name="CreationClassName">CIM_PowerManagementService</c:Selector>
                <c:Selector Name="Name">Intel(r) AMT Power Management Service</c:Selector>
                <c:Selector Name="SystemCreationClassName">CIM_ComputerSystem</c:Selector>
                <c:Selector Name="SystemName">Intel(r) AMT</c:Selector>
              </c:SelectorSet>
            </b:ReferenceParameters>
          </h:ServiceProvided>


BR,
Andy

 

 

 

 


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
Openwsman-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openwsman-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: about complex method invoke using wsmancli

Andy Zhao
Wow that works!!! I cant do this without your help.
So does this mean -J option should be recommended rather than -k, which sets value directly, while invoking wsman classes?


BR,
Andy


---- On Tue, 09 Dec 2014 11:14:22 +0800 Tan<[hidden email]> wrote ----

Hi

try:

wsman *** invoke http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_PowerManagementService -a RequestPowerStateChange -J power_on.xml

without -k "PowerState=2", this is included in power_on.xml

 

Tan

From: Andy Zhao [mailto:[hidden email]]
Sent: Tuesday, December 9, 2014 11:03 AM
To: Tan, Lin
Cc: [hidden email]
Subject: RE: RE: [Openwsman-devel] about complex method invoke using wsmancli

 

Appreciate for your prompt reply. But it seems i just got a "2" return value which means "unknown error":

redarrow ODW [:~] 1026$ wsman *** invoke http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_PowerManagementService -a RequestPowerStateChange -k "PowerState=2" -J power_on.xml
<?xml version="1.0" encoding="UTF-8"?>
<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:20e27f99-09bf-19bf-8002-497829c1d3a0</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-000000000001</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>


Here's power_on.xml:

<p:RequestPowerStateChange_INPUT xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_PowerManagementService
">       
  <p:PowerState>2</p:PowerState>      
  <p:ManagedElement> 
   <a:Address xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/address
ing/role/anonymous</a:Address>       
   <a:ReferenceParameters xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:w="<a href="http://schemas.dmtf.org/ wbem/wsman/1/wsman.xsd" target="_blank">http://schemas.dmtf.org/
wbem/wsman/1/wsman.xsd">    
    <w:ResourceURI>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem</w:ResourceURI> 
    <w:SelectorSet> 
     <w:Selector Name="Name">ManagedSystem</w:Selector>  
    </w:SelectorSet>
   </a:ReferenceParameters>
  </p:ManagedElement>
</p:RequestPowerStateChange_INPUT>

Could you do me the last favor and look into what happened here? I've attached enumeration log of CIM_PowerManagementService.

---- On Tue, 09 Dec 2014 10:41:52 +0800 Tan<[hidden email]> wrote ----

wsman invoke *** -a RequestPowerStateChange J power_on.xml

This should be correct.  For AMT, you should follow AMT_Implementation_and_reference_guide

https://software.intel.com/sites/manageability/AMT_Implementation_and_Reference_Guide/default.htm?turl=WordDocuments/supportforwsmanagementinintelamt.htm

But no specific docs about how to use AMT via wsman.

I know this is because I recently working on integrated AMT into OpenStack.

 

From: Andy Zhao [[hidden email]]
Sent: Tuesday, December 9, 2014 10:13 AM
To: Tan, Lin
Cc: [hidden email]
Subject: Re: RE: [Openwsman-devel] about complex method invoke using wsmancli

 

Many thanks Tan. btw have you got any docs or links about whether/how to use "-J" arg in CLI while operating AMT via wsman? This invoke seems quite different from ones on google, which carry no -J arg.


BR,
Andy

 

---- On Sat, 06 Dec 2014 13:16:54 +0800 Lin Tan <[hidden email]> wrote ----

Hi Andy,

 

Use this one:

wsman invoke *** -a RequestPowerStateChange -k PowerState=2 J power_on.xml

 

power_on.xml:

<p:RequestPowerStateChange_INPUT xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_Pow

erManagementService">        

  <p:PowerState>2</p:PowerState>       

  <p:ManagedElement>  

   <a:Address xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/

ws/2004/08/addressing/role/anonymous</a:Address>        

   <a:ReferenceParameters xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:w="http:/

/schemas.dmtf.org/wbem/wsman/1/wsman.xsd">     

    <w:ResourceURI>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem</w:ResourceU

RI>  

    <w:SelectorSet>  

     <w:Selector Name="Name">ManagedSystem</w:Selector>   

    </w:SelectorSet>

   </a:ReferenceParameters>

  </p:ManagedElement>

</p:RequestPowerStateChange_INPUT>

 

Tan

 

From: Andy Zhao [[hidden email]]
Sent: Friday, December 5, 2014 6:44 PM
To: [hidden email]
Subject: [Openwsman-devel] about complex method invoke using wsmancli

 

Greetings expert,
  Recently I'm trying to use wsman cli to remotely control power up/down on Intel AMT workstation. There's a class named CIM_PowerManagementService in charge of this and the method name is RequestPowerStateChange.
  It seems that a simple "wsman invoke *** -a RequestPowerStateChange -k PowerState=2" will do, but there's extra key value pair required, according to MOF of CIM_PowerManagementService:
  "RequestPowerStateChange defines the desired power state "
          "of the managed element, and when the element should be "
          "put into that state. The RequestPowerStateChange method "
          "has five input parameters and a result code. \n"
          "- PowerState indicates the desired power state. \n"
          "- ManagedElement indicates the element whose state is "
          "set. This element SHOULD be associated to the service "
          "using the AssociatedPowerManagementService relationship. \n"
          "- Time indicates when the power state should be set, "
          "either as a regular date-time value or as an interval "
          "value (where the interval begins when the method "
          "invocation is received). \n"


 This may mean that I need an extra key "ManagedElement", which is defined as CIM_ManagedElement REF in MOF file. So could you suggest how to include this key value pair in wsmancli invoke? I'm now able to obtain it via enumerate but its in xml format:
<h:ServiceProvided>
            <b:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</b:Address>
            <b:ReferenceParameters>
              <c:ResourceURI>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_PowerManagementService</c:ResourceURI>
              <c:SelectorSet>
                <c:Selector Name="CreationClassName">CIM_PowerManagementService</c:Selector>
                <c:Selector Name="Name">Intel(r) AMT Power Management Service</c:Selector>
                <c:Selector Name="SystemCreationClassName">CIM_ComputerSystem</c:Selector>
                <c:Selector Name="SystemName">Intel(r) AMT</c:Selector>
              </c:SelectorSet>
            </b:ReferenceParameters>
          </h:ServiceProvided>


BR,
Andy

 

 

 

 




------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
Openwsman-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openwsman-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: about complex method invoke using wsmancli

Tan, Lin

Great, glad to see it works for you.

This is depends on AMT action.

For Power ON/OFF is yes.

 

Tan

From: Andy Zhao [mailto:[hidden email]]
Sent: Tuesday, December 9, 2014 11:29 AM
To: Tan, Lin
Cc: [hidden email]
Subject: RE: RE: [Openwsman-devel] about complex method invoke using wsmancli

 

Wow that works!!! I cant do this without your help.
So does this mean -J option should be recommended rather than -k, which sets value directly, while invoking wsman classes?


BR,
Andy

 


---- On Tue, 09 Dec 2014 11:14:22 +0800 Tan<[hidden email]> wrote ----

Hi

try:

wsman *** invoke http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_PowerManagementService -a RequestPowerStateChange -J power_on.xml

without -k "PowerState=2", this is included in power_on.xml

 

Tan

From: Andy Zhao [[hidden email]]
Sent: Tuesday, December 9, 2014 11:03 AM
To: Tan, Lin
Cc: [hidden email]
Subject: RE: RE: [Openwsman-devel] about complex method invoke using wsmancli

 

Appreciate for your prompt reply. But it seems i just got a "2" return value which means "unknown error":

redarrow ODW [:~] 1026$ wsman *** invoke http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_PowerManagementService -a RequestPowerStateChange -k "PowerState=2" -J power_on.xml
<?xml version="1.0" encoding="UTF-8"?>
<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:20e27f99-09bf-19bf-8002-497829c1d3a0</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-000000000001</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>


Here's power_on.xml:

<p:RequestPowerStateChange_INPUT xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_PowerManagementService
">       
  <p:PowerState>2</p:PowerState>      
  <p:ManagedElement> 
   <a:Address xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/address
ing/role/anonymous</a:Address>       
   <a:ReferenceParameters xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:w="http://schemas.dmtf.org/
wbem/wsman/1/wsman.xsd">    
    <w:ResourceURI>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem</w:ResourceURI> 
    <w:SelectorSet> 
     <w:Selector Name="Name">ManagedSystem</w:Selector>  
    </w:SelectorSet>
   </a:ReferenceParameters>
  </p:ManagedElement>
</p:RequestPowerStateChange_INPUT>

Could you do me the last favor and look into what happened here? I've attached enumeration log of CIM_PowerManagementService.

---- On Tue, 09 Dec 2014 10:41:52 +0800 Tan<[hidden email]> wrote ----

wsman invoke *** -a RequestPowerStateChange J power_on.xml

This should be correct.  For AMT, you should follow AMT_Implementation_and_reference_guide

https://software.intel.com/sites/manageability/AMT_Implementation_and_Reference_Guide/default.htm?turl=WordDocuments/supportforwsmanagementinintelamt.htm

But no specific docs about how to use AMT via wsman.

I know this is because I recently working on integrated AMT into OpenStack.

 

From: Andy Zhao [[hidden email]]
Sent: Tuesday, December 9, 2014 10:13 AM
To: Tan, Lin
Cc: [hidden email]
Subject: Re: RE: [Openwsman-devel] about complex method invoke using wsmancli

 

Many thanks Tan. btw have you got any docs or links about whether/how to use "-J" arg in CLI while operating AMT via wsman? This invoke seems quite different from ones on google, which carry no -J arg.


BR,
Andy

 

---- On Sat, 06 Dec 2014 13:16:54 +0800 Lin Tan <[hidden email]> wrote ----

Hi Andy,

 

Use this one:

wsman invoke *** -a RequestPowerStateChange -k PowerState=2 J power_on.xml

 

power_on.xml:

<p:RequestPowerStateChange_INPUT xmlns:p="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_Pow

erManagementService">        

  <p:PowerState>2</p:PowerState>       

  <p:ManagedElement>  

   <a:Address xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/

ws/2004/08/addressing/role/anonymous</a:Address>        

   <a:ReferenceParameters xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:w="http:/

/schemas.dmtf.org/wbem/wsman/1/wsman.xsd">     

    <w:ResourceURI>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystem</w:ResourceU

RI>  

    <w:SelectorSet>  

     <w:Selector Name="Name">ManagedSystem</w:Selector>   

    </w:SelectorSet>

   </a:ReferenceParameters>

  </p:ManagedElement>

</p:RequestPowerStateChange_INPUT>

 

Tan

 

From: Andy Zhao [[hidden email]]
Sent: Friday, December 5, 2014 6:44 PM
To: [hidden email]
Subject: [Openwsman-devel] about complex method invoke using wsmancli

 

Greetings expert,
  Recently I'm trying to use wsman cli to remotely control power up/down on Intel AMT workstation. There's a class named CIM_PowerManagementService in charge of this and the method name is RequestPowerStateChange.
  It seems that a simple "wsman invoke *** -a RequestPowerStateChange -k PowerState=2" will do, but there's extra key value pair required, according to MOF of CIM_PowerManagementService:
  "RequestPowerStateChange defines the desired power state "
          "of the managed element, and when the element should be "
          "put into that state. The RequestPowerStateChange method "
          "has five input parameters and a result code. \n"
          "- PowerState indicates the desired power state. \n"
          "- ManagedElement indicates the element whose state is "
          "set. This element SHOULD be associated to the service "
          "using the AssociatedPowerManagementService relationship. \n"
          "- Time indicates when the power state should be set, "
          "either as a regular date-time value or as an interval "
          "value (where the interval begins when the method "
          "invocation is received). \n"


 This may mean that I need an extra key "ManagedElement", which is defined as CIM_ManagedElement REF in MOF file. So could you suggest how to include this key value pair in wsmancli invoke? I'm now able to obtain it via enumerate but its in xml format:
<h:ServiceProvided>
            <b:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</b:Address>
            <b:ReferenceParameters>
              <c:ResourceURI>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_PowerManagementService</c:ResourceURI>
              <c:SelectorSet>
                <c:Selector Name="CreationClassName">CIM_PowerManagementService</c:Selector>
                <c:Selector Name="Name">Intel(r) AMT Power Management Service</c:Selector>
                <c:Selector Name="SystemCreationClassName">CIM_ComputerSystem</c:Selector>
                <c:Selector Name="SystemName">Intel(r) AMT</c:Selector>
              </c:SelectorSet>
            </b:ReferenceParameters>
          </h:ServiceProvided>


BR,
Andy

 

 

 

 

 

 


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
Openwsman-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openwsman-devel
Loading...