Lines Matching refs:models

38 from django.db.models import Count
44 from autotest_lib.frontend.afe import models, model_logic, model_attributes
46 from autotest_lib.frontend.tko import models as tko_models
59 known_test_obj = models.Test.smart_get('autoupdate_ParameterizedJob')
75 label_model = models.Label.smart_get(id)
89 label_model = models.Label.smart_get(id)
94 hosts.append(models.Host.smart_get(h.id))
118 label = models.Label.add_object(name=name, **kwargs)
140 label = models.Label.smart_get(id)
141 host_objs = models.Host.smart_get_bulk(hosts)
143 models.Host.check_no_platform(host_objs)
162 label = models.Label.smart_get(id)
163 except models.Label.DoesNotExist:
168 label = models.Label.smart_get(add_label(id))
175 host_objs = models.Host.smart_get_bulk(hosts)
200 host_objs = models.Host.smart_get_bulk(hosts)
201 models.Label.smart_get(id).host_set.remove(*host_objs)
213 host_objs = models.Host.smart_get_bulk(hosts)
225 labels = models.Label.query_objects(filter_data)
234 return models.AtomicGroup.add_object(
240 models.AtomicGroup.smart_get(id).update_object(data)
244 models.AtomicGroup.smart_get(id).delete()
248 label_objs = models.Label.smart_get_bulk(labels)
249 models.AtomicGroup.smart_get(id).label_set.add(*label_objs)
253 label_objs = models.Label.smart_get_bulk(labels)
254 models.AtomicGroup.smart_get(id).label_set.remove(*label_objs)
259 models.AtomicGroup.list_objects(filter_data))
269 return models.Host.add_object(hostname=hostname, status=status,
289 host = models.Host.smart_get(id)
316 models.Host.smart_get(id).update_object(kwargs)
345 hosts = models.Host.query_objects(host_filter_data)
385 for host in models.Host.query_objects(host_filter_data):
395 label_objs = models.Label.smart_get_bulk(labels)
396 models.Host.smart_get(id).labels.add(*label_objs)
408 label_objs = models.Label.smart_get_bulk(labels)
415 host_obj = models.Host.smart_get(id)
417 models.Host.check_no_platform([host_obj])
430 label_objs = models.Label.smart_get_bulk(labels)
431 models.Host.smart_get(id).labels.remove(*label_objs)
443 host_obj = models.Host.smart_get(id)
456 models.Host.objects.populate_relationships(hosts, models.HostAttribute,
474 hosts = models.Host.query_objects(host_filter_data)
475 models.AclGroup.check_for_acl_violation_hosts(hosts)
487 models.Host.smart_get(id).delete()
509 models.Host.objects.populate_relationships(hosts, models.Label,
511 models.Host.objects.populate_relationships(hosts, models.AclGroup,
513 models.Host.objects.populate_relationships(hosts, models.HostAttribute,
527 entries = models.HostQueueEntry.objects.filter(
532 tasks = models.SpecialTask.objects.filter(
563 return models.Test.add_object(name=name, test_type=test_type, path=path,
574 models.Test.smart_get(id).update_object(data)
578 models.Test.smart_get(id).delete()
583 models.Test.list_objects(filter_data))
597 job_ids = list(models.Job.objects.filter(
622 return models.Profiler.add_object(name=name, description=description).id
626 models.Profiler.smart_get(id).update_object(data)
630 models.Profiler.smart_get(id).delete()
635 models.Profiler.list_objects(filter_data))
641 return models.User.add_object(login=login, access_level=access_level).id
645 models.User.smart_get(id).update_object(data)
649 models.User.smart_get(id).delete()
654 models.User.list_objects(filter_data))
660 group = models.AclGroup.add_object(name=name, description=description)
661 group.users.add(models.User.current_user())
666 group = models.AclGroup.smart_get(id)
673 group = models.AclGroup.smart_get(id)
675 users = models.User.smart_get_bulk(users)
680 group = models.AclGroup.smart_get(id)
682 users = models.User.smart_get_bulk(users)
688 group = models.AclGroup.smart_get(id)
690 hosts = models.Host.smart_get_bulk(hosts)
696 group = models.AclGroup.smart_get(id)
698 hosts = models.Host.smart_get_bulk(hosts)
704 models.AclGroup.smart_get(id).delete()
708 acl_groups = models.AclGroup.list_objects(filter_data)
710 acl_group_obj = models.AclGroup.objects.get(id=acl_group['id'])
811 test_obj = models.Test.smart_get(test)
815 label = models.Label.smart_get(label)
816 except models.Label.DoesNotExist:
819 kernel_objs = models.Kernel.create_kernels(kernel)
820 profiler_objs = [models.Profiler.smart_get(profiler)
823 parameterized_job = models.ParameterizedJob.objects.create(
830 parameterized_profiler = models.ParameterizedJobProfiler.objects.create(
835 models.ParameterizedJobProfilerParameter.objects.create(
976 known_test_obj = models.Test.smart_get('autoupdate_ParameterizedJob')
977 known_parameterized_job = models.ParameterizedJob.objects.create(
1008 query = models.HostQueueEntry.query_objects(filter_data)
1014 models.AclGroup.check_abort_permissions(query)
1018 models.HostQueueEntry.abort_host_queue_entries(host_queue_entries)
1028 query = models.SpecialTask.query_objects(filter_data)
1040 models.AclGroup.check_for_acl_violation_hosts(hosts)
1047 models.SpecialTask.schedule_special_task(host, task)
1065 hosts = models.Host.query_objects(filter_data)
1109 models.SpecialTask.Task.VERIFY, 'reverify_hosts', **filter_data)
1119 models.SpecialTask.Task.REPAIR, 'repair_hosts', **filter_data)
1146 jobs = list(models.Job.query_objects(filter_data))
1147 models.Job.objects.populate_relationships(jobs, models.Label,
1149 models.Job.objects.populate_relationships(jobs, models.JobKeyval, 'keyvals')
1175 return models.Job.query_count(filter_data)
1190 all_status_counts = models.Job.objects.get_status_counts(ids)
1204 job = models.Job.objects.get(id=id)
1258 models.HostQueueEntry.query_objects(filter_data),
1271 return models.HostQueueEntry.query_count(filter_data)
1279 query = models.HostQueueEntry.query_objects(filter_data)
1307 models.SpecialTask.query_objects(filter_data),
1325 host = models.Host.smart_get(host_id, False)
1348 return models.SpecialTask.query_count(kwargs)
1364 host_model = models.Host.smart_get(host, False)
1414 host = models.Host.smart_get(host_id)
1453 host = models.Host.smart_get(host_id)
1506 return (models.HostQueueEntry.query_count(filter_data_queue_entries)
1514 models.RecurringRun.query_objects(filter_data),
1519 return models.RecurringRun.query_count(filter_data)
1523 to_delete = models.RecurringRun.query_objects(filter_data)
1528 owner = models.User.current_user().login
1529 job = models.Job.objects.get(id=job_id)
1579 job_fields = models.Job.get_field_dict()
1580 default_drone_set_name = models.DroneSet.default_drone_set_name()
1583 models.DroneSet.objects.exclude(
1605 models.User.current_user().get_object_dict())
1606 result['host_statuses'] = sorted(models.Host.Status.names)
1607 result['job_statuses'] = sorted(models.HostQueueEntry.Status.names)
1608 result['job_timeout_mins_default'] = models.Job.DEFAULT_TIMEOUT_MINS
1610 models.Job.DEFAULT_MAX_RUNTIME_MINS)
1612 models.Job.DEFAULT_PARSE_FAILED_REPAIR)
1616 result['drone_sets_enabled'] = models.DroneSet.drone_sets_enabled()
1618 result['parameterized_jobs'] = models.Job.parameterized_jobs_enabled()