Home | History | Annotate | Download | only in scheduler

Lines Matching refs:Host

105         host = scheduler_models.Host(id=1)
106 fields = list(host._fields)
107 row_data = [getattr(host, fieldname) for fieldname in fields]
108 self.assertEqual({}, host._compare_fields_in_row(row_data))
111 host._compare_fields_in_row(row_data))
114 host._compare_fields_in_row(row_data))
128 host_a = scheduler_models.Host(id=2)
132 host_b = scheduler_models.Host(id=2, always_query=True)
140 host_c = scheduler_models.Host(id=2, always_query=False)
145 host = scheduler_models.Host(id=3)
146 host.delete()
147 host = self.assertRaises(scheduler_models.DBError, scheduler_models.Host, id=3,
149 host = self.assertRaises(scheduler_models.DBError, scheduler_models.Host, id=3,
187 hostname_idx = list(scheduler_models.Host._fields).index('hostname')
188 row = [None] * len(scheduler_models.Host._fields)
192 hosts.append(scheduler_models.Host(row=row, new_record=True))
199 self.assertEqual(0, scheduler_models.Host.cmp_for_sort(host10, host10))
200 self.assertEqual(1, scheduler_models.Host.cmp_for_sort(host10, host010))
201 self.assertEqual(-1, scheduler_models.Host.cmp_for_sort(host010, host10))
202 self.assertEqual(-1, scheduler_models.Host.cmp_for_sort(host1, host10))
203 self.assertEqual(-1, scheduler_models.Host.cmp_for_sort(host1, host010))
204 self.assertEqual(-1, scheduler_models.Host.cmp_for_sort(host3, host10))
205 self.assertEqual(-1, scheduler_models.Host.cmp_for_sort(host3, host010))
206 self.assertEqual(1, scheduler_models.Host.cmp_for_sort(host3, host1))
207 self.assertEqual(-1, scheduler_models.Host.cmp_for_sort(host1, host3))
208 self.assertEqual(-1, scheduler_models.Host.cmp_for_sort(alice, host3))
209 self.assertEqual(1, scheduler_models.Host.cmp_for_sort(host3, alice))
210 self.assertEqual(0, scheduler_models.Host.cmp_for_sort(alice, alice))
212 hosts.sort(cmp=scheduler_models.Host.cmp_for_sort)
216 hosts.sort(cmp=scheduler_models.Host.cmp_for_sort)
350 self.assertEquals(task.host.id, 1)
448 models.Host.smart_get(1).update_object(dirty=True)
453 models.Host.smart_get(1).update_object(dirty=False)