Lines Matching refs:instance
13 if self.instance.invalid:
14 raise http.Http404('%s has been deleted' % self.instance)
19 if self.instance.invalid:
20 raise http.Http404('%s has already been deleted' % self.instance)
34 return {'ag_name': self.instance.name}
39 rep['name'] = self.instance.name
46 self.instance.max_number_of_machines,
62 self.instance.update_object(**data)
87 return {'label_name': self.instance.name}
92 rep.update({'name': self.instance.name,
93 'is_platform': bool(self.instance.platform)})
100 self._request, self.instance.atomic_group)
116 self.instance.platform = input_dict['is_platform']
117 self.instance.save()
146 return {'username': self.instance.login}
151 rep['username'] = self.instance.login
158 accessible_hosts.set_query_parameters(accessible_by=self.instance.login)
183 return {'acl_name': self.instance.name}
188 rep['name'] = self.instance.name
261 return {'hostname': self.instance.hostname}
268 self.instance.platform())
270 rep.update({'hostname': self.instance.hostname,
271 'locked': bool(self.instance.locked),
272 'status': self.instance.status,
280 self.instance.protection)
282 self.instance.locked_by)
287 queue_entries.set_query_parameters(host=self.instance.hostname)
289 health_tasks.set_query_parameters(host=self.instance.hostname)
292 'locked_on': self._format_datetime(self.instance.lock_time),
293 'invalid': self.instance.invalid,
320 self.instance.update_object(**data)
323 label = self.resolve_link(input_dict['platform']) .instance
326 for label in self.instance.labels.filter(platform=True):
327 self.instance.labels.remove(label)
328 self.instance.labels.add(label)
370 return {'test_name': self.instance.name}
375 rep['name'] = self.instance.name
381 rep.update({'author': self.instance.author,
382 'class': self.instance.test_class,
385 self.instance.test_type),
386 'control_file_path': self.instance.path,
387 'sync_count': self.instance.sync_count,
412 self.instance.update_object(**data)
626 return {'job_id': self.instance.id}
639 self.instance.priority)
641 string_priority = str(self.instance.priority)
642 rep.update({'id': self.instance.id,
643 'owner': self.instance.owner,
644 'name': self.instance.name,
647 self._format_datetime(self.instance.created_on),
655 queue_entries.set_query_parameters(job=self.instance.id)
656 drone_set = self.instance.drone_set and self.instance.drone_set.name
657 rep.update({'email_list': self.instance.email_list,
659 bool(self.instance.parse_failed_repair),
662 ExecutionInfo.execution_info_from_job(self.instance),
665 for keyval in self.instance.keyvals)
711 host_objects.append(host_entry.instance)
715 metahost_label_objects.append(label_entry.instance)
720 assert atomic_group_entry.instance.id == atomic_group.id
722 atomic_group = atomic_group_entry.instance
756 instance = models.HostQueueEntry.objects.get(id=queue_entry_id)
757 return cls(request, instance)
761 return {'queue_entry_id': self.instance.id}
766 if self.instance.host:
767 host = (Host(self._request, self.instance.host)
771 job = Job(self._request, self.instance.job)
772 host = Host.from_optional_instance(self._request, self.instance.host)
774 self.instance.meta_host)
776 self._request, self.instance.atomic_group)
783 'status': self.instance.status,
784 'execution_path': self.instance.execution_subdir,
785 'started_on': self._format_datetime(self.instance.started_on),
786 'aborted': bool(self.instance.aborted)})
794 query = models.HostQueueEntry.objects.filter(pk=self.instance.pk)
797 self.instance.abort(thread_local.get_user())
817 instance = models.SpecialTask.objects.get(id=task_id)
818 return cls(request, instance)
822 return {'task_id': self.instance.id}
827 host = Host(self._request, self.instance.host)
829 self._request, self.instance.queue_entry)
832 'task_type': self.instance.task,
834 self._format_datetime(self.instance.time_started),
835 'status': self.instance.status,
844 host = containing_collection.base_entry.instance