<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 07/30/2012 12:13 PM, George Reese
      wrote:<br>
    </div>
    <blockquote
      cite="mid:31375D27-23DD-49C4-A598-A7813EC6500C@enstratus.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-1">
      Thanks, but I am looking for how this is done via API.</blockquote>
    <br>
    You can  determine from the CLI what APIs are called by running with
    --debug.  For example:<br>
    <br>
    nova --debug list<br>
    <br>
    You will see:<br>
    <br>
    send: u'GET /v2/cdc204424fdf4f428ca27cc3d65ea583/servers/detail
    HTTP/1.1\r\nHost: 10.16.184.54:8774\r\nx-auth-project-id:
    demo\r\nx-auth-token:..."<br>
    <br>
    REQ: curl -i
    <a class="moz-txt-link-freetext" href="http://10.16.184.54:8774/v2/cdc204424fdf4f428ca27cc3d65ea583/servers/detail">http://10.16.184.54:8774/v2/cdc204424fdf4f428ca27cc3d65ea583/servers/detail</a>
    -X GET -H "X-Auth-Project-Id: demo" -H "User-Agent:
    python-novaclient" -H "Accept: application/json" -H
    "X-Auth-Token:...."<br>
    <br>
    <br>
    <br>
    <blockquote
      cite="mid:31375D27-23DD-49C4-A598-A7813EC6500C@enstratus.com"
      type="cite">
      <div><br>
      </div>
      <div>-George</div>
      <div><br>
        <div>
          <div>On Jul 30, 2012, at 11:11 AM, Pengjun Pan <<a
              moz-do-not-send="true" href="mailto:panpengjun@gmail.com">panpengjun@gmail.com</a>>
            wrote:</div>
          <br class="Apple-interchange-newline">
          <blockquote type="cite">I never tried to stop a VM using api.
            But run a "nova help", it has<br>
            pause, reboot, resume, etc.<br>
            <br>
            To bypass nova api, you can use virsh to stop instances. Do
            a "sudo<br>
            virsh list --all", it will list all the running instances
            even if nova<br>
            cannot see it for some reason. And then you can kill all the
            "ghost"<br>
            instances by "sudo virsh shutdown <id>".<br>
            <br>
            Hope this helps.<br>
            <br>
            PJ<br>
            <br>
            <br>
            On Mon, Jul 30, 2012 at 10:50 AM, George Reese<br>
            <<a moz-do-not-send="true"
              href="mailto:george.reese@enstratus.com">george.reese@enstratus.com</a>>
            wrote:<br>
            <blockquote type="cite">I must be missing something, but I
              can't find any docs on how to suspend or<br>
              stop a VM via API.<br>
              <br>
              Any pointers, please? :)<br>
              <br>
              -George<br>
              <br>
              --<br>
              George Reese - Chief Technology Officer, enStratus<br>
              e: <a moz-do-not-send="true"
                href="mailto:george.reese@enstratus.com">george.reese@enstratus.com</a>
                 Skype: nspollution    t: @GeorgeReese    p:<br>
              +1.207.956.0217<br>
              enStratus: Enterprise Cloud Management - @enStratus -<br>
              <a moz-do-not-send="true" href="http://www.enstratus.com">http://www.enstratus.com</a><br>
              To schedule a meeting with me:
              <a class="moz-txt-link-freetext" href="http://tungle.me/GeorgeReese">http://tungle.me/GeorgeReese</a><br>
              <br>
              <br>
              _______________________________________________<br>
              Mailing list: <a class="moz-txt-link-freetext" href="https://launchpad.net/~openstack">https://launchpad.net/~openstack</a><br>
              Post to     : <a class="moz-txt-link-abbreviated" href="mailto:openstack@lists.launchpad.net">openstack@lists.launchpad.net</a><br>
              Unsubscribe : <a class="moz-txt-link-freetext" href="https://launchpad.net/~openstack">https://launchpad.net/~openstack</a><br>
              More help   : <a class="moz-txt-link-freetext" href="https://help.launchpad.net/ListHelp">https://help.launchpad.net/ListHelp</a><br>
              <br>
            </blockquote>
          </blockquote>
        </div>
        <br>
        <div apple-content-edited="true">
          <span class="Apple-style-span" style="border-collapse:
            separate; color: rgb(0, 0, 0); font-family: Helvetica;
            font-style: normal; font-variant: normal; font-weight:
            normal; letter-spacing: normal; line-height: normal;
            orphans: 2; text-align: -webkit-auto; text-indent: 0px;
            text-transform: none; white-space: normal; widows: 2;
            word-spacing: 0px; -webkit-border-horizontal-spacing: 0px;
            -webkit-border-vertical-spacing: 0px;
            -webkit-text-decorations-in-effect: none;
            -webkit-text-size-adjust: auto; -webkit-text-stroke-width:
            0px; font-size: medium; "><span class="Apple-style-span"
              style="border-collapse: separate; color: rgb(0, 0, 0);
              font-family: Helvetica; font-style: normal; font-variant:
              normal; font-weight: normal; letter-spacing: normal;
              line-height: normal; orphans: 2; text-align: -webkit-auto;
              text-indent: 0px; text-transform: none; white-space:
              normal; widows: 2; word-spacing: 0px;
              -webkit-border-horizontal-spacing: 0px;
              -webkit-border-vertical-spacing: 0px;
              -webkit-text-decorations-in-effect: none;
              -webkit-text-size-adjust: auto; -webkit-text-stroke-width:
              0px; font-size: medium; ">
              <div style="word-wrap: break-word; -webkit-nbsp-mode:
                space; -webkit-line-break: after-white-space; ">--<br>
                George Reese - Chief Technology Officer, enStratus<br>
                e: <a moz-do-not-send="true"
                  href="mailto:george.reese@enstratus.com">george.reese@enstratus.com</a> 
                  Skype: nspollution    t: @GeorgeReese    p:
                +1.207.956.0217<br>
                enStratus: Enterprise Cloud Management - @enStratus - <a
                  moz-do-not-send="true"
                  href="http://www.enstratus.com/">http://www.enstratus.com</a><br>
                To schedule a meeting with me: <a moz-do-not-send="true"
                  href="http://tungle.me/GeorgeReese">http://tungle.me/GeorgeReese</a></div>
            </span></span>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Mailing list: <a class="moz-txt-link-freetext" href="https://launchpad.net/~openstack">https://launchpad.net/~openstack</a>
Post to     : <a class="moz-txt-link-abbreviated" href="mailto:openstack@lists.launchpad.net">openstack@lists.launchpad.net</a>
Unsubscribe : <a class="moz-txt-link-freetext" href="https://launchpad.net/~openstack">https://launchpad.net/~openstack</a>
More help   : <a class="moz-txt-link-freetext" href="https://help.launchpad.net/ListHelp">https://help.launchpad.net/ListHelp</a>
</pre>
    </blockquote>
    <br>
    <br>
  </body>
</html>