• Home
  • Raw
  • Download

Lines Matching refs:host1

96     def _testShardHeartbeatFetchHostlessJobHelper(self, host1):  argument
103 self._do_heartbeat_and_assert_response(hosts=[host1])
106 def _testShardHeartbeatIncorrectHostsHelper(self, host1): argument
112 self._do_heartbeat_and_assert_response(known_hosts=[host1, host2],
116 def _testShardHeartbeatLabelRemovalRaceHelper(self, shard1, host1, label1): argument
129 known_hosts=[host1],
131 incorrect_host_ids=[host1.id])
137 def _testShardRetrieveJobsHelper(self, shard1, host1, label1, shard2, argument
161 jobs=[job1], hosts=[host1], hqes=job1.hostqueueentry_set.all())
171 known_jobs=[job1], known_hosts=[host1], hosts=[host3])
174 def _testResendJobsAfterFailedHeartbeatHelper(self, shard1, host1, label1): argument
180 hqes=job1.hostqueueentry_set.all(), hosts=[host1])
184 known_hosts=[host1],
189 known_jobs=[job1], known_hosts=[host1])
196 known_hosts=[host1])
202 known_hosts=[host1],
206 known_jobs=[job2], known_hosts=[host1])
217 known_jobs=[job2], known_hosts=[host1],
237 def _testResendHostsAfterFailedHeartbeatHelper(self, host1): argument
240 self._do_heartbeat_and_assert_response(hosts=[host1])
243 self._do_heartbeat_and_assert_response(hosts=[host1])
246 self._do_heartbeat_and_assert_response(known_hosts=[host1])
269 host1 = models.Host.objects.create(hostname='test_host')
270 host1.set_attribute('test_attribute1', 'test_value1')
271 host1.set_attribute('test_attribute2', 'test_value2')
272 self._set_static_attribute(host1, 'test_attribute1', 'static_value1')
273 self._set_static_attribute(host1, 'static_attribute1', 'static_value2')
274 host1.save()
275 return host1
279 host1 = self._fake_host_with_static_attributes()
280 hosts = rpc_interface.get_hosts(hostname=host1.hostname)
292 host1 = models.Host.objects.create(hostname='test_host1')
293 host1.set_attribute('test_attribute1', 'test_value1')
294 self._set_static_attribute(host1, 'test_attribute1', 'static_value1')
311 host1 = models.Host.objects.create(hostname='test_host1')
312 host1.set_attribute('test_attribute1', 'test_value1')
323 host1 = models.Host.objects.create(hostname='test_host1')
324 host1.set_attribute('test_attribute1', 'test_value1')
325 self._set_static_attribute(host1, 'test_attribute1', 'test_value1')
374 host1 = models.Host.objects.create(hostname='test_host')
382 host1.static_labels.add(static_platform)
383 host1.labels.add(non_static_platform)
384 host1.labels.add(label1)
385 host1.save()
386 return host1
390 host1 = self._fake_host_with_static_labels()
391 hosts = rpc_interface.get_hosts(hostname=host1.hostname)
453 host1 = models.Host.objects.create(hostname='test_host')
454 host1.static_labels.add(static_platform)
455 host1.labels.add(non_static_platform)
456 host1.save()
480 host1 = models.Host.objects.create(hostname='test_host')
481 host1.labels.add(platform2)
482 host1.save()
502 host1 = models.Host.objects.create(hostname='test_host')
503 host1.labels.add(label)
504 host1.static_labels.add(static_label)
505 host1.save()
519 host1 = models.Host.objects.create(hostname='test_host')
520 host1.labels.add(label)
521 host1.labels.add(label1)
522 host1.labels.add(label2)
523 host1.static_labels.add(static_label)
524 host1.save()
549 host1 = models.Host.smart_get(host.id)
551 self.assertEqual(host1.shard, None)
563 host1 = models.Host.smart_get(host.id)
564 rpc_utils.check_job_dependencies([host1], ['static'])
576 host1 = models.Host.smart_get(host.id)
579 [host1],
642 shard1, host1, label1 = self._createShardAndHostWithStaticLabel(
644 self._testShardHeartbeatFetchHostlessJobHelper(host1)
648 shard1, host1, label1 = self._createShardAndHostWithStaticLabel(
650 self._testShardHeartbeatIncorrectHostsHelper(host1)
654 shard1, host1, label1 = self._createShardAndHostWithStaticLabel(
656 self._testShardHeartbeatLabelRemovalRaceHelper(shard1, host1, label1)
660 shard1, host1, label1 = self._createShardAndHostWithStaticLabel()
663 self._testShardRetrieveJobsHelper(shard1, host1, label1,
668 shard1, host1, label1 = self._createShardAndHostWithStaticLabel()
669 self._testResendJobsAfterFailedHeartbeatHelper(shard1, host1, label1)
673 shard1, host1, label1 = self._createShardAndHostWithStaticLabel(
675 self._testResendHostsAfterFailedHeartbeatHelper(host1)
723 host1 = models.Host.objects.create(hostname='test_host1')
724 host1.set_attribute('test_attribute1', 'test_value1')
735 host1 = models.Host.objects.create(hostname='test_host1')
736 host1.set_attribute('test_attribute1', 'test_value1')
1181 host1 = models.Host.objects.all()[0]
1185 host1.shard = shard1
1186 host1.save()
1192 self.assertFalse(host1.locked)
1215 host1 = models.Host.objects.get(pk=host1.id)
1216 self.assertTrue(host1.locked)
1239 host1 = models.Host.objects.all()[0]
1241 host1.shard = shard1
1242 host1.save()
1243 host1_id = host1.id
1248 rpc_interface.delete_host(id=host1.id)
1254 mock_afe1.run.assert_called_with('delete_host', id=host1.id)
1259 host1 = models.Host.objects.all()[0]
1261 host1.shard = shard1
1262 host1.save()
1266 host1 = models.Host.smart_get(host1.id)
1267 self.assertIsNone(host1.shard)
1744 shard1, host1, lumpy_label = self._createShardAndHostWithLabel()
1754 shard1, host1, lumpy_label = self._createShardAndHostWithLabel()
1756 self.assertEqual(host1.shard, shard1)
1760 host1 = models.Host.smart_get(host1.id)
1762 self.assertEqual(host1.shard, None)
1795 shard1, host1, lumpy_label = self._createShardAndHostWithLabel()
1820 shard1, host1, label1 = self._createShardAndHostWithLabel()
1821 self._testShardHeartbeatFetchHostlessJobHelper(host1)
1825 shard1, host1, label1 = self._createShardAndHostWithLabel()
1826 self._testShardHeartbeatIncorrectHostsHelper(host1)
1830 shard1, host1, label1 = self._createShardAndHostWithLabel()
1831 self._testShardHeartbeatLabelRemovalRaceHelper(shard1, host1, label1)
1835 shard1, host1, label1 = self._createShardAndHostWithLabel()
1838 self._testShardRetrieveJobsHelper(shard1, host1, label1,
1843 shard1, host1, label1 = self._createShardAndHostWithLabel()
1844 self._testResendJobsAfterFailedHeartbeatHelper(shard1, host1, label1)
1848 shard1, host1, label1 = self._createShardAndHostWithLabel()
1849 self._testResendHostsAfterFailedHeartbeatHelper(host1)