How to use reserve_hosts method in autotest

Best Python code snippet using autotest_python

0002_auto__add_field_job_reserve_hosts.py

Source:0002_auto__add_field_job_reserve_hosts.py Github

copy

Full Screen

1# -*- coding: utf-8 -*-2from south.db import db3from south.v2 import SchemaMigration4class Migration(SchemaMigration):5 def forwards(self, orm):6 # Adding field 'Job.reserve_hosts'7 db.add_column('afe_jobs', 'reserve_hosts',8 self.gf('django.db.models.fields.BooleanField')(default=False),9 keep_default=False)10 def backwards(self, orm):11 # Deleting field 'Job.reserve_hosts'12 db.delete_column('afe_jobs', 'reserve_hosts')13 models = {14 'afe.abortedhostqueueentry': {15 'Meta': {'object_name': 'AbortedHostQueueEntry', 'db_table': "'afe_aborted_host_queue_entries'"},16 'aborted_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['afe.User']"}),17 'aborted_on': ('django.db.models.fields.DateTimeField', [], {}),18 'queue_entry': ('django.db.models.fields.related.OneToOneField', [], {'to': "orm['afe.HostQueueEntry']", 'unique': 'True', 'primary_key': 'True'})19 },20 'afe.aclgroup': {21 'Meta': {'object_name': 'AclGroup', 'db_table': "'afe_acl_groups'"},22 'description': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),23 'hosts': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['afe.Host']", 'symmetrical': 'False', 'db_table': "'afe_acl_groups_hosts'", 'blank': 'True'}),24 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),25 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),26 'users': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['afe.User']", 'db_table': "'afe_acl_groups_users'", 'symmetrical': 'False'})27 },28 'afe.atomicgroup': {29 'Meta': {'object_name': 'AtomicGroup', 'db_table': "'afe_atomic_groups'"},30 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),31 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),32 'invalid': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),33 'max_number_of_machines': ('django.db.models.fields.IntegerField', [], {'default': '333333333'}),34 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'})35 },36 'afe.drone': {37 'Meta': {'object_name': 'Drone', 'db_table': "'afe_drones'"},38 'hostname': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),39 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})40 },41 'afe.droneset': {42 'Meta': {'object_name': 'DroneSet', 'db_table': "'afe_drone_sets'"},43 'drones': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['afe.Drone']", 'db_table': "'afe_drone_sets_drones'", 'symmetrical': 'False'}),44 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),45 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'})46 },47 'afe.host': {48 'Meta': {'object_name': 'Host', 'db_table': "'afe_hosts'"},49 'dirty': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),50 'hostname': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),51 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),52 'invalid': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),53 'labels': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['afe.Label']", 'symmetrical': 'False', 'db_table': "'afe_hosts_labels'", 'blank': 'True'}),54 'lock_time': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),55 'locked': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),56 'locked_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['afe.User']", 'null': 'True', 'blank': 'True'}),57 'protection': ('django.db.models.fields.SmallIntegerField', [], {'default': '0', 'blank': 'True'}),58 'status': ('django.db.models.fields.CharField', [], {'default': "'Ready'", 'max_length': '255'}),59 'synch_id': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'})60 },61 'afe.hostattribute': {62 'Meta': {'object_name': 'HostAttribute', 'db_table': "'afe_host_attributes'"},63 'attribute': ('django.db.models.fields.CharField', [], {'max_length': '90'}),64 'host': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['afe.Host']"}),65 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),66 'value': ('django.db.models.fields.CharField', [], {'max_length': '300'})67 },68 'afe.hostqueueentry': {69 'Meta': {'object_name': 'HostQueueEntry', 'db_table': "'afe_host_queue_entries'"},70 'aborted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),71 'active': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),72 'atomic_group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['afe.AtomicGroup']", 'null': 'True', 'blank': 'True'}),73 'complete': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),74 'deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),75 'execution_subdir': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255', 'blank': 'True'}),76 'host': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['afe.Host']", 'null': 'True', 'blank': 'True'}),77 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),78 'job': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['afe.Job']"}),79 'meta_host': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['afe.Label']", 'null': 'True', 'db_column': "'meta_host'", 'blank': 'True'}),80 'profile': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255', 'blank': 'True'}),81 'started_on': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),82 'status': ('django.db.models.fields.CharField', [], {'max_length': '255'})83 },84 'afe.ineligiblehostqueue': {85 'Meta': {'object_name': 'IneligibleHostQueue', 'db_table': "'afe_ineligible_host_queues'"},86 'host': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['afe.Host']"}),87 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),88 'job': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['afe.Job']"})89 },90 'afe.job': {91 'Meta': {'object_name': 'Job', 'db_table': "'afe_jobs'"},92 'control_file': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),93 'control_type': ('django.db.models.fields.SmallIntegerField', [], {'default': '2', 'blank': 'True'}),94 'created_on': ('django.db.models.fields.DateTimeField', [], {}),95 'dependency_labels': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['afe.Label']", 'symmetrical': 'False', 'db_table': "'afe_jobs_dependency_labels'", 'blank': 'True'}),96 'drone_set': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['afe.DroneSet']", 'null': 'True', 'blank': 'True'}),97 'email_list': ('django.db.models.fields.CharField', [], {'max_length': '250', 'blank': 'True'}),98 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),99 'max_runtime_hrs': ('django.db.models.fields.IntegerField', [], {'default': "'72'"}),100 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),101 'owner': ('django.db.models.fields.CharField', [], {'max_length': '255'}),102 'parameterized_job': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['afe.ParameterizedJob']", 'null': 'True', 'blank': 'True'}),103 'parse_failed_repair': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),104 'priority': ('django.db.models.fields.SmallIntegerField', [], {'default': '1', 'blank': 'True'}),105 'reboot_after': ('django.db.models.fields.SmallIntegerField', [], {'default': '2', 'blank': 'True'}),106 'reboot_before': ('django.db.models.fields.SmallIntegerField', [], {'default': '1', 'blank': 'True'}),107 'reserve_hosts': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),108 'run_verify': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),109 'synch_count': ('django.db.models.fields.IntegerField', [], {'default': '1', 'null': 'True'}),110 'timeout': ('django.db.models.fields.IntegerField', [], {'default': "'72'"})111 },112 'afe.jobkeyval': {113 'Meta': {'object_name': 'JobKeyval', 'db_table': "'afe_job_keyvals'"},114 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),115 'job': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['afe.Job']"}),116 'key': ('django.db.models.fields.CharField', [], {'max_length': '90'}),117 'value': ('django.db.models.fields.CharField', [], {'max_length': '300'})118 },119 'afe.kernel': {120 'Meta': {'unique_together': "(('version', 'cmdline'),)", 'object_name': 'Kernel', 'db_table': "'afe_kernels'"},121 'cmdline': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),122 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),123 'version': ('django.db.models.fields.CharField', [], {'max_length': '255'})124 },125 'afe.label': {126 'Meta': {'object_name': 'Label', 'db_table': "'afe_labels'"},127 'atomic_group': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['afe.AtomicGroup']", 'null': 'True', 'blank': 'True'}),128 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),129 'invalid': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),130 'kernel_config': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),131 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),132 'only_if_needed': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),133 'platform': ('django.db.models.fields.BooleanField', [], {'default': 'False'})134 },135 'afe.migrateinfo': {136 'Meta': {'object_name': 'MigrateInfo', 'db_table': "'migrate_info'"},137 'version': ('django.db.models.fields.IntegerField', [], {'default': 'None', 'primary_key': 'True'})138 },139 'afe.parameterizedjob': {140 'Meta': {'object_name': 'ParameterizedJob', 'db_table': "'afe_parameterized_jobs'"},141 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),142 'kernels': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['afe.Kernel']", 'db_table': "'afe_parameterized_job_kernels'", 'symmetrical': 'False'}),143 'label': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['afe.Label']", 'null': 'True'}),144 'profile_only': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),145 'profilers': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['afe.Profiler']", 'through': "orm['afe.ParameterizedJobProfiler']", 'symmetrical': 'False'}),146 'test': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['afe.Test']"}),147 'upload_kernel_config': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),148 'use_container': ('django.db.models.fields.BooleanField', [], {'default': 'False'})149 },150 'afe.parameterizedjobparameter': {151 'Meta': {'unique_together': "(('parameterized_job', 'test_parameter'),)", 'object_name': 'ParameterizedJobParameter', 'db_table': "'afe_parameterized_job_parameters'"},152 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),153 'parameter_type': ('django.db.models.fields.CharField', [], {'max_length': '8'}),154 'parameter_value': ('django.db.models.fields.TextField', [], {}),155 'parameterized_job': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['afe.ParameterizedJob']"}),156 'test_parameter': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['afe.TestParameter']"})157 },158 'afe.parameterizedjobprofiler': {159 'Meta': {'unique_together': "(('parameterized_job', 'profiler'),)", 'object_name': 'ParameterizedJobProfiler', 'db_table': "'afe_parameterized_jobs_profilers'"},160 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),161 'parameterized_job': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['afe.ParameterizedJob']"}),162 'profiler': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['afe.Profiler']"})163 },164 'afe.parameterizedjobprofilerparameter': {165 'Meta': {'unique_together': "(('parameterized_job_profiler', 'parameter_name'),)", 'object_name': 'ParameterizedJobProfilerParameter', 'db_table': "'afe_parameterized_job_profiler_parameters'"},166 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),167 'parameter_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),168 'parameter_type': ('django.db.models.fields.CharField', [], {'max_length': '8'}),169 'parameter_value': ('django.db.models.fields.TextField', [], {}),170 'parameterized_job_profiler': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['afe.ParameterizedJobProfiler']"})171 },172 'afe.profiler': {173 'Meta': {'object_name': 'Profiler', 'db_table': "'afe_profilers'"},174 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),175 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),176 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'})177 },178 'afe.recurringrun': {179 'Meta': {'object_name': 'RecurringRun', 'db_table': "'afe_recurring_run'"},180 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),181 'job': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['afe.Job']"}),182 'loop_count': ('django.db.models.fields.IntegerField', [], {'blank': 'True'}),183 'loop_period': ('django.db.models.fields.IntegerField', [], {'blank': 'True'}),184 'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['afe.User']"}),185 'start_date': ('django.db.models.fields.DateTimeField', [], {})186 },187 'afe.specialtask': {188 'Meta': {'object_name': 'SpecialTask', 'db_table': "'afe_special_tasks'"},189 'host': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['afe.Host']"}),190 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),191 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),192 'is_complete': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),193 'queue_entry': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['afe.HostQueueEntry']", 'null': 'True', 'blank': 'True'}),194 'requested_by': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['afe.User']"}),195 'success': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),196 'task': ('django.db.models.fields.CharField', [], {'max_length': '64'}),197 'time_requested': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),198 'time_started': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'})199 },200 'afe.test': {201 'Meta': {'object_name': 'Test', 'db_table': "'afe_autotests'"},202 'author': ('django.db.models.fields.CharField', [], {'max_length': '255'}),203 'dependencies': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),204 'dependency_labels': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['afe.Label']", 'symmetrical': 'False', 'db_table': "'afe_autotests_dependency_labels'", 'blank': 'True'}),205 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),206 'experimental': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),207 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),208 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),209 'path': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),210 'run_verify': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),211 'sync_count': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}),212 'test_category': ('django.db.models.fields.CharField', [], {'max_length': '255'}),213 'test_class': ('django.db.models.fields.CharField', [], {'max_length': '255'}),214 'test_time': ('django.db.models.fields.SmallIntegerField', [], {'default': '2'}),215 'test_type': ('django.db.models.fields.SmallIntegerField', [], {'default': '1'})216 },217 'afe.testparameter': {218 'Meta': {'unique_together': "(('test', 'name'),)", 'object_name': 'TestParameter', 'db_table': "'afe_test_parameters'"},219 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),220 'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),221 'test': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['afe.Test']"})222 },223 'afe.user': {224 'Meta': {'object_name': 'User', 'db_table': "'afe_users'"},225 'access_level': ('django.db.models.fields.IntegerField', [], {'default': '0', 'blank': 'True'}),226 'drone_set': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['afe.DroneSet']", 'null': 'True', 'blank': 'True'}),227 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),228 'login': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}),229 'reboot_after': ('django.db.models.fields.SmallIntegerField', [], {'default': '2', 'blank': 'True'}),230 'reboot_before': ('django.db.models.fields.SmallIntegerField', [], {'default': '1', 'blank': 'True'}),231 'show_experimental': ('django.db.models.fields.BooleanField', [], {'default': 'False'})232 }233 }...

Full Screen

Full Screen

job.py

Source:job.py Github

copy

Full Screen

1"""2Module with interface for fetching and manipulating jobs on an autotest server3"""4import functools5import arc.base6import arc.constants7__all__ = ['get_data',8 'get_ids',9 'get_names',10 'get_ids_names',11 'get_data_by_id',12 'get_data_by_name',13 'Job',14 'get_objs']15#16# Service on RPC server hosting these methods17#18SERVICE_NAME = arc.defaults.AFE_SERVICE_NAME19#20# Name of fields as defined on the server side database21#22ID_FIELD = 'id'23NAME_FIELD = 'name'24#25# Name of RPC methods as defined on the server side26#27GET_METHOD = 'get_jobs'28ADD_METHOD = 'create_job'29#30# Boiler plate code for remote methods that are generic enough to be reused31#32get_data = functools.partial(arc.base.get_data, SERVICE_NAME, GET_METHOD)33get_ids = functools.partial(arc.base.get_and_filter, get_data, ID_FIELD)34get_names = functools.partial(arc.base.get_and_filter, get_data, NAME_FIELD)35get_ids_names = functools.partial(arc.base.get_id_name_and_filter, get_data,36 ID_FIELD, NAME_FIELD)37get_data_by_id = functools.partial(arc.base.get_by, SERVICE_NAME, GET_METHOD,38 ID_FIELD)39get_data_by_name = functools.partial(arc.base.get_by, SERVICE_NAME, GET_METHOD,40 NAME_FIELD)41def add(connection, name, control_file, control_type, hosts):42 """43 Create and enqueue a job.44 :param connection:45 :param name: name of this job46 :param control_file: String contents of the control file.47 :param control_type: Type of control file, Client or Server.48 :param hosts: List of hosts to run job on.49 :returns: The created Job id number.50 """51 priority = arc.constants.JOB_PRIORITIES[1]52 return add_complete(connection, name, priority, control_file, control_type,53 hosts)54def add_complete(connection,55 name,56 priority,57 control_file,58 control_type,59 hosts=(),60 profiles=(),61 meta_hosts=(),62 meta_host_profiles=[],63 one_time_hosts=(),64 atomic_group_name=None,65 synch_count=None,66 is_template=False,67 timeout=None,68 max_runtime_hrs=None,69 run_verify=True,70 email_list='',71 dependencies=(),72 reboot_before=None,73 reboot_after=None,74 parse_failed_repair=None,75 hostless=False,76 keyvals=None,77 drone_set=None,78 reserve_hosts=False):79 """80 Create and enqueue a job.81 :param connection:82 :param name: name of this job83 :param priority: one of Low, Medium, High, Urgent84 :param control_file: String contents of the control file.85 :param control_type: Type of control file, Client or Server.86 :param synch_count: How many machines the job uses per autoserv execution.87 synch_count == 1 means the job is asynchronous.88 If an atomic group is given this value is treated as a89 minimum.90 :param is_template: If true then create a template job.91 :param timeout: Hours after this call returns until the job times out.92 :param max_runtime_hrs: Hours from job starting time until job times out93 :param run_verify: Should the host be verified before running the test?94 :param email_list: String containing emails to mail when the job is done95 :param dependencies: List of label names on which this job depends96 :param reboot_before: Never, If dirty, or Always97 :param reboot_after: Never, If all tests passed, or Always98 :param parse_failed_repair: if true, results of failed repairs launched by99 this job will be parsed as part of the job.100 :param hostless: if true, create a hostless job101 :param keyvals: dict of keyvals to associate with the job102 :param hosts: List of hosts to run job on.103 :param profiles: List of profiles to use, in sync with @hosts list104 :param meta_hosts: List where each entry is a label name, and for each105 entry one host will be chosen from that label to run106 the job on.107 :param one_time_hosts: List of hosts not in the database to run the job on.108 :param atomic_group_name: The name of an atomic group to schedule the job109 on.110 :param drone_set: The name of the drone set to run this test on.111 :returns: The created Job id number.112 """113 if (type(hosts) == str):114 hosts = hosts.split(' ')115 return connection.run(SERVICE_NAME, ADD_METHOD,116 name, priority, control_file, control_type,117 hosts, profiles, meta_hosts, meta_host_profiles,118 one_time_hosts, atomic_group_name, synch_count,119 is_template, timeout, max_runtime_hrs, run_verify,120 email_list, dependencies, reboot_before,121 reboot_after, parse_failed_repair, hostless,122 keyvals, drone_set, reserve_hosts)123def delete(connection, numeric_id):124 """125 Deletes (unqueues, aborts) a Job queued on host machine(s)126 :param connection:127 :param numeric_id:128 """129 return connection.run(SERVICE_NAME,130 "abort_host_queue_entries",131 job=numeric_id)132class Job(arc.base.Model):133 """134 Interface for manipulating a job on an autotest server135 """136 ID_FIELD = ID_FIELD137 NAME_FIELD = NAME_FIELD138 FIELDS = ['control_file', 'control_type', 'created_on', 'dependencies',139 'drone_set', 'email_list', 'keyvals', 'max_runtime_hrs',140 'owner', 'parameterized_job', 'parse_failed_repair', 'priority',141 'reboot_after', 'reboot_before', 'run_verify', 'synch_count',142 'timeout']143 def __init__(self, connection, identification=None, name=None):144 super(Job, self).__init__(connection, identification, name)145 def _get_data_by_id(self):146 return get_data_by_id(self.connection, self.identification)147 def _get_data_by_name(self):148 return get_data_by_name(self.connection, self.name)149 def delete(self):150 """151 Deletes (aka aborts) this job152 """153 return delete(self.connection, self.identification)154 abort = delete155 def __repr__(self):156 return "<Job ID: %s>" % self.id...

Full Screen

Full Screen

test_vlm_helper.py

Source:test_vlm_helper.py Github

copy

Full Screen

1from keywords import vlm_helper2from testfixtures.vlm_fixtures import unreserve_hosts_session, unreserve_hosts_module, VlmHostsReserved3def test_vlm_reserve():4 VlmHostsReserved.add(hosts='controller-0', scope='session')5 vlm_helper.reserve_hosts('controller-0')6def test_vlm_reboot():7 VlmHostsReserved.add(hosts='controller-0', scope='session')8 vlm_helper.reboot_hosts('controller-0')9def test_vlm_power_off_and_on():10 VlmHostsReserved.add(hosts='controller-0', scope='session')11 vlm_helper.power_off_hosts('controller-0')...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run autotest automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful