<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Main Blog (in English) RSS Feed</title>
    <description>Main Blog (in English)</description>
    <link>http://www.logilab.org/blog/6056?rql=Any%20E%20ORDERBY%20D%20DESC%20LIMIT%2020%20WHERE%20E%20is%20BlogEntry%2C%20E%20entry_of%20X%2C%20X%20eid%206056%2C%20E%20creation_date%20D&amp;vtitle=Main%20Blog%20%28in%20English%29</link>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/147339</guid>
  <title>PyLint 10th anniversary 1.0 sprint: day 2</title>
  <link>http://www.logilab.org/blogentry/147339</link>
  <description>&lt;p&gt;Today was the second day of the 10th anniversary Pylint sprint in Logilab&#39;s Toulouse office.&lt;/p&gt;
&lt;p&gt;This morning, we started with a presentation by myself about how the inference engine works in &lt;strong&gt;astroid&lt;/strong&gt; (former astng).
Then we started thinking all together about how we should change its API to be able to plug more information during the inference process. The first use-case we wanted to assert was &lt;tt class=&quot;docutils literal&quot;&gt;namedtuple&lt;/tt&gt;, as explained in &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/ticket/8796&quot;&gt;http://www.logilab.org/ticket/8796&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;We ended up by addressing it by:&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;enhancing the existing transformation feature so one may register a transformation function on any node rather than on a module node only;&lt;/li&gt;
&lt;li&gt;being able to specify, on a node instance, a custom inference function to use instead of the default (class) implementation.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;We would then be able to customize both the tree structure and the inference process and so to resolve the cases we were targeting.&lt;/p&gt;
&lt;p&gt;Once this was sufficiently sketched out, everyone got his own tasks to do. Here is a quick summary of what has been achieved today:&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;Anthony resumed the &lt;tt class=&quot;docutils literal&quot;&gt;check_messages&lt;/tt&gt; thing and finished it for the simple cases, then he started on having a template for text reported,&lt;/li&gt;
&lt;li&gt;Julien and David made a lot of progress on the Python 3.3 compatibility, though not enough to get the full green test suite,&lt;/li&gt;
&lt;li&gt;Torsten continued backporting stuff from gpylint, all of them having been integrated by the end of the day,&lt;/li&gt;
&lt;li&gt;Sylvain implemented the new transformation API and had the &lt;tt class=&quot;docutils literal&quot;&gt;namedtuple&lt;/tt&gt; proof of concept working, and even some documentation! Now this have to be tested for more real-world uses.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So things are going really well, and see you tomorrow for even more improvements to pylint!&lt;/p&gt;
</description>
  <dc:date>2013-06-19T09:34-01:00</dc:date>
  <dc:creator>Sylvain Thenault</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/146924</guid>
  <title>PyLint 10th anniversary 1.0 sprint: day 1</title>
  <link>http://www.logilab.org/blogentry/146924</link>
  <description>&lt;p&gt;Today was the first day of the Pylint sprint we organized using
Pylint&#39;s 10th years anniversary as an excuse.&lt;/p&gt;
&lt;p&gt;So I (Sylvain) have welcome my fellow Logilab friends David, Anthony
and Julien as well as Torsten from Google into Logilab&#39;s new Toulouse
office.&lt;/p&gt;
&lt;p&gt;After a bit of presentation and talk about Pylint development, we
decided to keep discussion for lunch and dinner and to setup
priorities. We ended with the following tasks (picks from the pad at
&lt;a class=&quot;reference&quot; href=&quot;http://piratepad.net/oAvsUoGCAC&quot;&gt;http://piratepad.net/oAvsUoGCAC&lt;/a&gt;):&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;rename &lt;tt class=&quot;docutils literal&quot;&gt;astng&lt;/tt&gt; to move it outside the &lt;tt class=&quot;docutils literal&quot;&gt;logilab&lt;/tt&gt; package,&lt;/li&gt;
&lt;li&gt;Torsten &lt;tt class=&quot;docutils literal&quot;&gt;gpylint&lt;/tt&gt; (Google Pylint) patches review, as much as
possible (but not all of them, starting by a review of the numberous
internal checks Google has, seeing one by one which one should be
backported upstream),&lt;/li&gt;
&lt;li&gt;&lt;tt class=&quot;docutils literal&quot;&gt;setuptools&lt;/tt&gt; namespace package support
(&lt;a class=&quot;reference&quot; href=&quot;https://www.logilab.org/8796&quot;&gt;https://www.logilab.org/8796&lt;/a&gt;),&lt;/li&gt;
&lt;li&gt;python 3.3 support,&lt;/li&gt;
&lt;li&gt;enhance &lt;tt class=&quot;docutils literal&quot;&gt;astroid&lt;/tt&gt; (former &lt;tt class=&quot;docutils literal&quot;&gt;astng&lt;/tt&gt;) API to allow more ad-hoc
customization for a better grasp of magic occuring in e.g. web
frameworks (&lt;a class=&quot;reference&quot; href=&quot;https://code.google.com/p/protobuf/&quot;&gt;protocol buffer&lt;/a&gt; or &lt;a class=&quot;reference&quot; href=&quot;http://www.sqlalchemy.org/&quot;&gt;SQLAlchemy&lt;/a&gt; may also be an
application of this).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Regarding the &lt;tt class=&quot;docutils literal&quot;&gt;astng&lt;/tt&gt; renaming, we decided to move on with
&lt;tt class=&quot;docutils literal&quot;&gt;astroid&lt;/tt&gt; as pointed out by the &lt;a class=&quot;reference&quot; href=&quot;http://stellarsurvey.com/s.aspx?u=361C2111-FB16-491A-9F2B-862656B29DCD&amp;amp;&quot;&gt;survey on StellarSurvey.com&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In the afternoon, David and Julien tackled this, while Torsten was
extracting patches from Google code and sending them to bitbucket as
pulll request, Sylvain embrassing setuptools namespaces packages and
Anthony discovering the code to spread the &amp;#64;check_message decorator
usage.&lt;/p&gt;
&lt;p&gt;By the end of the day:&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;David and Julien submitted patches to rename &lt;tt class=&quot;docutils literal&quot;&gt;logilab.astng&lt;/tt&gt; which
were quickly integrated and now &lt;a class=&quot;reference&quot; href=&quot;https://bitbucket.org/logilab/astroid&quot;&gt;https://bitbucket.org/logilab/astroid&lt;/a&gt;
should be used instead of &lt;a class=&quot;reference&quot; href=&quot;https://bitbucket.org/logilab/astng&quot;&gt;https://bitbucket.org/logilab/astng&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Torsten submitted 5 pull-requests with code extracted from gpylint,
we reviewed them together and then Torsten used &lt;a class=&quot;reference&quot; href=&quot;http://mercurial.selenic.com/wiki/EvolveExtension&quot;&gt;evolve&lt;/a&gt; to properly
insert those in the pylint history once review comments were
integrated&lt;/li&gt;
&lt;li&gt;Sylvain submitted 2 patches on logilab-common to support both
&lt;tt class=&quot;docutils literal&quot;&gt;setuptools&lt;/tt&gt; namespace packages and &lt;tt class=&quot;docutils literal&quot;&gt;pkgutil.extend_path&lt;/tt&gt; (but
not bare &lt;tt class=&quot;docutils literal&quot;&gt;__path__&lt;/tt&gt; manipulation&lt;/li&gt;
&lt;li&gt;Anthony discovered various checkers and started adding proper
&lt;tt class=&quot;docutils literal&quot;&gt;&amp;#64;check_messages&lt;/tt&gt; on visit methods&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;After doing some review all together, we even had some time to take a
look at Python 3.3 support while writing this summary.&lt;/p&gt;
&lt;p&gt;Hopefuly, our work on forthcoming days will be as efficient as on this first day!&lt;/p&gt;
</description>
  <dc:date>2013-06-17T20:02-01:00</dc:date>
  <dc:creator>Sylvain Thenault</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/133321</guid>
  <title>Pylint 10th years anniversary from June 17  to 19 in Toulouse</title>
  <link>http://www.logilab.org/blogentry/133321</link>
  <description>&lt;p&gt;After a quick survey, we&#39;re officially scheduling Pylint 10th years anniversary sprint from monday, June 17 to wednesday, June 19 in &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.fr/contact&quot;&gt;Logilab&#39;s Toulouse&lt;/a&gt; office.&lt;/p&gt;
&lt;p&gt;There is still some room available if more people want to come, drop me a note (sylvain dot thenault at logilab dot fr).&lt;/p&gt;
</description>
  <dc:date>2013-04-18T14:37-01:00</dc:date>
  <dc:creator>Sylvain Thenault</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/129458</guid>
  <title>Pylint development moving to BitBucket</title>
  <link>http://www.logilab.org/blogentry/129458</link>
  <description>&lt;p&gt;Hi everyone,&lt;/p&gt;
&lt;p&gt;After 10 years of hosting Pylint on our own forge at logilab.org, we&#39;ve decided to publish version 1.0 and move Pylint and astng development to &lt;a class=&quot;reference&quot; href=&quot;https://bitbucket.org/logilab/pylint&quot;&gt;BitBucket&lt;/a&gt;. There has been repository mirrors there for some time, but we intend now to use all BitBucket features, notably Pull Request, to handle various development tasks.&lt;/p&gt;
&lt;p&gt;There are several reasons behind this. First, using both BitBucket and our own forge is rather cumbersome, for integrators at least. This is mainly because BitBucket doesn&#39;t provide support for Mercurial&#39;s &lt;a class=&quot;reference&quot; href=&quot;http://mercurial.selenic.com/wiki/ChangesetEvolution&quot;&gt;changeset evolution&lt;/a&gt; feature while our forge relies on it. Second, our forge has several usability drawbacks that make it hard to use for newcomers, and we lack the time to be responsive on this. Finally, we think that our quality-control process, as exposed by our forge, is a bit heavy for such community projects and may keep potential contributors away.&lt;/p&gt;
&lt;p&gt;All in all, we hope this will help to have a wider contributor audience as well as more regular maintainers / integrators which are not Logilab employees. And so, bring the best Pylint possible to the Python community!&lt;/p&gt;
&lt;p&gt;Logilab.org web pages will be updated to mention this, but kept as there is still valuable information there (eg tickets). We may also keep automatic tests and package building services there.&lt;/p&gt;
&lt;p&gt;So, please use &lt;a class=&quot;reference&quot; href=&quot;https://bitbucket.org/logilab/pylint&quot;&gt;https://bitbucket.org/logilab/pylint&lt;/a&gt; as main web site regarding pylint development. Bug reports, feature requests as well as contributions should be done there. The same move will be done for Pylint&#39;s underlying library, logilab-astng (&lt;a class=&quot;reference&quot; href=&quot;https://bitbucket.org/logilab/astng&quot;&gt;https://bitbucket.org/logilab/astng&lt;/a&gt;). We also wish in this process to move it out of the &#39;logilab&#39; python package. It may be a good time to give it another name, if you have any idea don&#39;t hesitate to express yourself.&lt;/p&gt;
&lt;p&gt;Last but not least, remember that &lt;a class=&quot;reference&quot; href=&quot;http://www.pylint.org&quot;&gt;Pylint home page&lt;/a&gt; may be edited using &lt;a class=&quot;reference&quot; href=&quot;https://bitbucket.org/logilab/pylint.org&quot;&gt;Mercurial&lt;/a&gt;, and that the new &lt;a class=&quot;reference&quot; href=&quot;http://docs.pylint.org&quot;&gt;http://docs.pylint.org&lt;/a&gt; is generated using the content found in &lt;a class=&quot;reference&quot; href=&quot;https://bitbucket.org/logilab/pylint/src&quot;&gt;Pylint source&lt;/a&gt; &lt;cite&gt;doc&lt;/cite&gt; subdirectory.&lt;/p&gt;
&lt;p&gt;Pylint turning 10 and moving out of its parents is probably a good time to thank Logilab for paying me and some colleagues to create and maintain this project!&lt;/p&gt;
&lt;img alt=&quot;https://bitbucket-assetroot.s3.amazonaws.com/c/photos/2013/Apr/05/pylint-logo-1661676867-0_avatar.png&quot; src=&quot;https://bitbucket-assetroot.s3.amazonaws.com/c/photos/2013/Apr/05/pylint-logo-1661676867-0_avatar.png&quot; /&gt;
</description>
  <dc:date>2013-04-16T17:31-01:00</dc:date>
  <dc:creator>Sylvain Thenault</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/124658</guid>
  <title>PyLint 10th years anniversary, 1.0 sprint</title>
  <link>http://www.logilab.org/blogentry/124658</link>
  <description>&lt;p&gt;In a few week, pylint will be 10 years old (0.1 released on may 19 2003!).
At this occasion, I would like to release a 1.0. Well, not exactly at that date,
but not too long after would be great. Also, I think it would be a good time
to have a few days sprint to work a bit on this 1.0 but also to meet all together
and talk about pylint status and future, as more and more contributions come from
outside Logilab (actually mostly Google, which employs Torsten and Martin, the most
active contributors recently).&lt;/p&gt;
&lt;p&gt;The first thing to do is to decide a date and place. Having discussed a bit with
Torsten about that, it seems reasonable to target a  sprint during june or july.
Due to personal constraints, I would like to host this sprint in Logilab&#39;s
Toulouse office.&lt;/p&gt;
&lt;p&gt;So, who would like to jump in and sprint to make pylint even better? I&#39;ve created
a doodle so every one interested may tell his preferences:
&lt;a class=&quot;reference&quot; href=&quot;http://doodle.com/4uhk26zryis5x7as&quot;&gt;http://doodle.com/4uhk26zryis5x7as&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Regarding the location, is everybody ok with Toulouse? Other ideas are Paris, or
Florence around EuroPython, or... &amp;lt;add your proposition here&amp;gt;.&lt;/p&gt;
&lt;p&gt;We&#39;ll talk about the sprint topics later, but there are plenty of exciting ideas
around there.&lt;/p&gt;
&lt;p&gt;Please, answer quickly so we can move on. And I hope to see you all there!&lt;/p&gt;
</description>
  <dc:date>2013-03-29T16:20-01:00</dc:date>
  <dc:creator>Sylvain Thenault</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/124527</guid>
  <title>LMGC90 Sprint at Logilab in March 2013</title>
  <link>http://www.logilab.org/blogentry/124527</link>
  <description>&lt;h3 class=&quot;title&quot;&gt;LMGC90 Sprint at Logilab&lt;/h3&gt;
&lt;p&gt;At the end of March 2013, Logilab hosted a sprint on the LMGC90 simulation code
in Paris.&lt;/p&gt;
&lt;p&gt;&lt;a class=&quot;reference&quot; href=&quot;http://www.lmgc.univ-montp2.fr/LMGC90&quot;&gt;LMGC90&lt;/a&gt; is an open-source software developed at the &lt;a class=&quot;reference&quot; href=&quot;http://www.lmgc.univ-montp2.fr&quot;&gt;LMGC&lt;/a&gt; (&amp;quot;Laboratoire de
Mécanique et Génie Civil&amp;quot; -- &amp;quot;&lt;em&gt;Mechanics and Civil Engineering Laboratory&lt;/em&gt;&amp;quot;) of
the CNRS, in Montpellier, France. LMGC90 is devoted to contact mechanics and is,
thus, able to model large collections of deformable or undeformable physical
objects of various shapes, with numerous &lt;em&gt;interaction&lt;/em&gt; laws.  LMGC90 also allows
for multiphysics coupling.&lt;/p&gt;
&lt;div class=&quot;section&quot; id=&quot;sprint-participants&quot;&gt;
&lt;h3&gt;&lt;a&gt;Sprint Participants&lt;/a&gt;&lt;/h3&gt;
&lt;img alt=&quot;https://www.logilab.org/file/143585/raw/logo_LMGC.jpg&quot; src=&quot;https://www.logilab.org/file/143585/raw/logo_LMGC.jpg&quot; /&gt;
&lt;img alt=&quot;https://www.logilab.org/file/143749/raw/logo_SNCF.jpg&quot; src=&quot;https://www.logilab.org/file/143749/raw/logo_SNCF.jpg&quot; /&gt;
&lt;img alt=&quot;https://www.logilab.org/file/143750/raw/logo_LaMSID.jpg&quot; src=&quot;https://www.logilab.org/file/143750/raw/logo_LaMSID.jpg&quot; style=&quot;width: 6.25pc; height: 6.25pc;&quot; /&gt;
&lt;img alt=&quot;https://www.logilab.org/file/143751/raw/logo_LOGILAB.jpg&quot; src=&quot;https://www.logilab.org/file/143751/raw/logo_LOGILAB.jpg&quot; /&gt;
&lt;p&gt;More than ten hackers joined in from:&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;the &lt;a class=&quot;reference&quot; href=&quot;http://www.lmgc.univ-montp2.fr&quot;&gt;LMGC&lt;/a&gt;, which leads LMCG90 development and aims at constantly improving its
architecture and usability;&lt;/li&gt;
&lt;li&gt;the Innovation and Research Department of the &lt;a class=&quot;reference&quot; href=&quot;http://www.recherche.sncf.fr&quot;&gt;SNCF&lt;/a&gt; (the French state-owned
railway company), which uses LMGC90 to study railway mechanics, and more
specifically, the &lt;a class=&quot;reference&quot; href=&quot;http://en.wikipedia.org/wiki/Track_ballast&quot;&gt;ballast&lt;/a&gt;;&lt;/li&gt;
&lt;li&gt;the &lt;a class=&quot;reference&quot; href=&quot;http://www.lamsid.cnrs-bellevue.fr&quot;&gt;LaMSID&lt;/a&gt; (&amp;quot;Laboratoire de Mécanique des Structures Industrielles Durables&amp;quot;,
&amp;quot;&lt;em&gt;Laboratory for the Mechanics of Ageing Industrial Structures&lt;/em&gt;&amp;quot;) laboratory
of the &lt;a class=&quot;reference&quot; href=&quot;http://www.edf.com&quot;&gt;EDF&lt;/a&gt; / &lt;a class=&quot;reference&quot; href=&quot;http://www.cnrs.fr&quot;&gt;CNRS&lt;/a&gt; / &lt;a class=&quot;reference&quot; href=&quot;http://www.cea.fr&quot;&gt;CEA&lt;/a&gt;&amp;nbsp;, which has an strong expertise on &lt;a class=&quot;reference&quot; href=&quot;http://www.code-aster.org&quot;&gt;Code_ASTER&lt;/a&gt;
and &lt;a class=&quot;reference&quot; href=&quot;http://www.lmgc.univ-montp2.fr/LMGC90&quot;&gt;LMGC90&lt;/a&gt;;&lt;/li&gt;
&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.fr&quot;&gt;Logilab&lt;/a&gt;, as the developer, for the SNCF, of a &lt;a class=&quot;reference&quot; href=&quot;http://www.cubicweb.org&quot;&gt;CubicWeb&lt;/a&gt;-based platform
dedicated to the simulation data and knowledge management.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;After a great introduction to LMGC90 by Frédéric Dubois and some preliminary
discussions, teams were quickly constituted around the common areas of interest.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;enhancing-lmgc90-s-python-api-to-build-core-objects&quot;&gt;
&lt;h3&gt;&lt;a&gt;Enhancing LMGC90&#39;s Python API to build core objects&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;As of the sprint date, LMGC90 is mainly developed in Fortran, but also contains
Python code for two purposes:&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;Exposing the Fortran functions and subroutines in the LMGC90 core to Python;
this is achieved using Fortran 2003&#39;s ISO_C_BINDING module and &lt;a class=&quot;reference&quot; href=&quot;http://www.swig.org&quot;&gt;Swig&lt;/a&gt;.
These Python bindings are grouped in a module called &lt;tt class=&quot;docutils literal&quot;&gt;ChiPy&lt;/tt&gt;.&lt;/li&gt;
&lt;li&gt;Making it easy to generate input data (so called &amp;quot;DATBOX&amp;quot; files) using Python.
This is done through a module called &lt;tt class=&quot;docutils literal&quot;&gt;Pre_LMGC&lt;/tt&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The main drawback of this approach is the double modelling of data that this
architecture implies: once in the core and once in &lt;tt class=&quot;docutils literal&quot;&gt;Pre_LMGC&lt;/tt&gt;.&lt;/p&gt;
&lt;p&gt;It was decided to build a unique user-level Python layer on top of &lt;tt class=&quot;docutils literal&quot;&gt;ChiPy&lt;/tt&gt;,
that would be able to build the computational problem description and write the
&lt;tt class=&quot;docutils literal&quot;&gt;DATBOX&lt;/tt&gt; input files (currently achieved by using &lt;tt class=&quot;docutils literal&quot;&gt;Pre_LMGC&lt;/tt&gt;), as well as
to drive the simulation and read the &lt;tt class=&quot;docutils literal&quot;&gt;OUTBOX&lt;/tt&gt; result files (currently by using
direct &lt;tt class=&quot;docutils literal&quot;&gt;ChiPy&lt;/tt&gt; calls).&lt;/p&gt;
&lt;p&gt;This task has been met with success, since, in the short time span available
(half a day, basically), the team managed to build some object types using
&lt;tt class=&quot;docutils literal&quot;&gt;ChiPy&lt;/tt&gt; calls and save them into a &lt;tt class=&quot;docutils literal&quot;&gt;DATBOX&lt;/tt&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;using-the-python-api-to-feed-a-computation-data-store&quot;&gt;
&lt;h3&gt;&lt;a&gt;Using the Python API to feed a computation data store&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;This topic involved importing LMGC90 &lt;tt class=&quot;docutils literal&quot;&gt;DATBOX&lt;/tt&gt; data into the numerical platform
developed by Logilab for the SNCF.&lt;/p&gt;
&lt;p&gt;This was achieved using &lt;tt class=&quot;docutils literal&quot;&gt;ChiPy&lt;/tt&gt; as a Python API to the Fortran core to get:&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;the bodies involved in the computation, along with their materials, behaviour
laws (with their associated parameters), geometries (expressed in terms of
zones);&lt;/li&gt;
&lt;li&gt;the interactions between these bodies, along with their interaction laws (and
associated parameters, e.g. friction coefficient) and body pair (each
interaction is defined between two bodies);&lt;/li&gt;
&lt;li&gt;the interaction groups, which contain interactions that have the same
interaction law.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;There is still a lot of work to be done (notably regarding the charges applied
to the bodies), but this is already a great achievement. This could only have
occured in a sprint, were every needed expertise is available:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p class=&quot;first&quot;&gt;the SNCF experts were there to clarify the import needs and check the overall
direction;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class=&quot;first&quot;&gt;Logilab implemented a data model based on &lt;a class=&quot;reference&quot; href=&quot;http://www.cubicweb.org&quot;&gt;CubicWeb&lt;/a&gt;, and imported the data
using the &lt;tt class=&quot;docutils literal&quot;&gt;ChiPy&lt;/tt&gt; bindings developed on-demand by the LMGC core developer team,
using the usual-for-them ISO_C_BINDING/ Swig Fortran wrapping dance.&lt;/p&gt;
&lt;img alt=&quot;https://www.logilab.org/file/143753/raw/logo_CubicWeb.jpg&quot; src=&quot;https://www.logilab.org/file/143753/raw/logo_CubicWeb.jpg&quot; /&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class=&quot;first&quot;&gt;Logilab undertook the data import; to this end, it asked the LMGC how the
relevant information from LMGC90 can be exposed to Python via the &lt;tt class=&quot;docutils literal&quot;&gt;ChiPy&lt;/tt&gt; API.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;using-hdf5-as-a-data-storage-backend-for-lmgc90&quot;&gt;
&lt;h3&gt;&lt;a&gt;Using HDF5 as a data storage backend for LMGC90&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The main point of this topic was to replace the in-house DATBOX/OUTBOX textual
format used by LMGC90 to store input and output data, with an open, standard and
efficient format.&lt;/p&gt;
&lt;p&gt;Several formats have been considered, like HDF5, MED and NetCDF4.&lt;/p&gt;
&lt;p&gt;MED has been ruled out for the moment, because it lacks the support for storing
body contact information. HDF5 was chosen at last because of the quality of its
Python libraries, &lt;tt class=&quot;docutils literal&quot;&gt;h5py&lt;/tt&gt; and &lt;tt class=&quot;docutils literal&quot;&gt;pytables&lt;/tt&gt;, and the ease of use tools like &lt;a class=&quot;reference&quot; href=&quot;http://http://www.logilab.org/project/h5fs&quot;&gt;h5fs&lt;/a&gt; provide.&lt;/p&gt;
&lt;img alt=&quot;https://www.logilab.org/file/143754/raw/logo_HDF.jpg&quot; src=&quot;https://www.logilab.org/file/143754/raw/logo_HDF.jpg&quot; /&gt;
&lt;p&gt;Alain Leufroy from Logilab quickly presented &lt;tt class=&quot;docutils literal&quot;&gt;h5py&lt;/tt&gt; and h5fs usage, and the team
started its work, measuring the performance impact of the storage pattern of
LMGC90 data. This was quickly achieved, as the LMGC experts made it easy to
setup tests of various sizes, and as the Logilab developers managed to
understand the concepts and implement the required code in a fast and agile way.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;debian-ubuntu-packaging-of-lmgc90&quot;&gt;
&lt;h3&gt;&lt;a&gt;Debian / Ubuntu Packaging of LMGC90&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;This topic turned out to be more difficult than initially assessed, mainly
because LMGC90 has dependencies to non-packaged external libraries, which thus had
to be packaged first:&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;the &lt;tt class=&quot;docutils literal&quot;&gt;Matlib&lt;/tt&gt; linear algebra library, written in C,&lt;/li&gt;
&lt;li&gt;the &lt;tt class=&quot;docutils literal&quot;&gt;Lapack95&lt;/tt&gt; library, which is a Fortran95 interface to the Lapack library.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Logilab kept working on this after the sprint and produced packages that are
currently being tested by the LMGC team. Some changes are expected (for instance,
Python modules should be prefixed with a proper namespace) before the packages can be
submitted for inclusion into Debian. The expertise of Logilab regarding
Debian packaging was of great help for this task. This will hopefully help to
spread the use of LMGC90.&lt;/p&gt;
&lt;img alt=&quot;https://www.logilab.org/file/143755/raw/logo_Debian.jpg&quot; src=&quot;https://www.logilab.org/file/143755/raw/logo_Debian.jpg&quot; /&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;distributed-version-control-system-for-lmgc90&quot;&gt;
&lt;h3&gt;&lt;a&gt;Distributed Version Control System for LMGC90&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;As you may know, Logilab is really fond of &lt;a class=&quot;reference&quot; href=&quot;http://mercurial.selenic.com&quot;&gt;Mercurial&lt;/a&gt; as a DVCS. Our company
invested a lot into the development of the great &lt;a class=&quot;reference&quot; href=&quot;http://mercurial.selenic.com/wiki/ChangesetEvolution&quot;&gt;evolve&lt;/a&gt; extension, which makes
Mercurial a very powerful tool to efficiently manage the team development of
software in a clean fashion.&lt;/p&gt;
&lt;p&gt;This is why Logilab presented Mercurial&#39;s features and advantages over the
current VCS used to manage LMGC90 sources, namely &lt;tt class=&quot;docutils literal&quot;&gt;svn&lt;/tt&gt;, to the other
participants of the Sprint. This was appreciated and will hopefully benefit to
LMGC90 ease of development and spread among the Open Source community.&lt;/p&gt;
&lt;img alt=&quot;https://www.logilab.org/file/143756/raw/logo_HG.jpg&quot; src=&quot;https://www.logilab.org/file/143756/raw/logo_HG.jpg&quot; style=&quot;width: 6.25pc; height: 6.25pc;&quot; /&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;conclusions&quot;&gt;
&lt;h3&gt;&lt;a&gt;Conclusions&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;All in all, this two-day sprint on LMGC90, involving participants from several
industrial and academic institutions has been a great success. A lot of code has
been written but, more importantly, several stepping stones have been laid, such
as:&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;the general LMGC90 data access architecture, with the Python layer on top of
the LMGC90 core;&lt;/li&gt;
&lt;li&gt;the data storage format, namely HDF5.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Colaterally somehow, several other results have also been achieved:&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;partial LMGC90 data import into the SNCF CubicWeb-based numerical platform,&lt;/li&gt;
&lt;li&gt;Debian / Ubuntu packaging of LMGC90 and dependencies.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;On a final note, one would say that we greatly appreciated the cooperation
between the participants, which we found pleasant and efficient. We look forward
to finding more occasions to work together.&lt;/p&gt;
&lt;/div&gt;
</description>
  <dc:date>2013-05-30T18:14-01:00</dc:date>
  <dc:creator>Vladimir Popescu</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/121327</guid>
  <title>Release of PyLint 0.27 / logilab-astng 0.24.2</title>
  <link>http://www.logilab.org/blogentry/121327</link>
  <description>&lt;p&gt;Hi there,&lt;/p&gt;
&lt;p&gt;I&#39;m very pleased to announce the release of pylint &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/project/pylint/0.27.0&quot;&gt;0.27&lt;/a&gt; and
logilab-astng &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/project/logilab-astng/0.24.2&quot;&gt;0.24.2&lt;/a&gt;. There has been a lot of enhancements and
bug fixes since the latest release, so you&#39;re strongly encouraged
to upgrade. Here is a detailed list of changes:&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/ticket/20693&quot;&gt;#20693&lt;/a&gt;: replace pylint.el by Ian Eure version (patch by J.Kotta)&lt;/li&gt;
&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/ticket/105327&quot;&gt;#105327&lt;/a&gt;: add support for --disable=all option and deprecate the
&#39;disable-all&#39; inline directive in favour of &#39;skip-file&#39; (patch by
A.Fayolle)&lt;/li&gt;
&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/ticket/110840&quot;&gt;#110840&lt;/a&gt;: add messages I0020 and I0021 for reporting of suppressed
messages and useless suppression pragmas. (patch by Torsten Marek)&lt;/li&gt;
&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/ticket/112728&quot;&gt;#112728&lt;/a&gt;: add warning E0604 for non-string objects in __all__
(patch by Torsten Marek)&lt;/li&gt;
&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/ticket/120657&quot;&gt;#120657&lt;/a&gt;: add warning W0110/deprecated-lambda when a map/filter
of a lambda could be a comprehension (patch by Martin Pool)&lt;/li&gt;
&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/ticket/113231&quot;&gt;#113231&lt;/a&gt;: logging checker now looks at instances of Logger classes
in addition to the base logging module. (patch by Mike Bryant)&lt;/li&gt;
&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/ticket/111799&quot;&gt;#111799&lt;/a&gt;: don&#39;t warn about octal escape sequence, but warn about o
which is not octal in Python (patch by Martin Pool)&lt;/li&gt;
&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/ticket/110839&quot;&gt;#110839&lt;/a&gt;: bind &amp;lt;F5&amp;gt; to Run button in pylint-gui&lt;/li&gt;
&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/ticket/115580&quot;&gt;#115580&lt;/a&gt;: fix erroneous W0212 (access to protected member) on super call
(patch by Martin Pool)&lt;/li&gt;
&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/ticket/110853&quot;&gt;#110853&lt;/a&gt;: fix a crash when an __init__ method in a base class has been
created by assignment rather than direct function definition (patch by
Torsten Marek)&lt;/li&gt;
&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/ticket/110838&quot;&gt;#110838&lt;/a&gt;: fix pylint-gui crash when include-ids is activated (patch by
Omega Weapon)&lt;/li&gt;
&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/ticket/112667&quot;&gt;#112667&lt;/a&gt;: fix emission of reimport warnings for mixed imports and extend
the testcase (patch by Torsten Marek)&lt;/li&gt;
&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/ticket/112698&quot;&gt;#112698&lt;/a&gt;: fix crash related to non-inferable __all__ attributes and
invalid __all__ contents (patch by Torsten Marek)&lt;/li&gt;
&lt;li&gt;Python 3 related fixes:&lt;ul&gt;
&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/ticket/110213&quot;&gt;#110213&lt;/a&gt;: fix import of checkers broken with python 3.3, causing
&amp;quot;No such message id W0704&amp;quot; breakage&lt;/li&gt;
&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/ticket/120635&quot;&gt;#120635&lt;/a&gt;: redefine cmp function used in pylint.reporters&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Include full warning id for I0020 and I0021 and make sure to flush
warnings after each module, not at the end of the pylint run.
(patch by Torsten Marek)&lt;/li&gt;
&lt;li&gt;Changed the regular expression for inline options so that it must be
preceeded by a # (patch by Torsten Marek)&lt;/li&gt;
&lt;li&gt;Make dot output for import graph predictable and not depend
on ordering of strings in hashes. (patch by Torsten Marek)&lt;/li&gt;
&lt;li&gt;Add hooks for import path setup and move pylint&#39;s sys.path
modifications into them. (patch by Torsten Marek)&lt;/li&gt;
&lt;li&gt;pylint-brain: more subprocess.Popen faking (see &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/ticket/46273&quot;&gt;#46273&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/ticket/109562&quot;&gt;#109562&lt;/a&gt; [jython]: java modules have no __doc__, causing crash&lt;/li&gt;
&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/ticket/120646&quot;&gt;#120646&lt;/a&gt; [py3]: fix for python3.3 _ast changes which may cause crash&lt;/li&gt;
&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/ticket/109988&quot;&gt;#109988&lt;/a&gt; [py3]: test fixes&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Many thanks to all the people who contributed to this release!&lt;/p&gt;
&lt;p&gt;Enjoy!&lt;/p&gt;
</description>
  <dc:date>2013-02-28T18:37-01:00</dc:date>
  <dc:creator>Sylvain Thenault</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/120046</guid>
  <title>FOSDEM 2013</title>
  <link>http://www.logilab.org/blogentry/120046</link>
  <description>&lt;p&gt;I was in Bruxelles for FOSDEM 2013. As with previous FOSDEM there were too many
interesting talks and people to see. Here is a summary of what I saw:&lt;/p&gt;
&lt;p&gt;In the Mozilla&#39;s room:&lt;/p&gt;
&lt;ol class=&quot;arabic simple&quot;&gt;
&lt;li&gt;The html5 pdf viewer &lt;a class=&quot;reference&quot; href=&quot;https://mozillalabs.com/en-US/pdfjs/&quot;&gt;pdfjs&lt;/a&gt; is impressive. The PDF specification is really
scary but this full featured &amp;quot;native&amp;quot; viewer is able to renders most of it
with very good performance. Have a look at the &lt;a class=&quot;reference&quot; href=&quot;http://mozilla.github.com/pdf.js/web/viewer.html&quot;&gt;pdfjs demo&lt;/a&gt;!&lt;/li&gt;
&lt;/ol&gt;
&lt;ol class=&quot;arabic simple&quot; start=&quot;2&quot;&gt;
&lt;li&gt;Firefox debug tools overview with a specific focus of &lt;a class=&quot;reference&quot; href=&quot;https://github.com/mozilla/r2d2b2g&quot;&gt;Firefox OS emulator&lt;/a&gt; in
your browser.&lt;/li&gt;
&lt;/ol&gt;
&lt;ol class=&quot;arabic simple&quot; start=&quot;3&quot;&gt;
&lt;li&gt;Introduction to webl10n: an internationalization format and library used in
&lt;a class=&quot;reference&quot; href=&quot;http://www.mozilla.org/en-US/firefoxos/&quot;&gt;Firefox OS&lt;/a&gt;.  A successful mix that results in a format that is idiot-proof
enough for a duck to use, that relies on Unicode specifications to handle
complex pluralization rules and that allows cascading translation
definitions.&lt;/li&gt;
&lt;/ol&gt;
&lt;img alt=&quot;typical webl10n user&quot; src=&quot;http://upload.wikimedia.org/wikipedia/commons/thumb/0/0a/Red-crested.pochard.slimbridge.arp.jpg/307px-Red-crested.pochard.slimbridge.arp.jpg&quot; /&gt;
&lt;ol class=&quot;arabic simple&quot; start=&quot;4&quot;&gt;
&lt;li&gt;Status of html5 video and audio support in Firefox. The topic looks like a
real headache but the team seems to be doing really well. Special mention
for the reverse demo effect: The speaker expected some format to be still
unsupported but someone else apparently implemented them over night.&lt;/li&gt;
&lt;li&gt;Last but not least I gave a talk about the &lt;a class=&quot;reference&quot; href=&quot;http://mercurial.selenic.com/wiki/ChangesetEvolution&quot;&gt;changeset evolution concept&lt;/a&gt; that
I&#39;m putting in Mercurial. Thanks goes to Feth for asking me his
&lt;em&gt;not-scripted-at-all-questions&lt;/em&gt; during this talk. (&lt;a class=&quot;reference&quot; href=&quot;https://www.logilab.org/file/120870/raw/evolve_talk.pdf&quot;&gt;slides&lt;/a&gt;)&lt;/li&gt;
&lt;/ol&gt;
&lt;img alt=&quot;http://www.selenic.com/hg-logo/logo-droplets-150.png&quot; src=&quot;http://www.selenic.com/hg-logo/logo-droplets-150.png&quot; /&gt;
&lt;p&gt;In the &lt;a class=&quot;reference&quot; href=&quot;http://www.postgresql.org/&quot;&gt;postgresql&lt;/a&gt; room:&lt;/p&gt;
&lt;ol class=&quot;arabic simple&quot;&gt;
&lt;li&gt;Insightful talk about more event trigger in postgresql engine and how this may
becomes the perfect way to break your system.&lt;/li&gt;
&lt;li&gt;Full update of the capability of &lt;a class=&quot;reference&quot; href=&quot;http://postgis.net/&quot;&gt;postgis&lt;/a&gt; 2.0. The postgis suite was already
impressive for storing and querying 2D data, but it now have impressive
capability regarding &lt;a class=&quot;reference&quot; href=&quot;http://gvsig3d.blogspot.fr/2011/07/coming-soon-postgis-3d.html&quot;&gt;3D&lt;/a&gt; data.&lt;/li&gt;
&lt;/ol&gt;
&lt;img alt=&quot;http://upload.wikimedia.org/wikipedia/en/6/60/PostGIS_logo.png&quot; src=&quot;http://upload.wikimedia.org/wikipedia/en/6/60/PostGIS_logo.png&quot; /&gt;
&lt;p&gt;On python related topic:&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;http://www.aldebaran-robotics.com/en/&quot;&gt;Aldebaran Robotic&lt;/a&gt; are currently opening &lt;a class=&quot;reference&quot; href=&quot;https://github.com/aldebaran/&quot;&gt;most of their code&lt;/a&gt;. And
they are a perfect example of the value of python for implementing high level
logic.&lt;/li&gt;
&lt;/ul&gt;
&lt;img alt=&quot;http://www.python.org/community/logos/python-logo-master-v3-TM-flattened.png&quot; src=&quot;http://www.python.org/community/logos/python-logo-master-v3-TM-flattened.png&quot; /&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;Victor Stinner has started an interesting project to improve CPython
performance. The first one: &lt;a class=&quot;reference&quot; href=&quot;https://bitbucket.org/haypo/astoptimizer/&quot;&gt;astoptimizer&lt;/a&gt; breaks some of the language
semantics to apply optimisation on compiling to byte code (lookup caching,
constant folding,…). The other, &lt;a class=&quot;reference&quot; href=&quot;http://hg.python.org/sandbox/registervm/&quot;&gt;registervm&lt;/a&gt; is a full redefinition of how the interpreter
handles reference in byte code.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;After the FOSDEM, I crossed the channel to attend a Mercurial sprint in London.
Expect more on this topic soon.&lt;/p&gt;
</description>
  <dc:date>2013-02-13T12:05-01:00</dc:date>
  <dc:creator>Pierre-Yves David</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/116824</guid>
  <title>Febuary 2013: Mercurial channel &quot;tour&quot;</title>
  <link>http://www.logilab.org/blogentry/116824</link>
  <description>&lt;p&gt;The Release candidate version of &lt;a class=&quot;reference&quot; href=&quot;http://mercurial.selenic.com/wiki/WhatsNew#Mercurial_2.5-rc_.282013-01-20.29&quot;&gt;Mercurial 2.5&lt;/a&gt; was released last sunday.&lt;/p&gt;
&lt;img alt=&quot;http://mercurial.selenic.com/images/mercurial-logo.png&quot; class=&quot;align-center&quot; src=&quot;http://mercurial.selenic.com/images/mercurial-logo.png&quot; /&gt;
&lt;p&gt;This new version makes a major change in the way &amp;quot;hidden&amp;quot; changesets are
handled.  In 2.4 only hg log (and a few others) would support effectively
hiding &amp;quot;hidden&amp;quot; changesets.  Now all hg commands are transparently compatible
with the hidden revision concept.  This is a considerable step towards
&lt;a class=&quot;reference&quot; href=&quot;http://mercurial.selenic.com/wiki/ChangesetEvolution&quot;&gt;changeset evolution&lt;/a&gt;, the next-generation collaboration technology that I&#39;m
developing for Mercurial.&lt;/p&gt;
&lt;!-- This approach is compatible with the idea behind mercurial to provide simple commands for --&gt;
&lt;!-- simple uses and increase the complexity of the commands with the complexity of the use. --&gt;
&lt;img alt=&quot;https://fosdem.org/2013/assets/flyer-thumb-0505d19dbf3cf6139bc7490525310f8e253e60448a29ed4313801b723d5b2ef1.png&quot; class=&quot;align-center&quot; src=&quot;https://fosdem.org/2013/assets/flyer-thumb-0505d19dbf3cf6139bc7490525310f8e253e60448a29ed4313801b723d5b2ef1.png&quot; /&gt;
&lt;p&gt;The 2.5 cycle is almost over, but there is no time to rest yet, Saturday the 2th of
February, I will &lt;a class=&quot;reference&quot; href=&quot;https://fosdem.org/2013/schedule/event/changeset_evolution_with_mercurial_the_next_generation_of_dvcs_features/&quot;&gt;give a talk about changeset evolution concept&lt;/a&gt; at &lt;a class=&quot;reference&quot; href=&quot;https://fosdem.org/2013/&quot;&gt;FOSDEM&lt;/a&gt; in the
Mozilla Room. This talk in an updated version of the one I gave at
&lt;cite&gt;OSDC.fr 2012&lt;/cite&gt; (&lt;a class=&quot;reference&quot; href=&quot;http://www.dailymotion.com/video/xuh369_osdc-fr-2012-changesets-evolution-mercurial-secoue-le-monde-du-dvcs_tech#.UP6rW6j0rEw&quot;&gt;video in french&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;The week after, I&#39;m crossing the channel to attend the &lt;a class=&quot;reference&quot; href=&quot;http://mercurial.selenic.com/wiki/2.6sprint&quot;&gt;Mercurial 2.6 Sprint&lt;/a&gt;
hosted by Facebook London. I expect a lot of discussion about the user
interface and network access of changeset evolution.&lt;/p&gt;
&lt;img alt=&quot;The HG 2.3 sprint&quot; class=&quot;align-center&quot; src=&quot;http://www.logilab.org/file/92955?vid=download&quot; /&gt;
</description>
  <dc:date>2013-01-22T17:17-01:00</dc:date>
  <dc:creator>Pierre-Yves David</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/115219</guid>
  <title>Building Debian images for an OpenStack (private) cloud</title>
  <link>http://www.logilab.org/blogentry/115219</link>
  <description>&lt;p&gt;Now I have a &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/blogentry/114769&quot;&gt;working OpenStack cloud&lt;/a&gt; at &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.fr&quot;&gt;Logilab&lt;/a&gt;, I want to provide
my fellow collegues a bunch of ready-made images to create instances.&lt;/p&gt;
&lt;p&gt;Strangely, there are no really usable ready-made UEC Debian images
available out there. There have been recent efforts made to provide
&lt;a class=&quot;reference&quot; href=&quot;https://aws.amazon.com/marketplace/seller-profile/ref=srh_res_product_vendor?ie=UTF8&amp;amp;id=890be55d-32d8-4bc8-9042-2b4fd83064d5&quot;&gt;Debian images on Amazon Market Place&lt;/a&gt;, and the toolsuite used to
build these is available as a collection of bash shell scripts from
a &lt;a class=&quot;reference&quot; href=&quot;https://github.com/andsens/ec2debian-build-ami&quot;&gt;github repository&lt;/a&gt;. There are also &lt;a class=&quot;reference&quot; href=&quot;http://emis.eucalyptus.com/&quot;&gt;some images for Eucalyptus&lt;/a&gt;,
but I have not been able to make them boot properly on my kvm-based
OpenStack install.&lt;/p&gt;
&lt;p&gt;So I have tried to build my own set of Debian images to upload in my
&lt;a class=&quot;reference&quot; href=&quot;http://docs.openstack.org/developer/glance/&quot;&gt;glance&lt;/a&gt; shop.&lt;/p&gt;
&lt;div class=&quot;section&quot; id=&quot;vocabulary&quot;&gt;
&lt;h3&gt;&lt;a&gt;Vocabulary&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;A bit of vocabulary may be useful for the one not very accustomed with
OpenStack nor AWS &lt;em&gt;jargons&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;When you want to create an instance of an &lt;em&gt;image&lt;/em&gt;, ie. boot a virtual
machine in a cloud, you generally choose from a set of ready made
system images, then you choose a virtual machine &lt;em&gt;flavor&lt;/em&gt; (ie. a
combination of a number of virtual CPUs, an amount of RAM, and a
harddrive size used as root device). Generally, you have to choose
between &lt;em&gt;tiny&lt;/em&gt; (1 CPU, 512MB, no disk), &lt;em&gt;small&lt;/em&gt; (1 CPU, 2G of RAM, 20G
of disk), etc.&lt;/p&gt;
&lt;p&gt;In the cloud world, an instance is not meant to be sustainable. What
is sustainable is a &lt;em&gt;volume&lt;/em&gt; that can be attached to a running instance.&lt;/p&gt;
&lt;p&gt;If you want your instance to be sustainable, there are 2 choices:&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;you can snapshot a running instance and upload it as a new image ;
so it is not really a sustainable instance, instead, it&#39;s the
ability to configure an instance that is then the base for booting
other instances,&lt;/li&gt;
&lt;li&gt;or you can boot an instance from a &lt;em&gt;volume&lt;/em&gt; (which is the
sustainable part of a virtual machine in a cloud).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In the Amazon world, a &amp;quot;standard&amp;quot; image (the one that is instanciated
when creating a new instance) is called an instance store-backed AMI
images, also called an UEC image, and a &lt;em&gt;volume&lt;/em&gt; image is called an
EBS-backed AMI image (EBS stands for Elastic Block Storage). So an AMI
images stored in a &lt;em&gt;volume&lt;/em&gt; cannot be instanciated, it can be booted
once and only once at a time. But it is sustainable. Different usage.&lt;/p&gt;
&lt;p&gt;An UEC or AMI image consist in a triplet: a kernel, an init ramdisk
and a root file system image. An EBS-backed image is just the raw
image disk to be booted on a virtulization host (a kvm raw or qcow2
image, etc.)&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;images-in-openstack&quot;&gt;
&lt;h3&gt;&lt;a&gt;Images in OpenStack&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;In OpenStack, when you create an instance from a given image, what
happens depends on the kind of image.&lt;/p&gt;
&lt;p&gt;In fact, in OpenStack, one can upload traditional UEC AMI images (need
to upload the 3 files, the kernel, the initial ramdisk and the root
filesystem as a raw image). But one can also upload &lt;em&gt;bare&lt;/em&gt;
images. These kind of images are booted directly by the
virtualization host. So it is some kind of hybrid between a boot from
volume (an EBS-backed boot in the Amazon world) and the traditional
instanciation from an UEC image.&lt;/p&gt;
&lt;div class=&quot;section&quot; id=&quot;instanciating-an-ami-image&quot;&gt;
&lt;h4&gt;&lt;a&gt;Instanciating an AMI image&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;When one creates an instance from an AMI image in an OpenStack cloud:&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;the kernel is copied to the virtualization host,&lt;/li&gt;
&lt;li&gt;the initial ramdisk is copied to the virtualization host,&lt;/li&gt;
&lt;li&gt;the root FS image is copied to the virtualization host,&lt;/li&gt;
&lt;li&gt;then, the root FS image is :&lt;ul&gt;
&lt;li&gt;duplicated (instanciated),&lt;/li&gt;
&lt;li&gt;resized (the file is increased if needed) to the size of the asked
instance &lt;em&gt;flavor&lt;/em&gt;,&lt;/li&gt;
&lt;li&gt;the file system is resized to the new size of the file,&lt;/li&gt;
&lt;li&gt;the contained filesystem is mounted (using qemu-nbd) and the
configured SSH acces key is added to
&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;/root/.ssh/authorized_keys&lt;/span&gt;&lt;/tt&gt;&lt;/li&gt;
&lt;li&gt;the nbd volume is then unmounted&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;a libvirt domain is created, configured to boot from the given
kernel and init ramdisk, using the resized and modified image disk
as root filesystem,&lt;/li&gt;
&lt;li&gt;the libvirt domain is then booted.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;instantiating-a-bare-image&quot;&gt;
&lt;h4&gt;&lt;a&gt;Instantiating a BARE image&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;When one creates an instance from a BARE image in an OpenStack cloud:&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;the VM image file is copied on the virtualization host,&lt;/li&gt;
&lt;li&gt;the VM image file is duplicated (instantiated),&lt;/li&gt;
&lt;li&gt;a libvirt domain is created, configured to boot from this copied
image disk as root filesystem,&lt;/li&gt;
&lt;li&gt;the libvirt domain is then booted.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;differences-between-the-2-instantiation-methods&quot;&gt;
&lt;h4&gt;&lt;a&gt;Differences between the 2 instantiation methods&lt;/a&gt;&lt;/h4&gt;
&lt;dl class=&quot;docutils&quot;&gt;
&lt;dt&gt;Instantiating a BARE image:&lt;/dt&gt;
&lt;dd&gt;&lt;ul class=&quot;first last simple&quot;&gt;
&lt;li&gt;Involves a much simpler process.&lt;/li&gt;
&lt;li&gt;Allows to boot a non-linux system (depends on the virtualization
system, especially true when using kvm vitualization).&lt;/li&gt;
&lt;li&gt;Is slower to boot and consumes more resources, since the virtual
machine image must be the size of the required/wanted virtual
machine (but can remain minimal if using a qcow2 image format). If
you use a 10G raw image, then 10G of data will be copied from the
image provider to the virtualization host, and this big file will
be duplicated each time you instantiate this image.&lt;/li&gt;
&lt;li&gt;The root filesystem size corresponding to the &lt;em&gt;flavor&lt;/em&gt; of the
instance is not honored; the filesystem size is the one of the
BARE images.&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;dt&gt;Instantiating an AMI image:&lt;/dt&gt;
&lt;dd&gt;&lt;ul class=&quot;first last simple&quot;&gt;
&lt;li&gt;Honours the &lt;em&gt;flavor&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;Generally allows quicker instance creation process.&lt;/li&gt;
&lt;li&gt;Less resource consumption.&lt;/li&gt;
&lt;li&gt;Can only boot Linux guests.&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;p&gt;If one wants to boot a Windows guest in OpenStack, the only solution
(as far as I know) is to use a BARE image of an installed Windows
system. It works (I have succeeded in doing so), but a minimal Windows
7 install is several GB, so instantiating such a BARE image is very
slow, because the image needs to be uploaded on the virtualization
host.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;building-a-debian-ami-image&quot;&gt;
&lt;h3&gt;&lt;a&gt;Building a Debian AMI image&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;So I wanted to provide a minimal Debian image in my cloud, and to
provide it as an AMI image so the &lt;em&gt;flavor&lt;/em&gt; is honoured, and so the
standard cloud injection mechanisms (like setting up the ssh key to
access the VM) work without having to &lt;a class=&quot;reference&quot; href=&quot;http://wiki.debian.org/Cloud/CreateEucalyptusImage#line-172&quot;&gt;tweak the rc.local script&lt;/a&gt; or use
&lt;a class=&quot;reference&quot; href=&quot;https://help.ubuntu.com/community/CloudInit&quot;&gt;cloud-init&lt;/a&gt; in my guest.&lt;/p&gt;
&lt;p&gt;Here is what I did.&lt;/p&gt;
&lt;div class=&quot;section&quot; id=&quot;install-a-debian-system-in-a-standard-libvirt-kvm-guest&quot;&gt;
&lt;h4&gt;&lt;a&gt;1. Install a Debian system in a standard libvirt/kvm guest.&lt;/a&gt;&lt;/h4&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;david@host:~&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;virt-install  --connect qemu+tcp://virthost/system   &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
                 -n openstack-squeeze-amd64 -r 512 &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
                 -l http://ftp2.fr.debian.org/pub/debian/dists/stable/main/installer-amd64/ &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
                 --disk &lt;span class=&quot;nv&quot;&gt;pool&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;default,bus&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;virtio,type&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;qcow2,size&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;5 &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
                 --network &lt;span class=&quot;nv&quot;&gt;bridge&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;vm7,model&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;virtio  --nographics  &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
                 --extra-args&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;console=tty0 console=ttyS0,115200&amp;#39;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;This creates a new virtual machine, launch the Debian installer
directly downloaded from a Debian mirror, and start the usual Debian
installer in a virtual serial console (I don&#39;t like VNC very much).&lt;/p&gt;
&lt;p&gt;I then followed the installation procedure. When asked for the
partitioning and so, I chose to create only one primary partition
(ie. with no swap partition; it wont be necessary here). I also chose
only &amp;quot;Default system&amp;quot; and &amp;quot;SSH server&amp;quot; to be installed.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;configure-the-system&quot;&gt;
&lt;h4&gt;&lt;a&gt;2. Configure the system&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;After the installation process, the VM is rebooted, I log into it (by
SSH or via the console), so I can configure a bit the system.&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;david@host:~&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;ssh root@openstack-squeeze-amd64.vm.logilab.fr
Linux openstack-squeeze-amd64 2.6.32-5-amd64 &lt;span class=&quot;c&quot;&gt;#1 SMP Sun Sep 23 10:07:46 UTC 2012 x86_64&lt;/span&gt;

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms &lt;span class=&quot;k&quot;&gt;for &lt;/span&gt;each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sun Dec 23 20:14:24 2012 from 192.168.1.34
root@openstack-squeeze-amd64:~# apt-get update
root@openstack-squeeze-amd64:~# apt-get install vim curl parted &lt;span class=&quot;c&quot;&gt;# install some must have packages&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;...&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;
root@openstack-squeeze-amd64:~# dpkg-reconfigure locales &lt;span class=&quot;c&quot;&gt;# I like to have fr_FR and en_US in my locales&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;...&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;
root@openstack-squeeze-amd64:~# &lt;span class=&quot;nb&quot;&gt;echo &lt;/span&gt;virtio_baloon &amp;gt;&amp;gt; /etc/modules
root@openstack-squeeze-amd64:~# &lt;span class=&quot;nb&quot;&gt;echo &lt;/span&gt;acpiphp &amp;gt;&amp;gt; /etc/modules
root@openstack-squeeze-amd64:~# update-initramfs -u
root@openstack-squeeze-amd64:~# apt-get clean
root@openstack-squeeze-amd64:~# rm /etc/udev/rules.d/70-persistent-net.rules
root@openstack-squeeze-amd64:~# rm .bash_history
root@openstack-squeeze-amd64:~# poweroff
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;What we do here is to install some packages, do some
configurations. The important part is adding the &lt;tt class=&quot;docutils literal&quot;&gt;acpiphp&lt;/tt&gt; module so
the volume attachment will work in our instances. We also clean some
stuffs up before shutting the VM down.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;convert-the-image-into-an-ami-image&quot;&gt;
&lt;h4&gt;&lt;a&gt;3. Convert the image into an AMI image&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;Since I created the VM image as a qcow2 image, I needed to convert it back to a raw image:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;david@host:~&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;scp root@virthost:/var/lib/libvirt/images/openstack-squeeze-amd64.img .
david@host:~&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;qemu-img convert -O raw openstack-squeeze-amd64.img openstack-squeeze-amd64.raw
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Then, as I want a minimal-sized disk image, the filesystem must be
resized to minimal. I did this like described below, but I think there
are simpler methods to do so.&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;david@host:~&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;fdisk -l openstack-squeeze-amd64.raw  &lt;span class=&quot;c&quot;&gt;# display the partition location in the disk&lt;/span&gt;

Disk openstack-squeeze-amd64.raw: 5368 MB, 5368709120 bytes
149 heads, 8 sectors/track, 8796 cylinders, total 10485760 sectors
&lt;span class=&quot;nv&quot;&gt;Units&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; sectors of 1 * &lt;span class=&quot;nv&quot;&gt;512&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; 512 bytes
Sector size &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;logical/physical&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;: 512 bytes / 512 bytes
I/O size &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;minimum/optimal&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;: 512 bytes / 512 bytes
Disk identifier: 0x0001fab7

                   Device Boot      Start         End      Blocks   Id  System
debian-squeeze-amd64.raw1            2048    10483711     5240832   83  Linux
david@host:~&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;c&quot;&gt;# extract the filesystem from the image&lt;/span&gt;
david@host:~&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;dd &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;openstack-squeeze-amd64.raw &lt;span class=&quot;nv&quot;&gt;of&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;openstack-squeeze-amd64.ami &lt;span class=&quot;nv&quot;&gt;bs&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;1024 &lt;span class=&quot;nv&quot;&gt;skip&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;1024 &lt;span class=&quot;nv&quot;&gt;count&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;5240832
david@host:~&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;losetup /dev/loop1 openstack-squeeze-amd64.ami
david@host:~&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;mkdir /tmp/img
david@host:~&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;mount /dev/loop1 /tmp/img
david@host:~&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;cp /tmp/img/boot/vmlinuz-2.6.32-5-amd64 .
david@host:~&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;cp /tmp/img/boot/initrd.img-2.6.32-5-amd64 .
david@host:~&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;umount /tmp/img
david@host:~&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;e2fsck -f /dev/loop1 &lt;span class=&quot;c&quot;&gt;# required before a resize&lt;/span&gt;

e2fsck 1.42.5 &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;29-Jul-2012&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/loop1: 26218/327680 files &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;0.2% non-contiguous&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;, 201812/1310208 blocks
david@host:~&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;resize2fs -M /dev/loop1 &lt;span class=&quot;c&quot;&gt;# minimize the filesystem&lt;/span&gt;

resize2fs 1.42.5 &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;29-Jul-2012&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;
Resizing the filesystem on /dev/loop1 to 191461 &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt;4k&lt;span class=&quot;o&quot;&gt;)&lt;/span&gt; blocks.
The filesystem on /dev/loop1 is now 191461 blocks long.
david@host:~&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;&lt;span class=&quot;c&quot;&gt;# note the new size ^^^^ and the block size above (4k)&lt;/span&gt;
david@host:~&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;losetup -d /dev/loop1 &lt;span class=&quot;c&quot;&gt;# detach the lo device&lt;/span&gt;
david@host:~&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;dd &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;debian-squeeze-amd64.ami &lt;span class=&quot;nv&quot;&gt;of&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;debian-squeeze-amd64-reduced.ami &lt;span class=&quot;nv&quot;&gt;bs&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;4096 &lt;span class=&quot;nv&quot;&gt;count&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;191461
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;upload-in-openstack&quot;&gt;
&lt;h4&gt;&lt;a&gt;4. Upload in OpenStack&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;After all this, you have a kernel image, a init ramdisk file and a
minimized root filesystem image file. So you just have to upload them to
your OpenStack image provider (glance):&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;david@host:~&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;glance add &lt;span class=&quot;nv&quot;&gt;disk_format&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;aki &lt;span class=&quot;nv&quot;&gt;container_format&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;aki &lt;span class=&quot;nv&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;debian-squeeze-uec-x86_64-kernel&amp;quot;&lt;/span&gt; &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
                 &amp;lt; vmlinuz-2.6.32-5-amd64
Uploading image &lt;span class=&quot;s1&quot;&gt;&amp;#39;debian-squeeze-uec-x86_64-kernel&amp;#39;&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;==================================================================================[&lt;/span&gt;100%&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt; 24.1M/s, ETA  0h  0m  0s
Added new image with ID: 644e59b8-1503-403f-a4fe-746d4dac2ff8
david@host:~&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;glance add &lt;span class=&quot;nv&quot;&gt;disk_format&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;ari &lt;span class=&quot;nv&quot;&gt;container_format&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;ari &lt;span class=&quot;nv&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;debian-squeeze-uec-x86_64-initrd&amp;quot;&lt;/span&gt; &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
                 &amp;lt; initrd.img-2.6.32-5-amd64
Uploading image &lt;span class=&quot;s1&quot;&gt;&amp;#39;debian-squeeze-uec-x86_64-initrd&amp;#39;&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;==================================================================================[&lt;/span&gt;100%&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt; 26.7M/s, ETA  0h  0m  0s
Added new image with ID: 6f75f1c9-1e27-4cb0-bbe0-d30defa8285c
david@host:~&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;glance add &lt;span class=&quot;nv&quot;&gt;disk_format&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;ami &lt;span class=&quot;nv&quot;&gt;container_format&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;ami &lt;span class=&quot;nv&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;debian-squeeze-uec-x86_64&amp;quot;&lt;/span&gt; &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
                 &lt;span class=&quot;nv&quot;&gt;kernel_id&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;644e59b8-1503-403f-a4fe-746d4dac2ff8 &lt;span class=&quot;nv&quot;&gt;ramdisk_id&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;6f75f1c9-1e27-4cb0-bbe0-d30defa8285c &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
                 &amp;lt; debian-squeeze-amd64-reduced.ami
Uploading image &lt;span class=&quot;s1&quot;&gt;&amp;#39;debian-squeeze-uec-x86_64&amp;#39;&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;==================================================================================[&lt;/span&gt;100%&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt; 42.1M/s, ETA  0h  0m  0s
Added new image with ID: 4abc09ae-ea34-44c5-8d54-504948e8d1f7
&lt;/pre&gt;&lt;/div&gt;
&lt;img alt=&quot;http://www.logilab.org/file/115220?vid=download&quot; src=&quot;http://www.logilab.org/file/115220?vid=download&quot; style=&quot;width: 80%;&quot; /&gt;
&lt;p&gt;And that&#39;s it (!). I now have a working Debian squeeze image in my cloud that works fine:&lt;/p&gt;
&lt;img alt=&quot;http://www.logilab.org/file/115221?vid=download&quot; src=&quot;http://www.logilab.org/file/115221?vid=download&quot; style=&quot;width: 80%;&quot; /&gt;
&lt;/div&gt;
&lt;/div&gt;
</description>
  <dc:date>2012-12-23T22:15-01:00</dc:date>
  <dc:creator>David Douard</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/115136</guid>
  <title>Nazca is out !</title>
  <link>http://www.logilab.org/blogentry/115136</link>
  <description>&lt;div class=&quot;section&quot; id=&quot;what-is-it-for&quot;&gt;
&lt;h3&gt;&lt;a&gt;What is it for ?&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;a class=&quot;reference&quot; href=&quot;https://www.logilab.org/project/Nazca&quot;&gt;Nazca&lt;/a&gt; is a python library aiming to
help you to &lt;em&gt;align data&lt;/em&gt;. But, what does “align data”&amp;nbsp;mean? For instance,
you have a list of cities, described by their name and their country and you
would like to find their URI on dbpedia to have more information about them, as
the longitude and the latitude.  If you have two or three cities, it can be done
with bare hands, but it could not if there are hundreds or thousands cities.
Nazca provides you all the stuff we need to do it.&lt;/p&gt;
&lt;p&gt;This blog post aims to introduce you how this library works and can be used.
Once you have understood the main concepts behind this library, don&#39;t hesitate
to try Nazca &lt;a class=&quot;reference&quot; href=&quot;http://demo.cubicweb.org/nazca/view?vid=nazca&quot;&gt;online&lt;/a&gt; !&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;introduction&quot;&gt;
&lt;h3&gt;&lt;a&gt;Introduction&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The alignment process is divided into three main steps:&lt;/p&gt;
&lt;ol class=&quot;arabic simple&quot;&gt;
&lt;li&gt;Gather and format the data we want to align.
In this step, we define two sets called the &lt;tt class=&quot;docutils literal&quot;&gt;alignset&lt;/tt&gt; and the
&lt;tt class=&quot;docutils literal&quot;&gt;targetset&lt;/tt&gt;. The &lt;tt class=&quot;docutils literal&quot;&gt;alignset&lt;/tt&gt; contains our data, and the
&lt;tt class=&quot;docutils literal&quot;&gt;targetset&lt;/tt&gt; contains the data on which we would like to make the links.&lt;/li&gt;
&lt;li&gt;Compute the similarity between the items gathered.  We compute a distance
matrix between the two sets according to a given distance.&lt;/li&gt;
&lt;li&gt;Find the items having a high similarity thanks to the distance matrix.&lt;/li&gt;
&lt;/ol&gt;
&lt;div class=&quot;section&quot; id=&quot;simple-case&quot;&gt;
&lt;h4&gt;&lt;a&gt;Simple case&lt;/a&gt;&lt;/h4&gt;
&lt;ol class=&quot;arabic simple&quot;&gt;
&lt;li&gt;Let&#39;s define &lt;tt class=&quot;docutils literal&quot;&gt;alignset&lt;/tt&gt; and &lt;tt class=&quot;docutils literal&quot;&gt;targetset&lt;/tt&gt; as simple python lists.&lt;/li&gt;
&lt;/ol&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;n&quot;&gt;alignset&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;Victor Hugo&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;Albert Camus&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;targetset&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;Albert Camus&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;Guillaume Apollinaire&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;Victor Hugo&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;ol class=&quot;arabic&quot; start=&quot;2&quot;&gt;
&lt;li&gt;&lt;p class=&quot;first&quot;&gt;Now, we have to compute the similarity between each items. For that purpose, the
&lt;a class=&quot;reference&quot; href=&quot;http://en.wikipedia.org/wiki/Levenshtein_distance&quot;&gt;Levenshtein distance&lt;/a&gt;
&lt;a class=&quot;footnote-reference&quot; href=&quot;#id2&quot; id=&quot;id1&quot;&gt;[1]&lt;/a&gt;, which is well accurate to compute the distance between few words, is used.
Such a function is provided in the &lt;tt class=&quot;docutils literal&quot;&gt;nazca.distance&lt;/tt&gt; module.&lt;/p&gt;
&lt;p&gt;The next step is to compute the distance matrix according to the Levenshtein
distance. The result is given in the following table.&lt;/p&gt;
&lt;table border=&quot;1&quot; class=&quot;docutils&quot;&gt;
&lt;colgroup&gt;
&lt;col width=&quot;22%&quot; /&gt;
&lt;col width=&quot;22%&quot; /&gt;
&lt;col width=&quot;36%&quot; /&gt;
&lt;col width=&quot;20%&quot; /&gt;
&lt;/colgroup&gt;
&lt;thead valign=&quot;bottom&quot;&gt;
&lt;tr&gt;&lt;th class=&quot;head&quot;&gt;&amp;nbsp;&lt;/th&gt;
&lt;th class=&quot;head&quot;&gt;&lt;p class=&quot;first last&quot;&gt;Albert Camus&lt;/p&gt;
&lt;/th&gt;
&lt;th class=&quot;head&quot;&gt;&lt;p class=&quot;first last&quot;&gt;Guillaume Apollinaire&lt;/p&gt;
&lt;/th&gt;
&lt;th class=&quot;head&quot;&gt;&lt;p class=&quot;first last&quot;&gt;Victor Hugo&lt;/p&gt;
&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody valign=&quot;top&quot;&gt;
&lt;tr&gt;&lt;td&gt;&lt;p class=&quot;first last&quot;&gt;Victor Hugo&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;&lt;p class=&quot;first last&quot;&gt;6&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;&lt;p class=&quot;first last&quot;&gt;9&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;&lt;p class=&quot;first last&quot;&gt;0&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;p class=&quot;first last&quot;&gt;Albert Camus&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;&lt;p class=&quot;first last&quot;&gt;0&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;&lt;p class=&quot;first last&quot;&gt;8&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;&lt;p class=&quot;first last&quot;&gt;6&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class=&quot;first&quot;&gt;The alignment process is ended by reading the matrix and saying items having a
value inferior to a given threshold are identical.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;table class=&quot;docutils footnote&quot; frame=&quot;void&quot; id=&quot;id2&quot; rules=&quot;none&quot;&gt;
&lt;colgroup&gt;&lt;col class=&quot;label&quot; /&gt;&lt;col /&gt;&lt;/colgroup&gt;
&lt;tbody valign=&quot;top&quot;&gt;
&lt;tr&gt;&lt;td class=&quot;label&quot;&gt;&lt;a class=&quot;fn-backref&quot; href=&quot;#id1&quot;&gt;[1]&lt;/a&gt;&lt;/td&gt;&lt;td&gt;Also called the &lt;em&gt;edit distance&lt;/em&gt;, because the distance between two words
is equal to the number of single-character edits required to change one
word into the other.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;a-more-complex-one&quot;&gt;
&lt;h4&gt;&lt;a&gt;A more complex one&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;The previous case was simple, because we had only one &lt;em&gt;attribute&lt;/em&gt; to align (the
name), but it is frequent to have a lot of &lt;em&gt;attributes&lt;/em&gt; to align, such as the name
and the birth date and the birth city. The steps remain the same, except that
three distance matrices will be computed, and &lt;em&gt;items&lt;/em&gt; will be represented as
nested lists. See the following example:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;n&quot;&gt;alignset&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[[&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;Paul Dupont&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;14-08-1991&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;Paris&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt;
            &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;Jacques Dupuis&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;06-01-1999&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;Bressuire&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt;
            &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;Michel Edouard&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;18-04-1881&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;Nantes&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]]&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;targetset&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[[&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;Dupond Paul&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;14/08/1991&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;Paris&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt;
             &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;Edouard Michel&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;18/04/1881&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;Nantes&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt;
             &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;Dupuis Jacques &amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;06/01/1999&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;Bressuire&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt;
             &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;Dupont Paul&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;01-12-2012&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;Paris&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]]&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;In such a case, two distance functions are used, the Levenshtein one for the
name and the city and a temporal one for the birth date &lt;a class=&quot;footnote-reference&quot; href=&quot;#id5&quot; id=&quot;id3&quot;&gt;[2]&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The &lt;tt class=&quot;docutils literal&quot;&gt;cdist&lt;/tt&gt; function of &lt;tt class=&quot;docutils literal&quot;&gt;nazca.distances&lt;/tt&gt; enables us to compute those
matrices&amp;nbsp;:&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;For the names:&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;nazca&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;matrix&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cdist&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;([&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;alignset&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;t&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;t&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;targetset&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;                    &lt;span class=&quot;s&quot;&gt;&amp;#39;levenshtein&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;matrix_normalized&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;False&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;array&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;([[&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;1.&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;  &lt;span class=&quot;mf&quot;&gt;6.&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;  &lt;span class=&quot;mf&quot;&gt;5.&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;  &lt;span class=&quot;mf&quot;&gt;0.&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt;
       &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;5.&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;  &lt;span class=&quot;mf&quot;&gt;6.&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;  &lt;span class=&quot;mf&quot;&gt;0.&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;  &lt;span class=&quot;mf&quot;&gt;5.&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt;
       &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;6.&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;  &lt;span class=&quot;mf&quot;&gt;0.&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;  &lt;span class=&quot;mf&quot;&gt;6.&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;  &lt;span class=&quot;mf&quot;&gt;6.&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]],&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;dtype&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;float32&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;table border=&quot;1&quot; class=&quot;docutils&quot;&gt;
&lt;colgroup&gt;
&lt;col width=&quot;22%&quot; /&gt;
&lt;col width=&quot;18%&quot; /&gt;
&lt;col width=&quot;22%&quot; /&gt;
&lt;col width=&quot;22%&quot; /&gt;
&lt;col width=&quot;18%&quot; /&gt;
&lt;/colgroup&gt;
&lt;thead valign=&quot;bottom&quot;&gt;
&lt;tr&gt;&lt;th class=&quot;head&quot;&gt;&amp;nbsp;&lt;/th&gt;
&lt;th class=&quot;head&quot;&gt;Dupond Paul&lt;/th&gt;
&lt;th class=&quot;head&quot;&gt;Edouard Michel&lt;/th&gt;
&lt;th class=&quot;head&quot;&gt;Dupuis Jacques&lt;/th&gt;
&lt;th class=&quot;head&quot;&gt;Dupont Paul&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody valign=&quot;top&quot;&gt;
&lt;tr&gt;&lt;td&gt;Paul Dupont&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;6&lt;/td&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Jacques Dupuis&lt;/td&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;6&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Edouard Michel&lt;/td&gt;
&lt;td&gt;6&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;6&lt;/td&gt;
&lt;td&gt;6&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;For the birthdates:&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;nazca&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;matrix&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cdist&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;([&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;alignset&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;t&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;t&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;targetset&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;                    &lt;span class=&quot;s&quot;&gt;&amp;#39;temporal&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;matrix_normalized&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;False&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;array&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;([[&lt;/span&gt;     &lt;span class=&quot;mf&quot;&gt;0.&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;  &lt;span class=&quot;mf&quot;&gt;40294.&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;   &lt;span class=&quot;mf&quot;&gt;2702.&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;   &lt;span class=&quot;mf&quot;&gt;7780.&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt;
       &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;  &lt;span class=&quot;mf&quot;&gt;2702.&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;  &lt;span class=&quot;mf&quot;&gt;42996.&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;      &lt;span class=&quot;mf&quot;&gt;0.&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;   &lt;span class=&quot;mf&quot;&gt;5078.&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt;
       &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;40294.&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;      &lt;span class=&quot;mf&quot;&gt;0.&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;  &lt;span class=&quot;mf&quot;&gt;42996.&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;  &lt;span class=&quot;mf&quot;&gt;48074.&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]],&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;dtype&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;float32&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;table border=&quot;1&quot; class=&quot;docutils&quot;&gt;
&lt;colgroup&gt;
&lt;col width=&quot;20%&quot; /&gt;
&lt;col width=&quot;20%&quot; /&gt;
&lt;col width=&quot;20%&quot; /&gt;
&lt;col width=&quot;20%&quot; /&gt;
&lt;col width=&quot;20%&quot; /&gt;
&lt;/colgroup&gt;
&lt;thead valign=&quot;bottom&quot;&gt;
&lt;tr&gt;&lt;th class=&quot;head&quot;&gt;&amp;nbsp;&lt;/th&gt;
&lt;th class=&quot;head&quot;&gt;14/08/1991&lt;/th&gt;
&lt;th class=&quot;head&quot;&gt;18/04/1881&lt;/th&gt;
&lt;th class=&quot;head&quot;&gt;06/01/1999&lt;/th&gt;
&lt;th class=&quot;head&quot;&gt;01-12-2012&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody valign=&quot;top&quot;&gt;
&lt;tr&gt;&lt;td&gt;14-08-1991&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;40294&lt;/td&gt;
&lt;td&gt;2702&lt;/td&gt;
&lt;td&gt;7780&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;06-01-1999&lt;/td&gt;
&lt;td&gt;2702&lt;/td&gt;
&lt;td&gt;42996&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;5078&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;18-04-1881&lt;/td&gt;
&lt;td&gt;40294&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;42996&lt;/td&gt;
&lt;td&gt;48074&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;For the birthplaces:&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;nazca&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;matrix&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cdist&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;([&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;alignset&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;t&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;t&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;targetset&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt;                    &lt;span class=&quot;s&quot;&gt;&amp;#39;levenshtein&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;matrix_normalized&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;False&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;array&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;([[&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;0.&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;  &lt;span class=&quot;mf&quot;&gt;4.&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;  &lt;span class=&quot;mf&quot;&gt;8.&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;  &lt;span class=&quot;mf&quot;&gt;0.&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt;
       &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;8.&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;  &lt;span class=&quot;mf&quot;&gt;9.&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;  &lt;span class=&quot;mf&quot;&gt;0.&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;  &lt;span class=&quot;mf&quot;&gt;8.&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt;
       &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;4.&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;  &lt;span class=&quot;mf&quot;&gt;0.&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;  &lt;span class=&quot;mf&quot;&gt;9.&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;  &lt;span class=&quot;mf&quot;&gt;4.&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]],&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;dtype&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;float32&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;table border=&quot;1&quot; class=&quot;docutils&quot;&gt;
&lt;colgroup&gt;
&lt;col width=&quot;25%&quot; /&gt;
&lt;col width=&quot;16%&quot; /&gt;
&lt;col width=&quot;18%&quot; /&gt;
&lt;col width=&quot;25%&quot; /&gt;
&lt;col width=&quot;16%&quot; /&gt;
&lt;/colgroup&gt;
&lt;thead valign=&quot;bottom&quot;&gt;
&lt;tr&gt;&lt;th class=&quot;head&quot;&gt;&amp;nbsp;&lt;/th&gt;
&lt;th class=&quot;head&quot;&gt;Paris&lt;/th&gt;
&lt;th class=&quot;head&quot;&gt;Nantes&lt;/th&gt;
&lt;th class=&quot;head&quot;&gt;Bressuire&lt;/th&gt;
&lt;th class=&quot;head&quot;&gt;Paris&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody valign=&quot;top&quot;&gt;
&lt;tr&gt;&lt;td&gt;Paris&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;8&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Bressuire&lt;/td&gt;
&lt;td&gt;8&lt;/td&gt;
&lt;td&gt;9&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;8&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Nantes&lt;/td&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;9&lt;/td&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;The next step is gathering those three matrices into a global one, called the
&lt;cite&gt;global alignment matrix&lt;/cite&gt;. Thus we have :&lt;/p&gt;
&lt;table border=&quot;1&quot; class=&quot;docutils&quot;&gt;
&lt;colgroup&gt;
&lt;col width=&quot;10%&quot; /&gt;
&lt;col width=&quot;23%&quot; /&gt;
&lt;col width=&quot;23%&quot; /&gt;
&lt;col width=&quot;23%&quot; /&gt;
&lt;col width=&quot;23%&quot; /&gt;
&lt;/colgroup&gt;
&lt;thead valign=&quot;bottom&quot;&gt;
&lt;tr&gt;&lt;th class=&quot;head&quot;&gt;&amp;nbsp;&lt;/th&gt;
&lt;th class=&quot;head&quot;&gt;0&lt;/th&gt;
&lt;th class=&quot;head&quot;&gt;1&lt;/th&gt;
&lt;th class=&quot;head&quot;&gt;2&lt;/th&gt;
&lt;th class=&quot;head&quot;&gt;3&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody valign=&quot;top&quot;&gt;
&lt;tr&gt;&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;40304&lt;/td&gt;
&lt;td&gt;2715&lt;/td&gt;
&lt;td&gt;7780&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;2715&lt;/td&gt;
&lt;td&gt;43011&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;5091&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;40304&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;43011&lt;/td&gt;
&lt;td&gt;48084&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Allowing some misspelling mistakes (for example &lt;em&gt;Dupont&lt;/em&gt; and &lt;em&gt;Dupond&lt;/em&gt; are very
closed), the matching threshold can be set to 1 or 2. Thus we can see that the
item 0 in our &lt;tt class=&quot;docutils literal&quot;&gt;alignset&lt;/tt&gt; is the same that the item 0 in the &lt;tt class=&quot;docutils literal&quot;&gt;targetset&lt;/tt&gt;, the
1 in the &lt;tt class=&quot;docutils literal&quot;&gt;alignset&lt;/tt&gt; and the 2 of the &lt;tt class=&quot;docutils literal&quot;&gt;targetset&lt;/tt&gt; too : the links can be
done&amp;nbsp;!&lt;/p&gt;
&lt;p&gt;It&#39;s important to notice that even if the item 0 of the &lt;tt class=&quot;docutils literal&quot;&gt;alignset&lt;/tt&gt; and the 3
of the &lt;tt class=&quot;docutils literal&quot;&gt;targetset&lt;/tt&gt; have the same name and the same birthplace they are
unlikely identical because of their very different birth date.&lt;/p&gt;
&lt;p&gt;You may have noticed that working with matrices as I did for the example is a
little bit boring. The good news is that &lt;a class=&quot;reference&quot; href=&quot;https://www.logilab.org/project/Nazca&quot;&gt;Nazca&lt;/a&gt; makes all this job for you. You just
have to give the sets and distance functions and that&#39;s all. An other good news
is the project comes with the needed functions to build the sets !&lt;/p&gt;
&lt;table class=&quot;docutils footnote&quot; frame=&quot;void&quot; id=&quot;id5&quot; rules=&quot;none&quot;&gt;
&lt;colgroup&gt;&lt;col class=&quot;label&quot; /&gt;&lt;col /&gt;&lt;/colgroup&gt;
&lt;tbody valign=&quot;top&quot;&gt;
&lt;tr&gt;&lt;td class=&quot;label&quot;&gt;&lt;a class=&quot;fn-backref&quot; href=&quot;#id3&quot;&gt;[2]&lt;/a&gt;&lt;/td&gt;&lt;td&gt;Provided in the &lt;tt class=&quot;docutils literal&quot;&gt;nazca.distances&lt;/tt&gt; module.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;real-applications&quot;&gt;
&lt;h3&gt;&lt;a&gt;Real applications&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Just before we start, we will assume the following imports have been done:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;nazca&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;dataio&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;aldio&lt;/span&gt;   &lt;span class=&quot;c&quot;&gt;#Functions for input and output data&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;nazca&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;distances&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ald&lt;/span&gt;  &lt;span class=&quot;c&quot;&gt;#Functions to compute the distances&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;nazca&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;normalize&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;aln&lt;/span&gt;  &lt;span class=&quot;c&quot;&gt;#Functions to normalize data&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;nazca&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;aligner&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ala&lt;/span&gt;    &lt;span class=&quot;c&quot;&gt;#Functions to align data&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;the-goncourt-prize&quot;&gt;
&lt;h4&gt;&lt;a&gt;The Goncourt prize&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;On wikipedia, we can find the &lt;a class=&quot;reference&quot; href=&quot;https://fr.wikipedia.org/wiki/Prix_Goncourt#Liste_des_laur.C3.A9ats&quot;&gt;Goncourt prize winners&lt;/a&gt;, and we
would like to establish a link between the winners and their URI on dbpedia
(Let&#39;s imagine the &lt;em&gt;Goncourt prize winners&lt;/em&gt; category does not exist in dbpedia)&lt;/p&gt;
&lt;p&gt;We simply copy/paste the winners list of wikipedia into a file and replace all
the separators (&lt;tt class=&quot;docutils literal&quot;&gt;-&lt;/tt&gt; and &lt;tt class=&quot;docutils literal&quot;&gt;,&lt;/tt&gt;) by &lt;tt class=&quot;docutils literal&quot;&gt;#&lt;/tt&gt;. So, the beginning of our file is :&lt;/p&gt;
&lt;!--  --&gt;
&lt;blockquote&gt;
&lt;div class=&quot;line-block&quot;&gt;
&lt;div class=&quot;line&quot;&gt;1903#John-Antoine Nau#Force ennemie (Plume)&lt;/div&gt;
&lt;div class=&quot;line&quot;&gt;1904#Léon Frapié#La Maternelle (Albin Michel)&lt;/div&gt;
&lt;div class=&quot;line&quot;&gt;1905#Claude Farrère#Les Civilisés (Paul Ollendorff)&lt;/div&gt;
&lt;div class=&quot;line&quot;&gt;1906#Jérôme et Jean Tharaud#Dingley, l&#39;illustre écrivain (Cahiers de la Quinzaine)&lt;/div&gt;
&lt;/div&gt;
&lt;/blockquote&gt;
&lt;p&gt;When using the high-level functions of this library, each item must have at
least two elements: an &lt;em&gt;identifier&lt;/em&gt; (the name, or the URI) and the &lt;em&gt;attribute&lt;/em&gt; to
compare. With the previous file, we will use the name (so the column number 1)
as &lt;em&gt;identifier&lt;/em&gt; (we don&#39;t have an &lt;em&gt;URI&lt;/em&gt; here as identifier) and &lt;em&gt;attribute&lt;/em&gt; to align.
This is told to python thanks to the following code:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;n&quot;&gt;alignset&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;aldio&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;parsefile&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;prixgoncourt&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;indexes&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;delimiter&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;#&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;So, the beginning of our &lt;tt class=&quot;docutils literal&quot;&gt;alignset&lt;/tt&gt; is:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;o&quot;&gt;&amp;gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;alignset&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;[[&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;u&amp;#39;John-Antoine Nau&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;u&amp;#39;John-Antoine Nau&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt;
 &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;u&amp;#39;Léon Frapié&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;u&amp;#39;Léon, Frapié&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt;
 &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;u&amp;#39;Claude Farrère&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;u&amp;#39;Claude Farrère&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]]&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Now, let&#39;s build the &lt;tt class=&quot;docutils literal&quot;&gt;targetset&lt;/tt&gt; thanks to a &lt;em&gt;sparql query&lt;/em&gt; and the dbpedia
end-point. We ask for the list of the French novelists, described by their URI
and their name in French:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;n&quot;&gt;query&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
&lt;span class=&quot;s&quot;&gt;     SELECT ?writer, ?name WHERE {&lt;/span&gt;
&lt;span class=&quot;s&quot;&gt;       ?writer  &amp;lt;http://purl.org/dc/terms/subject&amp;gt; &amp;lt;http://dbpedia.org/resource/Category:French_novelists&amp;gt;.&lt;/span&gt;
&lt;span class=&quot;s&quot;&gt;       ?writer rdfs:label ?name.&lt;/span&gt;
&lt;span class=&quot;s&quot;&gt;       FILTER(lang(?name) = &amp;#39;fr&amp;#39;)&lt;/span&gt;
&lt;span class=&quot;s&quot;&gt;    }&lt;/span&gt;
&lt;span class=&quot;s&quot;&gt; &amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
 &lt;span class=&quot;n&quot;&gt;targetset&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;aldio&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sparqlquery&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;http://dbpedia.org/sparql&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;query&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Both functions return nested lists as presented before. Now, we have to define
the distance function to be used for the alignment. This is done thanks to a
python dictionary where the keys are the columns to work on, and the values are
the treatments to apply.&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;n&quot;&gt;treatments&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;metric&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ald&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;levenshtein&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}}&lt;/span&gt; &lt;span class=&quot;c&quot;&gt;# Use a levenshtein on the name&lt;/span&gt;
                                              &lt;span class=&quot;c&quot;&gt;# (column 1)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Finally, the last thing we have to do, is to call the &lt;tt class=&quot;docutils literal&quot;&gt;alignall&lt;/tt&gt; function:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;n&quot;&gt;alignments&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ala&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;alignall&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;alignset&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;targetset&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                       &lt;span class=&quot;mf&quot;&gt;0.4&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;c&quot;&gt;#This is the matching threshold&lt;/span&gt;
                       &lt;span class=&quot;n&quot;&gt;treatments&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                       &lt;span class=&quot;n&quot;&gt;mode&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;None&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;c&quot;&gt;#We&amp;#39;ll discuss about that later&lt;/span&gt;
                       &lt;span class=&quot;n&quot;&gt;uniq&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;True&lt;/span&gt; &lt;span class=&quot;c&quot;&gt;#Get the best results only&lt;/span&gt;
                      &lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;This function returns an iterator over the different alignments done. You can
see the results thanks to the following code&amp;nbsp;:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;k&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;t&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;alignments&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;print&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;%s&lt;/span&gt;&lt;span class=&quot;s&quot;&gt; has been aligned onto &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;%s&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;t&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;It may be important to apply some pre-treatment on the data to align. For
instance, names can be written with lower or upper characters, with extra
characters as punctuation or unwanted information in parenthesis and so on. That
is why we provide some functions to &lt;cite&gt;normalize&lt;/cite&gt; your data. The most useful may
be the &lt;cite&gt;simplify()&lt;/cite&gt; function (see the docstring for more information). So the
treatments list can be given as follow:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;remove_after&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;string&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;sub&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
    &lt;span class=&quot;sd&quot;&gt;&amp;quot;&amp;quot;&amp;quot; Remove the text after ``sub`` in ``string``&lt;/span&gt;
&lt;span class=&quot;sd&quot;&gt;        &amp;gt;&amp;gt;&amp;gt; remove_after(&amp;#39;I like cats and dogs&amp;#39;, &amp;#39;and&amp;#39;)&lt;/span&gt;
&lt;span class=&quot;sd&quot;&gt;        &amp;#39;I like cats&amp;#39;&lt;/span&gt;
&lt;span class=&quot;sd&quot;&gt;        &amp;gt;&amp;gt;&amp;gt; remove_after(&amp;#39;I like cats and dogs&amp;#39;, &amp;#39;(&amp;#39;)&lt;/span&gt;
&lt;span class=&quot;sd&quot;&gt;        &amp;#39;I like cats and dogs&amp;#39;&lt;/span&gt;
&lt;span class=&quot;sd&quot;&gt;    &amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;try&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;string&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[:&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;string&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;lower&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;index&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sub&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;lower&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;())]&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;strip&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;except&lt;/span&gt; &lt;span class=&quot;ne&quot;&gt;ValueError&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;string&lt;/span&gt;


&lt;span class=&quot;n&quot;&gt;treatments&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;normalization&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;lambda&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;remove_after&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;(&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;
                                    &lt;span class=&quot;n&quot;&gt;aln&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;simply&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt;
                  &lt;span class=&quot;s&quot;&gt;&amp;#39;metric&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ald&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;levenshtein&lt;/span&gt;
                 &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
             &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;cities-alignment&quot;&gt;
&lt;h4&gt;&lt;a&gt;Cities alignment&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;The previous case with the &lt;cite&gt;Goncourt prize winners&lt;/cite&gt; was pretty simply because
the number of items was small, and the computation fast. But in a more real use
case, the number of items to align may be huge (some thousands or millions…). In
such a case it&#39;s unthinkable to build the global alignment matrix because it
would be too big and it would take (at least...) fews days to achieve the computation.
So the idea is to make small groups of possible similar data to compute smaller
matrices (i.e. a &lt;em&gt;divide and conquer&lt;/em&gt; approach).
For this purpose, we provide some functions to group/cluster data. We have
functions to group text and numerical data.&lt;/p&gt;
&lt;p&gt;This is the code used, we will explain it:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;n&quot;&gt;targetset&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;aldio&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;rqlquery&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;http://demo.cubicweb.org/geonames&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                           &lt;span class=&quot;sd&quot;&gt;&amp;quot;&amp;quot;&amp;quot;Any U, N, LONG, LAT WHERE X is Location, X name&lt;/span&gt;
&lt;span class=&quot;sd&quot;&gt;                              N, X country C, C name &amp;quot;France&amp;quot;, X longitude&lt;/span&gt;
&lt;span class=&quot;sd&quot;&gt;                              LONG, X latitude LAT, X population &amp;gt; 1000, X&lt;/span&gt;
&lt;span class=&quot;sd&quot;&gt;                              feature_class &amp;quot;P&amp;quot;, X cwuri U&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                           &lt;span class=&quot;n&quot;&gt;indexes&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)])&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;alignset&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;aldio&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sparqlquery&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;http://dbpedia.inria.fr/sparql&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                             &lt;span class=&quot;sd&quot;&gt;&amp;quot;&amp;quot;&amp;quot;prefix db-owl: &amp;lt;http://dbpedia.org/ontology/&amp;gt;&lt;/span&gt;
&lt;span class=&quot;sd&quot;&gt;                             prefix db-prop: &amp;lt;http://fr.dbpedia.org/property/&amp;gt;&lt;/span&gt;
&lt;span class=&quot;sd&quot;&gt;                             select ?ville, ?name, ?long, ?lat where {&lt;/span&gt;
&lt;span class=&quot;sd&quot;&gt;                              ?ville db-owl:country &amp;lt;http://fr.dbpedia.org/resource/France&amp;gt; .&lt;/span&gt;
&lt;span class=&quot;sd&quot;&gt;                              ?ville rdf:type db-owl:PopulatedPlace .&lt;/span&gt;
&lt;span class=&quot;sd&quot;&gt;                              ?ville db-owl:populationTotal ?population .&lt;/span&gt;
&lt;span class=&quot;sd&quot;&gt;                              ?ville foaf:name ?name .&lt;/span&gt;
&lt;span class=&quot;sd&quot;&gt;                              ?ville db-prop:longitude ?long .&lt;/span&gt;
&lt;span class=&quot;sd&quot;&gt;                              ?ville db-prop:latitude ?lat .&lt;/span&gt;
&lt;span class=&quot;sd&quot;&gt;                              FILTER (?population &amp;gt; 1000)&lt;/span&gt;
&lt;span class=&quot;sd&quot;&gt;                             }&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                             &lt;span class=&quot;n&quot;&gt;indexes&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)])&lt;/span&gt;


&lt;span class=&quot;n&quot;&gt;treatments&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;normalization&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;aln&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;simply&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt;
                  &lt;span class=&quot;s&quot;&gt;&amp;#39;metric&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ald&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;levenshtein&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                  &lt;span class=&quot;s&quot;&gt;&amp;#39;matrix_normalized&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;bp&quot;&gt;False&lt;/span&gt;
                 &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
             &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;results&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;ala&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;alignall&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;alignset&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;targetset&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;treatments&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;treatments&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;c&quot;&gt;#As before&lt;/span&gt;
                       &lt;span class=&quot;n&quot;&gt;indexes&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;c&quot;&gt;#On which data build the kdtree&lt;/span&gt;
                       &lt;span class=&quot;n&quot;&gt;mode&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;kdtree&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;  &lt;span class=&quot;c&quot;&gt;#The mode to use&lt;/span&gt;
                       &lt;span class=&quot;n&quot;&gt;uniq&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;True&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;c&quot;&gt;#Return only the best results&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Let&#39;s explain the code. We have two files, containing a list of cities we want
to align, the first column is the identifier, and the second is the name of the city
and the last one is location of the city (longitude and latitude), gathered into
a single tuple.&lt;/p&gt;
&lt;p&gt;In this example, we want to build a &lt;a class=&quot;reference&quot; href=&quot;http://en.wikipedia.org/wiki/K-d_tree&quot;&gt;kdtree&lt;/a&gt; on the couple (longitude, latitude)
to divide our data in few candidates. This clustering is coarse, and is only
used to reduce the potential candidats without loosing any more refined possible
matchs.&lt;/p&gt;
&lt;p&gt;So, in the next step, we define the treatments to apply.
It is the same as before, but we ask for a non-normalized matrix
(ie: the real output of the levenshtein distance).
Thus, we call the &lt;tt class=&quot;docutils literal&quot;&gt;alignall&lt;/tt&gt; function. &lt;tt class=&quot;docutils literal&quot;&gt;indexes&lt;/tt&gt; is a tuple saying the
position of the point on which the &lt;a class=&quot;reference&quot; href=&quot;http://en.wikipedia.org/wiki/K-d_tree&quot;&gt;kdtree&lt;/a&gt; must be built, &lt;tt class=&quot;docutils literal&quot;&gt;mode&lt;/tt&gt; is the mode
used to find neighbours &lt;a class=&quot;footnote-reference&quot; href=&quot;#id7&quot; id=&quot;id6&quot;&gt;[3]&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Finally, &lt;tt class=&quot;docutils literal&quot;&gt;uniq&lt;/tt&gt; ask to the function to return the best
candidate (ie: the one having the shortest distance below the given threshold)&lt;/p&gt;
&lt;p&gt;The function outputs a generator yielding tuples where the first element is the
identifier of the &lt;tt class=&quot;docutils literal&quot;&gt;alignset&lt;/tt&gt; item and the second is the &lt;tt class=&quot;docutils literal&quot;&gt;targetset&lt;/tt&gt; one (It
may take some time before yielding the first tuples, because all the computation
must be done…)&lt;/p&gt;
&lt;table class=&quot;docutils footnote&quot; frame=&quot;void&quot; id=&quot;id7&quot; rules=&quot;none&quot;&gt;
&lt;colgroup&gt;&lt;col class=&quot;label&quot; /&gt;&lt;col /&gt;&lt;/colgroup&gt;
&lt;tbody valign=&quot;top&quot;&gt;
&lt;tr&gt;&lt;td class=&quot;label&quot;&gt;&lt;a class=&quot;fn-backref&quot; href=&quot;#id6&quot;&gt;[3]&lt;/a&gt;&lt;/td&gt;&lt;td&gt;The available modes are &lt;tt class=&quot;docutils literal&quot;&gt;kdtree&lt;/tt&gt;, &lt;tt class=&quot;docutils literal&quot;&gt;kmeans&lt;/tt&gt; and &lt;tt class=&quot;docutils literal&quot;&gt;minibatch&lt;/tt&gt; for
numerical data and &lt;tt class=&quot;docutils literal&quot;&gt;minhashing&lt;/tt&gt; for text one.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;try-it-online&quot;&gt;
&lt;h3&gt;&lt;a&gt;Try it online !&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;We have also made this &lt;a class=&quot;reference&quot; href=&quot;http://demo.cubicweb.org/nazca/view?vid=nazca&quot;&gt;little application&lt;/a&gt; of Nazca, using &lt;a class=&quot;reference&quot; href=&quot;http://www.cubicweb.org/&quot;&gt;Cubicweb&lt;/a&gt;. This application provides a user interface for
Nazca, helping you to choose what you want to align. You can use sparql or rql
queries, as in the previous example, or import your own cvs file &lt;a class=&quot;footnote-reference&quot; href=&quot;#id9&quot; id=&quot;id8&quot;&gt;[4]&lt;/a&gt;. Once you
have choosen what you want to align, you can click the &lt;em&gt;Next step&lt;/em&gt; button to
customize the treatments you want to apply, just as you did before in python !
Once done, by clicking the &lt;em&gt;Next step&lt;/em&gt;, you start the alignment process. Wait a
little bit, and you can either download the results in a &lt;em&gt;csv&lt;/em&gt; or &lt;em&gt;rdf&lt;/em&gt; file, or
directly see the results online choosing the &lt;em&gt;html&lt;/em&gt; output.&lt;/p&gt;
&lt;table class=&quot;docutils footnote&quot; frame=&quot;void&quot; id=&quot;id9&quot; rules=&quot;none&quot;&gt;
&lt;colgroup&gt;&lt;col class=&quot;label&quot; /&gt;&lt;col /&gt;&lt;/colgroup&gt;
&lt;tbody valign=&quot;top&quot;&gt;
&lt;tr&gt;&lt;td class=&quot;label&quot;&gt;&lt;a class=&quot;fn-backref&quot; href=&quot;#id8&quot;&gt;[4]&lt;/a&gt;&lt;/td&gt;&lt;td&gt;Your csv file must be tab-separated for the moment…&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
</description>
  <dc:date>2012-12-21T19:01-01:00</dc:date>
  <dc:creator>Simon Chabot</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/114769</guid>
  <title>Openstack, Wheezy and ZFS on Linux</title>
  <link>http://www.logilab.org/blogentry/114769</link>
  <description>&lt;h3 class=&quot;title&quot;&gt;Openstack, Wheezy and ZFS on Linux&lt;/h3&gt;
&lt;p&gt;A while ago, I started the install of an &lt;a class=&quot;reference&quot; href=&quot;http://www.openstack.org&quot;&gt;OpenStack&lt;/a&gt; cluster at
Logilab, so our developers can play easily with any kind of
environment. We are planning to improve our &lt;a class=&quot;reference&quot; href=&quot;http://www.cubicweb.org/projects/apycot&quot;&gt;Apycot&lt;/a&gt; automatic testing
platform so it can use &amp;quot;elastic power&amp;quot;. And so on.&lt;/p&gt;
&lt;img alt=&quot;http://www.openstack.org/themes/openstack/images/open-stack-cloud-computing-logo-2.png&quot; src=&quot;http://www.openstack.org/themes/openstack/images/open-stack-cloud-computing-logo-2.png&quot; /&gt;
&lt;p&gt;I first tried a &lt;a class=&quot;reference&quot; href=&quot;http://www.ubuntu.com&quot;&gt;Ubuntu&lt;/a&gt; Precise based setup, since at that time,
&lt;a class=&quot;reference&quot; href=&quot;http://www.debian.org&quot;&gt;Debian&lt;/a&gt; packages were not really usable. The setup never reached a point
where it could be relased as production ready, due to the fact I tried a
too complex and bleeding edge configuration (involving &lt;a class=&quot;reference&quot; href=&quot;http://wiki.openstack.org/Quantum&quot;&gt;Quantum&lt;/a&gt;,
&lt;a class=&quot;reference&quot; href=&quot;http://openvswitch.org/&quot;&gt;openvswitch&lt;/a&gt;, &lt;a class=&quot;reference&quot; href=&quot;http://www.osrg.net/sheepdog/&quot;&gt;sheepdog&lt;/a&gt;)...&lt;/p&gt;
&lt;p&gt;Meanwhile, we went really short of storage capacity. For now, it
mainly consists in hard drives distributed in our 19&amp;quot; Dell racks
(generally with hardware RAID controllers).  So I recently purchased a
low-cost storage bay (&lt;a class=&quot;reference&quot; href=&quot;http://www.supermicro.com&quot;&gt;SuperMicro&lt;/a&gt; SC937 with a 6Gb/s JBOD-only HBA)
with 18 spinning hard drives and 4 SSDs. This storage bay being driven
by &lt;a class=&quot;reference&quot; href=&quot;http://zfsonlinux.org&quot;&gt;ZFS on Linux&lt;/a&gt; (tip: the SSD-stored ZIL &lt;strong&gt;is&lt;/strong&gt; a requirement to
get decent performances). This storage setup is still under test for
now.&lt;/p&gt;
&lt;img alt=&quot;http://zfsonlinux.org/images/zfs-linux.png&quot; src=&quot;http://zfsonlinux.org/images/zfs-linux.png&quot; /&gt;
&lt;p&gt;I also went to the last &lt;a class=&quot;reference&quot; href=&quot;http://fr2012.mini.debconf.org/&quot;&gt;Mini-DebConf&lt;/a&gt; in Paris, where Loic Dachary
&lt;a class=&quot;reference&quot; href=&quot;http://fr2012.mini.debconf.org/slides/openstack-and-debian.pdf&quot;&gt;presented&lt;/a&gt; the status of the &lt;a class=&quot;reference&quot; href=&quot;http://www.openstack.org&quot;&gt;OpenStack&lt;/a&gt; packaging effort in
Debian. This gave me the will to give a new try to OpenStack using
Wheezy and a bit simpler setup. But I could not
consider not to use my new ZFS-based storage as a &lt;cite&gt;nova volume&lt;/cite&gt;
provider. It is not available for now in OpenStack (there is a backend
for Solaris, but not for ZFS on Linux). However, this is Python and in
fact, the current &lt;a class=&quot;reference&quot; href=&quot;https://github.com/openstack/nova/blob/feaeadab934e3d31fd3562014ffd2e44ae6dce34/nova/volume/driver.py&quot;&gt;ISCSIDriver&lt;/a&gt; backend needs very little to
make it work with zfs instead of lvm as &amp;quot;elastics&amp;quot; block-volume
provider and manager.&lt;/p&gt;
&lt;p&gt;So, I wrote a custom nova volume driver to handle this. As I don&#39;t
want the nova-volume daemon to run on my ZFS SAN, I wrote this backend
mixing the &lt;a class=&quot;reference&quot; href=&quot;https://github.com/openstack/nova/blob/feaeadab934e3d31fd3562014ffd2e44ae6dce34/nova/volume/san.py&quot;&gt;SanISCSIDriver&lt;/a&gt; (which manages the storage system via
SSH) and the standard &lt;a class=&quot;reference&quot; href=&quot;https://github.com/openstack/nova/blob/feaeadab934e3d31fd3562014ffd2e44ae6dce34/nova/volume/driver.py&quot;&gt;ISCSIDriver&lt;/a&gt; (which uses standard Linux isci
target tools). I&#39;m not very fond of the API of the VolumeDriver
(especially the fact that the ISCSIDriver is responsible for 2 roles:
managing block-level volumes and exporting block-level volumes). This
small design flaw (IMHO) is the reason I had to duplicate some code
(not much but...) to implement my ZFSonLinuxISCSIDriver...&lt;/p&gt;
&lt;p&gt;So here is the setup I made:&lt;/p&gt;
&lt;div class=&quot;section&quot; id=&quot;infrastructure&quot;&gt;
&lt;h3&gt;&lt;a&gt;Infrastructure&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;My OpenStack Essex &amp;quot;cluster&amp;quot; consists for now in:&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;one control node, running in a &amp;quot;normal&amp;quot; libvirt-controlled virtual
machine; it is a Wheezy that runs:&lt;ul&gt;
&lt;li&gt;nova-api&lt;/li&gt;
&lt;li&gt;nova-cert&lt;/li&gt;
&lt;li&gt;nova-network&lt;/li&gt;
&lt;li&gt;nova-scheduler&lt;/li&gt;
&lt;li&gt;nova-volume&lt;/li&gt;
&lt;li&gt;glance&lt;/li&gt;
&lt;li&gt;postgresql&lt;/li&gt;
&lt;li&gt;OpenStack dashboard&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;one computing node (Dell R310, Xeon X3480, 32G, Wheezy), which runs:&lt;ul&gt;
&lt;li&gt;nova-api&lt;/li&gt;
&lt;li&gt;nova-network&lt;/li&gt;
&lt;li&gt;nova-compute&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;ZFS-on-Linux SAN (3x raidz1 poools made of 6 1T drives, 2x
(mirrored) 32G SLC SDDs, 2x 120G MLC SSDs for cache); for now, the storage is
exported to the SAN via one 1G ethernet link.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;opensstack-essex-setup&quot;&gt;
&lt;h3&gt;&lt;a&gt;OpensStack Essex setup&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;I mainly followed the &lt;a class=&quot;reference&quot; href=&quot;http://wiki.debian.org/OpenStackHowto&quot;&gt;Debian HOWTO&lt;/a&gt; to setup my private cloud. I
mainly tuned the network settings to match my environement (and the
fact my control node lives in a VM, with VLAN stuff handled by the
host).&lt;/p&gt;
&lt;p&gt;I easily got a working setup (I must admit that I think my
previous experiment with OpenStack helped a lot when dealing with
custom configurations... and vocabulary; I&#39;m not sure I would have
succeded &amp;quot;easily&amp;quot; following the HOWTO, but hey, it is a functionnal
HOWTO, meaning if you do not follow the instructions because you want
special tunings, don&#39;t blame the HOWTO).&lt;/p&gt;
&lt;p&gt;Compared to the HOWTO, my &lt;tt class=&quot;docutils literal&quot;&gt;nova.conf&lt;/tt&gt; looks like (as of today):&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
[DEFAULT]
logdir=/var/log/nova
state_path=/var/lib/nova
lock_path=/var/lock/nova
root_helper=sudo nova-rootwrap
auth_strategy=keystone
dhcpbridge_flagfile=/etc/nova/nova.conf
dhcpbridge=/usr/bin/nova-dhcpbridge
sql_connection=postgresql://novacommon:XXX&amp;#64;control.openstack.logilab.fr/nova

##  Network config
# A nova-network on each compute node
multi_host=true
# VLan manger
network_manager=nova.network.manager.VlanManager
vlan_interface=eth1
# My ip
my-ip=172.17.10.2
public_interface=eth0
# Dmz &amp;amp; metadata things
dmz_cidr=169.254.169.254/32
ec2_dmz_host=169.254.169.254
metadata_host=169.254.169.254

## More general things
# The RabbitMQ host
rabbit_host=control.openstack.logilab.fr

## Glance
image_service=nova.image.glance.GlanceImageService
glance_api_servers=control.openstack.logilab.fr:9292
use-syslog=true
ec2_host=control.openstack.logilab.fr

novncproxy_base_url=http://control.openstack.logilab.fr:6080/vnc_auto.html
vncserver_listen=0.0.0.0
vncserver_proxyclient_address=127.0.0.1
&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;volume&quot;&gt;
&lt;h3&gt;&lt;a&gt;Volume&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;I had a bit more work to do to make nova-volume work. First, I got hit
by this nasty bug &lt;a class=&quot;reference&quot; href=&quot;http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=695791&quot;&gt;#695791&lt;/a&gt; which is trivial to fix... when you know
how to fix it (I noticed the bug report after I fixed it by myself).&lt;/p&gt;
&lt;p&gt;Then, as I wanted the volumes to be stored and exported by my shiny
new ZFS-on-Linux setup, I had to write my own volume driver, which was
quite easy, since it is Python, and the logic to implement was already
provided by the ISCSIDriver class on the one hand, and by the
SanISCSIDrvier on the other hand. So I ended with this firt
implementation. This file should be copied to nova volumes package
directory (nova/volume/zol.py):&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;c&quot;&gt;# vim: tabstop=4 shiftwidth=4 softtabstop=4&lt;/span&gt;

&lt;span class=&quot;c&quot;&gt;# Copyright 2010 United States Government as represented by the&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;# Administrator of the National Aeronautics and Space Administration.&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;# Copyright 2011 Justin Santa Barbara&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;# Copyright 2012 David DOUARD, LOGILAB S.A.&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;# All Rights Reserved.&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#    Licensed under the Apache License, Version 2.0 (the &amp;quot;License&amp;quot;); you may&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#    not use this file except in compliance with the License. You may obtain&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#    a copy of the License at&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#         http://www.apache.org/licenses/LICENSE-2.0&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#    Unless required by applicable law or agreed to in writing, software&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#    distributed under the License is distributed on an &amp;quot;AS IS&amp;quot; BASIS, WITHOUT&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#    License for the specific language governing permissions and limitations&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;#    under the License.&lt;/span&gt;
&lt;span class=&quot;sd&quot;&gt;&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
&lt;span class=&quot;sd&quot;&gt;Driver for ZFS-on-Linux-stored volumes.&lt;/span&gt;

&lt;span class=&quot;sd&quot;&gt;This is mainly a custom version of the ISCSIDriver that uses ZFS as&lt;/span&gt;
&lt;span class=&quot;sd&quot;&gt;volume provider, generally accessed over SSH.&lt;/span&gt;
&lt;span class=&quot;sd&quot;&gt;&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;

&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;os&lt;/span&gt;

&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;nova&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;exception&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;nova&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;flags&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;nova&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;utils&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;nova&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;log&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;logging&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;nova.openstack.common&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;cfg&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;nova.volume.driver&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;_iscsi_location&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;nova.volume&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;iscsi&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;nova.volume.san&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;SanISCSIDriver&lt;/span&gt;


&lt;span class=&quot;n&quot;&gt;LOG&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;logging&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;getLogger&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;__name__&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;san_opts&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;cfg&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;StrOpt&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;san_zfs_command&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
               &lt;span class=&quot;n&quot;&gt;default&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;/sbin/zfs&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
               &lt;span class=&quot;n&quot;&gt;help&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;The ZFS command.&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;FLAGS&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;flags&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;FLAGS&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;FLAGS&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;register_opts&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;san_opts&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;


&lt;span class=&quot;k&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;ZFSonLinuxISCSIDriver&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;SanISCSIDriver&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
    &lt;span class=&quot;sd&quot;&gt;&amp;quot;&amp;quot;&amp;quot;Executes commands relating to ZFS-on-Linux-hosted ISCSI volumes.&lt;/span&gt;

&lt;span class=&quot;sd&quot;&gt;    Basic setup for a ZoL iSCSI server:&lt;/span&gt;

&lt;span class=&quot;sd&quot;&gt;    XXX&lt;/span&gt;

&lt;span class=&quot;sd&quot;&gt;    Note that current implementation of ZFS on Linux does not handle:&lt;/span&gt;

&lt;span class=&quot;sd&quot;&gt;      zfs allow/unallow&lt;/span&gt;

&lt;span class=&quot;sd&quot;&gt;    For now, needs to have root access to the ZFS host. The best is to&lt;/span&gt;
&lt;span class=&quot;sd&quot;&gt;    use a ssh key with ssh authorized_keys restriction mechanisms to&lt;/span&gt;
&lt;span class=&quot;sd&quot;&gt;    limit root access.&lt;/span&gt;

&lt;span class=&quot;sd&quot;&gt;    Make sure you can login using san_login &amp;amp; san_password/san_private_key&lt;/span&gt;
&lt;span class=&quot;sd&quot;&gt;    &amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;ZFSCMD&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;FLAGS&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;san_zfs_command&lt;/span&gt;

    &lt;span class=&quot;n&quot;&gt;_local_execute&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;utils&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;execute&lt;/span&gt;

    &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;_getrl&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;_runlocal&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;_setrl&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;v&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;isinstance&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;v&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;basestring&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;v&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;v&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;lower&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;ow&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;true&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;t&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;1&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;y&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;yes&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;_runlocal&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;v&lt;/span&gt;
    &lt;span class=&quot;n&quot;&gt;run_local&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;property&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;_getrl&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;_setrl&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

    &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;__init__&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
        &lt;span class=&quot;nb&quot;&gt;super&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ZFSonLinuxISCSIDriver&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;__init__&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
        &lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;tgtadm&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;set_execute&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;_execute&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;LOG&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;info&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;run local = &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;%s&lt;/span&gt;&lt;span class=&quot;s&quot;&gt; (&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;%s&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;)&amp;quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;run_local&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;FLAGS&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;san_is_local&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;

    &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;set_execute&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;execute&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;LOG&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;debug&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;override local execute cmd with &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;%s&lt;/span&gt;&lt;span class=&quot;s&quot;&gt; (&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;%s&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;)&amp;quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;%&lt;/span&gt;
                  &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;repr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;execute&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;execute&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;__module__&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
        &lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;_local_execute&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;execute&lt;/span&gt;

    &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;_execute&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cmd&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;**&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;kwargs&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;run_local&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;LOG&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;debug&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;LOCAL execute cmd &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;%s&lt;/span&gt;&lt;span class=&quot;s&quot;&gt; (&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;%s&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;)&amp;quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cmd&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;kwargs&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;_local_execute&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cmd&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;**&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;kwargs&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;LOG&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;debug&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;SSH execute cmd &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;%s&lt;/span&gt;&lt;span class=&quot;s&quot;&gt; (&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;%s&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;)&amp;quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cmd&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;kwargs&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;check_exit_code&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;kwargs&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;pop&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;check_exit_code&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;bp&quot;&gt;None&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;command&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39; &amp;#39;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;join&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cmd&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;_run_ssh&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;command&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;check_exit_code&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

    &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;_create_volume&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;volume_name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;sizestr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;zfs_poolname&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;_build_zfs_poolname&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;volume_name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

        &lt;span class=&quot;c&quot;&gt;# Create a zfs volume&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;cmd&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ZFSCMD&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;create&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;FLAGS&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;san_thin_provision&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;cmd&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;-s&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;cmd&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;extend&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;([&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;-V&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;sizestr&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;cmd&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;append&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;zfs_poolname&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;_execute&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cmd&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

    &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;_volume_not_present&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;volume_name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;zfs_poolname&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;_build_zfs_poolname&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;volume_name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;try&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;out&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;err&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;_execute&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ZFSCMD&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;list&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;-H&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;zfs_poolname&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;out&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;startswith&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;zfs_poolname&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
                &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;bp&quot;&gt;False&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;except&lt;/span&gt; &lt;span class=&quot;ne&quot;&gt;Exception&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
            &lt;span class=&quot;c&quot;&gt;# If the volume isn&amp;#39;t present&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;bp&quot;&gt;True&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;bp&quot;&gt;False&lt;/span&gt;

    &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;create_volume_from_snapshot&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;volume&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;snapshot&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
        &lt;span class=&quot;sd&quot;&gt;&amp;quot;&amp;quot;&amp;quot;Creates a volume from a snapshot.&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;zfs_snap&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;_build_zfs_poolname&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;snapshot&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;name&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;zfs_vol&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;_build_zfs_poolname&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;snapshot&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;name&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt;
        &lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;_execute&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ZFSCMD&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;clone&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;zfs_snap&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;zfs_vol&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;_execute&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ZFSCMD&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;promote&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;zfs_vol&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

    &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;delete_volume&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;volume&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
        &lt;span class=&quot;sd&quot;&gt;&amp;quot;&amp;quot;&amp;quot;Deletes a volume.&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;_volume_not_present&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;volume&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;name&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]):&lt;/span&gt;
            &lt;span class=&quot;c&quot;&gt;# If the volume isn&amp;#39;t present, then don&amp;#39;t attempt to delete&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;bp&quot;&gt;True&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;zfs_poolname&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;_build_zfs_poolname&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;volume&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;name&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt;
        &lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;_execute&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ZFSCMD&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;destroy&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;zfs_poolname&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

    &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;create_export&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;context&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;volume&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
        &lt;span class=&quot;sd&quot;&gt;&amp;quot;&amp;quot;&amp;quot;Creates an export for a logical volume.&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
        &lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;_ensure_iscsi_targets&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;context&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;volume&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;host&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;iscsi_target&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;db&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;volume_allocate_iscsi_target&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;context&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                                                            &lt;span class=&quot;n&quot;&gt;volume&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;id&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt;
                                                      &lt;span class=&quot;n&quot;&gt;volume&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;host&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;iscsi_name&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;%s%s&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;FLAGS&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;iscsi_target_prefix&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;volume&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;name&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;volume_path&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;local_path&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;volume&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

        &lt;span class=&quot;c&quot;&gt;# XXX (ddouard) this code is not robust: does not check for&lt;/span&gt;
        &lt;span class=&quot;c&quot;&gt;# existing iscsi targets on the host (ie. not created by&lt;/span&gt;
        &lt;span class=&quot;c&quot;&gt;# nova), but fixing it require a deep refactoring of the iscsi&lt;/span&gt;
        &lt;span class=&quot;c&quot;&gt;# handling code (which is what have been done in cinder)&lt;/span&gt;
        &lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;tgtadm&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;new_target&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;iscsi_name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;iscsi_target&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;tgtadm&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;new_logicalunit&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;iscsi_target&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;volume_path&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;FLAGS&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;iscsi_helper&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;tgtadm&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;lun&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;lun&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;run_local&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;iscsi_ip_address&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;FLAGS&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;iscsi_ip_address&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;else&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;iscsi_ip_address&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;FLAGS&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;san_ip&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;provider_location&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;_iscsi_location&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
                &lt;span class=&quot;n&quot;&gt;iscsi_ip_address&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;iscsi_target&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;iscsi_name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;lun&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)}&lt;/span&gt;

    &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;remove_export&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;context&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;volume&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
        &lt;span class=&quot;sd&quot;&gt;&amp;quot;&amp;quot;&amp;quot;Removes an export for a logical volume.&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;try&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;iscsi_target&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;db&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;volume_get_iscsi_target_num&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;context&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
                                                           &lt;span class=&quot;n&quot;&gt;volume&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;id&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;except&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;exception&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;NotFound&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;LOG&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;info&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;_&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;Skipping remove_export. No iscsi_target &amp;quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;
                       &lt;span class=&quot;s&quot;&gt;&amp;quot;provisioned for volume: &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;%d&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;volume&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;id&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt;

        &lt;span class=&quot;k&quot;&gt;try&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
            &lt;span class=&quot;c&quot;&gt;# ietadm show will exit with an error&lt;/span&gt;
            &lt;span class=&quot;c&quot;&gt;# this export has already been removed&lt;/span&gt;
            &lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;tgtadm&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;show_target&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;iscsi_target&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;except&lt;/span&gt; &lt;span class=&quot;ne&quot;&gt;Exception&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;LOG&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;info&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;_&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;Skipping remove_export. No iscsi_target &amp;quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt;
                       &lt;span class=&quot;s&quot;&gt;&amp;quot;is presently exported for volume: &lt;/span&gt;&lt;span class=&quot;si&quot;&gt;%d&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;volume&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;id&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt;

        &lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;tgtadm&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;delete_logicalunit&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;iscsi_target&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;tgtadm&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;delete_target&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;iscsi_target&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

    &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;check_for_export&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;context&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;volume_id&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
        &lt;span class=&quot;sd&quot;&gt;&amp;quot;&amp;quot;&amp;quot;Make sure volume is exported.&amp;quot;&amp;quot;&amp;quot;&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;tid&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;db&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;volume_get_iscsi_target_num&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;context&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;volume_id&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;try&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
            &lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;tgtadm&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;show_target&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;tid&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;except&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;exception&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;ProcessExecutionError&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;
            &lt;span class=&quot;c&quot;&gt;# Instances remount read-only in this case.&lt;/span&gt;
            &lt;span class=&quot;c&quot;&gt;# /etc/init.d/iscsitarget restart and rebooting nova-volume&lt;/span&gt;
            &lt;span class=&quot;c&quot;&gt;# is better since ensure_export() works at boot time.&lt;/span&gt;
            &lt;span class=&quot;n&quot;&gt;LOG&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;error&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;_&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;Cannot confirm exported volume &amp;quot;&lt;/span&gt;
                        &lt;span class=&quot;s&quot;&gt;&amp;quot;id:&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;%(volume_id)s&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;.&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;locals&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;())&lt;/span&gt;
            &lt;span class=&quot;k&quot;&gt;raise&lt;/span&gt;

    &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;local_path&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;volume&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;zfs_poolname&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;_build_zfs_poolname&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;volume&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;name&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;zvoldev&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;/dev/zvol/&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;%s&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;zfs_poolname&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;zvoldev&lt;/span&gt;

    &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;_build_zfs_poolname&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;bp&quot;&gt;self&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;volume_name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;):&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;zfs_poolname&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;%s%s&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;#39;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;FLAGS&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;san_zfs_volume_base&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;volume_name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;zfs_poolname&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;To configure my nova-volume instance (which runs on the control node,
since it&#39;s only a manager), I added these to my &lt;tt class=&quot;docutils literal&quot;&gt;nova.conf&lt;/tt&gt; file:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
# nove-volume config
volume_driver=nova.volume.zol.ZFSonLinuxISCSIDriver
iscsi_ip_address=172.17.1.7
iscsi_helper=tgtadm
san_thin_provision=false
san_ip=172.17.1.7
san_private_key=/etc/nova/sankey
san_login=root
san_zfs_volume_base=data/openstack/volume/
san_is_local=false
verbose=true
&lt;/pre&gt;
&lt;p&gt;Note that the private key (&lt;tt class=&quot;docutils literal&quot;&gt;/etc/nova/sankey&lt;/tt&gt; here) is stored
in clear and that it must be readable by the &lt;tt class=&quot;docutils literal&quot;&gt;nova&lt;/tt&gt; user.&lt;/p&gt;
&lt;p&gt;This key being stored in clear and giving root acces to my ZFS host, I
have limited a bit this root access by using a custom command wrapper
in the &lt;tt class=&quot;docutils literal&quot;&gt;.ssh/authorized_keys&lt;/tt&gt; file.&lt;/p&gt;
&lt;p&gt;Something like (naive implementation):&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;root@zfshost ~&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;cat /root/zfswrapper
&lt;span class=&quot;c&quot;&gt;#!/bin/sh&lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;CMD&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;sb&quot;&gt;`&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;$SSH_ORIGINAL_COMMAND&lt;/span&gt; | awk &lt;span class=&quot;s1&quot;&gt;&amp;#39;{print $1}&amp;#39;&lt;/span&gt;&lt;span class=&quot;sb&quot;&gt;`&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;$CMD&amp;quot;&lt;/span&gt; !&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;/sbin/zfs&amp;quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;$CMD&amp;quot;&lt;/span&gt; !&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;tgtadm&amp;quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;; &lt;span class=&quot;k&quot;&gt;then&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;  &lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;Can do only zfs/tgtadm stuff here&amp;quot;&lt;/span&gt;
  &lt;span class=&quot;nb&quot;&gt;exit &lt;/span&gt;1
&lt;span class=&quot;k&quot;&gt;fi&lt;/span&gt;

&lt;span class=&quot;nb&quot;&gt;echo&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;[`date`] $SSH_ORIGINAL_COMMAND&amp;quot;&lt;/span&gt; &amp;gt;&amp;gt; .zfsopenstack.log
&lt;span class=&quot;nb&quot;&gt;exec&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;$SSH_ORIGINAL_COMMAND&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Using this in root&#39;s &lt;tt class=&quot;docutils literal&quot;&gt;.ssh/authorized_keys&lt;/tt&gt; file:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;root@zfshost ~&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;cat /root/.ssh/authorized_keys | grep control
&lt;span class=&quot;nv&quot;&gt;from&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;control.openstack.logilab.fr&amp;quot;&lt;/span&gt;,no-pty,no-port-forwarding,no-X11-forwarding, &lt;span class=&quot;se&quot;&gt;\&lt;/span&gt;
      no-agent-forwarding,command&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;/root/zfswrapper&amp;quot;&lt;/span&gt; ssh-rsa AAAA&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;...&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt; root@control
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;I had to set the &lt;tt class=&quot;docutils literal&quot;&gt;iscsi_ip_address&lt;/tt&gt; (the ip address of the ZFS
host), but I think this is a result of something mistakenly
implemented in my ZFSonLinux driver.&lt;/p&gt;
&lt;p&gt;Using this config, I can boot an image, create a volume on my ZFS
storage, and attach it to the running image.&lt;/p&gt;
&lt;p&gt;I have to test things like snapshot, (live?) migration and so. This is a
very first draft implementation which needs to be refined, improved
and tested.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;what-s-next&quot;&gt;
&lt;h3&gt;&lt;a&gt;What&#39;s next&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Besides the fact that it needs more tests, I plan to use &lt;a class=&quot;reference&quot; href=&quot;http://www.saltstack.org&quot;&gt;salt&lt;/a&gt; for my OpenStack
deployment (first to add more compute nodes in my cluster), and on the
other side, I&#39;d like to try the &lt;a class=&quot;reference&quot; href=&quot;https://github.com/saltstack/salt-cloud&quot;&gt;salt-cloud&lt;/a&gt; so I have a bunch of
Debian images that &amp;quot;just work&amp;quot; (without the need of porting the
cloud-init Ubuntu package).&lt;/p&gt;
&lt;p&gt;On the side of my zol driver, I need to port it to &lt;a class=&quot;reference&quot; href=&quot;http://wiki.openstack.org/Cinder&quot;&gt;Cinder&lt;/a&gt;, but I do not have a &lt;a class=&quot;reference&quot; href=&quot;http://www.openstack.org/software/folsom/&quot;&gt;Folsom&lt;/a&gt; install to test it...&lt;/p&gt;
&lt;/div&gt;
</description>
  <dc:date>2012-12-21T22:54-01:00</dc:date>
  <dc:creator>David Douard</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/113035</guid>
  <title>Announcing pylint.org</title>
  <link>http://www.logilab.org/blogentry/113035</link>
  <description>&lt;p&gt;Pylint - the world renowned Python code static checker - now has a
landing page : &lt;a class=&quot;reference&quot; href=&quot;http://www.pylint.org&quot;&gt;http://www.pylint.org&lt;/a&gt;&lt;/p&gt;
&lt;img alt=&quot;http://www.python.org/images/python-logo.gif&quot; class=&quot;align-center&quot; src=&quot;http://www.python.org/images/python-logo.gif&quot; /&gt;
&lt;p&gt;We&#39;ve tried to summarize all the things a newcomer should know about
pylint. We hope it reflects the diversity of uses and support canals
for pylint.&lt;/p&gt;
&lt;div class=&quot;section&quot; id=&quot;open-and-decentralized-web&quot;&gt;
&lt;h3&gt;&lt;a&gt;Open and decentralized Web&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Note that pylint is not hosted on &lt;a class=&quot;reference&quot; href=&quot;http://www.github.com&quot;&gt;github&lt;/a&gt; or another well-known forge, since we firmly believe in a decentralized architecture for the web.&lt;/p&gt;
&lt;p&gt;This applies especially to open source software development. Pylint&#39;s development is self-hosted on a &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/project/pylint&quot;&gt;forge&lt;/a&gt; and its code is version-controlled with &lt;a class=&quot;reference&quot; href=&quot;http://mercurial.selenic.com/&quot;&gt;mercurial&lt;/a&gt;, a distributed version control system (DVCS). Both tools are free software written in python.&lt;/p&gt;
&lt;img alt=&quot;http://www.zjulian.com/wp-content/uploads/2012/05/Centralized-Decentralized-And-Distributed-System.jpg&quot; class=&quot;align-center&quot; src=&quot;http://www.zjulian.com/wp-content/uploads/2012/05/Centralized-Decentralized-And-Distributed-System.jpg&quot; /&gt;
&lt;p&gt;We know centralized (and closed source) platforms for managing
software projects can make things easier for contributors. We have
enabled a mirror on &lt;a class=&quot;reference&quot; href=&quot;https://bitbucket.org/logilab/pylint&quot;&gt;bitbucket&lt;/a&gt; (and &lt;a class=&quot;reference&quot; href=&quot;https://bitbucket.org/logilab/pylint-brain&quot;&gt;pylint-brain&lt;/a&gt;) so as to ease forks and
pull requests. Pull requests can be made there and even from a
self-hosted mercurial (with a quick email on the &lt;a class=&quot;reference&quot; href=&quot;http://lists.logilab.org/mailman/listinfo/python-projects&quot;&gt;mailing-list&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;Feel free to add your comments or feedback below.&lt;/p&gt;
&lt;/div&gt;
</description>
  <dc:date>2012-12-04T19:18-01:00</dc:date>
  <dc:creator>Arthur Lutz</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/112652</guid>
  <title>Mini-DebConf Paris 2012</title>
  <link>http://www.logilab.org/blogentry/112652</link>
  <description>&lt;p&gt;Last week-end, I attended the &lt;a class=&quot;reference&quot; href=&quot;http://fr2012.mini.debconf.org/&quot;&gt;mini-DebConf&lt;/a&gt; organized at EPITA (near
Paris) by the &lt;a class=&quot;reference&quot; href=&quot;http://france.debian.net/&quot;&gt;French Debian association&lt;/a&gt; and sponsored by &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.fr/&quot;&gt;Logilab&lt;/a&gt;.&lt;/p&gt;
&lt;img alt=&quot;http://www.logilab.org/file/112649?vid=download&quot; src=&quot;http://www.logilab.org/file/112649?vid=download&quot; /&gt;
&lt;p&gt;The event was a great success, with a rather large number of attendees,
including people coming from abroad such as Debian kernel maintainers &lt;a class=&quot;reference&quot; href=&quot;http://womble.decadent.org.uk/blog&quot;&gt;Ben
Hutchings&lt;/a&gt; and &lt;a class=&quot;reference&quot; href=&quot;http://www.itp.tuwien.ac.at/~mattems/blog&quot;&gt;Maximilian Attems&lt;/a&gt;, who talked about their work with Linux.&lt;/p&gt;
&lt;p&gt;Among the other speakers were &lt;a class=&quot;reference&quot; href=&quot;http://www.dachary.org/loic/&quot;&gt;Loïc Dachary&lt;/a&gt; about &lt;a class=&quot;reference&quot; href=&quot;http://www.openstack.org/&quot;&gt;OpenStack&lt;/a&gt; and its
packaging in Debian, and &lt;a class=&quot;reference&quot; href=&quot;http://np237.livejournal.com/&quot;&gt;Josselin Mouette&lt;/a&gt; about his work deploying
Debian/&lt;a class=&quot;reference&quot; href=&quot;http://www.gnome.org/&quot;&gt;GNOME&lt;/a&gt; desktops in a large enterprise environment at &lt;a class=&quot;reference&quot; href=&quot;http://research.edf.com/&quot;&gt;EDF R&amp;amp;D&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;On my part I gave a talk on Saturday about Debian&#39;s &lt;a class=&quot;reference&quot; href=&quot;http://release.debian.org/&quot;&gt;release team&lt;/a&gt;, and the
current state of the wheezy (to-be Debian 7.0) release.&lt;/p&gt;
&lt;p&gt;On Sunday I presented together with &lt;a class=&quot;reference&quot; href=&quot;http://www.igmors.u-psud.fr/spip.php?article773&quot;&gt;Vladimir Daric&lt;/a&gt; the work we did to
migrate a computation cluster from Red Hat to Debian.  Attendees had quite a
few questions about our use of &lt;a class=&quot;reference&quot; href=&quot;http://zfsonlinux.org/&quot;&gt;ZFS on Linux&lt;/a&gt; for storage, and &lt;a class=&quot;reference&quot; href=&quot;http://saltstack.org/&quot;&gt;salt&lt;/a&gt; for
configuration management and deployment.&lt;/p&gt;
&lt;p&gt;Slides for the talks are available on the mini-DebConf web page (&lt;a class=&quot;reference&quot; href=&quot;http://fr2012.mini.debconf.org/slides/rt-minidebconf12.pdf&quot;&gt;wheezy state&lt;/a&gt;, &lt;a class=&quot;reference&quot; href=&quot;http://fr2012.mini.debconf.org/slides/cluster-talk.pdf&quot;&gt;migration to debian cluster&lt;/a&gt; also &lt;a class=&quot;reference&quot; href=&quot;http://fr2012.mini.debconf.org/slides/rt-minidebconf12.pdf&quot;&gt;viewable on slideshare&lt;/a&gt;), and videos
will soon be on &lt;a class=&quot;reference&quot; href=&quot;http://video.debian.net/&quot;&gt;http://video.debian.net/&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Now looking forward to next summer&#39;s &lt;a class=&quot;reference&quot; href=&quot;http://debconf13.debconf.org/&quot;&gt;DebConf13&lt;/a&gt; in Switzerland, and
hopefully next year&#39;s edition of the Paris event.&lt;/p&gt;
</description>
  <dc:date>2012-11-29T16:29-01:00</dc:date>
  <dc:creator>Julien Cristau</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/107483</guid>
  <title>PyLint 0.26 is out</title>
  <link>http://www.logilab.org/blogentry/107483</link>
  <description>&lt;p&gt;I&#39;m very pleased to announce new releases of Pylint and
underlying ASTNG library, respectivly 0.26 and 0.24.1. The great
news is that both bring a lot of new features and some bug fixes,
mostly provided by the community effort.&lt;/p&gt;
&lt;p&gt;We&#39;re still trying to make it easier to contribute on our free
software project at Logilab, so I hope this will continue and
we&#39;ll get even more contritions in a near future, and an even
smarter/faster/whatever pylint!&lt;/p&gt;
&lt;p&gt;For more details, see ChangeLog files or &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/project/pylint/0.26.0&quot;&gt;http://www.logilab.org/project/pylint/0.26.0&lt;/a&gt; and &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/project/logilab-astng/0.24.1&quot;&gt;http://www.logilab.org/project/logilab-astng/0.24.1&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;So many thanks to all those who made that release, and enjoy!&lt;/p&gt;
</description>
  <dc:date>2012-10-08T18:32-01:00</dc:date>
  <dc:creator>Sylvain Thenault</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/104898</guid>
  <title>Profiling tools</title>
  <link>http://www.logilab.org/blogentry/104898</link>
  <description>&lt;div class=&quot;contents topic&quot; id=&quot;contents&quot;&gt;
&lt;p class=&quot;topic-title&quot;&gt;Contents&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/blog/6056?rql=Any%20E%20ORDERBY%20D%20DESC%20LIMIT%2020%20WHERE%20E%20is%20BlogEntry%2C%20E%20entry_of%20X%2C%20X%20eid%206056%2C%20E%20creation_date%20D&amp;amp;vtitle=Main%20Blog%20(in%20English)&amp;amp;vid=rss#python&quot; id=&quot;id3&quot;&gt;Python&lt;/a&gt;&lt;ul&gt;
&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/blog/6056?rql=Any%20E%20ORDERBY%20D%20DESC%20LIMIT%2020%20WHERE%20E%20is%20BlogEntry%2C%20E%20entry_of%20X%2C%20X%20eid%206056%2C%20E%20creation_date%20D&amp;amp;vtitle=Main%20Blog%20(in%20English)&amp;amp;vid=rss#run-time-profiling-with-cprofile&quot; id=&quot;id4&quot;&gt;Run time profiling with cProfile&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/blog/6056?rql=Any%20E%20ORDERBY%20D%20DESC%20LIMIT%2020%20WHERE%20E%20is%20BlogEntry%2C%20E%20entry_of%20X%2C%20X%20eid%206056%2C%20E%20creation_date%20D&amp;amp;vtitle=Main%20Blog%20(in%20English)&amp;amp;vid=rss#graphical-tools-to-show-profiling-results&quot; id=&quot;id5&quot;&gt;Graphical tools to show profiling results&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/blog/6056?rql=Any%20E%20ORDERBY%20D%20DESC%20LIMIT%2020%20WHERE%20E%20is%20BlogEntry%2C%20E%20entry_of%20X%2C%20X%20eid%206056%2C%20E%20creation_date%20D&amp;amp;vtitle=Main%20Blog%20(in%20English)&amp;amp;vid=rss#c-c-extension-profiling&quot; id=&quot;id6&quot;&gt;C/C++ extension profiling&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/blog/6056?rql=Any%20E%20ORDERBY%20D%20DESC%20LIMIT%2020%20WHERE%20E%20is%20BlogEntry%2C%20E%20entry_of%20X%2C%20X%20eid%206056%2C%20E%20creation_date%20D&amp;amp;vtitle=Main%20Blog%20(in%20English)&amp;amp;vid=rss#memory-profiler&quot; id=&quot;id7&quot;&gt;Memory Profiler&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/blog/6056?rql=Any%20E%20ORDERBY%20D%20DESC%20LIMIT%2020%20WHERE%20E%20is%20BlogEntry%2C%20E%20entry_of%20X%2C%20X%20eid%206056%2C%20E%20creation_date%20D&amp;amp;vtitle=Main%20Blog%20(in%20English)&amp;amp;vid=rss#general-purpose-profiling&quot; id=&quot;id8&quot;&gt;General purpose Profiling&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;python&quot;&gt;
&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;http://www.logilab.org/blog/6056?rql=Any%20E%20ORDERBY%20D%20DESC%20LIMIT%2020%20WHERE%20E%20is%20BlogEntry%2C%20E%20entry_of%20X%2C%20X%20eid%206056%2C%20E%20creation_date%20D&amp;amp;vtitle=Main%20Blog%20(in%20English)&amp;amp;vid=rss#id3&quot;&gt;Python&lt;/a&gt;&lt;/h3&gt;
&lt;div class=&quot;section&quot; id=&quot;run-time-profiling-with-cprofile&quot;&gt;
&lt;h4&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;http://www.logilab.org/blog/6056?rql=Any%20E%20ORDERBY%20D%20DESC%20LIMIT%2020%20WHERE%20E%20is%20BlogEntry%2C%20E%20entry_of%20X%2C%20X%20eid%206056%2C%20E%20creation_date%20D&amp;amp;vtitle=Main%20Blog%20(in%20English)&amp;amp;vid=rss#id4&quot;&gt;Run time profiling with cProfile&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;Python is distributed with &lt;a class=&quot;reference&quot; href=&quot;http://docs.python.org/library/profile.html&quot;&gt;profiling modules&lt;/a&gt;. They describe the run
time operation of a pure python program, providing a variety of
statistics.&lt;/p&gt;
&lt;p&gt;The &lt;a class=&quot;reference&quot; href=&quot;http://docs.python.org/library/profile.html#module-cProfile&quot;&gt;cProfile&lt;/a&gt; module is the recommended module. To execute your program
under the control of the &lt;a class=&quot;reference&quot; href=&quot;http://docs.python.org/library/profile.html#module-cProfile&quot;&gt;cProfile&lt;/a&gt; module, a simple form is&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
$ python -m cProfile -s cumulative mypythonscript.py

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
      16    0.055    0.003   15.801    0.988 __init__.py:1(&amp;lt;module&amp;gt;)
       1    0.000    0.000   11.113   11.113 __init__.py:35(extract)
     135    7.351    0.054   11.078    0.082 __init__.py:25(iter_extract)
10350736    3.628    0.000    3.628    0.000 {method &#39;startswith&#39; of &#39;str&#39; objects}
       1    0.000    0.000    2.422    2.422 pyplot.py:123(show)
       1    0.000    0.000    2.422    2.422 backend_bases.py:69(__call__)
       ...
&lt;/pre&gt;
&lt;p&gt;Each column provides information about time execution of every function calls.
&lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;-s&lt;/span&gt; cumulative&lt;/tt&gt; orders the result by descending cumulative time.&lt;/p&gt;
&lt;table class=&quot;docutils field-list&quot; frame=&quot;void&quot; rules=&quot;none&quot;&gt;
&lt;col class=&quot;field-name&quot; /&gt;
&lt;col class=&quot;field-body&quot; /&gt;
&lt;tbody valign=&quot;top&quot;&gt;
&lt;tr class=&quot;field&quot;&gt;&lt;th class=&quot;field-name&quot;&gt;Note:&lt;/th&gt;&lt;td class=&quot;field-body&quot;&gt;&lt;p class=&quot;first&quot;&gt;You can profile a particular python function such as &lt;tt class=&quot;docutils literal&quot;&gt;main()&lt;/tt&gt;&lt;/p&gt;
&lt;pre class=&quot;last literal-block&quot;&gt;
&amp;gt;&amp;gt;&amp;gt; import profile
&amp;gt;&amp;gt;&amp;gt; profile.run(&#39;main()&#39;)
&lt;/pre&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;graphical-tools-to-show-profiling-results&quot;&gt;
&lt;h4&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;http://www.logilab.org/blog/6056?rql=Any%20E%20ORDERBY%20D%20DESC%20LIMIT%2020%20WHERE%20E%20is%20BlogEntry%2C%20E%20entry_of%20X%2C%20X%20eid%206056%2C%20E%20creation_date%20D&amp;amp;vtitle=Main%20Blog%20(in%20English)&amp;amp;vid=rss#id5&quot;&gt;Graphical tools to show profiling results&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;Even if report tools are included in &lt;a class=&quot;reference&quot; href=&quot;http://docs.python.org/library/profile.html#module-cProfile&quot;&gt;cProfile&lt;/a&gt; profiler, it can be
interesting to use graphical tools.  Most of them work with a stat
file that can be generated by &lt;a class=&quot;reference&quot; href=&quot;http://docs.python.org/library/profile.html#module-cProfile&quot;&gt;cProfile&lt;/a&gt; using the &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;-o&lt;/span&gt; filepath&lt;/tt&gt;
option.&lt;/p&gt;
&lt;p&gt;Below are some of available graphical tools that we tested.&lt;/p&gt;
&lt;div class=&quot;section&quot; id=&quot;gprof2dot&quot;&gt;
&lt;h5&gt;&lt;a&gt;&lt;a class=&quot;reference&quot; href=&quot;http://code.google.com/p/jrfonseca/wiki/Gprof2Dot&quot;&gt;Gpro2Dot&lt;/a&gt;&lt;/a&gt;&lt;/h5&gt;
&lt;p&gt;is a python based tool that allows to transform profiling results
output into a picture containing the call tree graph (using
&lt;a class=&quot;reference&quot; href=&quot;http://www.graphviz.org/&quot;&gt;graphviz&lt;/a&gt;).  A typical profiling session with python looks like
this:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
$ python -m cProfile -o output.pstats mypythonscript.py
$ gprof2dot.py -f pstats output.pstats | dot -Tpng -o profiling_results.png
&lt;/pre&gt;
&lt;a class=&quot;reference image-reference&quot; href=&quot;http://wiki.jrfonseca.googlecode.com/git/gprof2dot.png&quot;&gt;&lt;img alt=&quot;http://wiki.jrfonseca.googlecode.com/git/gprof2dot.png&quot; src=&quot;http://wiki.jrfonseca.googlecode.com/git/gprof2dot.png&quot; style=&quot;width: 256px;&quot; /&gt;&lt;/a&gt;
&lt;p&gt;Each node of the output graph represents a function and has the following layout:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
+----------------------------------+
|   function name : module name    |
| total time including sub-calls % |  total time including sub-calls %
|    (self execution time %)       |------------------------------------&amp;gt;
|  total number of self calls      |
+----------------------------------+
&lt;/pre&gt;
&lt;p&gt;Nodes and edges are colored according to the &amp;quot;total time&amp;quot; spent in the functions.&lt;/p&gt;
&lt;table class=&quot;docutils field-list&quot; frame=&quot;void&quot; rules=&quot;none&quot;&gt;
&lt;col class=&quot;field-name&quot; /&gt;
&lt;col class=&quot;field-body&quot; /&gt;
&lt;tbody valign=&quot;top&quot;&gt;
&lt;tr class=&quot;field&quot;&gt;&lt;th class=&quot;field-name&quot;&gt;Note:&lt;/th&gt;&lt;td class=&quot;field-body&quot;&gt;The following small patch let the node color correspond to the execution
time and the edge color to the &amp;quot;total time&amp;quot;:&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;gh&quot;&gt;diff -r da2b31597c5f gprof2dot.py&lt;/span&gt;
&lt;span class=&quot;gd&quot;&gt;--- a/gprof2dot.py      Fri Aug 31 16:38:37 2012 +0200&lt;/span&gt;
&lt;span class=&quot;gi&quot;&gt;+++ b/gprof2dot.py      Fri Aug 31 16:40:56 2012 +0200&lt;/span&gt;
&lt;span class=&quot;gu&quot;&gt;@@ -2628,6 +2628,7 @@&lt;/span&gt;
                 weight = function.weight
             else:
                 weight = 0.0
&lt;span class=&quot;gi&quot;&gt;+            weight = function[TIME_RATIO]&lt;/span&gt;

             label = &amp;#39;\n&amp;#39;.join(labels)
             self.node(function.id,
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;pyprof2calltree&quot;&gt;
&lt;h5&gt;&lt;a&gt;&lt;a class=&quot;reference&quot; href=&quot;https://bitbucket.org/ogrisel/pyprof2calltree&quot;&gt;PyProf2CallTree&lt;/a&gt;&lt;/a&gt;&lt;/h5&gt;
&lt;p&gt;is a script to help visualizing profiling data with the &lt;a class=&quot;reference&quot; href=&quot;http://kcachegrind.sourceforge.net/&quot;&gt;KCacheGrind&lt;/a&gt;
graphical calltree analyzer. This is a more interactive solution
than &lt;a class=&quot;reference&quot; href=&quot;http://code.google.com/p/jrfonseca/wiki/Gprof2Dot&quot;&gt;Gpro2Dot&lt;/a&gt; but it requires to install &lt;a class=&quot;reference&quot; href=&quot;http://kcachegrind.sourceforge.net/&quot;&gt;KCacheGrind&lt;/a&gt;.
Typical usage:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
$ python -m cProfile -o stat.prof mypythonscript.py
$ python pyprof2calltree.py -i stat.prof -k
&lt;/pre&gt;
&lt;p&gt;Profiling data file is opened in &lt;a class=&quot;reference&quot; href=&quot;http://kcachegrind.sourceforge.net/&quot;&gt;KCacheGrind&lt;/a&gt; with pyprof2calltree module,
whose &lt;tt class=&quot;docutils literal&quot;&gt;&lt;span class=&quot;pre&quot;&gt;-k&lt;/span&gt;&lt;/tt&gt; switch automatically opens &lt;a class=&quot;reference&quot; href=&quot;http://kcachegrind.sourceforge.net/&quot;&gt;KCacheGrind&lt;/a&gt;.&lt;/p&gt;
&lt;a class=&quot;reference image-reference&quot; href=&quot;http://kcachegrind.sourceforge.net/html/pics/KcgShot3Large.gif&quot;&gt;&lt;img alt=&quot;http://kcachegrind.sourceforge.net/html/pics/KcgShot3Large.gif&quot; src=&quot;http://kcachegrind.sourceforge.net/html/pics/KcgShot3Large.gif&quot; style=&quot;width: 256px;&quot; /&gt;&lt;/a&gt;
&lt;p&gt;There are other tools that are worth testing:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p class=&quot;first&quot;&gt;&lt;a class=&quot;reference&quot; href=&quot;http://www.vrplumber.com/programming/runsnakerun/&quot;&gt;RunSnakeRun&lt;/a&gt; is an interactive GUI tool which visualizes profile file using square maps:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
$ python -m cProfile -o stat.prof mypythonscript.py
$ runsnake stat.prof
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class=&quot;first&quot;&gt;&lt;a class=&quot;reference&quot; href=&quot;http://pycallgraph.slowchop.com/&quot;&gt;pycallgraph&lt;/a&gt; generates PNG images of a call tree with the total number of calls:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
$ pycallgraph mypythonscript.py
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p class=&quot;first&quot;&gt;&lt;a class=&quot;reference&quot; href=&quot;https://bitbucket.org/pypy/pypy/src/default/pypy/tool/lsprofcalltree.py&quot;&gt;lsprofcalltree&lt;/a&gt; also use &lt;a class=&quot;reference&quot; href=&quot;http://kcachegrind.sourceforge.net/&quot;&gt;KCacheGrind&lt;/a&gt; to display profiling data:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
$ python lsprofcalltree.py -o output.log yourprogram.py
$ kcachegrind output.log
&lt;/pre&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;c-c-extension-profiling&quot;&gt;
&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;http://www.logilab.org/blog/6056?rql=Any%20E%20ORDERBY%20D%20DESC%20LIMIT%2020%20WHERE%20E%20is%20BlogEntry%2C%20E%20entry_of%20X%2C%20X%20eid%206056%2C%20E%20creation_date%20D&amp;amp;vtitle=Main%20Blog%20(in%20English)&amp;amp;vid=rss#id6&quot;&gt;C/C++ extension profiling&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;For optimization purpose one may have python extensions written in
C/C++. For such modules, &lt;a class=&quot;reference&quot; href=&quot;http://docs.python.org/library/profile.html#module-cProfile&quot;&gt;cProfile&lt;/a&gt; will not dig into the
corresponding call tree. Dedicated tools must be used (they are most
part of Python) to profile a C++ extension from python.&lt;/p&gt;
&lt;p&gt;&lt;a class=&quot;reference&quot; href=&quot;http://pypi.python.org/pypi/yep&quot;&gt;Yep&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;is a python module dedicated to the profiling of compiled python extension. It
uses the &lt;a class=&quot;reference&quot; href=&quot;perftools&amp;lt;http://code.google.com/p/gperftools/?redir=1&quot;&gt;google&lt;/a&gt; CPU profiler:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
$ python -m yep --callgrind mypythonscript.py
&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;memory-profiler&quot;&gt;
&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;http://www.logilab.org/blog/6056?rql=Any%20E%20ORDERBY%20D%20DESC%20LIMIT%2020%20WHERE%20E%20is%20BlogEntry%2C%20E%20entry_of%20X%2C%20X%20eid%206056%2C%20E%20creation_date%20D&amp;amp;vtitle=Main%20Blog%20(in%20English)&amp;amp;vid=rss#id7&quot;&gt;Memory Profiler&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;You may want to control the amount of memory used by a python program.
There is an interesting module that fits this need: &lt;a class=&quot;reference&quot; href=&quot;https://github.com/fabianp/memory_profiler&quot;&gt;memory_profiler&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You can fetch memory consumption of a program over time using&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
&amp;gt;&amp;gt;&amp;gt; from memory_profiler import memory_usage
&amp;gt;&amp;gt;&amp;gt; memory_usage(main, (), {})
&lt;/pre&gt;
&lt;p&gt;&lt;a class=&quot;reference&quot; href=&quot;https://github.com/fabianp/memory_profiler&quot;&gt;memory_profiler&lt;/a&gt; can also spot lines that consume the most using &lt;a class=&quot;reference&quot; href=&quot;docs.python.org/library/pdb.html&quot;&gt;pdb&lt;/a&gt;
or &lt;a class=&quot;reference&quot; href=&quot;http://ipython.org&quot;&gt;IPython&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;general-purpose-profiling&quot;&gt;
&lt;h3&gt;&lt;a class=&quot;toc-backref&quot; href=&quot;http://www.logilab.org/blog/6056?rql=Any%20E%20ORDERBY%20D%20DESC%20LIMIT%2020%20WHERE%20E%20is%20BlogEntry%2C%20E%20entry_of%20X%2C%20X%20eid%206056%2C%20E%20creation_date%20D&amp;amp;vtitle=Main%20Blog%20(in%20English)&amp;amp;vid=rss#id8&quot;&gt;General purpose Profiling&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The Linux &lt;a class=&quot;reference&quot; href=&quot;https://perf.wiki.kernel.org/index.php/Main_Page&quot;&gt;perf&lt;/a&gt; tool gives access to a wide variety of performance counter
subsystems. Using perf, any execution configuration (pure python programs,
compiled extensions, subprocess, etc.) may be profiled.&lt;/p&gt;
&lt;p&gt;Performance counters are CPU hardware registers that count hardware events such
as instructions executed, cache-misses suffered, or branches mispredicted. They
form a basis for profiling applications to trace dynamic control flow and
identify hotspots.&lt;/p&gt;
&lt;p&gt;You can have information about execution times with:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
$ perf stat -e cpu-cycles,cpu-clock,task-clock python mypythonscript.py
&lt;/pre&gt;
&lt;p&gt;You can have RAM access information using:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
$ perf stat -e cache-misses python mypythonscript.py
&lt;/pre&gt;
&lt;p&gt;Be careful about the fact that &lt;a class=&quot;reference&quot; href=&quot;https://perf.wiki.kernel.org/index.php/Main_Page&quot;&gt;perf&lt;/a&gt; gives the raw value of the
hardware counters. So, you need to know exactly what you are looking for
and how to interpret these values in the context of your program.&lt;/p&gt;
&lt;p&gt;Note that you can use &lt;a class=&quot;reference&quot; href=&quot;http://code.google.com/p/jrfonseca/wiki/Gprof2Dot&quot;&gt;Gpro2Dot&lt;/a&gt; to get a more user-friendly output:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
$ perf record -g python mypythonscript.py
$ perf script | gprof2dot.py -f perf | dot -Tpng -o output.png
&lt;/pre&gt;
&lt;/div&gt;
</description>
  <dc:date>2013-02-26T09:40-01:00</dc:date>
  <dc:creator>Alain Leufroy</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/100365</guid>
  <title>PyLint 0.25.2 and related projects released</title>
  <link>http://www.logilab.org/blogentry/100365</link>
  <description>&lt;p&gt;I&#39;m pleased to announce the new release of &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/project/pylint&quot;&gt;Pylint&lt;/a&gt; and related projects (i.e. &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/project/logilab-astng&quot;&gt;logilab-astng&lt;/a&gt; and &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/project/logilab-common&quot;&gt;logilab-common&lt;/a&gt;)!&lt;/p&gt;
&lt;p&gt;By installing &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/project/pylint/0.25.2&quot;&gt;PyLint 0.25.2&lt;/a&gt;, &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/project/logilab-astng/0.24.0&quot;&gt;ASTNG 0.24&lt;/a&gt; and &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/project/logilab-common/0.58.1&quot;&gt;logilab-common 0.58.1&lt;/a&gt;, you&#39;ll get a bunch of bug fixes and a few new features. Among the hot stuff:&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;PyLint should now work with alternative python implementations such as Jython, and at least go further with PyPy and IronPython (but those have not really been tested, please try it and provide feedback so we can improve their support)&lt;/li&gt;
&lt;li&gt;the new ASTNG includes a description of dynamic code it is not able to understand. This is handled by a &lt;a class=&quot;reference&quot; href=&quot;https://bitbucket.org/sthenault/pylint-brain&quot;&gt;bitbucket hosted project&lt;/a&gt; described &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/blogentry/100364&quot;&gt;in another post&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Many thanks to everyone who contributed to these releases, Torsten Marek / Boris Feld in particular (both sponsored by Google by the way, Torsten as an employee and Boris as a GSoC student).&lt;/p&gt;
&lt;p&gt;Enjoy!&lt;/p&gt;
</description>
  <dc:date>2012-07-18T13:32-01:00</dc:date>
  <dc:creator>Sylvain Thenault</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/100364</guid>
  <title>Introducing the pylint-brain project</title>
  <link>http://www.logilab.org/blogentry/100364</link>
  <description>&lt;div class=&quot;figure align-right&quot;&gt;
&lt;img alt=&quot;chimpazee brain&quot; src=&quot;http://www.logilab.org/file/100381?vid=download&quot; /&gt;
&lt;p class=&quot;caption&quot;&gt;&lt;a class=&quot;reference&quot; href=&quot;http://www.flickr.com/photos/43078695&amp;#64;N00/1931470865&quot;&gt;image&lt;/a&gt; by &lt;a class=&quot;reference&quot; href=&quot;http://www.flickr.com/photos/43078695&amp;#64;N00&quot;&gt;Gaetan Lee&lt;/a&gt; under &lt;a class=&quot;reference&quot; href=&quot;http://creativecommons.org/licenses/by/2.0/deed.en&quot;&gt;cc by-ca&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Huum, along with the new &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/blogentry/100365&quot;&gt;PyLint release&lt;/a&gt;, it&#39;s time to introduce the PyLint-Brain project I&#39;ve recently started.&lt;/p&gt;
&lt;p&gt;Despite its name, PyLint-Brain is actually a collection of extensions for &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/project/logilab-astng&quot;&gt;ASTNG&lt;/a&gt;, with the goal of making &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/project/logilab-astng&quot;&gt;ASTNG&lt;/a&gt; smarter (and this directly benefits &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/project/pylint&quot;&gt;PyLint&lt;/a&gt;) by describing stuff that is too dynamic to be understood automatically (such as functions in the &lt;cite&gt;hashlib&lt;/cite&gt; module, &lt;cite&gt;defaultdict&lt;/cite&gt;, etc.).&lt;/p&gt;
&lt;p&gt;The PyLint-Brain collection of extensions is developped outside of &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/project/logilab-astng&quot;&gt;ASTNG&lt;/a&gt; itself and hosted on a &lt;a class=&quot;reference&quot; href=&quot;https://bitbucket.org/sthenault/pylint-brain&quot;&gt;bitbucket project&lt;/a&gt; to ease community involvement and to allow distinct development cycles. Basically, &lt;a class=&quot;reference&quot; href=&quot;http://www.logilab.org/project/logilab-astng&quot;&gt;ASTNG&lt;/a&gt; will include the PyLint-Brain extensions, but you may use earlier/custom versions by tweaking your PYTHONPATH.&lt;/p&gt;
&lt;p&gt;Take a look at the code, it&#39;s fairly easy to contribute new descriptions, and help us make pylint smarter!&lt;/p&gt;
</description>
  <dc:date>2012-07-18T13:32-01:00</dc:date>
  <dc:creator>Sylvain Thenault</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/98928</guid>
  <title>Debian science sprint and workshop at ESRF</title>
  <link>http://www.logilab.org/blogentry/98928</link>
  <description>&lt;p&gt;&lt;img alt=&quot;esrf&quot; src=&quot;http://www.esrf.eu/decouvrir/esrf-aerial-view-sm.jpg/image_preview&quot; /&gt; &lt;img alt=&quot;debian&quot; src=&quot;http://www.logilab.org/file/88881?vid=download&quot; /&gt;&lt;/p&gt;
&lt;p&gt;From June 24th to June 26th, the &lt;a class=&quot;reference&quot; href=&quot;http://www.esrf.eu/&quot;&gt;European Synchrotron&lt;/a&gt; organises a
&lt;a class=&quot;reference&quot; href=&quot;http://www.esrf.eu/events/conferences/debian-for-scientific-facilities-days-1&quot;&gt;workshop&lt;/a&gt; centered
around Debian.  On Monday, a number  of talks about the use of Debian in scientific facilities will
be featured.
On Sunday and Tuesday, members of the
&lt;a class=&quot;reference&quot; href=&quot;http://wiki.debian.org/DebianScience&quot;&gt;Debian  Science&lt;/a&gt; group will meet for a
sprint focusing on the upcoming Debian 7.0 release.&lt;/p&gt;
&lt;p&gt;Among the speakers will be Stefano Zacchiroli, the current Debian project leader.
Logilab will be present with Nicolas Chauvat at Monday&#39;s conference, and Julien Cristau
at both the sprint and the conference.&lt;/p&gt;
&lt;p&gt;At the sprint we&#39;ll be discussing packaging of scientific libraries such as blas or MPI
implementations, and working on polishing other scientific packages, such as python-related ones (including &lt;a class=&quot;reference&quot; href=&quot;http://packages.debian.org/sid/salome&quot;&gt;Salome&lt;/a&gt; on which we are currently working).&lt;/p&gt;
</description>
  <dc:date>2012-06-22T18:09-01:00</dc:date>
  <dc:creator>Julien Cristau</dc:creator>
</item>
<item>
<guid isPermaLink="true">http://www.logilab.org/blogentry/98317</guid>
  <title>A Python dev day at La Cantine. Would like to have more PyCon?</title>
  <link>http://www.logilab.org/blogentry/98317</link>
  <description>&lt;div style=&quot;width:600px;font-size:110%&quot;&gt;&lt;!-- afpy logo --&gt;
&lt;img alt=&quot;http://www.logilab.org/file/98313?vid=download&quot; class=&quot;align-left&quot; src=&quot;http://www.logilab.org/file/98313?vid=download&quot; /&gt;
&lt;!-- Picon bottle --&gt;
&lt;img alt=&quot;http://www.logilab.org/file/98312?vid=download&quot; class=&quot;align-right&quot; src=&quot;http://www.logilab.org/file/98312?vid=download&quot; /&gt;
&lt;p&gt;We were at La Cantine on May 21th 2012 in Paris for the &amp;quot;PyCon.us Replay session&amp;quot;.&lt;/p&gt;
&lt;p&gt;&lt;a class=&quot;reference&quot; href=&quot;http://lacantine.org/&quot;&gt;La Cantine&lt;/a&gt; is a coworking space where hackers,
artists, students and so on can meet and work. It also organises some
meetings and conferences about digital culture, computer science, ...&lt;/p&gt;
&lt;p&gt;On May 21th 2012, it was a &lt;a class=&quot;reference&quot; href=&quot;http://lacantine.org/events/vous-reprendrez-bien-un-peu-de-pycon&quot;&gt;dev day about Python&lt;/a&gt;. &amp;quot;Would you
like to have more PyCon?&amp;quot; is a french wordplay where PyCon sounds like &lt;a class=&quot;reference&quot; href=&quot;http://en.wikipedia.org/wiki/Sirop_de_Picon&quot;&gt;Picon&lt;/a&gt;, a french &amp;quot;apéritif&amp;quot; which
traditionally accompanies beer. A good thing because the meeting began at 6:30
PM! Presentations and demonstrations were about some Python projects presented
at &lt;a class=&quot;reference&quot; href=&quot;https://us.pycon.org/2012/&quot;&gt;PyCon 2012 in Santa Clara (California)&lt;/a&gt; last
March. The original pycon presentations are accessible on &lt;a class=&quot;reference&quot; href=&quot;http://www.pyvideo.org/category/17/pycon-us-2012&quot;&gt;pyvideo.org&lt;/a&gt;.&lt;/p&gt;
&lt;div class=&quot;section&quot; id=&quot;pdb-introduction&quot;&gt;
&lt;h3&gt;&lt;a&gt;PDB Introduction&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;By Gael Pasgrimaud (&lt;a class=&quot;reference&quot; href=&quot;https://twitter.com/#!/gawel_&quot;&gt;&amp;#64;gawel_&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;&lt;a class=&quot;reference&quot; href=&quot;http://docs.python.org/library/pdb.html&quot;&gt;pdb&lt;/a&gt; is the well-known Python
debugger. Gael showed us how to easily use this almost-mandatory tool when you
develop in Python. As with the gdb debugger, you can stop the execution at a
breakpoint, walk up the stack, print the value of local variables or modify
temporarily some local variables.&lt;/p&gt;
&lt;p&gt;The best way to define a breakpoint in your source code, it&#39;s to write:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;pdb&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;pdb&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;set_trace&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Insert that where you would like &lt;tt class=&quot;docutils literal&quot;&gt;pdb&lt;/tt&gt; to stop. Then, you can step trough the code with
&lt;tt class=&quot;docutils literal&quot;&gt;s&lt;/tt&gt;, &lt;tt class=&quot;docutils literal&quot;&gt;c&lt;/tt&gt; or &lt;tt class=&quot;docutils literal&quot;&gt;n&lt;/tt&gt; commands. See help for more information. Following, the
help command in &lt;tt class=&quot;docutils literal&quot;&gt;pdb&lt;/tt&gt; command-line interpreter:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
(Pdb) help

Documented commands (type help &amp;lt;topic&amp;gt;):
========================================
EOF    bt         cont      enable  jump  pp       run      unt
a      c          continue  exit    l     q        s        until
alias  cl         d         h       list  quit     step     up
args   clear      debug     help    n     r        tbreak   w
b      commands   disable   ignore  next  restart  u        whatis
break  condition  down      j       p     return   unalias  where

Miscellaneous help topics:
==========================
exec  pdb
&lt;/pre&gt;
&lt;p&gt;It is also possible to invoke the module &lt;tt class=&quot;docutils literal&quot;&gt;pdb&lt;/tt&gt; when you run a Python script such
as:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
$&amp;gt; python -m pdb my_script.py
&lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;pyramid&quot;&gt;
&lt;h3&gt;&lt;a&gt;Pyramid&lt;/a&gt;&lt;/h3&gt;
&lt;!-- Pyramid logo --&gt;
&lt;img alt=&quot;http://www.logilab.org/file/98311?vid=download&quot; src=&quot;http://www.logilab.org/file/98311?vid=download&quot; /&gt;
&lt;p&gt;By Alexis Metereau (&lt;a class=&quot;reference&quot; href=&quot;https://twitter.com/#!/ametaireau&quot;&gt;&amp;#64;ametaireau&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;&lt;a class=&quot;reference&quot; href=&quot;http://www.pylonsproject.org/projects/pyramid/about&quot;&gt;Pyramid&lt;/a&gt; is an open
source Python web framework from &lt;a class=&quot;reference&quot; href=&quot;http://www.pylonsproject.org/about/pylons&quot;&gt;Pylons Project&lt;/a&gt;. It concentrates on providing
fast, high-quality solutions to the fundamental problems of creating a web
application:&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;the mapping of URLs to code ;&lt;/li&gt;
&lt;li&gt;templating ;&lt;/li&gt;
&lt;li&gt;security and serving static assets.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The framework allows to choose different approaches according the
simplicity//feature tradeoff that the programmer need. Alexis, from the French team of &lt;a class=&quot;reference&quot; href=&quot;https://services.mozilla.com/&quot;&gt;Services Mozilla&lt;/a&gt;,
is working with it on a daily basis and seemed happy to use it. He told us that
he uses Pyramid more as web Python library than a web framework.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;circus&quot;&gt;
&lt;h3&gt;&lt;a&gt;Circus&lt;/a&gt;&lt;/h3&gt;
&lt;!-- Circus logo --&gt;
&lt;img alt=&quot;http://www.logilab.org/file/98316?vid=download&quot; src=&quot;http://www.logilab.org/file/98316?vid=download&quot; /&gt;
&lt;p&gt;By Benoit Chesneau (&lt;a class=&quot;reference&quot; href=&quot;https://twitter.com/#!/benoitc&quot;&gt;&amp;#64;benoitc&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;&lt;a class=&quot;reference&quot; href=&quot;http://circus.readthedocs.org/&quot;&gt;Circus&lt;/a&gt; is a process watcher and
runner. Python scripts, via an API, or command-line interface can be used to
manage and monitor multiple processes.&lt;/p&gt;
&lt;p&gt;A very useful web application, called &lt;tt class=&quot;docutils literal&quot;&gt;circushttpd&lt;/tt&gt;, provides a way to
monitor and manage Circus through the web. Circus uses &lt;a class=&quot;reference&quot; href=&quot;http://www.zeromq.org/&quot;&gt;zeromq&lt;/a&gt;, a well-known tool used at
Logilab.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;matplotlib-demo&quot;&gt;
&lt;h3&gt;&lt;a&gt;matplotlib demo&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;This session was a well prepared and funny live demonstration by Julien
Tayon of &lt;a class=&quot;reference&quot; href=&quot;http://matplotlib.sourceforge.net/&quot;&gt;matplotlib&lt;/a&gt;, the Python 2D plotting library . He showed us some quick and easy stuff.&lt;/p&gt;
&lt;p&gt;For instance, how to plot a sinus with a few code lines with matplotlib and
NumPy:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;numpy&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;np&lt;/span&gt;
&lt;span class=&quot;kn&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;matplotlib.pyplot&lt;/span&gt; &lt;span class=&quot;kn&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;nn&quot;&gt;plt&lt;/span&gt;

&lt;span class=&quot;n&quot;&gt;fig&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;plt&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;figure&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;ax&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;fig&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;add_subplot&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;111&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;c&quot;&gt;# A simple sinus.&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;ax&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;plot&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;np&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sin&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;np&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;arange&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;10.&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;10.&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;0.05&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)))&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;fig&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;show&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;which gives:&lt;/p&gt;
&lt;!-- Sinus figure --&gt;
&lt;img alt=&quot;http://www.logilab.org/file/98315?vid=download&quot; src=&quot;http://www.logilab.org/file/98315?vid=download&quot; /&gt;
&lt;p&gt;You can make some fancier plots such as:&lt;/p&gt;
&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;span class=&quot;c&quot;&gt;# A sinus and a fancy Cardioid.&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;np&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;arange&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;5.&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;5.&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;0.1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;ax_sin&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;fig&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;add_subplot&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;211&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;ax_sin&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;plot&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;np&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sin&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;^-r&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;lw&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;1.5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;ax_sin&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;set_title&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;A sinus&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;c&quot;&gt;# Cardioid.&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;ax_cardio&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;fig&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;add_subplot&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;212&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;x&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;0.5&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;2.&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;np&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cos&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;np&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;cos&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;y&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mf&quot;&gt;0.5&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mf&quot;&gt;2.&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;np&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sin&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;np&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;sin&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;ax_cardio&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;plot&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;y&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;#39;-og&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;ax_cardio&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;grid&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;ax_cardio&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;set_xlabel&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;r&amp;quot;$\frac{1}{2} (2 \cos{t} - \cos{2t})$&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;n&quot;&gt;fontsize&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;16&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;n&quot;&gt;fig&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;show&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;where you can type some LaTeX equations as X label for instance.&lt;/p&gt;
&lt;!-- Cardioid figure. --&gt;
&lt;img alt=&quot;http://www.logilab.org/file/98314?vid=download&quot; src=&quot;http://www.logilab.org/file/98314?vid=download&quot; /&gt;
&lt;p&gt;The force of this plotting library is the gallery of several examples &lt;strong&gt;with
piece of code&lt;/strong&gt;. See the &lt;a class=&quot;reference&quot; href=&quot;http://matplotlib.sourceforge.net/gallery.html&quot;&gt;matplotlib gallery&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;using-python-for-robotics&quot;&gt;
&lt;h3&gt;&lt;a&gt;Using Python for robotics&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Dimitri Merejkowsky reviewed how Python can be used to control and program Aldebaran&#39;s &lt;a class=&quot;reference&quot; href=&quot;http://developer.aldebaran-robotics.com/blog&quot;&gt;humanoid robot NAO&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;wrap-up&quot;&gt;
&lt;h3&gt;&lt;a&gt;Wrap up&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Unfortunately, Olivier Grisel who was supposed to make three interesting presentations
was not there. He was supposed to present :&lt;/p&gt;
&lt;ul class=&quot;simple&quot;&gt;
&lt;li&gt;A demo about injecting arbitrary code and monitoring Python process with
&lt;a class=&quot;reference&quot; href=&quot;http://pyrasite.com/&quot;&gt;Pyrasite&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Another demo about Interactive Data analysis with Pandas and the new &lt;a class=&quot;reference&quot; href=&quot;http://ipython.org/&quot;&gt;IPython
NoteBook&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Wrap up : Distributed computation on cluster related project:
&lt;a class=&quot;reference&quot; href=&quot;http://www.parallelpython.com/&quot;&gt;IPython.parallel&lt;/a&gt;, &lt;a class=&quot;reference&quot; href=&quot;http://www.picloud.com&quot;&gt;picloud&lt;/a&gt; and Storm + Umbrella&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Thanks to La Cantine and the different organisers for this friendly dev day.&lt;/p&gt;
&lt;/div&gt;&lt;/div&gt;
</description>
  <dc:date>2012-06-04T09:48-01:00</dc:date>
  <dc:creator>Damien Garaud</dc:creator>
</item>
  </channel>
</rss>