• Home
  • Raw
  • Download

Lines Matching refs:models

18 from autotest_lib.frontend.afe import models
33 _hqe_status = models.HostQueueEntry.Status
96 return models.Job.objects.get(id=job_id)
101 label2 = models.Label.objects.create(name='bluetooth', platform=False)
111 host2 = models.Host.objects.create(hostname='test_host2', leased=False)
121 host2 = models.Host.objects.create(hostname='test_host2', leased=False)
126 self.mox.StubOutWithMock(models.Host, '_assign_to_shard_nothing_helper')
130 models.Host._assign_to_shard_nothing_helper().WithSideEffects(
136 host2 = models.Host.smart_get(host2.id)
144 leased_host = models.Host.objects.create(hostname='leased_host',
170 host3 = models.Host.objects.create(hostname='test_host3', leased=False)
194 job1 = models.Job.objects.get(pk=job1.id)
211 job2 = models.Job.objects.get(pk=job2.pk)
224 models.Test.objects.create(name='platform_BootPerfServer:shard',
231 models.Shard.DoesNotExist, models.Shard.objects.get, pk=shard1.id)
233 job1 = models.Job.objects.get(pk=job1.id)
234 label1 = models.Label.objects.get(pk=label1.id)
262 models.RESPECT_STATIC_ATTRIBUTES = True
270 models.RESPECT_STATIC_ATTRIBUTES = self.old_respect_static_config
274 host1 = models.Host.objects.create(hostname='test_host')
297 host1 = models.Host.objects.create(hostname='test_host1')
300 host2 = models.Host.objects.create(hostname='test_host2')
316 host1 = models.Host.objects.create(hostname='test_host1')
318 host2 = models.Host.objects.create(hostname='test_host2')
328 host1 = models.Host.objects.create(hostname='test_host1')
331 host2 = models.Host.objects.create(hostname='test_host2')
334 host3 = models.Host.objects.create(hostname='test_host3')
336 host4 = models.Host.objects.create(hostname='test_host4')
338 host5 = models.Host.objects.create(hostname='test_host5')
369 models.RESPECT_STATIC_LABELS = True
377 models.RESPECT_STATIC_LABELS = self.old_respect_static_config
381 host1 = models.Host.objects.create(hostname='test_host')
382 label1 = models.Label.objects.create(
384 non_static_platform = models.Label.objects.create(
386 static_platform = models.StaticLabel.objects.create(
388 models.ReplacedLabel.objects.create(label_id=non_static_platform.id)
419 label1 = models.Label.smart_get('static')
421 host2 = models.Host.objects.all()[1]
422 shard1 = models.Shard.objects.create(hostname='shard1')
439 label1 = models.Label.smart_get('static')
442 host2 = models.Host.objects.all()[1]
443 shard1 = models.Shard.objects.create(hostname='shard1')
457 self.assertEqual(models.Label.smart_get('static').invalid, 0)
463 static_platform = models.StaticLabel.objects.create(
465 non_static_platform = models.Label.objects.create(
467 models.ReplacedLabel.objects.create(label_id=non_static_platform.id)
468 platform2 = models.Label.objects.create(name='platform2', platform=True)
469 host1 = models.Host.objects.create(hostname='test_host')
488 platform1 = models.Label.objects.create(
490 models.ReplacedLabel.objects.create(label_id=platform1.id)
491 static_platform = models.StaticLabel.objects.create(
493 platform2 = models.Label.objects.create(
496 host1 = models.Host.objects.create(hostname='test_host')
515 label = models.Label.smart_get('static')
516 static_label = models.StaticLabel.objects.create(name='static')
518 host1 = models.Host.objects.create(hostname='test_host')
530 label = models.Label.smart_get('static')
531 label1 = models.Label.smart_get('label1')
532 label2 = models.Label.smart_get('label2')
533 static_label = models.StaticLabel.objects.create(name='static')
535 host1 = models.Host.objects.create(hostname='test_host')
552 label = models.Label.smart_get('static')
553 static_label = models.StaticLabel.objects.create(name='static')
555 shard = models.Shard.objects.create(hostname='test_shard')
558 host = models.Host.objects.create(hostname='test_host',
565 host1 = models.Host.smart_get(host.id)
566 shard1 = models.Shard.smart_get(shard.id)
573 static_label = models.StaticLabel.objects.create(name='static')
575 host = models.Host.objects.create(hostname='test_host')
579 host1 = models.Host.smart_get(host.id)
585 label = models.Label.smart_get('static')
586 static_label = models.StaticLabel.objects.create(name='static')
588 host = models.Host.objects.create(hostname='test_host')
592 host1 = models.Host.smart_get(host.id)
600 label1 = models.Label.smart_get('label1')
601 label2 = models.Label.smart_get('label2')
602 label = models.Label.smart_get('static')
603 static_label = models.StaticLabel.objects.create(name='static')
605 host = models.Host.objects.create(hostname='test_host')
619 label1 = models.Label.smart_get('label1')
620 label2 = models.Label.smart_get('label2')
621 label = models.Label.smart_get('static')
622 static_label = models.StaticLabel.objects.create(name='static')
624 host = models.Host.objects.create(hostname='test_host')
641 label = models.Label.objects.create(name=label_name)
643 shard = models.Shard.objects.create(hostname=shard_hostname)
646 host = models.Host.objects.create(hostname=host_hostname, leased=False,
650 models.ReplacedLabel.objects.create(label_id=label.id)
651 static_label = models.StaticLabel.objects.create(name=label_name)
717 platform2 = models.Label.objects.create(name='platform2', platform=True)
741 host1 = models.Host.objects.create(hostname='test_host1')
743 host2 = models.Host.objects.create(hostname='test_host2')
753 host1 = models.Host.objects.create(hostname='test_host1')
755 host2 = models.Host.objects.create(hostname='test_host2')
828 HqeStatus = models.HostQueueEntry.Status
891 host = models.Host.objects.get(hostname='testhost')
909 job = models.Job.objects.get(pk=job_id)
929 self.task1 = models.SpecialTask.objects.create(
930 host=host, task=models.SpecialTask.Task.VERIFY,
932 is_complete=True, requested_by=models.User.current_user())
933 self.task2 = models.SpecialTask.objects.create(
934 host=host, task=models.SpecialTask.Task.VERIFY,
936 is_active=True, requested_by=models.User.current_user())
937 self.task3 = models.SpecialTask.objects.create(
938 host=host, task=models.SpecialTask.Task.VERIFY,
939 requested_by=models.User.current_user()) # not yet run
947 self.assertEquals(tasks[0]['task'], models.SpecialTask.Task.VERIFY)
959 host__hostname='host1', task=models.SpecialTask.Task.VERIFY,
999 shard = models.Shard.objects.create(hostname='shard')
1001 HqeStatus = models.HostQueueEntry.Status
1003 models.HostQueueEntry(
1006 models.HostQueueEntry(
1009 models.HostQueueEntry(
1013 models.HostQueueEntryStartTimes(
1015 models.HostQueueEntryStartTimes(
1017 models.HostQueueEntryStartTimes(
1114 self.assertEquals(task['task'], models.SpecialTask.Task.VERIFY)
1127 self.assertEquals(task['task'], models.SpecialTask.Task.REPAIR)
1137 host = models.Host.objects.all()[0]
1139 shard = models.Shard.objects.create(hostname=shard_hostname)
1172 host = models.Host.objects.get(pk=host.id)
1198 host1 = models.Host.objects.all()[0]
1199 host2 = models.Host.objects.all()[1]
1201 shard1 = models.Shard.objects.create(hostname='shard1')
1205 shard2 = models.Shard.objects.create(hostname='shard2')
1245 host1 = models.Host.objects.get(pk=host1.id)
1247 host2 = models.Host.objects.get(pk=host2.id)
1254 host1 = models.Host.objects.all()[0]
1255 shard1 = models.Shard.objects.create(hostname='shard1')
1270 self.assertRaises(models.Host.DoesNotExist,
1271 models.Host.smart_get, host1_id)
1278 host1 = models.Host.objects.all()[0]
1279 shard1 = models.Shard.objects.create(hostname='shard1')
1285 host1 = models.Host.smart_get(host1.id)
1287 self.assertRaises(models.Shard.DoesNotExist,
1288 models.Shard.smart_get, shard1.hostname)
1292 label1 = models.Label.objects.all()[0]
1295 host2 = models.Host.objects.all()[1]
1296 shard1 = models.Shard.objects.create(hostname='shard1')
1311 self.assertEqual(models.Label.objects.all()[0].invalid, 1)
1316 label1 = models.Label.objects.all()[0]
1318 host2 = models.Host.objects.all()[1]
1319 shard1 = models.Shard.objects.create(hostname='shard1')
1334 self.assertRaises(models.Label.DoesNotExist,
1335 models.Label.smart_get, label1.id)
1347 job = models.Job.objects.get(id=job_id)
1361 job = models.Job.objects.get(id=job_id)
1375 job = models.Job.objects.get(id=job_id)
1390 job = models.Job.objects.get(id=job_id)
1664 job = models.Job.objects.get(pk=job_id)
1665 shard = models.Shard.objects.create(hostname='host1')
1695 self.assertEqual(models.HostQueueEntry.objects.all()[0].status,
1707 self.assertEqual(models.HostQueueEntry.objects.all()[0].status,
1713 shard1 = models.Shard.objects.create(hostname='shard1')
1714 shard2 = models.Shard.objects.create(hostname='shard2')
1719 hqe1 = models.HostQueueEntry.objects.create(job=job1)
1720 hqe2 = models.HostQueueEntry.objects.create(job=job2)
1742 self.assertEqual(models.Job.objects.get(id=job1_id).control_file,
1744 self.assertEqual(models.Job.objects.get(id=job2_id).control_file,
1746 self.assertEqual(models.HostQueueEntry.objects.get(id=hqe1_id).status,
1748 self.assertEqual(models.HostQueueEntry.objects.get(id=hqe2_id).status,
1766 label = models.Label.objects.create(name=label_name)
1768 label = models.Label.smart_get(label_name)
1770 shard = models.Shard.objects.create(hostname=shard_hostname)
1773 host = models.Host.objects.create(hostname=host_hostname, leased=False,
1783 stumpy_label = models.Label.objects.create(
1798 host1 = models.Host.smart_get(host1.id)
1799 shard1 = models.Shard.smart_get(shard1.id)
1806 lumpy_label = models.Label.objects.create(name='board:lumpy',
1808 stumpy_label = models.Label.objects.create(name='board:stumpy',
1810 peppy_label = models.Label.objects.create(name='board:peppy',
1821 shard = models.Shard.objects.get(pk=shard_id)
1835 stumpy_label = models.Label.objects.create(name='board:stumpy',
1840 self.assertRaises(models.Label.DoesNotExist,
1847 shard = models.Shard.objects.get(pk=shard_id)