- <div class="title"><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">MPEG-LA mener NRK må ha avtale med dem for å kringkaste og publisere H.264-video</a></div>
- <div class="date">28th June 2012</div>
- <div class="body"><p>Etter at NRK
-<a href="http://people.skolelinux.org/pere/blog/NRK_nekter___finne_og_utlevere_eventuell_avtale_med_MPEG_LA.html">nektet
-å spore opp eventuell avtale med MPEG-LA</a> eller andre om bruk av
-MPEG/H.264-video etter at jeg <a
-href="http://people.skolelinux.org/pere/blog/Trenger_en_avtale_med_MPEG_LA_for___publisere_og_kringkaste_H_264_video_.html">ba
-om innsyn i slike avtaler</a>, tenkte jeg at i stedet for å forsøke å
-få NRK til å finne en slik avtale, så burde det være like enkelt å
-spørre MPEG-LA om de hadde avtale med NRK. Spørsmålet ble sendt før
-jeg fikk tips fra Kieran Kunhya om hvor listen over lisensinnehavere
-"in Good Standing" befant seg. MPEG-LA svarte meg i dag, og kan
-fortelle at NRK ikke har noen avtale med dem, så da er i det minste det
-slått fast. Ikke overraskende mener MPEG-LA at det trengs en avtale
-med MPEG-LA for å streame H.264, men deres rammer er jo
-rettstilstanden i USA og ikke Norge. Jeg tar dermed den delen av
-svaret med en klype salt. Jeg er dermed fortsatt ikke klok på om det
-trengs en avtale, og hvis det trengs en avtale her i Norge, heller
-ikke sikker på om NRK har en avtale med noen andre enn MPEG-LA som
-gjør at de ikke trenger avtale direkte med MPEG-LA. Jeg håper NRKs
-jurister har vurdert dette, og at det er mulig å få tilgang til
-vurderingen uansett om de trenger en avtale eller ikke.</p>
-
-<p>Her er epostutvekslingen med MPEG-LA så langt. Håper ikke
-utvekslingen fører til NRK plutselig får en litt uventet pakke fra
-MPEG-LA.</p>
-
-<p><blockquote>
-<p>Date: Mon, 25 Jun 2012 15:29:37 +0200
-<br>From: Petter Reinholdtsen <pere (at) hungry.com>
-<br>To: licensing-web (at) mpegla.com
-<br>Subject: Do NRK have a license agreement with MPEG-LA?</p>
-
-<p>Hi. I have a small question for you, that I hope it is OK that I
-ask.</p>
-
-<p>Is there any license agreements between MPEG-LA and NRK, <URL:
-<a href="http://www.nrk.no/">http://www.nrk.no/</a> >, the
-Norwegian national broadcasting cooperation? I am not sure if they
-need one, and am just curious if such agreeement exist.</p>
-
-<p>The postal address is</p>
-
-<p><blockquote>
- NRK
- <br>Postbox 8500, Majorstuen
- <br>0340 Oslo
- <br>Norway
-</blockquote></p>
-
-<p>if it make it easier for you to locate such agreement.</p>
-
-<p>Can you tell me how many entities in Norway have an agreement with
-MPEG-LA, and the name of these entities?</p>
-
-<p>--
-<br>Happy hacking
-<br>Petter Reinholdtsen
-</blockquote></p>
-
-<p>I dag, to dager senere, fikk jeg følgende svar:</p>
-
-<p><blockquote>
-<p>Date: Thu, 28 Jun 2012 14:11:17 +0000
-<br>From: Ryan Rodriguez <RRodriguez (at) mpegla.com>
-<br>To: Petter Reinholdtsen <pere (at) hungry.com>
-<br>CC: MD Administration <MDAdministration (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 and for your interest in MPEG LA. We
-appreciate hearing from you and I will be happy to assist you.</p>
-
-<p>To begin, I will assume that you are referring to AVC/H.264
-technology in your message below, as this technology is commonly used
-in the transmission of video content. In that case, please allow me
-to briefly summarize the coverage provided by our AVC Patent Portfolio
-License.</p>
-
-<P>Our AVC License provides coverage for end products and video
-services that make use of AVC/H.264 technology. Accordingly, the
-party offering such end products and video to End Users concludes the
-AVC License and is responsible for paying the applicable royalties
-associated with the end products/video they offer.</p>
-
-<p>While the Norwegian Broadcast Corporation (NRK) is not currently a
-Licensee to MPEG LA's AVC License (or any other Portfolio License
-offered by MPEG LA), if NRK offers AVC Video to End Users for
-remuneration (for example, Title-by-Title, Subscription, Free
-Television, or Internet Broadcast AVC Video), then NRK will need to
-conclude the AVC License and may be responsible for paying applicable
-royalties associated with the AVC Video it distributes.</p>
-
-<p>Today I will send you a FedEx package containing a copy of our AVC
-License for your review. You should receive the License document
-within the next few days.</p>
-
-<p>Meanwhile, MPEG LA currently has several Norwegian Licensees that
-can be found under the "Licensees" header within the respective
-portion of our website. For example, you may find our list of
-Licensees in Good Standing to our AVC License in the AVC portion of
-our website,
-<a href="http://www.mpegla.com/main/programs/AVC/Pages/Licensees.aspx">http://www.mpegla.com/main/programs/AVC/Pages/Licensees.aspx</a></p>
-
-<p>I hope the above information is helpful. If you have additional
-questions or need further assistance with the AVC License, please feel
-free to contact me directly. I look forward to hearing from you again
-soon.</p>
-
-<p>Best regards,</p>
-
-<p>Ryan</p>
-
-<p>Ryan M. Rodriguez
-<br>Licensing Associate
-<br>MPEG LA
-<br>5425 Wisconsin Avenue
-<br>Suite 801
-<br>Chevy Chase, MD 20815
-<br>U.S.A.
-<br>Phone: +1 (301) 986-6660 x211
-<br>Fax: +1 (301) 986-8575
-<br>Email: rrodriguez (at) mpegla.com</p>
-
-</blockquote></p>
-
-<p>Meldingen om utsendt FedEx-pakke var så merkelig at jeg
-øyeblikkelig sendte svar tilbake og spurte hva i alle dager han mente,
-da han jo ikke hadde fått noen postadresse som nådde meg.</p>
-
-<p><blockquote>
-
-<p>Date: Thu, 28 Jun 2012 16:36:15 +0200
-<br>From: Petter Reinholdtsen <pere (at) hungry.com>
-<br>To: Ryan Rodriguez <RRodriguez (at) mpegla.com>
-<br>Cc: MD Administration <MDAdministration (at) mpegla.com>
-<br>Subject: Re: Do NRK have a license agreement with MPEG-LA?</p>
-
-<p>[Ryan Rodriguez]
-<br>> Dear Mr. Reinholdtsen,</p>
-
-<p>Thank you for your quick reply.</p>
-
-<p>> Today I will send you a FedEx package containing a copy of our AVC
-<br>> License for your review. You should receive the License document
-<br>> within the next few days.</p>
-
-<p>The part about sending a FedEx package confused me, though. I did not
-<br>give you my address, nor am I associated with NRK in any way, so I hope
-<br>you did not try to send me a package using the address of NRK. If you
-<br>would send me the Internet address of to the document, it would be more
-<br>useful to me to be able to download it as an electronic document.</p>
-
-<p>> Meanwhile, MPEG LA currently has several Norwegian Licensees that can
-<br>> be found under the "Licensees" header within the respective portion
-<br>> of our website. For example, you may find our list of Licensees in
-<br>> Good Standing to our AVC License in the AVC portion of our website,
-<br>> http://www.mpegla.com/main/programs/AVC/Pages/Licensees.aspx</p>
-
-<p>How can I recognize the Norwegian licensees?</p>
-
-<p>--
-<br>Happy hacking
-<br>Petter Reinholdtsen</p>
-</blockquote></p>
-
-<p>Selv om jeg svarte kun noen minutter etter at jeg fikk eposten fra
-MPEG-LA, fikk jeg eposten under som automatisk var beskjed på min
-siste epost. Får håpe noen likevel følger opp "FedEx-pakken". For å
-øke sjansen for at noen revurderer utsending av pakke uten mottaker,
-videresendte jeg min epost til swolf (at) mpegla.com, så får vi se.
-Har ikke hørt noe mer 3 timer senere, så jeg mistenker at ingen leste
-min epost tidsnok.</p>
-
-<p><blockquote>
-
-<p>Date: Thu, 28 Jun 2012 14:36:20 +0000
-<br>From: Ryan Rodriguez <RRodriguez (at) mpegla.com>
-<br>To: Petter Reinholdtsen <pere (at) hungry.com>
-<br>Subject: Automatic reply: Do NRK have a license agreement with MPEG-LA?</p>
-
-<p>Thank you for your message.</p>
-
-<p>I will be out of the office until Thursday, July 5 and will respond
-to all messages upon my return. If this is a matter that requires
-immediate attention, please contact Sidney Wolf (swolf (at)
-mpegla.com)</p>
-
-<p>Best regards,</p>
-
-<p>Ryan</p>
-
-<p>Ryan M. Rodriguez
-<br>Licensing Associate
-<br>MPEG LA</p>
-
-</blockquote></p>
-
-<p>Litt klokere, men fortsatt ikke klok på mitt opprinnelige spørsmål,
-som er om en trenger avtale med MPEG-LA for å publisere eller
-kringkaste H.264-video i Norge.</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>