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)
|
return makeurl(self.apiurl, l, query)
|
||||||
|
|
||||||
def retried_GET(self, url):
|
def retried_GET(self, url):
|
||||||
|
url = urllib2.quote(url, safe=':/?=&')
|
||||||
try:
|
try:
|
||||||
return http_GET(url)
|
return http_GET(url)
|
||||||
except urllib2.HTTPError, e:
|
except urllib2.HTTPError, e:
|
||||||
|
@ -61,6 +61,9 @@ class ToTestBase(object):
|
|||||||
|
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
|
def openqa_group(self):
|
||||||
|
return self.project
|
||||||
|
|
||||||
def get_current_snapshot(self):
|
def get_current_snapshot(self):
|
||||||
"""Return the current snapshot in :ToTest"""
|
"""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/' \
|
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)
|
f = self.api.retried_GET(url)
|
||||||
jobs = []
|
jobs = []
|
||||||
for job in json.load(f)['jobs']:
|
for job in json.load(f)['jobs']:
|
||||||
@ -368,6 +372,9 @@ class ToTestFactory(ToTestBase):
|
|||||||
def openqa_version(self):
|
def openqa_version(self):
|
||||||
return 'Tumbleweed'
|
return 'Tumbleweed'
|
||||||
|
|
||||||
|
def openqa_group(self):
|
||||||
|
return ''
|
||||||
|
|
||||||
def iso_prefix(self):
|
def iso_prefix(self):
|
||||||
return 'Tumbleweed'
|
return 'Tumbleweed'
|
||||||
|
|
||||||
@ -403,6 +410,9 @@ class ToTestFactoryPowerPC(ToTestBase):
|
|||||||
def openqa_version(self):
|
def openqa_version(self):
|
||||||
return 'Tumbleweed'
|
return 'Tumbleweed'
|
||||||
|
|
||||||
|
def openqa_group(self):
|
||||||
|
return 'PowerPC'
|
||||||
|
|
||||||
def arch(self):
|
def arch(self):
|
||||||
return 'ppc64le'
|
return 'ppc64le'
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user