• Home
  • Raw
  • Download

Lines Matching refs:host1

99     def _testShardHeartbeatFetchHostlessJobHelper(self, host1):  argument
106 self._do_heartbeat_and_assert_response(hosts=[host1])
109 def _testShardHeartbeatIncorrectHostsHelper(self, host1): argument
115 self._do_heartbeat_and_assert_response(known_hosts=[host1, host2],
119 def _testShardHeartbeatLabelRemovalRaceHelper(self, shard1, host1, label1): argument
135 known_hosts=[host1], hosts=[], incorrect_host_ids=[host1.id])
140 def _testShardRetrieveJobsHelper(self, shard1, host1, label1, shard2, argument
164 jobs=[job1], hosts=[host1], hqes=job1.hostqueueentry_set.all())
174 known_jobs=[job1], known_hosts=[host1], hosts=[host3])
177 def _testResendJobsAfterFailedHeartbeatHelper(self, shard1, host1, label1): argument
183 hqes=job1.hostqueueentry_set.all(), hosts=[host1])
187 known_hosts=[host1],
192 known_jobs=[job1], known_hosts=[host1])
199 known_hosts=[host1])
205 known_hosts=[host1],
209 known_jobs=[job2], known_hosts=[host1])
220 known_jobs=[job2], known_hosts=[host1],
240 def _testResendHostsAfterFailedHeartbeatHelper(self, host1): argument
243 self._do_heartbeat_and_assert_response(hosts=[host1])
246 self._do_heartbeat_and_assert_response(hosts=[host1])
249 self._do_heartbeat_and_assert_response(known_hosts=[host1])
274 host1 = models.Host.objects.create(hostname='test_host')
275 host1.set_attribute('test_attribute1', 'test_value1')
276 host1.set_attribute('test_attribute2', 'test_value2')
277 self._set_static_attribute(host1, 'test_attribute1', 'static_value1')
278 self._set_static_attribute(host1, 'static_attribute1', 'static_value2')
279 host1.save()
280 return host1
284 host1 = self._fake_host_with_static_attributes()
285 hosts = rpc_interface.get_hosts(hostname=host1.hostname)
297 host1 = models.Host.objects.create(hostname='test_host1')
298 host1.set_attribute('test_attribute1', 'test_value1')
299 self._set_static_attribute(host1, 'test_attribute1', 'static_value1')
316 host1 = models.Host.objects.create(hostname='test_host1')
317 host1.set_attribute('test_attribute1', 'test_value1')
328 host1 = models.Host.objects.create(hostname='test_host1')
329 host1.set_attribute('test_attribute1', 'test_value1')
330 self._set_static_attribute(host1, 'test_attribute1', 'test_value1')
381 host1 = models.Host.objects.create(hostname='test_host')
389 host1.static_labels.add(static_platform)
390 host1.labels.add(non_static_platform)
391 host1.labels.add(label1)
392 host1.save()
393 return host1
397 host1 = self._fake_host_with_static_labels()
398 hosts = rpc_interface.get_hosts(hostname=host1.hostname)
469 host1 = models.Host.objects.create(hostname='test_host')
470 host1.static_labels.add(static_platform)
471 host1.labels.add(non_static_platform)
472 host1.save()
496 host1 = models.Host.objects.create(hostname='test_host')
497 host1.labels.add(platform2)
498 host1.save()
518 host1 = models.Host.objects.create(hostname='test_host')
519 host1.labels.add(label)
520 host1.static_labels.add(static_label)
521 host1.save()
535 host1 = models.Host.objects.create(hostname='test_host')
536 host1.labels.add(label)
537 host1.labels.add(label1)
538 host1.labels.add(label2)
539 host1.static_labels.add(static_label)
540 host1.save()
565 host1 = models.Host.smart_get(host.id)
567 self.assertEqual(host1.shard, None)
579 host1 = models.Host.smart_get(host.id)
580 rpc_utils.check_job_dependencies([host1], ['static'])
592 host1 = models.Host.smart_get(host.id)
595 [host1],
658 shard1, host1, label1 = self._createShardAndHostWithStaticLabel(
660 self._testShardHeartbeatFetchHostlessJobHelper(host1)
664 shard1, host1, label1 = self._createShardAndHostWithStaticLabel(
666 self._testShardHeartbeatIncorrectHostsHelper(host1)
670 shard1, host1, label1 = self._createShardAndHostWithStaticLabel(
672 self._testShardHeartbeatLabelRemovalRaceHelper(shard1, host1, label1)
676 shard1, host1, label1 = self._createShardAndHostWithStaticLabel()
679 self._testShardRetrieveJobsHelper(shard1, host1, label1,
684 shard1, host1, label1 = self._createShardAndHostWithStaticLabel()
685 self._testResendJobsAfterFailedHeartbeatHelper(shard1, host1, label1)
689 shard1, host1, label1 = self._createShardAndHostWithStaticLabel(
691 self._testResendHostsAfterFailedHeartbeatHelper(host1)
741 host1 = models.Host.objects.create(hostname='test_host1')
742 host1.set_attribute('test_attribute1', 'test_value1')
753 host1 = models.Host.objects.create(hostname='test_host1')
754 host1.set_attribute('test_attribute1', 'test_value1')
1198 host1 = models.Host.objects.all()[0]
1202 host1.shard = shard1
1203 host1.save()
1209 self.assertFalse(host1.locked)
1245 host1 = models.Host.objects.get(pk=host1.id)
1246 self.assertTrue(host1.locked)
1254 host1 = models.Host.objects.all()[0]
1256 host1.shard = shard1
1257 host1.save()
1258 host1_id = host1.id
1266 mock_afe1.run.expect_call('delete_host', id=host1.id)
1268 rpc_interface.delete_host(id=host1.id)
1278 host1 = models.Host.objects.all()[0]
1280 host1.shard = shard1
1281 host1.save()
1285 host1 = models.Host.smart_get(host1.id)
1286 self.assertIsNone(host1.shard)
1782 shard1, host1, lumpy_label = self._createShardAndHostWithLabel()
1792 shard1, host1, lumpy_label = self._createShardAndHostWithLabel()
1794 self.assertEqual(host1.shard, shard1)
1798 host1 = models.Host.smart_get(host1.id)
1800 self.assertEqual(host1.shard, None)
1834 shard1, host1, lumpy_label = self._createShardAndHostWithLabel()
1859 shard1, host1, label1 = self._createShardAndHostWithLabel()
1860 self._testShardHeartbeatFetchHostlessJobHelper(host1)
1864 shard1, host1, label1 = self._createShardAndHostWithLabel()
1865 self._testShardHeartbeatIncorrectHostsHelper(host1)
1869 shard1, host1, label1 = self._createShardAndHostWithLabel()
1870 self._testShardHeartbeatLabelRemovalRaceHelper(shard1, host1, label1)
1874 shard1, host1, label1 = self._createShardAndHostWithLabel()
1877 self._testShardRetrieveJobsHelper(shard1, host1, label1,
1882 shard1, host1, label1 = self._createShardAndHostWithLabel()
1883 self._testResendJobsAfterFailedHeartbeatHelper(shard1, host1, label1)
1887 shard1, host1, label1 = self._createShardAndHostWithLabel()
1888 self._testResendHostsAfterFailedHeartbeatHelper(host1)