Commit a7e2e59b authored by Rémi Duraffort's avatar Rémi Duraffort Committed by Neil Williams
Browse files

API: fix old behavior for device status

In the old api, Device status are lower case while TestJob status are

Change-Id: I8556ca0506061bc0059d0f0b2174fd9d78532932
parent 58d23f23
......@@ -75,15 +75,15 @@ def build_job_status_display(state, health):
def build_device_status_display(state, health):
if state == Device.STATE_IDLE:
if health in [Device.HEALTH_GOOD, Device.HEALTH_UNKNOWN]:
return "Idle"
return "idle"
elif health == Device.HEALTH_RETIRED:
return "Retired"
return "retired"
return "Offline"
return "offline"
elif state == Device.STATE_RESERVED:
return "Reserved"
return "reserved"
return "Running"
return "running"
class SchedulerAPI(ExposedAPI):
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