Lines Matching refs:models

40 from django.db.models import Count
55 from autotest_lib.frontend.afe import models
57 from autotest_lib.frontend.tko import models as tko_models
86 label_model = models.Label.smart_get(id)
100 label_model = models.Label.smart_get(id)
105 hosts.append(models.Host.smart_get(h.id))
124 # models.Label.add_object() throws model_logic.ValidationError
129 label = models.Label.add_object(name=name, **kwargs)
149 @raises models.Label.DoesNotExist: If the label with id doesn't exist.
151 label = models.Label.smart_get(id)
152 host_objs = models.Host.smart_get_bulk(hosts)
154 models.Host.check_no_platform(host_objs)
157 models.Host.check_board_labels_allowed(host_objs, [label.name])
178 label = models.Label.smart_get(id)
179 except models.Label.DoesNotExist:
184 label = models.Label.smart_get(add_label(id))
201 host_objs = models.Host.smart_get_bulk(hosts)
229 host_objs = models.Host.smart_get_bulk(hosts)
239 host_objs = models.Host.smart_get_bulk(hosts)
240 models.Label.smart_get(id).host_set.remove(*host_objs)
252 host_objs = models.Host.smart_get_bulk(hosts)
264 labels = models.Label.query_objects(filter_data)
277 return models.Host.add_object(hostname=hostname, status=status,
297 host = models.Host.smart_get(id)
324 models.Host.smart_get(id).update_object(kwargs)
353 hosts = models.Host.query_objects(host_filter_data)
393 for host in models.Host.query_objects(host_filter_data):
403 label_objs = models.Label.smart_get_bulk(labels)
404 models.Host.smart_get(id).labels.add(*label_objs)
420 label_objs = models.Label.smart_get_bulk(labels)
430 host_obj = models.Host.smart_get(id)
432 models.Host.check_no_platform([host_obj])
434 models.Host.check_board_labels_allowed([host_obj], labels)
447 label_objs = models.Label.smart_get_bulk(labels)
448 models.Host.smart_get(id).labels.remove(*label_objs)
460 host_obj = models.Host.smart_get(id)
473 models.Host.objects.populate_relationships(hosts, models.HostAttribute,
491 hosts = models.Host.query_objects(host_filter_data)
492 models.AclGroup.check_for_acl_violation_hosts(hosts)
504 models.Host.smart_get(id).delete()
522 models.Host.objects.populate_relationships(hosts, models.Label,
524 models.Host.objects.populate_relationships(hosts, models.AclGroup,
526 models.Host.objects.populate_relationships(hosts, models.HostAttribute,
539 entries = models.HostQueueEntry.objects.filter(
544 tasks = models.SpecialTask.objects.filter(
571 models.Test.list_objects(filter_data))
584 job_ids = list(models.Job.objects.filter(
609 return models.Profiler.add_object(name=name, description=description).id
613 models.Profiler.smart_get(id).update_object(data)
617 models.Profiler.smart_get(id).delete()
622 models.Profiler.list_objects(filter_data))
629 models.User.list_objects(filter_data))
635 group = models.AclGroup.add_object(name=name, description=description)
636 group.users.add(models.User.current_user())
641 group = models.AclGroup.smart_get(id)
648 group = models.AclGroup.smart_get(id)
650 users = models.User.smart_get_bulk(users)
655 group = models.AclGroup.smart_get(id)
657 users = models.User.smart_get_bulk(users)
663 group = models.AclGroup.smart_get(id)
665 hosts = models.Host.smart_get_bulk(hosts)
671 group = models.AclGroup.smart_get(id)
673 hosts = models.Host.smart_get_bulk(hosts)
679 models.AclGroup.smart_get(id).delete()
683 acl_groups = models.AclGroup.list_objects(filter_data)
685 acl_group_obj = models.AclGroup.objects.get(id=acl_group['id'])
913 query = models.HostQueueEntry.query_objects(filter_data)
919 models.AclGroup.check_abort_permissions(query)
923 models.HostQueueEntry.abort_host_queue_entries(host_queue_entries)
933 query = models.SpecialTask.query_objects(filter_data)
945 models.AclGroup.check_for_acl_violation_hosts(hosts)
952 models.SpecialTask.schedule_special_task(host, task)
964 @param task: Enum value of frontend.afe.models.SpecialTask.Task
970 hosts = models.Host.query_objects(filter_data)
1014 models.SpecialTask.Task.VERIFY, 'reverify_hosts', **filter_data)
1024 models.SpecialTask.Task.REPAIR, 'repair_hosts', **filter_data)
1051 jobs = list(models.Job.query_objects(filter_data))
1052 models.Job.objects.populate_relationships(jobs, models.Label,
1054 models.Job.objects.populate_relationships(jobs, models.JobKeyval, 'keyvals')
1078 return models.Job.query_count(filter_data)
1093 all_status_counts = models.Job.objects.get_status_counts(ids)
1107 job = models.Job.objects.get(id=id)
1196 models.HostQueueEntry.query_objects(filter_data),
1209 return models.HostQueueEntry.query_count(filter_data)
1217 query = models.HostQueueEntry.query_objects(filter_data)
1245 models.SpecialTask.query_objects(filter_data),
1263 host = models.Host.smart_get(host_id, False)
1286 return models.SpecialTask.query_count(kwargs)
1302 host_model = models.Host.smart_get(host, False)
1352 host = models.Host.smart_get(host_id)
1391 host = models.Host.smart_get(host_id)
1444 return (models.HostQueueEntry.query_count(filter_data_queue_entries)
1490 default_drone_set_name = models.DroneSet.default_drone_set_name()
1493 models.DroneSet.objects.exclude(
1515 models.User.current_user().get_object_dict())
1516 result['host_statuses'] = sorted(models.Host.Status.names)
1517 result['job_statuses'] = sorted(models.HostQueueEntry.Status.names)
1518 result['job_timeout_mins_default'] = models.Job.DEFAULT_TIMEOUT_MINS
1520 models.Job.DEFAULT_MAX_RUNTIME_MINS)
1522 models.Job.DEFAULT_PARSE_FAILED_REPAIR)
1526 result['drone_sets_enabled'] = models.DroneSet.drone_sets_enabled()
1565 hosts = models.HostAttribute.query_objects({'attribute': attribute,
1957 host_model = models.Host.objects.get(pk=known_host_ids[i])
1977 shards = models.Shard.query_objects(filter_data)
1996 @raises models.Label.DoesNotExist: If the label specified doesn't exist.
1998 @returns: A list of label models that ready to be added to shard.
2012 label = models.Label.smart_get(label)
2015 shard = models.Shard.objects.get(labels=label)
2018 except models.Shard.DoesNotExist:
2035 @raises models.Label.DoesNotExist: If the label specified doesn't exist.
2040 shard = models.Shard.add_object(hostname=hostname)
2054 @raises models.Label.DoesNotExist: If the label specified doesn't exist.
2059 shard = models.Shard.objects.get(hostname=hostname)
2087 models.Host.objects.filter(shard=shard, locked=False)]
2096 models.Host.objects.filter(hostname__in=hostnames_to_lock).update(**dicts)
2099 models.Host.objects.filter(shard=shard).update(shard=None)
2100 models.Job.objects.filter(shard=shard).update(shard=None)
2105 t = models.Test.objects.get(name='platform_BootPerfServer:shard')
2116 models.Host.objects.filter(hostname__in=hostnames_to_lock).update(**dicts)