- <div class="title"><a href="http://people.skolelinux.org/pere/blog/Debian_Edu_interview__Giorgio_Pioda.html">Debian Edu interview: Giorgio Pioda</a></div>
- <div class="date">17th September 2012</div>
- <div class="body"><p>After a long break in my row of interviews with people in the
-<a href="http://www.skolelinux.org/">Debian Edu and Skolelinux</a>
-community, I finally found time to wrap up another. This time it is
-Giorgio Pioda, which showed up on the mailing list at the start of
-this year, asking questions and inspiring us to improve the first time
-administrators experience with Skolelinux. :) The interview was
-conduced in May, but I only found time to publish it now.</p>
-
-<p><strong>Who are you, and how do you spend your days?</strong></p>
-
-<p>I have a PhD in chemistry but since several years I work as teacher
-in secondary (15-18 year old students) and tertiary (a kind of "light"
-university) schools. Five years ago I started to manage a Learning
-Management Service server and slowly I got more and more involved with
-IT. 3 years ago the graduating schools moved completely to Linux and I
-got the head of the IT for this. The experience collected in chemistry
-labs computers (for example NMR analysis of protein folding) and in
-the IT-courses during university where sufficient to start. Self
-training is anyway very important</p>
-
-<p>I live in the Italian speaking part of Switzerland, and the
-<a href="http://www.spse.ch/">SPSE school</a> (secondary) is a very
-special sport school for young people who try to became sport pro (for
-all sports, we have dozens of disciplines represented) and we are
-recognised by the Olympic Swiss Organisation.
-
-<p><strong>How did you get in contact with the Skolelinux/Debian Edu
-project?</strong></p>
-
-<p>Looking for Linux / Primary Domain Controller (PDC) I found it
-already several years ago. But since the system was still not
-Kerberized and since our schools relies strongly on laptops I didn't
-use it. I plan to introduce it in the next future, probably for the
-next school year, since the squeeze release solved this security
-hole.</p>
-
-<p><strong>What do you see as the advantages of Skolelinux/Debian
-Edu?</strong></p>
-
-<p>Many. First of all there is a strong and living community that is
-very generous for help and hints. Chat help is crucial, together with
-the mailing list. Second. With Skolelinux you get an already well
-engineered platform and you don't have to start to build up your PDC
-and your clients from GNU/scratch; I've already done this once and I
-can tell it, it is hard. Third, since Skolelinux is a standard
-platform, it is way easier to educate other IT people and even if the
-head IT is sick another one could pick up the task without too much
-hassle.</p>
-
-<p><strong>What do you see as the disadvantages of Skolelinux/Debian
-Edu?</strong></p>
-
-<p>The only real problem I see is that it is a little too less
-flexible at client level. Debian stable is rocky and desirable, but
-there are many reasons that force for another choice. For example the
-need of new drivers for new PC, or the need for a specific OS for some
-devices that have specific software packages for another specific
-distribution (I have such a case for whiteboards that have only
-Ubuntu packages). Thus, I prepared compatibility packages educlient
-and eduroaming, hoping not to use them ;-)</p>
-
-<p><strong>Which free software do you use daily?</strong></p>
-
-<p>I have a Debian Stable PDC at school (Kerberos, NIS, NFS) with
-mixed Debian and Ubuntu clients. If you think that this triad
-combination is exotic... well I discovered right yesterday that
-<a href="http://moo.nac.uci.edu/~hjm/Perceus-Report.html">Perceus</a>
-has the same...</p>
-
-<p>For myself I run Debian wheezy/sid, but this combination is good
-only I you have enough competence to fix stuff for yourself, if
-something breaks. Daily I use texmacs, gnumeric, a little bit of R
-statistics, kmplot, and less frequently OpenOffice.org.</p>
-
-<p><strong>Which strategy do you believe is the right one to use to
-get schools to use free software?</strong></p>
-
-<P>I think that the only real argument that school managers "hear" is
-cost reduction. They don't give too much weight on quality, stability,
-just because they are normally not open to change.</p>
-
-<p>Students adapts very quickly to GNU/Linux (and for them being able
-to switch between different OS is a plus value); teachers and managers
-don't.</p>
-
-<p>We decided to move to Linux because students at our school have own
-laptop and we have the responsibility to keep the laptop ready to use;
-we were really unsatisfied with Microsoft since every Monday we had 20
-machine to fix for viral infections... With Linux this has been
-reduced to zero, since people installs almost only from official
-repositories. I think that our special needs brought us to Linux.
-Those who don't have such needs will hardly move to Linux.</p>
+ <div class="title"><a href="http://people.skolelinux.org/pere/blog/Scripting_the_Cerebrum_bofhd_user_administration_system_using_XML_RPC.html">Scripting the Cerebrum/bofhd user administration system using XML-RPC</a></div>
+ <div class="date"> 6th December 2012</div>
+ <div class="body"><p>Where I work at the <a href="http://www.uio.no/">University of
+Oslo</a>, we use the
+<a href="http://sourceforge.net/projects/cerebrum/">Cerebrum user
+administration system</a> to maintain users, groups, DNS, DHCP, etc.
+I've known since the system was written that the server is providing
+an <a href="http://en.wikipedia.org/wiki/XML-RPC">XML-RPC</a> API, but
+I have never spent time to try to figure out how to use it, as we
+always use the bofh command line client at work. Until today. I want
+to script the updating of DNS and DHCP to make it easier to set up
+virtual machines. Here are a few notes on how to use it with
+Python.</p>
+
+<p>I started by looking at the source of the Java
+<a href="http://cerebrum.svn.sourceforge.net/viewvc/cerebrum/trunk/cerebrum/clients/jbofh/">bofh
+client</a>, to figure out how it connected to the API server. I also
+googled for python examples on how to use XML-RPC, and found
+<a href="http://tldp.org/HOWTO/XML-RPC-HOWTO/xmlrpc-howto-python.html">a
+simple example in</a> the XML-RPC howto.</p>
+
+<p>This simple example code show how to connect, get the list of
+commands (as a JSON dump), and how to get the information about the
+user currently logged in:</p>
+
+<blockquote><pre>
+#!/usr/bin/env python
+import getpass
+import xmlrpclib
+server_url = 'https://cerebrum-uio.uio.no:8000';
+username = getpass.getuser()
+password = getpass.getpass()
+server = xmlrpclib.Server(server_url);
+#print server.get_commands(sessionid)
+sessionid = server.login(username, password)
+print server.run_command(sessionid, "user_info", username)
+result = server.logout(sessionid)
+print result
+</pre></blockquote>
+
+<p>Armed with this knowledge I can now move forward and script the DNS
+and DHCP updates I wanted to do.</p>