X-Git-Url: https://pere.pagekite.me/gitweb/homepage.git/blobdiff_plain/0bf82d81497fb2f5ad123c7d37281c6a3a7a5c0d..f10e8b30f3531c7159ef8c4e97b598a8694db3f6:/blog/index.html diff --git a/blog/index.html b/blog/index.html index c6f996753f..e95802ffe6 100644 --- a/blog/index.html +++ b/blog/index.html @@ -19,6 +19,38 @@ +
+
Moved the pymissile Debian packaging to collab-maint
+
10th January 2013
+

As part of my investigation on how to improve the support in Debian +for hardware dongles, I dug up my old Mark and Spencer USB Rocket +Launcher and updated the Debian package +pymissile to make +sure udev will fix the device permissions when it is plugged in. I +also added a "Modaliases" header to test it in the Debian archive and +hopefully make the package be proposed by jockey in Ubuntu when a user +plug in his rocket launcher. In the process I moved the source to a +git repository under collab-maint, to make it easier for any DD to +contribute. Upstream +is not very active, but the software still work for me even after five +years of relative silence. The new git repository is not listed in +the uploaded package yet, because I want to test the other changes a +bit more before I upload the new version. If you want to check out +the new version with a .desktop file included, visit the +gitweb +view or use "git clone +git://anonscm.debian.org/collab-maint/pymissile.git".

+
+
+ + + Tags: debian, english, robot. + + +
+
+
+
Lets make hardware dongles easier to use in Debian
9th January 2013
@@ -609,60 +641,6 @@ innbyggerne i uka om feil på offentlig infrastruktur.

-
-
Scripting the Cerebrum/bofhd user administration system using XML-RPC
-
6th December 2012
-

Where I work at the University of -Oslo, we use the -Cerebrum user -administration system to maintain users, groups, DNS, DHCP, etc. -I've known since the system was written that the server is providing -an XML-RPC 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.

- -

I started by looking at the source of the Java -bofh -client, 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 -simple example in the XML-RPC howto.

- -

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:

- -
-#!/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
-
- -

Armed with this knowledge I can now move forward and script the DNS -and DHCP updates I wanted to do.

-
-
- - - Tags: english, sysadmin. - - -
-
-
-

RSS feed