Message ID | 20130912093124.27707.64217.launchpad@ackee.canonical.com |
---|---|
State | Accepted |
Headers | show |
=== modified file 'lava_scheduler_app/utils.py' --- lava_scheduler_app/utils.py 2013-09-12 07:07:01 +0000 +++ lava_scheduler_app/utils.py 2013-09-12 09:30:32 +0000 @@ -22,6 +22,7 @@ import socket import urlparse import simplejson +import models def rewrite_hostname(result_url): @@ -74,6 +75,8 @@ group_count = 0 for clients in json_jobdata["device_group"]: group_count += int(clients["count"]) + if group_count <= 1: + raise models.JSONDataError("Only one device requested in a MultiNode job submission.") for clients in json_jobdata["device_group"]: role = str(clients["role"]) count = int(clients["count"])