Lines Matching full:models

48 from autotest_lib.frontend.afe import (model_attributes, model_logic, models,
50 from autotest_lib.frontend.tko import models as tko_models
62 from django.db.models import Count
96 label_model = models.Label.smart_get(id)
116 label_model = models.Label.smart_get(id)
127 hosts.append(models.Host.smart_get(h.id))
146 # models.Label.add_object() throws model_logic.ValidationError
151 label = models.Label.add_object(name=name, **kwargs)
171 @raises models.Label.DoesNotExist: If the label with id doesn't exist.
173 label = models.Label.smart_get(id)
175 label = models.StaticLabel.smart_get(label.name)
177 host_objs = models.Host.smart_get_bulk(hosts)
179 models.Host.check_no_platform(host_objs)
182 models.Host.check_board_labels_allowed(host_objs, [label.name])
203 label = models.Label.smart_get(id)
204 except models.Label.DoesNotExist:
209 label = models.Label.smart_get(add_label(id))
226 host_objs = models.Host.smart_get_bulk(hosts)
254 host_objs = models.Host.smart_get_bulk(hosts)
264 host_objs = models.Host.smart_get_bulk(hosts)
265 label = models.Label.smart_get(id)
284 host_objs = models.Host.smart_get_bulk(hosts)
296 labels = models.Label.query_objects(filter_data)
303 static_labels = models.StaticLabel.query_objects(filter_data)
311 replaced = models.ReplacedLabel.objects.filter(label__id__in=label_ids)
334 return models.Host.add_object(hostname=hostname, status=status,
354 host = models.Host.smart_get(id)
389 models.Host.smart_get(id).update_object(kwargs)
418 hosts = models.Host.query_objects(host_filter_data)
458 for host in models.Host.query_objects(host_filter_data):
468 label_objs = models.Label.smart_get_bulk(labels)
470 models.Host.smart_get(id).labels.add(*label_objs)
472 static_labels, non_static_labels = models.Host.classify_label_objects(
474 host = models.Host.smart_get(id)
492 label_objs = models.Label.smart_get_bulk(labels)
500 host_obj = models.Host.smart_get(id)
502 models.Host.check_no_platform([host_obj])
504 models.Host.check_board_labels_allowed([host_obj], labels)
517 label_objs = models.Label.smart_get_bulk(labels)
519 models.Host.smart_get(id).labels.remove(*label_objs)
521 static_labels, non_static_labels = models.Host.classify_label_objects(
523 host = models.Host.smart_get(id)
541 host_obj = models.Host.smart_get(id)
554 models.Host.objects.populate_relationships(hosts, models.HostAttribute,
566 static_attrs = models.StaticHostAttribute.query_objects(
602 hosts = models.Host.query_objects(host_filter_data)
603 models.AclGroup.check_for_acl_violation_hosts(hosts)
615 models.Host.smart_get(id).delete()
635 models.Host.objects.populate_relationships(hosts, models.Label,
637 models.Host.objects.populate_relationships(hosts, models.AclGroup,
639 models.Host.objects.populate_relationships(hosts, models.HostAttribute,
641 models.Host.objects.populate_relationships(hosts,
642 models.StaticHostAttribute,
656 static_label = models.StaticLabel.smart_get(label.name)
678 entries = models.HostQueueEntry.objects.filter(
683 tasks = models.SpecialTask.objects.filter(
714 models.Test.list_objects(filter_data))
728 job_ids = list(models.Job.objects.filter(
753 return models.Profiler.add_object(name=name, description=description).id
757 models.Profiler.smart_get(id).update_object(data)
761 models.Profiler.smart_get(id).delete()
766 models.Profiler.list_objects(filter_data))
773 models.User.list_objects(filter_data))
779 group = models.AclGroup.add_object(name=name, description=description)
780 group.users.add(models.User.current_user())
785 group = models.AclGroup.smart_get(id)
792 group = models.AclGroup.smart_get(id)
794 users = models.User.smart_get_bulk(users)
799 group = models.AclGroup.smart_get(id)
801 users = models.User.smart_get_bulk(users)
807 group = models.AclGroup.smart_get(id)
809 hosts = models.Host.smart_get_bulk(hosts)
815 group = models.AclGroup.smart_get(id)
817 hosts = models.Host.smart_get_bulk(hosts)
823 models.AclGroup.smart_get(id).delete()
827 acl_groups = models.AclGroup.list_objects(filter_data)
829 acl_group_obj = models.AclGroup.objects.get(id=acl_group['id'])
1068 query = models.HostQueueEntry.query_objects(filter_data)
1074 models.AclGroup.check_abort_permissions(query)
1078 models.HostQueueEntry.abort_host_queue_entries(host_queue_entries)
1088 query = models.SpecialTask.query_objects(filter_data)
1100 models.AclGroup.check_for_acl_violation_hosts(hosts)
1107 models.SpecialTask.schedule_special_task(host, task)
1119 @param task: Enum value of frontend.afe.models.SpecialTask.Task
1125 hosts = models.Host.query_objects(filter_data)
1169 models.SpecialTask.Task.VERIFY, 'reverify_hosts', **filter_data)
1179 models.SpecialTask.Task.REPAIR, 'repair_hosts', **filter_data)
1206 jobs = list(models.Job.query_objects(filter_data))
1207 models.Job.objects.populate_relationships(jobs, models.Label,
1209 models.Job.objects.populate_relationships(jobs, models.JobKeyval, 'keyvals')
1233 return models.Job.query_count(filter_data)
1248 all_status_counts = models.Job.objects.get_status_counts(ids)
1262 job = models.Job.objects.get(id=id)
1354 query = models.HostQueueEntryStartTimes.objects.filter(
1368 query = models.HostQueueEntryStartTimes.objects.filter(
1379 models.HostQueueEntry.query_objects(filter_data),
1393 models.HostQueueEntry.query_objects(filter_data),
1406 return models.HostQueueEntry.query_count(filter_data)
1414 query = models.HostQueueEntry.query_objects(filter_data)
1442 models.SpecialTask.query_objects(filter_data),
1460 host = models.Host.smart_get(host_id, False)
1483 return models.SpecialTask.query_count(kwargs)
1499 host_model = models.Host.smart_get(host, False)
1549 host = models.Host.smart_get(host_id)
1588 host = models.Host.smart_get(host_id)
1641 return (models.HostQueueEntry.query_count(filter_data_queue_entries)
1687 default_drone_set_name = models.DroneSet.default_drone_set_name()
1690 models.DroneSet.objects.exclude(
1710 models.User.current_user().get_object_dict())
1711 result['host_statuses'] = sorted(models.Host.Status.names)
1712 result['job_statuses'] = sorted(models.HostQueueEntry.Status.names)
1713 result['job_timeout_mins_default'] = models.Job.DEFAULT_TIMEOUT_MINS
1715 models.Job.DEFAULT_MAX_RUNTIME_MINS)
1717 models.Job.DEFAULT_PARSE_FAILED_REPAIR)
1721 result['drone_sets_enabled'] = models.DroneSet.drone_sets_enabled()
1770 rows = models.HostAttribute.query_objects({'attribute': attribute,
1783 static_hosts = models.StaticHostAttribute.query_objects(
1796 static_rows = models.StaticHostAttribute.query_objects(
2073 host_model = models.Host.objects.get(pk=known_host_ids[i])
2094 shards = models.Shard.query_objects(filter_data)
2113 @raises models.Label.DoesNotExist: If the label specified doesn't exist.
2115 @returns: A list of label models that ready to be added to shard.
2129 label = models.Label.smart_get(label)
2132 shard = models.Shard.objects.get(labels=label)
2135 except models.Shard.DoesNotExist:
2152 @raises models.Label.DoesNotExist: If the label specified doesn't exist.
2157 shard = models.Shard.add_object(hostname=hostname)
2171 @raises models.Label.DoesNotExist: If the label specified doesn't exist.
2176 shard = models.Shard.objects.get(hostname=hostname)
2191 @raises models.Label.DoesNotExist: If the label specified doesn't exist.
2195 shard = models.Shard.objects.get(hostname=hostname)
2196 label = models.Label.smart_get(label)
2203 static_label = models.StaticLabel.smart_get(label.name)
2204 models.Host.objects.filter(
2207 models.Host.objects.filter(labels__in=[label]).update(shard=None)
2218 models.Host.objects.filter(shard=shard).update(shard=None)
2221 # models.Job.objects.filter(shard=shard).update(shard=None)
2240 models.Job.objects.filter(shard=shard).update(shard=None)