Author: anthonyshaw
Date: Wed Apr  6 05:32:53 2016
New Revision: 1737921

URL: http://svn.apache.org/viewvc?rev=1737921&view=rev
Log:
Updated site

Added:
    libcloud/site/trunk/generated/blog/tags/API.html
Modified:
    libcloud/site/trunk/generated/blog/2016/04/06/requests-support.html
    libcloud/site/trunk/generated/blog/archives/2016/04/index.html
    libcloud/site/trunk/generated/blog/atom.xml
    libcloud/site/trunk/generated/blog/index.html
    libcloud/site/trunk/generated/blog/tags/news.html
    libcloud/site/trunk/generated/blog/tags/tutorial.html
    libcloud/site/trunk/generated/index.html
    libcloud/site/trunk/generated/sitemap.xml
    libcloud/site/trunk/source/_posts/2016-04-06-requests-support.md

Modified: libcloud/site/trunk/generated/blog/2016/04/06/requests-support.html
URL: 
http://svn.apache.org/viewvc/libcloud/site/trunk/generated/blog/2016/04/06/requests-support.html?rev=1737921&r1=1737920&r2=1737921&view=diff
==============================================================================
--- libcloud/site/trunk/generated/blog/2016/04/06/requests-support.html 
(original)
+++ libcloud/site/trunk/generated/blog/2016/04/06/requests-support.html Wed Apr 
 6 05:32:53 2016
@@ -1,15 +1,118 @@
-<hr>
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="utf-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+    
+
+    <meta name="author" content="The Apache Software Foundation">
+
+    
+      <meta name="keywords" content="news,API,tutorial" />
+    
+
+    
+      <title>Experimental support for the requests package | Apache 
Libcloud</title>
+    
+
+    <!-- fav icons -->
+    <link rel="shortcut icon" href="/images/favicon.png" />
+    <link rel="apple-touch-icon" href="/images/apple-touch-icon.png" />
+    <link rel="apple-touch-icon-precomposed" 
href="/images/apple-touch-icon.png" />
+
+    <link href="/blog/atom.xml" type="application/atom+xml" rel="alternate" 
title="Apache Libcloud Blog Feed" />
+
+    <link 
href='https://fonts.googleapis.com/css?family=Open+Sans:400,400italic' 
rel='stylesheet' type='text/css'>
+    <link href='https://fonts.googleapis.com/css?family=Inconsolata' 
rel='stylesheet' type='text/css'>
+
+    <!-- Facebook OpenGraph tags -->
+    <meta content="Apache Libcloud" property="og:site_name">
+    
+      <meta content="Experimental support for the requests package" 
property="og:title">
+    
+
+    
+
+    
+
+    
+      <meta content="article" property="og:type">
+    
+
+    
+      <meta 
content="https://libcloud.apache.org/blog/2016/04/06/requests-support.html"; 
property="og:url">
+    
+    
+      <meta content="2016-04-06T00:00:00+10:00" 
property="article:published_time">
+      <meta content="https://libcloud.apache.org/about.html"; 
property="article:author">
+    
+
+    
+      
+      <meta content="news" property="article:tag">
+      
+      <meta content="API" property="article:tag">
+      
+      <meta content="tutorial" property="article:tag">
+      
+    
+
+    <link href='/assets/global-52715da7c55e2d86c5b5bfc2a8e7c73e.css' 
rel='stylesheet' type='text/css' />
+
+  </head>
+
+  <body data-spy="scroll" data-target=".sidebar-nav" data-offset="80">
+    <nav class="navbar navbar-fixed-top navbar-inverse" role="navigation">
+      <div class="container">
+        <div class="navbar-header">
+          <button type="button" class="navbar-toggle" data-toggle="collapse" 
data-target=".navbar-ex1-collapse">
+            <span class="sr-only">Toggle navigation</span>
+            <span class="icon-bar"></span>
+            <span class="icon-bar"></span>
+            <span class="icon-bar"></span>
+          </button>
+          <a class="navbar-brand" href="/index.html"><img 
src="/images/libcloud_logo.png" class="navbar-logo" /> Apache Libcloud</a>
+        </div>
+        <div class="collapse navbar-collapse navbar-ex1-collapse">
+          <ul class="nav navbar-nav">
+            
+            
+              <li ><a href="/" >Home</a></li>
+            
+              <li ><a href="/about.html" >About</a></li>
+            
+              <li ><a href="/getting-started.html" >Quick Start</a></li>
+            
+              <li ><a href="https://libcloud.readthedocs.org/en/latest/"; 
target="_blank">Documentation</a></li>
+            
+              <li ><a href="/downloads.html" >Downloads</a></li>
+            
+              <li ><a href="/community.html" >Community</a></li>
+            
+              <li ><a href="/blog/" >Blog</a></li>
+            
+          </ul>
+        </div><!-- /.navbar-collapse -->
+      </div><!-- /.container -->
+    </nav>
+
+    <div class="container main-container">
+      <div class="row section page-content">
+  <div class="col-lg-8 col-lg-offset-2">
+    
+<div class="post">
+  
+    <h2>Experimental support for the requests package</h2>
+  
+
+  
+    
+  
+  <span class="post-date-author">By Anthony Shaw on Apr 06, 2016</span>
 
-<p>layout: post
-title: Experimental support for the requests package
-author: Anthony Shaw
-tags:
-  - news
-  - API</p>
-
-<h2>  - tutorial</h2>
-
-<h2>Background</h2>
+  <div class="post-content">
+    <h2>Background</h2>
 
 <p>I&#39;ve just pushed a branch of the latest version of libcloud using the 
popular <code>requests</code> package by Kenneth Reitz instead of our 
home-rolled HTTP client library.</p>
 
@@ -86,3 +189,64 @@ that there are no regression bugs with t
 <h2>Credit</h2>
 
 <p>Credit to dz0ny on IRC for contributing some of the requests patch.</p>
+
+  </div>
+
+  <div class="row section post-meta">
+    <div class="col-md-12 post-tags">
+      <p>Tags: <a href="/blog/tags/news.html" rel="tag">news</a>, <a 
href="/blog/tags/API.html" rel="tag">API</a>, <a 
href="/blog/tags/tutorial.html" rel="tag">tutorial</a></p>
+    </div>
+  </div>
+</div>
+
+Share : <a href="https://twitter.com/share"; 
class="twitter-share-button"{count} data-via="libcloud" data-size="large" 
data-hashtags="cloud">Tweet</a>
+<script>!function(d,s,id){var 
js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document,
 'script', 'twitter-wjs');</script>
+
+  </div>
+</div>
+
+
+      <hr />
+
+      <footer>
+        <div class="row">
+          <div class="col-lg-12 text-center">
+            <div class="footer-links">
+  <p><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="/media.html">Media</a>
+</div>
+
+<div class="footer-text">
+  <p class="">Copyright &copy; 2009-2016 <a href="https://www.apache.org/"; 
target="_blank">The Apache Software Foundation</a></p>
+  <p class="">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.</p>
+</div>
+
+          </div>
+        </div>
+      </footer>
+
+    </div><!-- /.container -->
+
+    <!-- JavaScript -->
+    <script src='/assets/global-9c9298ad4670c6fcb2e40b5291d6c657.js' 
type='text/javascript'></script>
+
+
+    
+
+    <script type="text/javascript">
+  var _gaq = _gaq || [];
+  _gaq.push(['_setAccount', 'UA-23580482-1']);
+  _gaq.push(['_trackPageview']);
+
+  (function() {
+    var ga = document.createElement('script'); ga.type = 'text/javascript'; 
ga.async = true;
+    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 
'http://www') + '.google-analytics.com/ga.js';
+    var s = document.getElementsByTagName('script')[0]; 
s.parentNode.insertBefore(ga, s);
+  })();
+</script>
+
+  </body>
+</html>

Modified: libcloud/site/trunk/generated/blog/archives/2016/04/index.html
URL: 
http://svn.apache.org/viewvc/libcloud/site/trunk/generated/blog/archives/2016/04/index.html?rev=1737921&r1=1737920&r2=1737921&view=diff
==============================================================================
--- libcloud/site/trunk/generated/blog/archives/2016/04/index.html (original)
+++ libcloud/site/trunk/generated/blog/archives/2016/04/index.html Wed Apr  6 
05:32:53 2016
@@ -95,27 +95,16 @@
 
   <div class="post">
   
-    <h2><a href="/blog/2016/04/06/requests-support.html">Requests 
Support</a></h2>
+    <h2><a href="/blog/2016/04/06/requests-support.html">Experimental support 
for the requests package</a></h2>
   
 
   
     
   
-  <span class="post-date-author">By  on Apr 06, 2016</span>
+  <span class="post-date-author">By Anthony Shaw on Apr 06, 2016</span>
 
   <div class="post-content">
-    <hr>
-
-<p>layout: post
-title: Experimental support for the requests package
-author: Anthony Shaw
-tags:
-  - news
-  - API</p>
-
-<h2>  - tutorial</h2>
-
-<h2>Background</h2>
+    <h2>Background</h2>
 
 <p>I&#39;ve just pushed a branch of the latest version of libcloud using the 
popular <code>requests</code> package by Kenneth Reitz instead of our 
home-rolled HTTP client library.</p>
 
@@ -197,7 +186,7 @@ that there are no regression bugs with t
 
   <div class="row section post-meta">
     <div class="col-md-12 post-tags">
-      <p>Tags: </p>
+      <p>Tags: <a href="/blog/tags/news.html" rel="tag">news</a>, <a 
href="/blog/tags/API.html" rel="tag">API</a>, <a 
href="/blog/tags/tutorial.html" rel="tag">tutorial</a></p>
     </div>
   </div>
 </div>

Modified: libcloud/site/trunk/generated/blog/atom.xml
URL: 
http://svn.apache.org/viewvc/libcloud/site/trunk/generated/blog/atom.xml?rev=1737921&r1=1737920&r2=1737921&view=diff
==============================================================================
--- libcloud/site/trunk/generated/blog/atom.xml (original)
+++ libcloud/site/trunk/generated/blog/atom.xml Wed Apr  6 05:32:53 2016
@@ -5,32 +5,21 @@
   <link href="https://libcloud.apache.org"; rel="self" />
   <link href="https://libcloud.apache.org"; />
   <id>https://libcloud.apache.org</id>
-  <updated>2016-04-06T15:31:35+10:00</updated>
+  <updated>2016-04-06T15:32:30+10:00</updated>
   <author>
     <name>The Apache Software Foundation</name>
   </author>
 
     
   <entry>
-    <title>Requests Support</title>
+    <title>Experimental support for the requests package</title>
     <link 
href="https://libcloud.apache.org/blog/2016/04/06/requests-support.html"; />
     <id>https://libcloud.apache.org/blog/2016/04/06/requests-support.html</id>
     <updated>2016-04-06T00:00:00+10:00</updated>
     <author>
-      <name></name>
+      <name>Anthony Shaw</name>
     </author>
-    <content type="html">&lt;hr&gt;
-
-&lt;p&gt;layout: post
-title: Experimental support for the requests package
-author: Anthony Shaw
-tags:
-  - news
-  - API&lt;/p&gt;
-
-&lt;h2&gt;  - tutorial&lt;/h2&gt;
-
-&lt;h2&gt;Background&lt;/h2&gt;
+    <content type="html">&lt;h2&gt;Background&lt;/h2&gt;
 
 &lt;p&gt;I&amp;#39;ve just pushed a branch of the latest version of libcloud 
using the popular &lt;code&gt;requests&lt;/code&gt; package by Kenneth Reitz 
instead of our home-rolled HTTP client library.&lt;/p&gt;
 

Modified: libcloud/site/trunk/generated/blog/index.html
URL: 
http://svn.apache.org/viewvc/libcloud/site/trunk/generated/blog/index.html?rev=1737921&r1=1737920&r2=1737921&view=diff
==============================================================================
--- libcloud/site/trunk/generated/blog/index.html (original)
+++ libcloud/site/trunk/generated/blog/index.html Wed Apr  6 05:32:53 2016
@@ -97,27 +97,16 @@
     
       <div class="post">
   
-    <h2><a href="/blog/2016/04/06/requests-support.html">Requests 
Support</a></h2>
+    <h2><a href="/blog/2016/04/06/requests-support.html">Experimental support 
for the requests package</a></h2>
   
 
   
     
   
-  <span class="post-date-author">By  on Apr 06, 2016</span>
+  <span class="post-date-author">By Anthony Shaw on Apr 06, 2016</span>
 
   <div class="post-content">
-    <hr>
-
-<p>layout: post
-title: Experimental support for the requests package
-author: Anthony Shaw
-tags:
-  - news
-  - API</p>
-
-<h2>  - tutorial</h2>
-
-<h2>Background</h2>
+    <h2>Background</h2>
 
 <p>I&#39;ve just pushed a branch of the latest version of libcloud using the 
popular <code>requests</code> package by Kenneth Reitz instead of our 
home-rolled HTTP client library.</p>
 
@@ -203,7 +192,7 @@ that there are no regression bugs with t
 
   <div class="row section post-meta">
     <div class="col-md-12 post-tags">
-      <p>Tags: </p>
+      <p>Tags: <a href="/blog/tags/news.html" rel="tag">news</a>, <a 
href="/blog/tags/API.html" rel="tag">API</a>, <a 
href="/blog/tags/tutorial.html" rel="tag">tutorial</a></p>
     </div>
   </div>
 </div>

Added: libcloud/site/trunk/generated/blog/tags/API.html
URL: 
http://svn.apache.org/viewvc/libcloud/site/trunk/generated/blog/tags/API.html?rev=1737921&view=auto
==============================================================================
--- libcloud/site/trunk/generated/blog/tags/API.html (added)
+++ libcloud/site/trunk/generated/blog/tags/API.html Wed Apr  6 05:32:53 2016
@@ -0,0 +1,249 @@
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="utf-8">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+    
+
+    <meta name="author" content="The Apache Software Foundation">
+
+    
+      <meta name="keywords" content="python,libcloud,cloud,cloud 
computing,rackspace,amazon ec2,cloudfiles,openstack,cloudstack" />
+    
+
+    
+      <title>Tag Archive | Apache Libcloud</title>
+    
+
+    <!-- fav icons -->
+    <link rel="shortcut icon" href="/images/favicon.png" />
+    <link rel="apple-touch-icon" href="/images/apple-touch-icon.png" />
+    <link rel="apple-touch-icon-precomposed" 
href="/images/apple-touch-icon.png" />
+
+    <link href="/blog/atom.xml" type="application/atom+xml" rel="alternate" 
title="Apache Libcloud Blog Feed" />
+
+    <link 
href='https://fonts.googleapis.com/css?family=Open+Sans:400,400italic' 
rel='stylesheet' type='text/css'>
+    <link href='https://fonts.googleapis.com/css?family=Inconsolata' 
rel='stylesheet' type='text/css'>
+
+    <!-- Facebook OpenGraph tags -->
+    <meta content="Apache Libcloud" property="og:site_name">
+    
+      <meta content="Tag Archive" property="og:title">
+    
+
+    
+
+    
+
+    
+      <meta content="website" property="og:type">
+    
+
+    
+      <meta content="https://libcloud.apache.org/blog/tags/API.html"; 
property="og:url">
+    
+    
+
+    
+
+    <link href='/assets/global-52715da7c55e2d86c5b5bfc2a8e7c73e.css' 
rel='stylesheet' type='text/css' />
+
+  </head>
+
+  <body data-spy="scroll" data-target=".sidebar-nav" data-offset="80">
+    <nav class="navbar navbar-fixed-top navbar-inverse" role="navigation">
+      <div class="container">
+        <div class="navbar-header">
+          <button type="button" class="navbar-toggle" data-toggle="collapse" 
data-target=".navbar-ex1-collapse">
+            <span class="sr-only">Toggle navigation</span>
+            <span class="icon-bar"></span>
+            <span class="icon-bar"></span>
+            <span class="icon-bar"></span>
+          </button>
+          <a class="navbar-brand" href="/index.html"><img 
src="/images/libcloud_logo.png" class="navbar-logo" /> Apache Libcloud</a>
+        </div>
+        <div class="collapse navbar-collapse navbar-ex1-collapse">
+          <ul class="nav navbar-nav">
+            
+            
+              <li ><a href="/" >Home</a></li>
+            
+              <li ><a href="/about.html" >About</a></li>
+            
+              <li ><a href="/getting-started.html" >Quick Start</a></li>
+            
+              <li ><a href="https://libcloud.readthedocs.org/en/latest/"; 
target="_blank">Documentation</a></li>
+            
+              <li ><a href="/downloads.html" >Downloads</a></li>
+            
+              <li ><a href="/community.html" >Community</a></li>
+            
+              <li ><a href="/blog/" >Blog</a></li>
+            
+          </ul>
+        </div><!-- /.navbar-collapse -->
+      </div><!-- /.container -->
+    </nav>
+
+    <div class="container main-container">
+      <div class="row section page-content">
+  <div class="col-lg-8 col-lg-offset-2">
+    <h1>Tag: API</h1>
+
+
+
+  
+    <div class="post">
+  
+    <h2><a href="/blog/2016/04/06/requests-support.html">Experimental support 
for the requests package</a></h2>
+  
+
+  
+    
+  
+  <span class="post-date-author">By Anthony Shaw on Apr 06, 2016</span>
+
+  <div class="post-content">
+    <h2>Background</h2>
+
+<p>I&#39;ve just pushed a branch of the latest version of libcloud using the 
popular <code>requests</code> package by Kenneth Reitz instead of our 
home-rolled HTTP client library.</p>
+
+<p>This article is for both users and developers of libcloud. If you want to 
give feedback, please join the developer mailing list.</p>
+
+<h2>Why?</h2>
+
+<ul>
+<li>requests is the defacto standard - it would be in the standard library but 
agreed against to allow it to develop faster 
https://github.com/kennethreitz/requests/issues/2424</li>
+<li>it works with python 2.6-&gt;3.5</li>
+<li>Our SSL experience has a lot to be desired for Windows users, having to 
download the CA cert package and setting environment variables just to get SSL 
working</li>
+<li>Developers can use requests_mock for deeper integration testing</li>
+<li>less code to maintain</li>
+<li>the role of libcloud is for cloud abstraction, we provide no value in 
writing and maintaining our own HTTP client library</li>
+</ul>
+
+<h2>Benefits of requests</h2>
+
+<p>There are a number of benefits to having a requests package</p>
+
+<ul>
+<li>The client library code is smaller, leaner and simpler.</li>
+<li>Requests has built in decompression support, we no longer need to support 
this</li>
+<li>Requests has built in RAW download, upload support, helping with our 
storage drivers</li>
+</ul>
+
+<h2>Implications of the change</h2>
+
+<ul>
+<li>There are no longer 2 classes (<code>LibcloudHTTPSConnection</code> and 
<code>LibcloudHTTPConnection</code>) to be provided to each driver, they are 
now 1 class - <code>LibcloudConnection</code>. You probably won&#39;t notice 
this because it is a property of the <code>Connection</code> class, but
+if you are developing or extending functionality then it is implicated.</li>
+<li>Unit tests will look slightly different (see below)</li>
+<li>This change broke 4200 unit tests (out of 6340)! I&#39;ve since fixed them 
all since they were coupled to the original implementation, but now I don&#39;t 
know if all of tests are valid.</li>
+</ul>
+
+<h2>Testing with requests</h2>
+
+<p>Unit tests that were written like this:</p>
+
+<div class="highlight"><pre><code class="python language-python" 
data-lang="python"><span class="k">class</span> <span 
class="nc">DigitalOceanTests</span><span class="p">(</span><span 
class="n">LibcloudTestCase</span><span class="p">):</span>
+
+      <span class="k">def</span> <span class="nf">setUp</span><span 
class="p">(</span><span class="bp">self</span><span class="p">):</span>
+          <span class="n">DigitalOceanBaseDriver</span><span 
class="o">.</span><span class="n">connectionCls</span><span 
class="o">.</span><span class="n">conn_classes</span> <span class="o">=</span> 
\ 
+           <span class="p">(</span><span class="bp">None</span><span 
class="p">,</span> <span class="n">DigitalOceanMockHttp</span><span 
class="p">)</span>
+          <span class="n">DigitalOceanMockHttp</span><span 
class="o">.</span><span class="n">type</span> <span class="o">=</span> <span 
class="bp">None</span>
+          <span class="bp">self</span><span class="o">.</span><span 
class="n">driver</span> <span class="o">=</span> <span 
class="n">DigitalOceanBaseDriver</span><span class="p">(</span><span 
class="o">*</span><span class="n">DIGITALOCEAN_v1_PARAMS</span><span 
class="p">)</span>
+</code></pre></div>
+
+<p>Because of the change have been modified to (I updated all of them - so 
this is just for future reference)</p>
+
+<div class="highlight"><pre><code class="python language-python" 
data-lang="python"><span class="k">class</span> <span 
class="nc">DigitalOceanTests</span><span class="p">(</span><span 
class="n">LibcloudTestCase</span><span class="p">):</span>
+
+      <span class="k">def</span> <span class="nf">setUp</span><span 
class="p">(</span><span class="bp">self</span><span class="p">):</span>
+          <span class="n">DigitalOceanBaseDriver</span><span 
class="o">.</span><span class="n">connectionCls</span><span 
class="o">.</span><span class="n">conn_class</span> <span class="o">=</span> 
<span class="n">DigitalOceanMockHttp</span>
+          <span class="n">DigitalOceanMockHttp</span><span 
class="o">.</span><span class="n">type</span> <span class="o">=</span> <span 
class="bp">None</span>
+          <span class="bp">self</span><span class="o">.</span><span 
class="n">driver</span> <span class="o">=</span> <span 
class="n">DigitalOceanBaseDriver</span><span class="p">(</span><span 
class="o">*</span><span class="n">DIGITALOCEAN_v1_PARAMS</span><span 
class="p">)</span>
+</code></pre></div>
+
+<h1>Check it out!</h1>
+
+<p>The package is on my personal apache site, you can download it and install 
it in a virtualenv for testing.</p>
+
+<p>`pip install -e 
http://people.apache.org/~anthonyshaw/libcloud/1.0.0-rc2-requests/apache-libcloud-1.0.0-rc2-requests.zip@feature#egg=apache-libcloud</p>
+
+<p>The hashes are my <a 
href="http://people.apache.org/%7Eanthonyshaw/libcloud/1.0.0-rc2-requests/";>apache
 space</a></p>
+
+<p>Have a look at the <a 
href="https://github.com/apache/libcloud/pull/728/files";>PR and the change 
set</a> for a list of changes</p>
+
+<h1>What might break?</h1>
+
+<p>What I&#39;m really looking for is for users of Libcloud to take 15 
minutes, an existing (working) libcloud script, install this package in a 
virtualenv and just validate
+that there are no regression bugs with this change.</p>
+
+<p>I&#39;m particularly sceptical about the storage drivers.</p>
+
+<p>Once we have enough community feedback, we will propose a vote to merge 
this into trunk for future release.</p>
+
+<h2>Credit</h2>
+
+<p>Credit to dz0ny on IRC for contributing some of the requests patch.</p>
+
+  </div>
+
+  <div class="row section post-meta">
+    <div class="col-md-12 post-tags">
+      <p>Tags: <a href="/blog/tags/news.html" rel="tag">news</a>, <a 
href="/blog/tags/API.html" rel="tag">API</a>, <a 
href="/blog/tags/tutorial.html" rel="tag">tutorial</a></p>
+    </div>
+  </div>
+</div>
+
+  
+
+
+  </div>
+</div>
+
+
+      <hr />
+
+      <footer>
+        <div class="row">
+          <div class="col-lg-12 text-center">
+            <div class="footer-links">
+  <p><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="/media.html">Media</a>
+</div>
+
+<div class="footer-text">
+  <p class="">Copyright &copy; 2009-2016 <a href="https://www.apache.org/"; 
target="_blank">The Apache Software Foundation</a></p>
+  <p class="">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.</p>
+</div>
+
+          </div>
+        </div>
+      </footer>
+
+    </div><!-- /.container -->
+
+    <!-- JavaScript -->
+    <script src='/assets/global-9c9298ad4670c6fcb2e40b5291d6c657.js' 
type='text/javascript'></script>
+
+
+    
+
+    <script type="text/javascript">
+  var _gaq = _gaq || [];
+  _gaq.push(['_setAccount', 'UA-23580482-1']);
+  _gaq.push(['_trackPageview']);
+
+  (function() {
+    var ga = document.createElement('script'); ga.type = 'text/javascript'; 
ga.async = true;
+    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 
'http://www') + '.google-analytics.com/ga.js';
+    var s = document.getElementsByTagName('script')[0]; 
s.parentNode.insertBefore(ga, s);
+  })();
+</script>
+
+  </body>
+</html>

Modified: libcloud/site/trunk/generated/blog/tags/news.html
URL: 
http://svn.apache.org/viewvc/libcloud/site/trunk/generated/blog/tags/news.html?rev=1737921&r1=1737920&r2=1737921&view=diff
==============================================================================
--- libcloud/site/trunk/generated/blog/tags/news.html (original)
+++ libcloud/site/trunk/generated/blog/tags/news.html Wed Apr  6 05:32:53 2016
@@ -96,6 +96,111 @@
   
     <div class="post">
   
+    <h2><a href="/blog/2016/04/06/requests-support.html">Experimental support 
for the requests package</a></h2>
+  
+
+  
+    
+  
+  <span class="post-date-author">By Anthony Shaw on Apr 06, 2016</span>
+
+  <div class="post-content">
+    <h2>Background</h2>
+
+<p>I&#39;ve just pushed a branch of the latest version of libcloud using the 
popular <code>requests</code> package by Kenneth Reitz instead of our 
home-rolled HTTP client library.</p>
+
+<p>This article is for both users and developers of libcloud. If you want to 
give feedback, please join the developer mailing list.</p>
+
+<h2>Why?</h2>
+
+<ul>
+<li>requests is the defacto standard - it would be in the standard library but 
agreed against to allow it to develop faster 
https://github.com/kennethreitz/requests/issues/2424</li>
+<li>it works with python 2.6-&gt;3.5</li>
+<li>Our SSL experience has a lot to be desired for Windows users, having to 
download the CA cert package and setting environment variables just to get SSL 
working</li>
+<li>Developers can use requests_mock for deeper integration testing</li>
+<li>less code to maintain</li>
+<li>the role of libcloud is for cloud abstraction, we provide no value in 
writing and maintaining our own HTTP client library</li>
+</ul>
+
+<h2>Benefits of requests</h2>
+
+<p>There are a number of benefits to having a requests package</p>
+
+<ul>
+<li>The client library code is smaller, leaner and simpler.</li>
+<li>Requests has built in decompression support, we no longer need to support 
this</li>
+<li>Requests has built in RAW download, upload support, helping with our 
storage drivers</li>
+</ul>
+
+<h2>Implications of the change</h2>
+
+<ul>
+<li>There are no longer 2 classes (<code>LibcloudHTTPSConnection</code> and 
<code>LibcloudHTTPConnection</code>) to be provided to each driver, they are 
now 1 class - <code>LibcloudConnection</code>. You probably won&#39;t notice 
this because it is a property of the <code>Connection</code> class, but
+if you are developing or extending functionality then it is implicated.</li>
+<li>Unit tests will look slightly different (see below)</li>
+<li>This change broke 4200 unit tests (out of 6340)! I&#39;ve since fixed them 
all since they were coupled to the original implementation, but now I don&#39;t 
know if all of tests are valid.</li>
+</ul>
+
+<h2>Testing with requests</h2>
+
+<p>Unit tests that were written like this:</p>
+
+<div class="highlight"><pre><code class="python language-python" 
data-lang="python"><span class="k">class</span> <span 
class="nc">DigitalOceanTests</span><span class="p">(</span><span 
class="n">LibcloudTestCase</span><span class="p">):</span>
+
+      <span class="k">def</span> <span class="nf">setUp</span><span 
class="p">(</span><span class="bp">self</span><span class="p">):</span>
+          <span class="n">DigitalOceanBaseDriver</span><span 
class="o">.</span><span class="n">connectionCls</span><span 
class="o">.</span><span class="n">conn_classes</span> <span class="o">=</span> 
\ 
+           <span class="p">(</span><span class="bp">None</span><span 
class="p">,</span> <span class="n">DigitalOceanMockHttp</span><span 
class="p">)</span>
+          <span class="n">DigitalOceanMockHttp</span><span 
class="o">.</span><span class="n">type</span> <span class="o">=</span> <span 
class="bp">None</span>
+          <span class="bp">self</span><span class="o">.</span><span 
class="n">driver</span> <span class="o">=</span> <span 
class="n">DigitalOceanBaseDriver</span><span class="p">(</span><span 
class="o">*</span><span class="n">DIGITALOCEAN_v1_PARAMS</span><span 
class="p">)</span>
+</code></pre></div>
+
+<p>Because of the change have been modified to (I updated all of them - so 
this is just for future reference)</p>
+
+<div class="highlight"><pre><code class="python language-python" 
data-lang="python"><span class="k">class</span> <span 
class="nc">DigitalOceanTests</span><span class="p">(</span><span 
class="n">LibcloudTestCase</span><span class="p">):</span>
+
+      <span class="k">def</span> <span class="nf">setUp</span><span 
class="p">(</span><span class="bp">self</span><span class="p">):</span>
+          <span class="n">DigitalOceanBaseDriver</span><span 
class="o">.</span><span class="n">connectionCls</span><span 
class="o">.</span><span class="n">conn_class</span> <span class="o">=</span> 
<span class="n">DigitalOceanMockHttp</span>
+          <span class="n">DigitalOceanMockHttp</span><span 
class="o">.</span><span class="n">type</span> <span class="o">=</span> <span 
class="bp">None</span>
+          <span class="bp">self</span><span class="o">.</span><span 
class="n">driver</span> <span class="o">=</span> <span 
class="n">DigitalOceanBaseDriver</span><span class="p">(</span><span 
class="o">*</span><span class="n">DIGITALOCEAN_v1_PARAMS</span><span 
class="p">)</span>
+</code></pre></div>
+
+<h1>Check it out!</h1>
+
+<p>The package is on my personal apache site, you can download it and install 
it in a virtualenv for testing.</p>
+
+<p>`pip install -e 
http://people.apache.org/~anthonyshaw/libcloud/1.0.0-rc2-requests/apache-libcloud-1.0.0-rc2-requests.zip@feature#egg=apache-libcloud</p>
+
+<p>The hashes are my <a 
href="http://people.apache.org/%7Eanthonyshaw/libcloud/1.0.0-rc2-requests/";>apache
 space</a></p>
+
+<p>Have a look at the <a 
href="https://github.com/apache/libcloud/pull/728/files";>PR and the change 
set</a> for a list of changes</p>
+
+<h1>What might break?</h1>
+
+<p>What I&#39;m really looking for is for users of Libcloud to take 15 
minutes, an existing (working) libcloud script, install this package in a 
virtualenv and just validate
+that there are no regression bugs with this change.</p>
+
+<p>I&#39;m particularly sceptical about the storage drivers.</p>
+
+<p>Once we have enough community feedback, we will propose a vote to merge 
this into trunk for future release.</p>
+
+<h2>Credit</h2>
+
+<p>Credit to dz0ny on IRC for contributing some of the requests patch.</p>
+
+  </div>
+
+  <div class="row section post-meta">
+    <div class="col-md-12 post-tags">
+      <p>Tags: <a href="/blog/tags/news.html" rel="tag">news</a>, <a 
href="/blog/tags/API.html" rel="tag">API</a>, <a 
href="/blog/tags/tutorial.html" rel="tag">tutorial</a></p>
+    </div>
+  </div>
+</div>
+
+  
+
+  
+    <div class="post">
+  
     <h2><a href="/blog/2016/02/16/new-drivers-deprecated-drivers.html">New 
compute drivers and deprecated drivers in 1.0</a></h2>
   
 

Modified: libcloud/site/trunk/generated/blog/tags/tutorial.html
URL: 
http://svn.apache.org/viewvc/libcloud/site/trunk/generated/blog/tags/tutorial.html?rev=1737921&r1=1737920&r2=1737921&view=diff
==============================================================================
--- libcloud/site/trunk/generated/blog/tags/tutorial.html (original)
+++ libcloud/site/trunk/generated/blog/tags/tutorial.html Wed Apr  6 05:32:53 
2016
@@ -96,6 +96,111 @@
   
     <div class="post">
   
+    <h2><a href="/blog/2016/04/06/requests-support.html">Experimental support 
for the requests package</a></h2>
+  
+
+  
+    
+  
+  <span class="post-date-author">By Anthony Shaw on Apr 06, 2016</span>
+
+  <div class="post-content">
+    <h2>Background</h2>
+
+<p>I&#39;ve just pushed a branch of the latest version of libcloud using the 
popular <code>requests</code> package by Kenneth Reitz instead of our 
home-rolled HTTP client library.</p>
+
+<p>This article is for both users and developers of libcloud. If you want to 
give feedback, please join the developer mailing list.</p>
+
+<h2>Why?</h2>
+
+<ul>
+<li>requests is the defacto standard - it would be in the standard library but 
agreed against to allow it to develop faster 
https://github.com/kennethreitz/requests/issues/2424</li>
+<li>it works with python 2.6-&gt;3.5</li>
+<li>Our SSL experience has a lot to be desired for Windows users, having to 
download the CA cert package and setting environment variables just to get SSL 
working</li>
+<li>Developers can use requests_mock for deeper integration testing</li>
+<li>less code to maintain</li>
+<li>the role of libcloud is for cloud abstraction, we provide no value in 
writing and maintaining our own HTTP client library</li>
+</ul>
+
+<h2>Benefits of requests</h2>
+
+<p>There are a number of benefits to having a requests package</p>
+
+<ul>
+<li>The client library code is smaller, leaner and simpler.</li>
+<li>Requests has built in decompression support, we no longer need to support 
this</li>
+<li>Requests has built in RAW download, upload support, helping with our 
storage drivers</li>
+</ul>
+
+<h2>Implications of the change</h2>
+
+<ul>
+<li>There are no longer 2 classes (<code>LibcloudHTTPSConnection</code> and 
<code>LibcloudHTTPConnection</code>) to be provided to each driver, they are 
now 1 class - <code>LibcloudConnection</code>. You probably won&#39;t notice 
this because it is a property of the <code>Connection</code> class, but
+if you are developing or extending functionality then it is implicated.</li>
+<li>Unit tests will look slightly different (see below)</li>
+<li>This change broke 4200 unit tests (out of 6340)! I&#39;ve since fixed them 
all since they were coupled to the original implementation, but now I don&#39;t 
know if all of tests are valid.</li>
+</ul>
+
+<h2>Testing with requests</h2>
+
+<p>Unit tests that were written like this:</p>
+
+<div class="highlight"><pre><code class="python language-python" 
data-lang="python"><span class="k">class</span> <span 
class="nc">DigitalOceanTests</span><span class="p">(</span><span 
class="n">LibcloudTestCase</span><span class="p">):</span>
+
+      <span class="k">def</span> <span class="nf">setUp</span><span 
class="p">(</span><span class="bp">self</span><span class="p">):</span>
+          <span class="n">DigitalOceanBaseDriver</span><span 
class="o">.</span><span class="n">connectionCls</span><span 
class="o">.</span><span class="n">conn_classes</span> <span class="o">=</span> 
\ 
+           <span class="p">(</span><span class="bp">None</span><span 
class="p">,</span> <span class="n">DigitalOceanMockHttp</span><span 
class="p">)</span>
+          <span class="n">DigitalOceanMockHttp</span><span 
class="o">.</span><span class="n">type</span> <span class="o">=</span> <span 
class="bp">None</span>
+          <span class="bp">self</span><span class="o">.</span><span 
class="n">driver</span> <span class="o">=</span> <span 
class="n">DigitalOceanBaseDriver</span><span class="p">(</span><span 
class="o">*</span><span class="n">DIGITALOCEAN_v1_PARAMS</span><span 
class="p">)</span>
+</code></pre></div>
+
+<p>Because of the change have been modified to (I updated all of them - so 
this is just for future reference)</p>
+
+<div class="highlight"><pre><code class="python language-python" 
data-lang="python"><span class="k">class</span> <span 
class="nc">DigitalOceanTests</span><span class="p">(</span><span 
class="n">LibcloudTestCase</span><span class="p">):</span>
+
+      <span class="k">def</span> <span class="nf">setUp</span><span 
class="p">(</span><span class="bp">self</span><span class="p">):</span>
+          <span class="n">DigitalOceanBaseDriver</span><span 
class="o">.</span><span class="n">connectionCls</span><span 
class="o">.</span><span class="n">conn_class</span> <span class="o">=</span> 
<span class="n">DigitalOceanMockHttp</span>
+          <span class="n">DigitalOceanMockHttp</span><span 
class="o">.</span><span class="n">type</span> <span class="o">=</span> <span 
class="bp">None</span>
+          <span class="bp">self</span><span class="o">.</span><span 
class="n">driver</span> <span class="o">=</span> <span 
class="n">DigitalOceanBaseDriver</span><span class="p">(</span><span 
class="o">*</span><span class="n">DIGITALOCEAN_v1_PARAMS</span><span 
class="p">)</span>
+</code></pre></div>
+
+<h1>Check it out!</h1>
+
+<p>The package is on my personal apache site, you can download it and install 
it in a virtualenv for testing.</p>
+
+<p>`pip install -e 
http://people.apache.org/~anthonyshaw/libcloud/1.0.0-rc2-requests/apache-libcloud-1.0.0-rc2-requests.zip@feature#egg=apache-libcloud</p>
+
+<p>The hashes are my <a 
href="http://people.apache.org/%7Eanthonyshaw/libcloud/1.0.0-rc2-requests/";>apache
 space</a></p>
+
+<p>Have a look at the <a 
href="https://github.com/apache/libcloud/pull/728/files";>PR and the change 
set</a> for a list of changes</p>
+
+<h1>What might break?</h1>
+
+<p>What I&#39;m really looking for is for users of Libcloud to take 15 
minutes, an existing (working) libcloud script, install this package in a 
virtualenv and just validate
+that there are no regression bugs with this change.</p>
+
+<p>I&#39;m particularly sceptical about the storage drivers.</p>
+
+<p>Once we have enough community feedback, we will propose a vote to merge 
this into trunk for future release.</p>
+
+<h2>Credit</h2>
+
+<p>Credit to dz0ny on IRC for contributing some of the requests patch.</p>
+
+  </div>
+
+  <div class="row section post-meta">
+    <div class="col-md-12 post-tags">
+      <p>Tags: <a href="/blog/tags/news.html" rel="tag">news</a>, <a 
href="/blog/tags/API.html" rel="tag">API</a>, <a 
href="/blog/tags/tutorial.html" rel="tag">tutorial</a></p>
+    </div>
+  </div>
+</div>
+
+  
+
+  
+    <div class="post">
+  
     <h2><a href="/blog/2016/02/05/libcloud-containers-example.html">Using the 
container abstraction API in 1.0.0-pre1</a></h2>
   
 

Modified: libcloud/site/trunk/generated/index.html
URL: 
http://svn.apache.org/viewvc/libcloud/site/trunk/generated/index.html?rev=1737921&r1=1737920&r2=1737921&view=diff
==============================================================================
--- libcloud/site/trunk/generated/index.html (original)
+++ libcloud/site/trunk/generated/index.html Wed Apr  6 05:32:53 2016
@@ -241,7 +241,7 @@
         <h3>Latest Blog Posts</h3>
         
           
-            <p><a href="/blog/2016/04/06/requests-support.html">Requests 
Support</a>
+            <p><a href="/blog/2016/04/06/requests-support.html">Experimental 
support for the requests package</a>
           
         
           

Modified: libcloud/site/trunk/generated/sitemap.xml
URL: 
http://svn.apache.org/viewvc/libcloud/site/trunk/generated/sitemap.xml?rev=1737921&r1=1737920&r2=1737921&view=diff
==============================================================================
--- libcloud/site/trunk/generated/sitemap.xml (original)
+++ libcloud/site/trunk/generated/sitemap.xml Wed Apr  6 05:32:53 2016
@@ -314,7 +314,7 @@
     </url>
     <url>
         
<loc>https://libcloud.apache.org/blog/2016/04/06/requests-support.html</loc>
-        <lastmod>2016-04-06T15:27:21+10:00</lastmod>
+        <lastmod>2016-04-06T00:00:00+10:00</lastmod>
     </url>
     <url>
         <loc>https://libcloud.apache.org/about.html</loc>
@@ -346,7 +346,7 @@
     </url>
     <url>
         <loc>https://libcloud.apache.org/</loc>
-        <lastmod>2016-04-06T15:27:21+10:00</lastmod>
+        <lastmod>2016-04-06T15:30:55+10:00</lastmod>
     </url>
     <url>
         <loc>https://libcloud.apache.org/getting-started.html</loc>
@@ -366,7 +366,7 @@
     </url>
     <url>
         <loc>https://libcloud.apache.org/blog/blog/</loc>
-        <lastmod>2016-04-06T15:27:21+10:00</lastmod>
+        <lastmod>2016-04-06T15:30:55+10:00</lastmod>
     </url>
     <url>
         <loc>https://libcloud.apache.org/security.html</loc>

Modified: libcloud/site/trunk/source/_posts/2016-04-06-requests-support.md
URL: 
http://svn.apache.org/viewvc/libcloud/site/trunk/source/_posts/2016-04-06-requests-support.md?rev=1737921&r1=1737920&r2=1737921&view=diff
==============================================================================
--- libcloud/site/trunk/source/_posts/2016-04-06-requests-support.md (original)
+++ libcloud/site/trunk/source/_posts/2016-04-06-requests-support.md Wed Apr  6 
05:32:53 2016
@@ -1,4 +1,4 @@
- ---
+---
 layout: post
 title: Experimental support for the requests package
 author: Anthony Shaw



Reply via email to