Is there a backend interface to bugzilla?

Tom Emerson tree at basistech.com
Wed Oct 1 19:41:32 UTC 2003


Christian Reis writes:
> On Wed, Oct 01, 2003 at 02:58:14PM -0400, Tom Emerson wrote:
> > jose at invisiondns.com writes:
> > > I would like to integrate my app with bugzilla but prefer not to use the
> > > generated html output from bugzilla.  Is there a backend interface to
> > > bugzilla where I can just post queries and get plain text responses that I
> > > can parse and display as I need?
> > 
> > I would bootstrap off the existing Perl query code: some of that was
> > refactored for the templating system, but not all of it. I ended up
> > writing my own Python interface to the Bugzilla database for some
> > custom work here. I can make this available to anyone who wants it.
> 
> -- and ESR and I are working on a (commandline) Python bug
> submission tool. See bug 220724 for details (we should have a script
> attached there RSN<tm>). 
> 
> What sort of .py interface do you provide?

http://www.dreamersrealm.net/tree/sw/pyBugzilla.py

A year or so ago I had a need to create several Products with similar
components, and a few other maintenance functions that were obnoxious
to do in the UI and cumbersome to do from the MySQL listener. Hence my
pyBugzilla stuff was born. It only implements the functionality I
needed:

GetUserProfileByName
GetUserProfileByID
GetUserIDByName
AddComponentToProduct
AddVersionToProduct
AddMilestoneToProduct
MoveMilestoneToVersion
AddProduct
GetProductNames

These are a pretty thin layer on top of what is already there, but
they work well for what I needed, and there are a number of support
functions underneath. I don't even know if the script works with the
latest Bugzilla tables --- though I expect they do.

One of the reasons I didn't want to replicate queries already in the
Bugzilla Perl code in a separate code base. I also didn't want to go
to the effort of creating parallel Python class abstractions for
Bugzilla concepts when I didn't need them: this was an eXtreme
project.

> Offshoot question: is there a consensus that moving to an XML-RPC
> interface is what we should be doing (for a 'foreign interface')?

Well... it depends on the functionality provided by that interface. If
the low-level predicates are there, sure.

Anyway, I'm interested in either expanding what is already in place or
contributing to ongoing Python/Bugzilla work.

    -tree

-- 
Tom Emerson                                          Basis Technology Corp.
Software Architect                                 http://www.basistech.com
  "Beware the lollipop of mediocrity: lick it once and you suck forever"



More information about the developers mailing list