Commit 527b583c authored by Matt Hart's avatar Matt Hart
Browse files

Add pipeline info to all_devices XMLRPC method

Needed for kernelci to know which devices to
submit YAML jobs to.

Change-Id: I986812175cb26f99ab24beaab9b4641e59ee8ff4
parent 99e3fb5e
......@@ -258,9 +258,10 @@ class SchedulerAPI(ExposedAPI):
Return value
------------
This function returns an XML-RPC array in which each item is a list of
device hostname, device type, device state and current running job id. For example:
device hostname, device type, device state, current running job id and
if device is pipeline. For example:
[['panda01', 'panda', 'running', 164], ['qemu01', 'qemu', 'idle', None]]
[['panda01', 'panda', 'running', 164, False], ['qemu01', 'qemu', 'idle', None, True]]
"""
devices_list = []
......@@ -271,7 +272,7 @@ class SchedulerAPI(ExposedAPI):
continue
devices_list.append(dev)
return [list((dev.hostname, dev.device_type.name, Device.STATUS_CHOICES[dev.status][1].lower(), dev.current_job.pk if dev.current_job else None))
return [list((dev.hostname, dev.device_type.name, Device.STATUS_CHOICES[dev.status][1].lower(), dev.current_job.pk if dev.current_job else None, dev.is_pipeline))
for dev in devices_list]
def all_device_types(self):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment