IC5Notice: We have upgraded developerWorks Community to the latest version of IBM Connections. For more information, read our upgrade FAQ.
Topic
  • 3 replies
  • Latest Post - ‏2013-06-28T17:03:58Z by HermannSW
samanderson
samanderson
172 Posts

Pinned topic Stylesheet for DP box restart

‏2013-06-28T13:50:32Z |

I want to have DP box restarted with a soap message.  Is there a stylesheet I can run to reboot?

  • swlinn
    swlinn
    1346 Posts

    Re: Stylesheet for DP box restart

    ‏2013-06-28T15:33:00Z  

    I'm not exactly sure why you would want to do this, but you could create a SOMA request with a dp:do-action with

    <Shutdown>
       <Mode>reboot | reload</Mode>

       <Delay>number of seconds</Delay>

    </Shutdown>

    Doing an internal SOMA call will require you to do a url-open to the XML Management IP and port, and your user agent will require the basic auth creds.  You can also place your SSL Proxy Profile reference in the user agent, or you can specify the object name on the url-open.

    Regards.

    Steve

  • HermannSW
    HermannSW
    4524 Posts

    Re: Stylesheet for DP box restart

    ‏2013-06-28T16:57:13Z  
    • swlinn
    • ‏2013-06-28T15:33:00Z

    I'm not exactly sure why you would want to do this, but you could create a SOMA request with a dp:do-action with

    <Shutdown>
       <Mode>reboot | reload</Mode>

       <Delay>number of seconds</Delay>

    </Shutdown>

    Doing an internal SOMA call will require you to do a url-open to the XML Management IP and port, and your user agent will require the basic auth creds.  You can also place your SSL Proxy Profile reference in the user agent, or you can specify the object name on the url-open.

    Regards.

    Steve

    If I understand samanderson correctly, then all he seems to be looking for is the Soma request (1st sentence).

    Posting "Accessing XML Management interface from within a stylesheet" gives the details if execution from within a stylesheet is needed:
    https://www.ibm.com/developerworks/community/blogs/HermannSW/entry/accessing_xml_management_interface_from_within_a_stylesheet38

     

    Hermann<myXsltBlog/> <myXsltTweets/> <myCE/>

  • HermannSW
    HermannSW
    4524 Posts

    Re: Stylesheet for DP box restart

    ‏2013-06-28T17:03:58Z  
    • HermannSW
    • ‏2013-06-28T16:57:13Z

    If I understand samanderson correctly, then all he seems to be looking for is the Soma request (1st sentence).

    Posting "Accessing XML Management interface from within a stylesheet" gives the details if execution from within a stylesheet is needed:
    https://www.ibm.com/developerworks/community/blogs/HermannSW/entry/accessing_xml_management_interface_from_within_a_stylesheet38

     

    Hermann<myXsltBlog/> <myXsltTweets/> <myCE/>

    Nice, this is the first SOMA command that does NOT return a dp:results ;-)

    And I was logged into the box via CLI -- got kicked out there, too.

    $ export PS1=$\
    $ doSoma admin Shutdown.xml dp1-l3:5550
    Enter host password for user 'admin':
    curl: (52) Empty reply from server
    $

     

    And here is the Soma (immediate reload) command I used:

    $ cat Shutdown.xml
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
      <env:Body>
        <dp:request xmlns:dp="http://www.datapower.com/schemas/management">
          <dp:do-action>
            <Shutdown>
              <Mode>reload</Mode>
              <Delay>0</Delay>
            </Shutdown>
          </dp:do-action>
        </dp:request>
      </env:Body>
    </env:Envelope>
    $

     

    Hermann<myXsltBlog/> <myXsltTweets/> <myCE/>