• Home
  • Raw
  • Download

Lines Matching refs:models

42 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
85 label_model = models.Label.smart_get(id)
99 label_model = models.Label.smart_get(id)
104 hosts.append(models.Host.smart_get(h.id))
128 label = models.Label.add_object(name=name, **kwargs)
150 label = models.Label.smart_get(id)
151 host_objs = models.Host.smart_get_bulk(hosts)
153 models.Host.check_no_platform(host_objs)
156 models.Host.check_board_labels_allowed(host_objs, [label.name])
177 label = models.Label.smart_get(id)
178 except models.Label.DoesNotExist:
183 label = models.Label.smart_get(add_label(id))
200 host_objs = models.Host.smart_get_bulk(hosts)
228 host_objs = models.Host.smart_get_bulk(hosts)
238 host_objs = models.Host.smart_get_bulk(hosts)
239 models.Label.smart_get(id).host_set.remove(*host_objs)
251 host_objs = models.Host.smart_get_bulk(hosts)
263 labels = models.Label.query_objects(filter_data)
276 return models.Host.add_object(hostname=hostname, status=status,
296 host = models.Host.smart_get(id)
323 models.Host.smart_get(id).update_object(kwargs)
352 hosts = models.Host.query_objects(host_filter_data)
392 for host in models.Host.query_objects(host_filter_data):
402 label_objs = models.Label.smart_get_bulk(labels)
403 models.Host.smart_get(id).labels.add(*label_objs)
419 label_objs = models.Label.smart_get_bulk(labels)
429 host_obj = models.Host.smart_get(id)
431 models.Host.check_no_platform([host_obj])
433 models.Host.check_board_labels_allowed([host_obj], labels)
446 label_objs = models.Label.smart_get_bulk(labels)
447 models.Host.smart_get(id).labels.remove(*label_objs)
459 host_obj = models.Host.smart_get(id)
472 models.Host.objects.populate_relationships(hosts, models.HostAttribute,
490 hosts = models.Host.query_objects(host_filter_data)
491 models.AclGroup.check_for_acl_violation_hosts(hosts)
503 models.Host.smart_get(id).delete()
521 models.Host.objects.populate_relationships(hosts, models.Label,
523 models.Host.objects.populate_relationships(hosts, models.AclGroup,
525 models.Host.objects.populate_relationships(hosts, models.HostAttribute,
538 entries = models.HostQueueEntry.objects.filter(
543 tasks = models.SpecialTask.objects.filter(
570 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)
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)
1199 query = models.HostQueueEntryStartTimes.objects.filter(
1213 query = models.HostQueueEntryStartTimes.objects.filter(
1224 models.HostQueueEntry.query_objects(filter_data),
1238 models.HostQueueEntry.query_objects(filter_data),
1251 return models.HostQueueEntry.query_count(filter_data)
1259 query = models.HostQueueEntry.query_objects(filter_data)
1287 models.SpecialTask.query_objects(filter_data),
1305 host = models.Host.smart_get(host_id, False)
1328 return models.SpecialTask.query_count(kwargs)
1344 host_model = models.Host.smart_get(host, False)
1394 host = models.Host.smart_get(host_id)
1433 host = models.Host.smart_get(host_id)
1486 return (models.HostQueueEntry.query_count(filter_data_queue_entries)
1532 default_drone_set_name = models.DroneSet.default_drone_set_name()
1535 models.DroneSet.objects.exclude(
1557 models.User.current_user().get_object_dict())
1558 result['host_statuses'] = sorted(models.Host.Status.names)
1559 result['job_statuses'] = sorted(models.HostQueueEntry.Status.names)
1560 result['job_timeout_mins_default'] = models.Job.DEFAULT_TIMEOUT_MINS
1562 models.Job.DEFAULT_MAX_RUNTIME_MINS)
1564 models.Job.DEFAULT_PARSE_FAILED_REPAIR)
1568 result['drone_sets_enabled'] = models.DroneSet.drone_sets_enabled()
1616 hosts = models.HostAttribute.query_objects({'attribute': attribute,
1972 host_model = models.Host.objects.get(pk=known_host_ids[i])
1993 shards = models.Shard.query_objects(filter_data)
2028 label = models.Label.smart_get(label)
2031 shard = models.Shard.objects.get(labels=label)
2034 except models.Shard.DoesNotExist:
2056 shard = models.Shard.add_object(hostname=hostname)
2075 shard = models.Shard.objects.get(hostname=hostname)
2096 shard = models.Shard.objects.get(hostname=hostname)
2097 label = models.Label.smart_get(label)
2102 models.Host.objects.filter(labels__in=[label]).update(shard=None)
2127 models.Host.objects.filter(shard=shard, locked=False)]
2136 models.Host.objects.filter(hostname__in=hostnames_to_lock).update(**dicts)
2139 models.Host.objects.filter(shard=shard).update(shard=None)
2140 models.Job.objects.filter(shard=shard).update(shard=None)
2145 t = models.Test.objects.get(name='platform_BootPerfServer:shard')
2158 models.Host.objects.filter(hostname__in=hostnames_to_lock).update(**dicts)