[one-users] OCCI Interface - HTTP commands

João Soares joaosoares at ua.pt
Mon Mar 21 09:30:59 PDT 2011


Hi,

 

I am trying to use the OCCI interface, I am able to launch VMs through the
“occi-compute” command, but I am having some issues when trying to use for
example the GET request:

I create a VM by using the occi-compute which returns me the ID 129. Then:

 

telnet localhost 4567

 

GET /compute/129 HTTP/1.1

 

Trying ::1...
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
GET /compute/129 HTTP/1.1

HTTP/1.1 500 Internal Server Error
Content-Type: text/html
Content-Length: 122449
Connection: keep-alive
Server: thin 1.2.8 codename Black Keys

<!DOCTYPE html>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <title>NoMethodError at /compute/129</title>

  <script type="text/javascript">
  //<!--
  function toggle(id) {
    var pre  = document.getElementById("pre-" + id);
    var post = document.getElementById("post-" + id);
    var context = document.getElementById("context-" + id);

    if (pre.style.display == 'block') {
      pre.style.display = 'none';
      post.style.display = 'none';
      context.style.background = "none";
    } else {
      pre.style.display = 'block';
      post.style.display = 'block';
      context.style.background = "#fffed9";
    }
  }

  function toggleBacktrace(){

................................................... (continues)



           <td>rack.version</td>
           <td class="code"><div>[1, 0]</div></td>
         </tr>
         
         <tr>
           <td>sinatra.error</td>
           <td class="code"><div>#<NoMethodError: private method
`split' called for nil:NilClass></div></td>
         </tr>
         
      </table>
      <div class="clear"></div>
    </div> <!-- /RACK ENV -->

    <p id="explanation">You're seeing this error because you have
enabled the <code>show_exceptions</code> setting.</p>
  </div> <!-- /WRAP -->
  </body>
</html>




On the other hand, if I try:


GET /compute/ HTTP/1.1

HTTP/1.1 404 Not Found
X-Cascade: pass
Content-Type: text/html;charset=utf-8
Content-Length: 417
Connection: keep-alive
Server: thin 1.2.8 codename Black Keys

<!DOCTYPE html>
<html>
<head>
  <style type="text/css">
  body { text-align:center;font-family:helvetica,arial;font-size:22px;
    color:#888;margin:20px}
  #c {margin:0 auto;width:500px;text-align:left}
  </style>
</head>
<body>
  <h2>Sinatra doesn't know this ditty.</h2>
  <img src='/__sinatra__/404.png'>
  <div id="c">
    Try this:
    <pre>get '/compute/' do
  "Hello World"
end</pre>
  </div>
</body>
</html>

 

I am not fully aware how the interface works so I might be making a silly
mistake
any help?

 

Thanks in advanced,

 

João

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20110321/f9215650/attachment-0001.htm>


More information about the Users mailing list