Blame bugzilla/bugzilla3.py

Packit 436967
# bugzilla3.py - a Python interface to Bugzilla 3.x using xmlrpclib.
Packit 436967
#
Packit 436967
# Copyright (C) 2008, 2009 Red Hat Inc.
Packit 436967
# Author: Will Woods <wwoods@redhat.com>
Packit 436967
#
Packit 436967
# This program is free software; you can redistribute it and/or modify it
Packit 436967
# under the terms of the GNU General Public License as published by the
Packit 436967
# Free Software Foundation; either version 2 of the License, or (at your
Packit 436967
# option) any later version.  See http://www.gnu.org/copyleft/gpl.html for
Packit 436967
# the full text of the license.
Packit 436967
Packit 436967
from bugzilla.base import BugzillaBase
Packit 436967
Packit 436967
Packit 436967
class Bugzilla3(BugzillaBase):
Packit 436967
    bz_ver_major = 3
Packit 436967
    bz_ver_minor = 0
Packit 436967
Packit 436967
Packit 436967
class Bugzilla32(Bugzilla3):
Packit 436967
    bz_ver_minor = 2
Packit 436967
Packit 436967
Packit 436967
class Bugzilla34(Bugzilla32):
Packit 436967
    bz_ver_minor = 4
Packit 436967
Packit 436967
Packit 436967
class Bugzilla36(Bugzilla34):
Packit 436967
    bz_ver_minor = 6
Packit 436967
Packit 436967
    def _getbugfields(self):
Packit 436967
        '''Get the list of valid fields for Bug objects'''
Packit 436967
        r = self._proxy.Bug.fields({'include_fields': ['name']})
Packit 436967
        return [f['name'] for f in r['fields']]