Merge pull request #324 from k0da/groupid
Add group to the openQA query
This commit is contained in:
commit
f209bfabca
@ -78,6 +78,7 @@ class StagingAPI(object):
|
||||
return makeurl(self.apiurl, l, query)
|
||||
|
||||
def retried_GET(self, url):
|
||||
url = urllib2.quote(url, safe=':/?=&')
|
||||
try:
|
||||
return http_GET(url)
|
||||
except urllib2.HTTPError, e:
|
||||
|
@ -61,6 +61,9 @@ class ToTestBase(object):
|
||||
|
||||
return ret
|
||||
|
||||
def openqa_group(self):
|
||||
return self.project
|
||||
|
||||
def get_current_snapshot(self):
|
||||
"""Return the current snapshot in :ToTest"""
|
||||
|
||||
@ -79,8 +82,9 @@ class ToTestBase(object):
|
||||
|
||||
"""
|
||||
|
||||
group = 'openSUSE' + ' ' + self.openqa_version() + ' ' + self.openqa_group()
|
||||
url = 'https://openqa.opensuse.org/api/v1/' \
|
||||
'jobs?version={}&build={}&distri=opensuse'.format(self.openqa_version(), snapshot)
|
||||
'jobs?version={}&build={}&distri=opensuse&group={}'.format(self.openqa_version(), snapshot, group)
|
||||
f = self.api.retried_GET(url)
|
||||
jobs = []
|
||||
for job in json.load(f)['jobs']:
|
||||
@ -368,6 +372,9 @@ class ToTestFactory(ToTestBase):
|
||||
def openqa_version(self):
|
||||
return 'Tumbleweed'
|
||||
|
||||
def openqa_group(self):
|
||||
return ''
|
||||
|
||||
def iso_prefix(self):
|
||||
return 'Tumbleweed'
|
||||
|
||||
@ -403,6 +410,9 @@ class ToTestFactoryPowerPC(ToTestBase):
|
||||
def openqa_version(self):
|
||||
return 'Tumbleweed'
|
||||
|
||||
def openqa_group(self):
|
||||
return 'PowerPC'
|
||||
|
||||
def arch(self):
|
||||
return 'ppc64le'
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user