You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by bu...@apache.org on 2011/11/03 02:39:48 UTC

svn commit: r797969 - in /websites/staging/libcloud/trunk/content/docs: components.html compute-base-api.html compute-deployment.html compute-overview.html debugging.html index.html using-libcloud-in-multi-threaded-and-async-environments.html

Author: buildbot
Date: Thu Nov  3 01:39:47 2011
New Revision: 797969

Log:
Staging update by buildbot

Added:
    websites/staging/libcloud/trunk/content/docs/components.html
    websites/staging/libcloud/trunk/content/docs/using-libcloud-in-multi-threaded-and-async-environments.html
Modified:
    websites/staging/libcloud/trunk/content/docs/compute-base-api.html
    websites/staging/libcloud/trunk/content/docs/compute-deployment.html
    websites/staging/libcloud/trunk/content/docs/compute-overview.html
    websites/staging/libcloud/trunk/content/docs/debugging.html
    websites/staging/libcloud/trunk/content/docs/index.html

Added: websites/staging/libcloud/trunk/content/docs/components.html
==============================================================================
--- websites/staging/libcloud/trunk/content/docs/components.html (added)
+++ websites/staging/libcloud/trunk/content/docs/components.html Thu Nov  3 01:39:47 2011
@@ -0,0 +1,111 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+  <title>Components | Apache Libcloud Documentation</title>
+  <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+  <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script>
+  <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js" type="text/javascript"></script>
+  <script src="/js/clearlink.js" type="text/javascript"></script>
+  <script src="/js/libcloud.js" type="text/javascript"></script>
+  <link rel="stylesheet" href="/css/screen.css" type="text/css">
+  <link rel="stylesheet" href="/css/libcloud.css" type="text/css">
+  <link rel="stylesheet" href="/css/documentation.css" type="text/css">
+  <link rel="stylesheet" href="/css/code.css" type="text/css">
+  <link rel="icon" type="image/png" href="/images/favicon.png"/>
+</head>
+<body>
+  <div class="container">
+    <div id="header" class="span-24 last">
+      
+      <h1>Apache Libcloud <span>a unified interface to the cloud</span></h1>
+      
+    </div>
+
+    <div id="banner" class="span-24 last">
+      
+      <h2>Libcloud
+                                             Documentation: Components</h2>
+      
+  </div>
+
+    
+    <div id="sidebar" class="span-6 border">
+      
+<ul id="menu">
+    <li><a href="/index.html">Website home</a></li>
+    <li><a href="/docs/index.html">Documentation home</a></li>
+    <li><a href="/docs/components.html">Components</a></li>
+    <ul>
+        <li class="title">Compute</li>
+        <ul>
+            <li><a href="compute-overview.html">Overview</a></li>
+            <li><a href="compute-base-api.html">Base API</a></li>
+            <li><a href="compute-deployment.html">Deployment</a></li>
+        </ul>
+        <li class="title">Storage</li>
+        <li class="title">Load Balancer</li>
+    </ul>
+    <li>Other</li>
+    <ul>
+        <ul>
+            <li><a href="debugging.html">Debugging</a></li>
+            <li><a href="using-libcloud-in-multi-threaded-and-async-environments.html">Using Libcloud in multi-threaded and async environments</a></li>
+        </ul>
+    </ul>
+    <li><a href="/apidocs">Generated API docs</a></li>
+</ul>
+
+
+
+    </div>
+    
+
+    <div id="main" class="span-16 last">
+      
+      <h2 id="components">Components</h2>
+<p>Libcloud is composed of multiple components, currently those are:</p>
+<ul>
+<li><a href="/docs/compute-overview.html">Compute</a> - libcloud.compute.*</li>
+<li><a href="/docs/storage-overview.html">Storage</a> - libcloud.storage.*</li>
+<li><a href="/docs/loadbalancer-overview.html">Load balancers</a> - libcloud.loadbalancer.*</li>
+</ul>
+<p>Each component is relatively self-sustainable and exposes a simple and easy
+to use base API which works across all the supported providers.</p>
+<p>In places where it makes sense a component is also aware of other components.
+Good example of this is a <code>balancer_attach_node</code> method in the load balancer
+API. This method takes <code>Node</code> object from the compute API as an argument
+and automatically reads its first public IP address before adding a member
+to the load balancer.</p>
+<p>Besides the Base API some drivers also implement driver-specific or so called
+extension methods and arguments. Those methods implement functionality which
+is specific to a provider or a subset of providers. They can be easily recognized
+because they are prefixed with an <code>ex_</code>.</p>
+      
+    </div>
+
+    <div id="footer" class="span-24">
+    <a href="http://www.apache.org/licenses/">License</a> | <a
+    href="/security.html">Security</a> | <a
+    href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a> |
+<a href="http://www.apache.org/foundation/thanks.html">Thanks</a> | <a
+    href="/credits.html">Credits</a> | <a href="/sitemap.html">Sitemap</a><br /><br />
+
+Copyright © 2009-2011, <a href="http://apache.org/">The Apache Software Foundation</a><br />
+Apache Libcloud, Libcloud, Apache, the Apache feather, and the Apache Libcloud
+project logo are trademarks of the Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+
+    </div>
+  </div>
+<script type="text/javascript">
+var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
+document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
+</script>
+<script type="text/javascript">
+try {
+var pageTracker = _gat._getTracker("UA-23580482-1");
+pageTracker._trackPageview();
+} catch(err) {}
+</script>
+
+</body>
+</html>

Modified: websites/staging/libcloud/trunk/content/docs/compute-base-api.html
==============================================================================
--- websites/staging/libcloud/trunk/content/docs/compute-base-api.html (original)
+++ websites/staging/libcloud/trunk/content/docs/compute-base-api.html Thu Nov  3 01:39:47 2011
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 <html>
 <head>
-  <title>Apache Libcloud Python library - Compute -&gt; Base API</title>
+  <title>Compute -&gt; Base API | Apache Libcloud Documentation</title>
   <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
   <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script>
   <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js" type="text/javascript"></script>
@@ -16,7 +16,7 @@
 <body>
   <div class="container">
     <div id="header" class="span-24 last">
-        
+      
       <h1>Apache Libcloud <span>a unified interface to the cloud</span></h1>
       
     </div>
@@ -34,7 +34,7 @@
 <ul id="menu">
     <li><a href="/index.html">Website home</a></li>
     <li><a href="/docs/index.html">Documentation home</a></li>
-    <li>Components</li>
+    <li><a href="/docs/components.html">Components</a></li>
     <ul>
         <li class="title">Compute</li>
         <ul>
@@ -49,6 +49,7 @@
     <ul>
         <ul>
             <li><a href="debugging.html">Debugging</a></li>
+            <li><a href="using-libcloud-in-multi-threaded-and-async-environments.html">Using Libcloud in multi-threaded and async environments</a></li>
         </ul>
     </ul>
     <li><a href="/apidocs">Generated API docs</a></li>

Modified: websites/staging/libcloud/trunk/content/docs/compute-deployment.html
==============================================================================
--- websites/staging/libcloud/trunk/content/docs/compute-deployment.html (original)
+++ websites/staging/libcloud/trunk/content/docs/compute-deployment.html Thu Nov  3 01:39:47 2011
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 <html>
 <head>
-  <title>Apache Libcloud Python library - Compute -&gt; Deployment</title>
+  <title>Compute -&gt; Deployment | Apache Libcloud Documentation</title>
   <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
   <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script>
   <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js" type="text/javascript"></script>
@@ -16,7 +16,7 @@
 <body>
   <div class="container">
     <div id="header" class="span-24 last">
-        
+      
       <h1>Apache Libcloud <span>a unified interface to the cloud</span></h1>
       
     </div>
@@ -34,7 +34,7 @@
 <ul id="menu">
     <li><a href="/index.html">Website home</a></li>
     <li><a href="/docs/index.html">Documentation home</a></li>
-    <li>Components</li>
+    <li><a href="/docs/components.html">Components</a></li>
     <ul>
         <li class="title">Compute</li>
         <ul>
@@ -49,6 +49,7 @@
     <ul>
         <ul>
             <li><a href="debugging.html">Debugging</a></li>
+            <li><a href="using-libcloud-in-multi-threaded-and-async-environments.html">Using Libcloud in multi-threaded and async environments</a></li>
         </ul>
     </ul>
     <li><a href="/apidocs">Generated API docs</a></li>
@@ -129,7 +130,8 @@ tool so it shouldn't be used as such.</p
 
 <span class="c"># deploy_node takes the same base keyword arguments as create_node.</span>
 <span class="n">node</span> <span class="o">=</span> <span class="n">conn</span><span class="o">.</span><span class="n">deploy_node</span><span class="p">(</span><span class="n">name</span><span class="o">=</span><span class="s">&#39;test&#39;</span><span class="p">,</span> <span class="n">image</span><span class="o">=</span><span class="n">image</span><span class="p">,</span> <span class="n">size</span><span class="o">=</span><span class="n">size</span><span class="p">,</span> <span class="n">deploy</span><span class="o">=</span><span class="n">script</span><span class="p">,</span>
-                        <span class="n">ssh_key</span><span class="o">=</span><span class="n">key_path</span><span class="p">,</span> <span class="n">ex_keyname</span><span class="o">=</span><span class="n">key_name</span><span class="p">)</span>
+                        <span class="n">ssh_username</span><span class="o">=</span><span class="s">&#39;ubuntu&#39;</span><span class="p">,</span> <span class="n">ssh_key</span><span class="o">=</span><span class="n">key_path</span><span class="p">,</span>
+                        <span class="n">ex_keyname</span><span class="o">=</span><span class="n">key_name</span><span class="p">)</span>
 <span class="c"># &lt;Node: uuid=..., name=test, state=3, public_ip=[&#39;1.1.1.1&#39;], provider=EC2 ...&gt;</span>
 <span class="c"># the node is now booted, with puppet installed.</span>
 </pre></div>

Modified: websites/staging/libcloud/trunk/content/docs/compute-overview.html
==============================================================================
--- websites/staging/libcloud/trunk/content/docs/compute-overview.html (original)
+++ websites/staging/libcloud/trunk/content/docs/compute-overview.html Thu Nov  3 01:39:47 2011
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 <html>
 <head>
-  <title>Apache Libcloud Python library - Compute -&gt; Overview</title>
+  <title>Compute -&gt; Overview | Apache Libcloud Documentation</title>
   <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
   <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script>
   <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js" type="text/javascript"></script>
@@ -16,7 +16,7 @@
 <body>
   <div class="container">
     <div id="header" class="span-24 last">
-        
+      
       <h1>Apache Libcloud <span>a unified interface to the cloud</span></h1>
       
     </div>
@@ -34,7 +34,7 @@
 <ul id="menu">
     <li><a href="/index.html">Website home</a></li>
     <li><a href="/docs/index.html">Documentation home</a></li>
-    <li>Components</li>
+    <li><a href="/docs/components.html">Components</a></li>
     <ul>
         <li class="title">Compute</li>
         <ul>
@@ -49,6 +49,7 @@
     <ul>
         <ul>
             <li><a href="debugging.html">Debugging</a></li>
+            <li><a href="using-libcloud-in-multi-threaded-and-async-environments.html">Using Libcloud in multi-threaded and async environments</a></li>
         </ul>
     </ul>
     <li><a href="/apidocs">Generated API docs</a></li>

Modified: websites/staging/libcloud/trunk/content/docs/debugging.html
==============================================================================
--- websites/staging/libcloud/trunk/content/docs/debugging.html (original)
+++ websites/staging/libcloud/trunk/content/docs/debugging.html Thu Nov  3 01:39:47 2011
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 <html>
 <head>
-  <title>Apache Libcloud Python library - Debugging</title>
+  <title>Debugging | Apache Libcloud Documentation</title>
   <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
   <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script>
   <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js" type="text/javascript"></script>
@@ -16,7 +16,7 @@
 <body>
   <div class="container">
     <div id="header" class="span-24 last">
-        
+      
       <h1>Apache Libcloud <span>a unified interface to the cloud</span></h1>
       
     </div>
@@ -34,7 +34,7 @@
 <ul id="menu">
     <li><a href="/index.html">Website home</a></li>
     <li><a href="/docs/index.html">Documentation home</a></li>
-    <li>Components</li>
+    <li><a href="/docs/components.html">Components</a></li>
     <ul>
         <li class="title">Compute</li>
         <ul>
@@ -49,6 +49,7 @@
     <ul>
         <ul>
             <li><a href="debugging.html">Debugging</a></li>
+            <li><a href="using-libcloud-in-multi-threaded-and-async-environments.html">Using Libcloud in multi-threaded and async environments</a></li>
         </ul>
     </ul>
     <li><a href="/apidocs">Generated API docs</a></li>

Modified: websites/staging/libcloud/trunk/content/docs/index.html
==============================================================================
--- websites/staging/libcloud/trunk/content/docs/index.html (original)
+++ websites/staging/libcloud/trunk/content/docs/index.html Thu Nov  3 01:39:47 2011
@@ -1,7 +1,7 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
 <html>
 <head>
-  <title>Apache Libcloud Python library - Home</title>
+  <title>Home | Apache Libcloud Documentation</title>
   <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
   <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script>
   <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js" type="text/javascript"></script>
@@ -16,7 +16,7 @@
 <body>
   <div class="container">
     <div id="header" class="span-24 last">
-        
+      
       <h1>Apache Libcloud <span>a unified interface to the cloud</span></h1>
       
     </div>
@@ -34,7 +34,7 @@
 <ul id="menu">
     <li><a href="/index.html">Website home</a></li>
     <li><a href="/docs/index.html">Documentation home</a></li>
-    <li>Components</li>
+    <li><a href="/docs/components.html">Components</a></li>
     <ul>
         <li class="title">Compute</li>
         <ul>
@@ -49,6 +49,7 @@
     <ul>
         <ul>
             <li><a href="debugging.html">Debugging</a></li>
+            <li><a href="using-libcloud-in-multi-threaded-and-async-environments.html">Using Libcloud in multi-threaded and async environments</a></li>
         </ul>
     </ul>
     <li><a href="/apidocs">Generated API docs</a></li>

Added: websites/staging/libcloud/trunk/content/docs/using-libcloud-in-multi-threaded-and-async-environments.html
==============================================================================
--- websites/staging/libcloud/trunk/content/docs/using-libcloud-in-multi-threaded-and-async-environments.html (added)
+++ websites/staging/libcloud/trunk/content/docs/using-libcloud-in-multi-threaded-and-async-environments.html Thu Nov  3 01:39:47 2011
@@ -0,0 +1,147 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+  <title>Using Libcloud in multi-threaded and async environments | Apache Libcloud Documentation</title>
+  <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
+  <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script>
+  <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js" type="text/javascript"></script>
+  <script src="/js/clearlink.js" type="text/javascript"></script>
+  <script src="/js/libcloud.js" type="text/javascript"></script>
+  <link rel="stylesheet" href="/css/screen.css" type="text/css">
+  <link rel="stylesheet" href="/css/libcloud.css" type="text/css">
+  <link rel="stylesheet" href="/css/documentation.css" type="text/css">
+  <link rel="stylesheet" href="/css/code.css" type="text/css">
+  <link rel="icon" type="image/png" href="/images/favicon.png"/>
+</head>
+<body>
+  <div class="container">
+    <div id="header" class="span-24 last">
+      
+      <h1>Apache Libcloud <span>a unified interface to the cloud</span></h1>
+      
+    </div>
+
+    <div id="banner" class="span-24 last">
+      
+      <h2>Libcloud
+                                             Documentation: Using Libcloud in multi-threaded and async environments</h2>
+      
+  </div>
+
+    
+    <div id="sidebar" class="span-6 border">
+      
+<ul id="menu">
+    <li><a href="/index.html">Website home</a></li>
+    <li><a href="/docs/index.html">Documentation home</a></li>
+    <li><a href="/docs/components.html">Components</a></li>
+    <ul>
+        <li class="title">Compute</li>
+        <ul>
+            <li><a href="compute-overview.html">Overview</a></li>
+            <li><a href="compute-base-api.html">Base API</a></li>
+            <li><a href="compute-deployment.html">Deployment</a></li>
+        </ul>
+        <li class="title">Storage</li>
+        <li class="title">Load Balancer</li>
+    </ul>
+    <li>Other</li>
+    <ul>
+        <ul>
+            <li><a href="debugging.html">Debugging</a></li>
+            <li><a href="using-libcloud-in-multi-threaded-and-async-environments.html">Using Libcloud in multi-threaded and async environments</a></li>
+        </ul>
+    </ul>
+    <li><a href="/apidocs">Generated API docs</a></li>
+</ul>
+
+
+
+    </div>
+    
+
+    <div id="main" class="span-16 last">
+      
+      <h2 id="using_libcloud_in_multi-threaded_and_async_environments">Using Libcloud in multi-threaded and async environments</h2>
+<p>Libcloud's primary task is to communicate with different provider APIs using HTTP.
+This means most of the work is not CPU intensive, but performing all those HTTP
+requests includes a lot of waiting which makes the library I/O bound.</p>
+<p>Most of the time you want to perform more operations in parallel or just want
+your code to finish faster (for example starting a lot of servers or periodically
+polling for node status).</p>
+<p>Problems like this are usually solved using threads or async libraries such as
+Twisted, Tornado or gevent.</p>
+<p>This page contains some information and tips about how to use Libcloud in
+such environments.</p>
+<h3 id="libcloud_and_thread-safety">Libcloud and thread-safety</h3>
+<p>Important thing to keep in mind when dealing with threads is
+thread-safety. Libcloud driver instance is <strong>not</strong> thread safe. This means if
+you don't want to deal with complex (and usually inefficient) locking the
+easiest solution is to create a new driver instance inside each thread.</p>
+<h3 id="using_libcloud_with_gevent">Using Libcloud with gevent</h3>
+<p>gevent has an ability to monkey patch and replace functions in the Python <code>socket</code>
+and <code>time</code> module with its own functions which don't block.</p>
+<p>The only thing you need to use to make Libcloud efficiently work with gevent is
+to enable this monkey-patching:</p>
+<div class="codehilite"><pre><span class="kn">from</span> <span class="nn">gevent</span> <span class="kn">import</span> <span class="n">monkey</span>
+<span class="n">monkey</span><span class="o">.</span><span class="n">patch_all</span><span class="p">()</span>
+</pre></div>
+
+
+<h3 id="using_libcloud_with_twisted">Using Libcloud with Twisted</h3>
+<p>Libcloud has no Twisted support included in the core which means you need
+to be careful when you use it with Twisted and some other async frameworks.</p>
+<p>If you don't use it properly it can block the whole reactor (similar as any
+other blocking library or a long CPU-intensive task) which means the execution 
+of other pending tasks in the event queue will be blocked.</p>
+<p>A simple solution to prevent blocking the reactor is to run Libcloud calls
+inside a thread. In Twisted this can be achieved using <code>threads.deferToThread</code>
+which runs a provided method inside the Twisted thread pool.</p>
+<p>The example bellow demonstrates how to create a new node inside a thread
+without blocking the whole reactor.</p>
+<div class="codehilite"><pre><span class="kn">from</span> <span class="nn">twisted.internet</span> <span class="kn">import</span> <span class="n">defer</span><span class="p">,</span> <span class="n">threads</span><span class="p">,</span> <span class="n">reactor</span>
+
+<span class="kn">from</span> <span class="nn">libcloud.compute.types</span> <span class="kn">import</span> <span class="n">Provider</span>
+<span class="kn">from</span> <span class="nn">libcloud.compute.providers</span> <span class="kn">import</span> <span class="n">get_driver</span>
+
+<span class="nd">@defer.inlineCallbacks</span>
+<span class="k">def</span> <span class="nf">create_node</span><span class="p">():</span>
+    <span class="n">node</span> <span class="o">=</span> <span class="k">yield</span> <span class="n">threads</span><span class="o">.</span><span class="n">deferToThread</span><span class="p">(</span><span class="n">_thread_create_node</span><span class="p">,</span>
+                                       <span class="n">name</span><span class="o">=</span><span class="n">name</span><span class="p">)</span>
+<span class="k">def</span> <span class="nf">_thread_create_node</span><span class="p">(</span><span class="n">name</span><span class="p">):</span>
+    <span class="n">Driver</span> <span class="o">=</span> <span class="n">get_driver</span><span class="p">(</span><span class="n">Provider</span><span class="o">.</span><span class="n">RACKSPACE</span><span class="p">)</span>
+    <span class="n">conn</span> <span class="o">=</span> <span class="n">Driver</span><span class="p">(</span><span class="s">&#39;username&#39;</span><span class="p">,</span> <span class="s">&#39;api key&#39;</span><span class="p">)</span>
+    <span class="n">image</span> <span class="o">=</span> <span class="n">conn</span><span class="o">.</span><span class="n">list_images</span><span class="p">()[</span><span class="mi">0</span><span class="p">]</span>
+    <span class="n">size</span> <span class="o">=</span> <span class="n">conn</span><span class="o">.</span><span class="n">list_sizes</span><span class="p">()[</span><span class="mi">0</span><span class="p">]</span>
+    <span class="n">node</span> <span class="o">=</span> <span class="n">conn</span><span class="o">.</span><span class="n">create_node</span><span class="p">(</span><span class="n">name</span><span class="o">=</span><span class="n">name</span><span class="p">,</span> <span class="n">image</span><span class="o">=</span><span class="n">image</span><span class="p">,</span> <span class="n">size</span><span class="o">=</span><span class="n">size</span><span class="p">)</span>
+    <span class="k">return</span> <span class="n">node</span>
+</pre></div>
+      
+    </div>
+
+    <div id="footer" class="span-24">
+    <a href="http://www.apache.org/licenses/">License</a> | <a
+    href="/security.html">Security</a> | <a
+    href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a> |
+<a href="http://www.apache.org/foundation/thanks.html">Thanks</a> | <a
+    href="/credits.html">Credits</a> | <a href="/sitemap.html">Sitemap</a><br /><br />
+
+Copyright © 2009-2011, <a href="http://apache.org/">The Apache Software Foundation</a><br />
+Apache Libcloud, Libcloud, Apache, the Apache feather, and the Apache Libcloud
+project logo are trademarks of the Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
+
+    </div>
+  </div>
+<script type="text/javascript">
+var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
+document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
+</script>
+<script type="text/javascript">
+try {
+var pageTracker = _gat._getTracker("UA-23580482-1");
+pageTracker._trackPageview();
+} catch(err) {}
+</script>
+
+</body>
+</html>