- <div class="title"><a href="http://people.skolelinux.org/pere/blog/Mer_oppf_lging_fra_MPEG_LA_om_avtale_med_dem_for___kringkaste_og_publisere_H_264_video.html">Mer oppfølging fra MPEG-LA om avtale med dem for å kringkaste og publisere H.264-video</a></div>
- <div class="date"> 5th July 2012</div>
- <div class="body"><p>I føljetongen om H.264
-<a href="http://people.skolelinux.org/pere/blog/MPEG_LA_mener_NRK_m__ha_avtale_med_dem_for___kringkaste_og_publisere_H_264_video.html">forlot
-jeg leserne i undring</a> om hvor pakken fra MPEG-LA tok veien, og om
-hvilke selskaper i Norge som har avtale med MPEG-LA. Da Ryan hos
-MPEG-LA dro på ferie sendte jeg min melding videre til hans kollega,
-og dagen etter fikk jeg følgende svar derfra:</p>
-
-<p><blockquote>
-<p>Date: Fri, 29 Jun 2012 18:32:34 +0000
-<br>From: Sidney Wolf <SWolf (at) mpegla.com>
-<br>To: Petter Reinholdtsen <pere (at) hungry.com>
-<br>Cc: Ryan Rodriguez <RRodriguez (at) mpegla.com>
-<br>Subject: RE: Do NRK have a license agreement with MPEG-LA?</p>
-
-<p>Dear Mr. Reinholdtsen,</p>
-
-<p>Thank you for your message. As you know, Ryan is currently our of the
-office, so it will be my pleasure to assist you.</p>
-
-<p>Per your request, attached please find an electronic copy of the
-AVC Patent Portfolio License. Please note that the electronic copy of
-the License is provided as a convenience and for informational
-purposes only. When concluding the Licenses, only the hard copies
-provided by MPEG LA may be used.</p>
-
-<p>To your question, MPEG LA lists our Licensees on our website
-according to each program. The lists are in alphabetical order, so it
-is very easy to search.</p>
-
-<p>I hope that this was helpful. If we can be of additional
-assistance, please let me know.</p>
-
-<p>Kind regards,</p>
-
-<p>Sidney A. Wolf
-<br>Manager, Global Licensing
-<br>MPEG LA</p>
-</blockquote></p>
-
-<p>Selv om et epostvedlegg er nyttig for mottakeren, så håpet jeg å få
-et dokument jeg kunne dele med alle leserne av bloggen min, og ikke et
-som må deles på individuell basis. Opphavsretten krever godkjenning
-fra rettighetsinnehaver før en kan gjøre slikt, så dermed fulgte jeg
-opp med et spørsmål om dette var greit.</p>
-
-<p><blockquote>
-<p>Date: Wed, 4 Jul 2012 20:25:06 +0200
-<br>From: Petter Reinholdtsen <pere (at) hungry.com>
-<br>To: Sidney Wolf <SWolf (at) mpegla.com>
-<br>Cc: Ryan Rodriguez <RRodriguez (at) mpegla.com>
-<br>Subject: Re: Do NRK have a license agreement with MPEG-LA?</p>
-
-<p>Thank you for your reply.</p>
-
-<p>[Sidney Wolf]
-<br>> Per your request, attached please find an electronic copy of the AVC
-<br>> Patent Portfolio License. Please note that the electronic copy of
-<br>> the License is provided as a convenience and for informational
-<br>> purposes only. When concluding the Licenses, only the hard copies
-<br>> provided by MPEG LA may be used.</p>
-
-<p>This is useful for me to learn, but the reason I asked for the
-Internet address of the licensing document was to ensure I could
-publish a link to it when I discuss the topic of H.264 licensing here
-in Norway, and allow others to verify my observations. I can not do
-the same with an email attachment. Thus I would like to ask you if it
-is OK with MPEG LA that I publish this document on the Internet for
-others to read?</p>
-
-<p>> To your question, MPEG LA lists our Licensees on our website
-<br>> according to each program. The lists are in alphabetical order, so
-<br>> it is very easy to search.</p>
-
-<p>I am afraid this do not help me locate Norwegian companies in the
-list of Licensees. I do not know the name of all companies and
-organisations in Norway, and thus do not know how to locate the
-Norwegian ones on that list.</p>
-
-<p>> I hope that this was helpful. If we can be of additional assistance,
-<br>> please let me know.</p>
-
-<p>Absoutely helpful to learn more about how MPEG LA handle licensing.</p>
-
-<p>--
-<br>Happy hacking
-<br>Petter Reinholdtsen</p>
-</blockquote></p>
-
-<p>Jeg håpet også at det skulle være mulig å få vite hvilke av de
-mange hundre som har avtale med MPEG-LA om bruk av H.264 som holdt til
-i Norge. Begge mine håp falt i grus med svaret fra MPEG-LA.
-
-<p><blockquote>
-<p>Date: Thu, 5 Jul 2012 17:42:39 +0000
-<br>From: Sidney Wolf <SWolf (at) mpegla.com>
-<br>To: 'Petter Reinholdtsen' <pere (at) hungry.com>
-<br>Cc: Ryan Rodriguez <RRodriguez (at) mpegla.com>
-<br>Subject: RE: Do NRK have a license agreement with MPEG-LA?</p>
-
-<p>Dear Mr. Reinholdtsen,</p>
-
-<p>Thank you for your reply.</p>
-
-<p>We appreciate the additional explanation you have provided and for
-asking our permission to publish the electronic copy of the License in
-advance of doing so. Typically, MPEG LA prefers to distribute the
-electronic copies of our Licenses to interested parties. Therefore,
-please feel free to send interested parties to the AVC portion of our
-website, http://www.mpegla.com/main/programs/AVC/Pages/Intro.aspx for
-their further reference.</p>
-
-<p>As previously mentioned, MPEG LA maintains a list of Licensees in good
-standing on our website according to each program. Due to the large
-volume of Licensees, it would be administratively impractical to
-provide this level of detail to interested parties. Therefore, I am
-afraid we are not in a position to assist you with your request.</p>
-
-<p>Kind regards,</p>
-
-<p>Sidney A. Wolf
-<br>Manager, Global Licensing
-<br>MPEG LA</p>
-</blockquote></p>
-
-<p>Men takket være epostvedlegget kunne jeg søke på Google etter
-setningen "WHEREAS, a video standard commonly referred to as AVC has
-been defined and is referred to in this Agreement as the “AVC
-Standard” (as more fully defined herein below)" som finnes i avtalen,
-og lokalisere en kopi fra 2007 av
-<a href="http://www.sec.gov/Archives/edgar/data/1342960/000119312509050004/dex1024.htm">lisensavtalen
-mellom MPEG-LA og DivX, Inc.</a>, slik at mine lesere kan se hvordan
-avtalen så ut da. Jeg har ikke sammenlignet tekstene for å se om noe
-har endret seg siden den tid, men satser på at teksten er representativ.</p>
-
-<p>Jeg aner fortsatt ikke hvor FedEx tok veien med pakken fra
-MPEG-LA.</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>