Beispiel #1
0
class BodhiClient(object):
    def __init__(self, username, password):
        self.bodhi = BClient(username=username, password=password)

    def createUpdate(self, builds, notes, bugs, type="enhancement"):
        try:
            result = self.bodhi.save(builds=builds,
                                     type=type,
                                     notes=notes,
                                     bugs=bugs)
        except BodhiClientException as e:
            logging.error(e)
            return False

        return True

    def createNewPackageUpdate(self, builds, notes, bugs):
        return self.createUpdate(builds, notes, bugs, type="newpackage")

    def createOverride(self, build, duration=21, notes="Override"):
        try:
            self.bodhi.save_override(build, duration, notes)
        except BodhiClientException as e:
            logging.error(e)
            return False

        return True
Beispiel #2
0
class BodhiClient(object):

	def __init__(self, username, password):
		self.bodhi = BClient(username=username, password=password)

	def createUpdate(self, builds, notes, bugs, type="enhancement"):
		try:
			result = self.bodhi.save(builds=builds, type=type, notes=notes, bugs=bugs)
		except BodhiClientException as e:
			logging.error(e)
			return False

		return True

	def createNewPackageUpdate(self, builds, notes, bugs):
		return self.createUpdate(builds, notes, bugs, type="newpackage")

	def createOverride(self, build, duration = 21, notes = "Override"):
		try:
			self.bodhi.save_override(build, duration, notes)
		except BodhiClientException as e:
			logging.error(e)
			return False

		return True
    def __init__(self, worker_name, queue, main_thread, parent=None):
        super(BodhiWorker, self).__init__(parent)
        self.queue = queue

        self.worker_name = worker_name
        self.main_thread = main_thread

        bodhi_url = 'https://admin.fedoraproject.org/updates/'
        self.bc = BodhiClient(bodhi_url, useragent="Fedora Gooey Karma", debug=None)
        self.installed_packages = []
        self.process_list = self.get_proc_list()
Beispiel #4
0
import os
import subprocess

from fedora.client import BodhiClient, BodhiClientException
from fedora.client.bodhi import Bodhi2Client

log = logging.getLogger('fedora.client.bodhi')

build = u'qt-creator-3.4.1-3.fc23'
username = os.getenv('USER')
p = subprocess.Popen(['/usr/bin/pass', 'fedora'], stdout=subprocess.PIPE)
out, err = p.communicate()
password = out.strip()

print('Logging into bodhi2')
bodhi = BodhiClient(staging=True, username=username, password=password)

print('Logged in! Creating new update...')

try:
    result = bodhi.save(builds=build,
                        type='bugfix',
                        notes='The quick brown fox jumped over the lazy dog',
                        bugs='1234106,1234107')
    print(result)
    assert len(result.bugs) == 2, result.bugs
except BodhiClientException as e:
    print(e)

print('Editing update')
try:
Beispiel #5
0
 def __init__(self, username, password):
     self.bodhi = BClient(username=username, password=password)
from fedora.client import BodhiClient, BodhiClientException
from fedora.client.bodhi import Bodhi2Client

log = logging.getLogger('fedora.client.bodhi')

build = u'qt-creator-3.4.1-3.fc23'
username = os.getenv('USER')
#username = raw_input('FAS Username: '******'/usr/bin/pass', 'fedora'], stdout=subprocess.PIPE)
out, err = p.communicate()
password = out.strip()

print('Logging into bodhi2')
bodhi = BodhiClient(staging=True, username=username, password=password)

print('Logged in! Creating new update...')

try:
    result = bodhi.save(
            builds=build,
            type='bugfix',
            notes='The quick brown fox jumped over the lazy dog',
            bugs='1234106,1234107',
    )
    print(result)
    assert len(result.bugs) == 2, result.bugs
except BodhiClientException as e:
    print(e)
Beispiel #7
0
"""
Print out a list of builds that need signing.
"""

__requires__ = 'bodhi'

import pkg_resources
import os
import sys
import pickle

import optparse

from fedora.client import BodhiClient

bodhi = BodhiClient(base_url='http://localhost/updates/')


parser = optparse.OptionParser()
parser.add_option('-e', '--epel',    action='store_true', help='Output EPEL builds')
parser.add_option('-f', '--fedora',  action='store_true', help='Output Fedora builds')
parser.add_option('-v', '--verbose', action='store_true', help='Verbose output')
opts, args = parser.parse_args()


def signable_builds(release):
    locked = set()

    # Load the bodhi masher state
    lock = '/mnt/koji/mash/updates/MASHING-%s' % release.id_prefix
    if os.path.exists(lock):
Beispiel #8
0
"""
Print out a list of builds that need signing.
"""

__requires__ = 'bodhi'

import pkg_resources
import os
import sys
import pickle

import optparse

from fedora.client import BodhiClient

bodhi = BodhiClient(base_url='http://localhost/updates/')

parser = optparse.OptionParser()
parser.add_option('-e',
                  '--epel',
                  action='store_true',
                  help='Output EPEL builds')
parser.add_option('-f',
                  '--fedora',
                  action='store_true',
                  help='Output Fedora builds')
parser.add_option('-v',
                  '--verbose',
                  action='store_true',
                  help='Verbose output')
opts, args = parser.parse_args()
Beispiel #9
0
	def __init__(self, username, password):
		self.bodhi = BClient(username=username, password=password)