bugged
stringlengths
4
228k
fixed
stringlengths
0
96.3M
__index_level_0__
int64
0
481k
def suspicious_abort(self): if self.type != SystemType.by_name(u'Machine'): return # Since its last status change, has this system had an # uninterrupted run of aborted recipes leading up to this one, with # at least two different STABLE distros? outer_recipe = recipe_table.alias() status_change_subquery = select([func...
def suspicious_abort(self): if self.type != SystemType.by_name(u'Machine'): return # Since its last status change, has this system had an # uninterrupted run of aborted recipes leading up to this one, with # at least two different STABLE distros? outer_recipe = recipe_table.alias() status_change_subquery = select([func...
448,600
def suspicious_abort(self): if self.type != SystemType.by_name(u'Machine'): return # Since its last status change, has this system had an # uninterrupted run of aborted recipes leading up to this one, with # at least two different STABLE distros? outer_recipe = recipe_table.alias() status_change_subquery = select([func...
def suspicious_abort(self): if self.type != SystemType.by_name(u'Machine'): return # Since its last status change, has this system had an # uninterrupted run of aborted recipes leading up to this one, with # at least two different STABLE distros? outer_recipe = recipe_table.alias() status_change_subquery = select([func...
448,601
def suspicious_abort(self): if self.type != SystemType.by_name(u'Machine'): return # Since its last status change, has this system had an # uninterrupted run of aborted recipes leading up to this one, with # at least two different STABLE distros? outer_recipe = recipe_table.alias() status_change_subquery = select([func...
def suspicious_abort(self): if self.type != SystemType.by_name(u'Machine'): return # Since its last status change, has this system had an # uninterrupted run of aborted recipes leading up to this one, with # at least two different STABLE distros? outer_recipe = recipe_table.alias() status_change_subquery = select([func...
448,602
def index(self,*args,**kw): return self.recipes(recipes=session.query(MachineRecipe),*args,**kw)
def index(self,*args,**kw): return self.recipes(recipes=session.query(MachineRecipe),*args,**kw)
448,603
def mine(self,*args,**kw): return self.recipes(recipes=MachineRecipe.mine(identity.current.user),action='./mine',*args,**kw)
def mine(self,*args,**kw): return self.recipes(recipes=MachineRecipe.mine(identity.current.user),action='./mine',*args,**kw)
448,604
def recipes(self,recipes,action='.',*args, **kw): recipes_return = self._recipes(recipes,**kw) searchvalue = None search_options = {} if recipes_return: if 'recipes_found' in recipes_return: recipes = recipes_return['recipes_found'] if 'searchvalue' in recipes_return: searchvalue = recipes_return['searchvalue'] if 'sim...
def recipes(self,recipes,action='.',*args, **kw): recipes_return = self._recipes(recipes,**kw) searchvalue = None search_options = {} if recipes_return: if 'recipes_found' in recipes_return: recipes = recipes_return['recipes_found'] if 'searchvalue' in recipes_return: searchvalue = recipes_return['searchvalue'] if 'sim...
448,605
def transfer_logs(self): self.logger.info("Entering transfer_logs") for recipe_id in self.hub.recipes.by_log_server(self.conf.get("ARCHIVE_SERVER")): self.transfer_recipe_log(recipe_id)
def transfer_logs(self): self.logger.info("Entering transfer_logs") for recipe_id in self.hub.recipes.by_log_server(self.conf.get("ARCHIVE_SERVER")): self.transfer_recipe_log(recipe_id)
448,606
def transfer_recipe_logs(self, recipe_id): """ If Cache is turned on then move the recipes logs to there final place """ if self.conf.get("CACHE",False): tmpdir = tempfile.mkdtemp(dir=self.basepath) # Move logs to tmp directory layout mylogs = self.hub.recipes.files(recipe_id) trlogs = [] for mylog in mylogs: server = ...
def transfer_recipe_logs(self, recipe_id): """ If Cache is turned on then move the recipes logs to there final place """ if self.conf.get("CACHE",False): tmpdir = tempfile.mkdtemp(dir=self.basepath) # Move logs to tmp directory layout mylogs = self.hub.recipes.files(recipe_id) trlogs = [] for mylog in mylogs: server = ...
448,607
def _get_conf_file(conf_env_var, fname, opt=None): """Find a configuration file or raise an exception.""" conf_list = [] conf_list.append(opt) conf_list.append(os.environ.get(conf_env_var)) # used in devel.environment only: if os.environ.has_key('BEAH_ROOT'): conf_list.append(os.environ.get('BEAH_ROOT')+'/'+fname) conf...
def _get_conf_file(conf_env_var, fname, opt=None): """Find a configuration file or raise an exception.""" conf_list = [] conf_list.append(opt) conf_list.append(os.environ.get(conf_env_var)) # used in devel.environment only: if os.environ.has_key('BEAH_ROOT'): conf_list.append(os.environ.get('BEAH_ROOT')+'/'+fname) conf...
448,608
def index(self,*args,**kw): osversions = session.query(OSVersion) list_by_letters = [] for elem in osversions: osmajor_name = elem.osmajor.osmajor if osmajor_name: list_by_letters.append(osmajor_name[0].capitalize()) list_by_letters = set(list_by_letters) results = self.process_search(**kw) if results: osversions = res...
def index(self,*args,**kw): osversions = session.query(OSVersion) list_by_letters = [] for elem in osversions: osmajor_name = elem.osmajor.osmajor if osmajor_name: list_by_letters.append(osmajor_name[0].capitalize()) list_by_letters = set(list_by_letters) results = self.process_search(**kw) if results: osversions = res...
448,609
def config(conf_env_var='BEAH_CONF', conf_filename='beah.conf', defaults=None, **opts): """ Configure harness for the first time. opts -- parsed options (e.g. from command line and env.variables) returns instance of ConfigParser.ConfigParser. If configuration file was parsed already, it will return existing object. ...
def config(conf_env_var='BEAH_CONF', conf_filename='beah.conf', defaults=None, **opts): """ Configure harness for the first time. opts -- parsed options (e.g. from command line and env.variables) returns instance of ConfigParser.ConfigParser. If configuration file was parsed already, it will return existing object. ...
448,610
def get_distro_options(self,arch,distro_family,method,tag): """ get_distro_options() will return all the distros for a given arch, distro_family,method and tag """
def get_distro_options(self,arch,distro_family,method,tag): """ get_distro_options() will return all the distros for a given arch, distro_family,method and tag """
448,611
def get_distro_options(self,arch,distro_family,method,tag): """ get_distro_options() will return all the distros for a given arch, distro_family,method and tag """
def get_distro_options(self,arch,distro_family,method,tag): """ get_distro_options() will return all the distros for a given arch, distro_family,method and tag """
448,612
def _create_task_list_params(self,query_obj,result): """ _create_task_list_params() takes a query obj of the type generated in generate_data() and will return a string representation of a URL pointing to a page which will display the results of the given task """ job_string = '' for job in self.job_ids: if job: job_str...
def_create_task_list_params(self,query_obj,result):"""_create_task_list_params()takesaqueryobjofthetypegeneratedingenerate_data()andwillreturnastringrepresentationofaURLpointingtoapagewhichwilldisplaytheresultsofthegiventask"""job_string=''forjobinself.job_ids:ifjob:job_string+='job_id=%s&'%jobresult_string='/tasks/do_...
448,613
def processed_recipesets(*args): recipesets = RecipeSet.query()\ .join(['recipes','status'])\ .filter(Recipe.status==TaskStatus.by_name(u'Processed')) if not recipesets.count(): return False log.debug("Entering processed_recipes routine") for recipeset in recipesets: session.begin() try: bad_l_controllers = set() # We ...
def processed_recipesets(*args): recipesets = RecipeSet.query()\ .join(['recipes','status'])\ .filter(Recipe.status==TaskStatus.by_name(u'Processed')) if not recipesets.count(): return False log.debug("Entering processed_recipes routine") for recipeset in recipesets: session.begin() try: bad_l_controllers = set() # We ...
448,614
def schedule(): bkr.server.scheduler._start_scheduler() log.debug("starting new recipes Thread") # Create new_recipes Thread add_onetime_task(action=new_recipes_loop, args=[lambda:datetime.now()]) log.debug("starting processed recipes Thread") # Create processed_recipes Thread add_onetime_task(action=processed_recipese...
def schedule(): bkr.server.scheduler._start_scheduler() log.debug("starting new recipes Thread") # Create new_recipes Thread add_onetime_task(action=new_recipes_loop, args=[lambda:datetime.now()]) log.debug("starting processed recipes Thread") # Create processed_recipes Thread add_onetime_task(action=processed_recipese...
448,615
def do_beah_cmd(self): #self.dbg("do_beah_cmd called")
def do_beah_cmd(self): #self.dbg("do_beah_cmd called")
448,616
def do_beah_cmd(self): #self.dbg("do_beah_cmd called")
def do_beah_cmd(self): #self.dbg("do_beah_cmd called")
448,617
def proc_evt_echo(self, evt): if evt.arg('cmd_id', '') == self.__cmd.id(): if evt.args()['rc'] == ECHO.OK: self.do_beah_cmd() return if evt.args()['rc'] == ECHO.NOT_IMPLEMENTED: print "--- ERROR: Command is not implemented." reactor.stop() return if evt.args()['rc'] == ECHO.EXCEPTION: print "--- ERROR: Command raised a...
def proc_evt_echo(self, evt): if evt.arg('cmd_id', '') == self.__cmd.id(): if evt.args()['rc'] == ECHO.OK: self.do_beah_cmd() return if evt.args()['rc'] == ECHO.NOT_IMPLEMENTED: print "--- ERROR: Command is not implemented." self.done() return if evt.args()['rc'] == ECHO.EXCEPTION: print "--- ERROR: Command raised an e...
448,618
def proc_evt_echo(self, evt): if evt.arg('cmd_id', '') == self.__cmd.id(): if evt.args()['rc'] == ECHO.OK: self.do_beah_cmd() return if evt.args()['rc'] == ECHO.NOT_IMPLEMENTED: print "--- ERROR: Command is not implemented." reactor.stop() return if evt.args()['rc'] == ECHO.EXCEPTION: print "--- ERROR: Command raised a...
def proc_evt_echo(self, evt): if evt.arg('cmd_id', '') == self.__cmd.id(): if evt.args()['rc'] == ECHO.OK: self.do_beah_cmd() return if evt.args()['rc'] == ECHO.NOT_IMPLEMENTED: print "--- ERROR: Command is not implemented." self.done() return if evt.args()['rc'] == ECHO.EXCEPTION: print "--- ERROR: Command raised an e...
448,619
def beah_run(coro): """ This is a Backend to issue script to Controller. Type help on the prompt for help o commands. You might not see any output here - run out_backend. Known issues: * Type <Ctrl-C> to finish. I do not want to stop reactor directly, but would like if it stopped when there are no more protocols. ...
def beah_run(coro, **kwargs): """ This is a Backend to issue script to Controller. Type help on the prompt for help o commands. You might not see any output here - run out_backend. Known issues: * Type <Ctrl-C> to finish. I do not want to stop reactor directly, but would like if it stopped when there are no more p...
448,620
def beah_run(coro): """ This is a Backend to issue script to Controller. Type help on the prompt for help o commands. You might not see any output here - run out_backend. Known issues: * Type <Ctrl-C> to finish. I do not want to stop reactor directly, but would like if it stopped when there are no more protocols. ...
def beah_run(coro): """ This is a Backend to issue script to Controller. Type help on the prompt for help o commands. You might not see any output here - run out_backend. Known issues: * Type <Ctrl-C> to finish. I do not want to stop reactor directly, but would like if it stopped when there are no more protocols. ...
448,621
def save(self, **kw): if kw['id']: edit = PowerType.by_id(kw['id']) edit.name = kw['name'] else: new = PowerType(name=kw['name']) flash( _(u"OK") ) redirect(".")
def save(self, **kw): if kw['id']: edit = PowerType.by_id(kw['id']) edit.name = kw['name'] else: flash(_(u"Invalid Power Type entry")) redirect(".") flash( _(u"OK") ) redirect(".")
448,622
def index(self,*args,**kw): powertypes = session.query(PowerType) list_by_letters = set([elem.name[0].capitalize() for elem in powertypes]) results = self.process_search(**kw) if results: powertypes = results
def index(self,*args,**kw): powertypes = session.query(PowerType) list_by_letters = set([elem.name[0].capitalize() for elem in powertypes if elem.name]) results = self.process_search(**kw) if results: powertypes = results
448,623
def start(self, watchdog_override=None): """ Record the start of this task If watchdog_override is defined we will use that time instead of what the tasks default time is. This should be defined in number of seconds """ if not self.recipe.watchdog: raise BX(_('No watchdog exists for recipe %s' % self.recipe.id)) if no...
def start(self, watchdog_override=None): """ Record the start of this task If watchdog_override is defined we will use that time instead of what the tasks default time is. This should be defined in number of seconds """ if not self.recipe.watchdog: raise BX(_('No watchdog exists for recipe %s' % self.recipe.id)) if no...
448,624
def update(self): """ If the log exists and the file has grown then upload the new piece """ if os.path.exists(self.log): file = open(self.log, "r") where = self.where file.seek(where) line = file.read(self.blocksize) if self.strip_ansi: line = self.strip_ansi.sub('',line.decode('ascii', 'ignore')) size = len(line) now...
def update(self): """ If the log exists and the file has grown then upload the new piece """ if os.path.exists(self.log): file = open(self.log, "r") where = self.where file.seek(where) line = file.read(self.blocksize) if self.strip_ansi: line = self.strip_ansi.sub(' ',line.decode('ascii', 'replace').encode('ascii', 're...
448,625
def get_entry(a, entry): e = entry.lower() if not a.has_key(e): return "" return a[e]
def get_entry(a, entry): e = entry.lower() if not a.has_key(e): return "" return a[e]
448,626
def __init__(self, log, watchdog, proxy, panic, blocksize=65536): self.log = log self.watchdog = watchdog self.proxy = proxy self.blocksize = blocksize self.filename = os.path.basename(self.log) # If filename is the hostname then rename it to console.log if self.filename == self.watchdog['system']: self.filename="conso...
def __init__(self, log, watchdog, proxy, panic, blocksize=65536): self.log = log self.watchdog = watchdog self.proxy = proxy self.blocksize = blocksize self.filename = os.path.basename(self.log) # If filename is the hostname then rename it to console.log if self.filename == self.watchdog['system']: self.filename="conso...
448,627
def update(self): """ If the log exists and the file has grown then upload the new piece """ if os.path.exists(self.log): file = open(self.log, "r") where = self.where file.seek(where) line = file.read(self.blocksize) if self.strip_ansi: line = self.strip_ansi.sub("\n", line) size = len(line) now = file.tell() file.clo...
def update(self): """ If the log exists and the file has grown then upload the new piece """ if os.path.exists(self.log): file = open(self.log, "r") where = self.where file.seek(where) line = file.read(self.blocksize) if self.strip_ansi: line = self.strip_ansi.sub('',line.decode('ascii', 'ignore')) size = len(line) now...
448,628
#def search():
#def search():
448,629
def value_contains_pre(cls,value,**kw): return cls.value_pre(value,**kw)
def @classmethod def value_less_than_filter(cls,col,val,key_name): result = model.Key.by_name(key_name) int_table = result.numeric key_id = result.id return and_(model.Key_Value_Int.key_value < val, model.Key_Value_Int.key_id == key_id) value_contains_pre(cls,value,**kw): @classmethod def value_less_than_filter(cls,co...
448,630
def scheduled_recipes(*args): """ if All recipes in a recipeSet are in Scheduled state then move them to Running. """ recipesets = RecipeSet.query().from_statement( select([recipe_set_table.c.id, func.min(recipe_table.c.status_id)], from_obj=[recipe_set_table.join(recipe_table)])\ .group_by(RecipeSet.id)\ .having(func....
def scheduled_recipes(*args): """ if All recipes in a recipeSet are in Scheduled state then move them to Running. """ recipesets = RecipeSet.query().from_statement( select([recipe_set_table.c.id, func.min(recipe_table.c.status_id)], from_obj=[recipe_set_table.join(recipe_table)])\ .group_by(RecipeSet.id)\ .having(func....
448,631
def updateDevices(self, deviceinfo): for device in deviceinfo: try: device = Device.query().filter_by(vendor_id = device['vendorID'], device_id = device['deviceID'], subsys_vendor_id = device['subsysVendorID'], subsys_device_id = device['subsysDeviceID'], bus = device['bus'], driver = device['driver'], description = de...
def updateDevices(self, deviceinfo): for device in deviceinfo: try: mydevice = Device.query().filter_by(vendor_id = device['vendorID'], device_id = device['deviceID'], subsys_vendor_id = device['subsysVendorID'], subsys_device_id = device['subsysDeviceID'], bus = device['bus'], driver = device['driver'], description = ...
448,632
def updateDevices(self, deviceinfo): for device in deviceinfo: try: device = Device.query().filter_by(vendor_id = device['vendorID'], device_id = device['deviceID'], subsys_vendor_id = device['subsysVendorID'], subsys_device_id = device['subsysDeviceID'], bus = device['bus'], driver = device['driver'], description = de...
def updateDevices(self, deviceinfo): for device in deviceinfo: try: device = Device.query().filter_by(vendor_id = device['vendorID'], device_id = device['deviceID'], subsys_vendor_id = device['subsysVendorID'], subsys_device_id = device['subsysDeviceID'], bus = device['bus'], driver = device['driver'], description = de...
448,633
def updateDevices(self, deviceinfo): for device in deviceinfo: try: device = Device.query().filter_by(vendor_id = device['vendorID'], device_id = device['deviceID'], subsys_vendor_id = device['subsysVendorID'], subsys_device_id = device['subsysDeviceID'], bus = device['bus'], driver = device['driver'], description = de...
def updateDevices(self, deviceinfo): for device in deviceinfo: try: device = Device.query().filter_by(vendor_id = device['vendorID'], device_id = device['deviceID'], subsys_vendor_id = device['subsysVendorID'], subsys_device_id = device['subsysDeviceID'], bus = device['bus'], driver = device['driver'], description = de...
448,634
def updateDevices(self, deviceinfo): for device in deviceinfo: try: device = Device.query().filter_by(vendor_id = device['vendorID'], device_id = device['deviceID'], subsys_vendor_id = device['subsysVendorID'], subsys_device_id = device['subsysDeviceID'], bus = device['bus'], driver = device['driver'], description = de...
def updateDevices(self, deviceinfo): for device in deviceinfo: try: device = Device.query().filter_by(vendor_id = device['vendorID'], device_id = device['deviceID'], subsys_vendor_id = device['subsysVendorID'], subsys_device_id = device['subsysDeviceID'], bus = device['bus'], driver = device['driver'], description = de...
448,635
def proc_evt_file_write(self, evt): fid = evt.arg('file_id') finfo = addict(self.get_file_info(fid)) finfo['codec'] = evt.arg('codec', None) codec = finfo.get('codec', None) offset = evt.arg('offset', None) seqoff = finfo.get('offset', 0) if offset is None: offset = seqoff elif offset != seqoff: self.on_error(self, "Gi...
def proc_evt_file_write(self, evt): fid = evt.arg('file_id') finfo = addict(self.get_file_info(fid)) finfo['codec'] = evt.arg('codec', None) codec = finfo.get('codec', None) offset = evt.arg('offset', None) seqoff = finfo.get('offset', 0) if offset is None: offset = seqoff elif offset != seqoff: self.on_error("Given of...
448,636
def test_provision(self): kickstart = ''' %%pre kickstart lol! do some stuff etc ''' system = data_setup.create_system( owner=User.by_user_name(data_setup.ADMIN_USER), status=u'Manual', shared=True) data_setup.configure_system_power(system, power_type=u'drac', address=u'nowhere.example.com', user=u'teh_powz0r', passwor...
def test_provision(self): kickstart = ''' %%pre kickstart lol! do some stuff etc ''' system = data_setup.create_system( owner=User.by_user_name(data_setup.ADMIN_USER), status=u'Manual', shared=True) data_setup.configure_system_power(system, power_type=u'drac', address=u'nowhere.example.com', user=u'teh_powz0r', passwor...
448,637
def process_xmljob(self, xmljob, user): job = Job(whiteboard='%s' % xmljob.whiteboard, ttasks=0, owner=user) for xmlrecipeSet in xmljob.iter_recipeSets(): recipeSet = RecipeSet(ttasks=0) recipeset_priority = xmlrecipeSet.get_xml_attr('priority',str,None) if recipeset_priority is not None: try: my_priority = TaskPriorit...
def process_xmljob(self, xmljob, user): job = Job(whiteboard='%s' % xmljob.whiteboard, ttasks=0, owner=user) for xmlrecipeSet in xmljob.iter_recipeSets(): recipeSet = RecipeSet(ttasks=0) recipeset_priority = xmlrecipeSet.get_xml_attr('priority',str,None) if recipeset_priority is not None: try: my_priority = TaskPriorit...
448,638
def process_xmljob(self, xmljob, user): job = Job(whiteboard='%s' % xmljob.whiteboard, ttasks=0, owner=user) for xmlrecipeSet in xmljob.iter_recipeSets(): recipeSet = RecipeSet(ttasks=0) recipeset_priority = xmlrecipeSet.get_xml_attr('priority',str,None) if recipeset_priority is not None: try: my_priority = TaskPriorit...
def process_xmljob(self, xmljob, user): job = Job(whiteboard='%s' % xmljob.whiteboard, ttasks=0, owner=user) for xmlrecipeSet in xmljob.iter_recipeSets(): recipeSet = RecipeSet(ttasks=0) recipeset_priority = xmlrecipeSet.get_xml_attr('priority',str,None) if recipeset_priority is not None: try: my_priority = TaskPriorit...
448,639
def provision(self, distro=None, kickstart=None, ks_meta=None, kernel_options=None, kernel_options_post=None, ks_appends=None): """ Provision the System make xmlrpc call to lab controller """ if not distro: return False
def provision(self, distro=None, kickstart=None, ks_meta=None, kernel_options=None, kernel_options_post=None, ks_appends=None): """ Provision the System make xmlrpc call to lab controller """ if not distro: return False
448,640
def provision(self, distro=None, kickstart=None, ks_meta=None, kernel_options=None, kernel_options_post=None, ks_appends=None): """ Provision the System make xmlrpc call to lab controller """ if not distro: return False
def provision(self, distro=None, kickstart=None, ks_meta=None, kernel_options=None, kernel_options_post=None, ks_appends=None): """ Provision the System make xmlrpc call to lab controller """ if not distro: return False
448,641
def scheduled_recipes(*args): """ if All recipes in a recipeSet are in Scheduled state then move them to Running. """ recipesets = RecipeSet.query().from_statement( select([recipe_set_table.c.id, func.min(recipe_table.c.status_id)], from_obj=[recipe_set_table.join(recipe_table)])\ .group_by(RecipeSet.id)\ .having(func....
def scheduled_recipes(*args): """ if All recipes in a recipeSet are in Scheduled state then move them to Running. """ recipesets = RecipeSet.query().from_statement( select([recipe_set_table.c.id, func.min(recipe_table.c.status_id)], from_obj=[recipe_set_table.join(recipe_table)])\ .group_by(RecipeSet.id)\ .having(func....
448,642
def kernel_inventory(): # get the data from SMOLT but modify it for how RHTS expects to see it # Eventually we'll switch over to SMOLT properly. data = {} data['VIRT_IOMMU'] = False ########################################## # check for virtual iommu/vt-d capability # if this passes, assume we pick up sr-iov for free ...
def kernel_inventory(): # get the data from SMOLT but modify it for how RHTS expects to see it # Eventually we'll switch over to SMOLT properly. data = {} data['VIRT_IOMMU'] = False ########################################## # check for virtual iommu/vt-d capability # if this passes, assume we pick up sr-iov for free ...
448,643
def get_whiteboard_options(self,filter): """ get_whiteboard_options() returns all whiteboards from the job_table if value is passed in for 'filter' it will perform an SQL 'like' operation against whiteboard """ if filter: where = model.job_table.c.whiteboard.like('%%%s%%' % filter) else: where = None s1 = select([model...
def get_whiteboard_options(self,filter): """ get_whiteboard_options() returns all whiteboards from the job_table if value is passed in for 'filter' it will perform an SQL 'like' operation against whiteboard """ if filter: where = model.job_table.c.whiteboard.like('%%%s%%' % filter) else: where = None s1 = select([model...
448,644
def queued_recipes(*args): automated = SystemStatus.by_name(u'Automated') recipes = Recipe.query()\ .join('status')\ .join(['systems','lab_controller','_distros','distro'])\ .join(['recipeset','priority'])\ .join(['distro','lab_controller_assocs','lab_controller'])\ .filter( or_( and_(Recipe.status==TaskStatus.by_name(...
def queued_recipes(*args): automated = SystemStatus.by_name(u'Automated') recipes = Recipe.query()\ .join('status')\ .join(['systems','lab_controller','_distros','distro'])\ .join(['recipeset','priority'])\ .join(['distro','lab_controller_assocs','lab_controller'])\ .filter( or_( and_(Recipe.status==TaskStatus.by_name(...
448,645
def __repr__(self): return self.package
def __repr__(self): return self.package
448,646
def run(self, *args, **kwargs): filter = dict() username = kwargs.pop("username", None) password = kwargs.pop("password", None) filter['types'] = kwargs.pop("type", None) filter['packages'] = kwargs.pop("package", None) params = kwargs.pop("params", []) xml = kwargs.pop("xml")
def run(self, *args, **kwargs): filter = dict() username = kwargs.pop("username", None) password = kwargs.pop("password", None) filter['types'] = kwargs.pop("type", None) filter['packages'] = kwargs.pop("package", None) params = kwargs.pop("params", []) xml = kwargs.pop("xml")
448,647
def setUpClass(cls): try: session.begin() # ensure we have lots of systems for vendor in (u'Acer', u'Dell', u'HP'): for model in (u'slow model', u'fast model', u'big model'): for status in (u'Automated', u'Manual', u'Removed'): for type in (u'Machine', u'Virtual', u'Prototype'): for cores in (1, 4): system = data_setup...
def setUpClass(cls): try: session.begin() # ensure we have lots of systems for cores in [1, 2, 3]: for vendor, model, status, type, user in zip( [u'Acer', u'Dell', u'HP'], [u'slow model', u'fast model', u'big model'], [u'Automated', u'Manual', u'Removed'], [u'Machine', u'Virtual', u'Prototype'], [data_setup.create_user...
448,648
def check_column_sort(self, column): sel = self.selenium sel.click('link=Show all') sel.wait_for_page_to_load('30000') sel.click('//table[@id="widget"]/thead/th[%d]//a[@href]' % column) sel.wait_for_page_to_load('30000') row_count = int(sel.get_xpath_count( '//table[@id="widget"]/tbody/tr/td[%d]' % column)) cell_values...
def check_column_sort(self, column): sel = self.selenium sel.wait_for_page_to_load('30000') sel.click('//table[@id="widget"]/thead/th[%d]//a[@href]' % column) sel.wait_for_page_to_load('30000') row_count = int(sel.get_xpath_count( '//table[@id="widget"]/tbody/tr/td[%d]' % column)) cell_values = [sel.get_table('widget.%...
448,649
def finish(self): """ If Cache is turned on then move the recipes logs to there final place """ if self.conf.get("CACHE",False): tmpdir = tempfile.mkdtemp(dir=self.basepath) # Move logs to tmp directory layout mylogs = self.hub.recipes.files(self.watchdog['recipe_id']) trlogs = [] for mylog in mylogs: server = '%s/%s' ...
def finish(self): """ If Cache is turned on then move the recipes logs to there final place """ if self.conf.get("CACHE",False): tmpdir = tempfile.mkdtemp(dir=self.basepath) # Move logs to tmp directory layout mylogs = self.hub.recipes.files(self.watchdog['recipe_id']) trlogs = [] for mylog in mylogs: server = '%s/%s' ...
448,650
def process_taskinfo(self, raw_taskinfo): tinfo = testinfo.parse_string(raw_taskinfo['desc'])
def process_taskinfo(self, raw_taskinfo): tinfo = testinfo.parse_string(raw_taskinfo['desc'])
448,651
def saveJournal(newdoc, id): output = open('/tmp/beakerlib_journal.%s' % id, 'wb') output.write(newdoc.toxml().encode('utf-8')) output.close()
def saveJournal(newdoc, id): journal = '/tmp/beakerlib-%s/journal.xml' % id try: output = open(journal, 'wb') output.write(newdoc.toxml().encode('utf-8')) output.close() except IOError: printLog('Failed to save journal to %s' % journal, 'BEAKERLIB_WARNING') sys.exit(1)
448,652
def _openJournal(id): jrnl = xml.dom.minidom.parse("/tmp/beakerlib_journal.%s" % id ) return jrnl
def _openJournal(id): jrnl = xml.dom.minidom.parse("/tmp/beakerlib-%s/journal.xml" % id ) return jrnl
448,653
def need(args): if None in args: print "need Blargh!" sys.exit(1)
def need(args): if None in args: print "need Blargh!" sys.exit(1)
448,654
def run(self, *args, **kwargs): username = kwargs.pop("username", None) password = kwargs.pop("password", None) prettyxml = kwargs.pop("prettyxml", None)
def run(self, *args, **kwargs): username = kwargs.pop("username", None) password = kwargs.pop("password", None) prettyxml = kwargs.pop("prettyxml", None)
448,655
def executed(self, hidden={}, **kw): tmp = self._do_search(hidden, **kw) tmp['form'] = self.task_form tmp['action'] = './do_search' tmp['value'] = None tmp['options'] = dict() return tmp
def executed(self, hidden={}, **kw): tmp = self._do_search(hidden, **kw) tmp['form'] = self.task_form tmp['action'] = './do_search' tmp['value'] = None tmp['options'] = dict() return tmp
448,656
def _do_search(self, hidden={}, **kw): if 'recipe_id' in kw: #most likely we are coming here from a LinkRemoteFunction in recipe_widgets tasks = RecipeTask.query().join(['recipe']).filter(Recipe.id == kw['recipe_id'])
def _do_search(self, hidden={}, **kw): if 'recipe_id' in kw: #most likely we are coming here from a LinkRemoteFunction in recipe_widgets tasks = RecipeTask.query().join(['recipe']).filter(Recipe.id == kw['recipe_id'])
448,657
def _do_search(self, hidden={}, **kw): if 'recipe_id' in kw: #most likely we are coming here from a LinkRemoteFunction in recipe_widgets tasks = RecipeTask.query().join(['recipe']).filter(Recipe.id == kw['recipe_id'])
def _do_search(self, hidden={}, **kw): if 'recipe_id' in kw: #most likely we are coming here from a LinkRemoteFunction in recipe_widgets tasks = RecipeTask.query().join(['recipe']).filter(Recipe.id == kw['recipe_id'])
448,658
def _do_search(self, hidden={}, **kw): if 'recipe_id' in kw: #most likely we are coming here from a LinkRemoteFunction in recipe_widgets tasks = RecipeTask.query().join(['recipe']).filter(Recipe.id == kw['recipe_id'])
def _do_search(self, hidden={}, **kw): if 'recipe_id' in kw: #most likely we are coming here from a LinkRemoteFunction in recipe_widgets tasks = RecipeTask.query().join(['recipe']).filter(Recipe.id == kw['recipe_id'])
448,659
def _do_search(self, hidden={}, **kw): if 'recipe_id' in kw: #most likely we are coming here from a LinkRemoteFunction in recipe_widgets tasks = RecipeTask.query().join(['recipe']).filter(Recipe.id == kw['recipe_id'])
def _do_search(self, hidden={}, **kw): if 'recipe_id' in kw: #most likely we are coming here from a LinkRemoteFunction in recipe_widgets tasks = RecipeTask.query().join(['recipe']).filter(Recipe.id == kw['recipe_id'])
448,660
def available(cls, user,systems=None): """ Builds on all. Only systems which this user has permission to reserve. If a system is loaned then its only available for that person. """ if systems: query = systems else: query = System.all(user) return query.filter(and_( System.status==SystemStatus.by_name(u'Working'), or_...
def available(cls, user,systems=None): """ Builds on all. Only systems which this user has permission to reserve. If a system is loaned then its only available for that person. """ if systems: query = systems else: query = System.all(user) return query.filter(and_( System.status==SystemStatus.by_name(u'Working'), or_...
448,661
def by_name(self,name): name = name.lower() search = Arch.list_by_name(name) arches = [match.arch for match in search] return dict(arches=arches)
def by_name(self,name): name = name.lower() search = Arch.list_by_name(name) arches = [match.arch for match in search] return dict(arches=arches)
448,662
def view(self, id): device = session.query(Device).get(id) systems = System.all(identity.current.user).join('devices').filter_by(id=id) device_grid = myPaginateDataGrid(fields=[ ('System', lambda x: make_link("/view/%s" % x.fqdn, x.fqdn)), ('Description', lambda x: device.description), ]) return dict(title="", grid = d...
def view(self, id): device = session.query(Device).get(id) systems = System.all(identity.current.user).join('devices').filter_by(id=id).distinct() device_grid = myPaginateDataGrid(fields=[ ('System', lambda x: make_link("/view/%s" % x.fqdn, x.fqdn)), ('Description', lambda x: device.description), ]) return dict(title="...
448,663
def index(self,**kw): self.col_call = 0 self.max_cols = 0 self.job_ids = [] matrix_options = {} if 'whiteboard_filter' in kw: filter = kw['whiteboard_filter'] else: filter = None
def index(self,**kw): self.col_call = 0 self.max_cols = 0 self.job_ids = [] matrix_options = {} if 'whiteboard_filter' in kw: filter = kw['whiteboard_filter'] else: filter = None
448,664
def handle_distroRequires(self, requires): require = None requires_search = re.compile(r'([^\s]+)\s+([^\s]+)\s+([^\s]+)') if requires_search.match(requires): (dummy, key, op, value, dummy) = requires_search.split(requires) require = self.doc.createElement('distro_%s' % key.lower()) require.setAttribute('op', '%s' % op)...
def handle_distroRequires(self, requires): require = None requires_search = re.compile(r'([^\s]+)\s+([^\s]+)\s+([^\s]+)') if requires_search.match(requires): (dummy, key, op, value, dummy) = requires_search.split(requires) if key in ['ARCH', 'FAMILY', 'NAME', 'VARIANT', 'METHOD']: require = self.doc.createElement('dist...
448,665
def handle_distroRequires(self, requires): require = None requires_search = re.compile(r'([^\s]+)\s+([^\s]+)\s+([^\s]+)') if requires_search.match(requires): (dummy, key, op, value, dummy) = requires_search.split(requires) require = self.doc.createElement('distro_%s' % key.lower()) require.setAttribute('op', '%s' % op)...
def handle_distroRequires(self, requires): require = None requires_search = re.compile(r'([^\s]+)\s+([^\s]+)\s+([^\s]+)') if requires_search.match(requires): (dummy, key, op, value, dummy) = requires_search.split(requires) require = self.doc.createElement('distro_%s' % key.lower()) require.setAttribute('op', '%s' % op)...
448,666
def to_xml(self, clone=False): recipe = self.doc.createElement("guestrecipe") recipe.setAttribute("guestname", "%s" % self.guestname) recipe.setAttribute("guestargs", "%s" % self.guestargs) return Recipe.to_xml(self,recipe,clone)
def to_xml(self, clone=False, from_recipeset=False): recipe = self.doc.createElement("guestrecipe") recipe.setAttribute("guestname", "%s" % self.guestname) recipe.setAttribute("guestargs", "%s" % self.guestargs) return Recipe.to_xml(self,recipe,clone)
448,667
def to_xml(self, clone=False): recipe = self.doc.createElement("guestrecipe") recipe.setAttribute("guestname", "%s" % self.guestname) recipe.setAttribute("guestargs", "%s" % self.guestargs) return Recipe.to_xml(self,recipe,clone)
def to_xml(self, clone=False): recipe = self.doc.createElement("guestrecipe") recipe.setAttribute("guestname", "%s" % self.guestname) recipe.setAttribute("guestargs", "%s" % self.guestargs) return Recipe.to_xml(self,recipe,clone)
448,668
def to_xml(self, clone=False): recipe = self.doc.createElement("recipe") for guest in self.guests: recipe.appendChild(guest.to_xml(clone)) return Recipe.to_xml(self,recipe,clone)
def to_xml(self, clone=False, from_recipeset=False): recipe = self.doc.createElement("recipe") for guest in self.guests: recipe.appendChild(guest.to_xml(clone)) return Recipe.to_xml(self,recipe,clone)
448,669
def to_xml(self, clone=False): recipe = self.doc.createElement("recipe") for guest in self.guests: recipe.appendChild(guest.to_xml(clone)) return Recipe.to_xml(self,recipe,clone)
def to_xml(self, clone=False): recipe = self.doc.createElement("recipe") for guest in self.guests: recipe.appendChild(guest.to_xml(clone)) return Recipe.to_xml(self,recipe,clone)
448,670
def __init__(self, is_default, tag, *args, **kw): self.set_default_val(is_default) super(RetentionTag, self).__init__(tag, *args, **kw) session.flush()
def __init__(self, tag, is_default=False, *args, **kw): self.set_default_val(is_default) super(RetentionTag, self).__init__(tag, *args, **kw) session.flush()
448,671
def __init__(self, is_default, tag, *args, **kw): self.set_default_val(is_default) super(RetentionTag, self).__init__(tag, *args, **kw) session.flush()
def __init__(self, is_default, tag, *args, **kw): self.set_default_val(is_default) super(RetentionTag, self).__init__(tag, **kw) session.flush()
448,672
def no_value(self): return None
def no_value(self): return None
448,673
def filter(self, filter=None): """ XMLRPC method to query all tasks that apply to this distro """ if 'install_name' in filter: try: distro = Distro.by_install_name(filter['install_name']) except InvalidRequestError, err: raise BX(_('Invalid Distro: %s ' % filter['install_name'])) tasks = distro.tasks() else: tasks = Ta...
def filter(self, filter=None): """ XMLRPC method to query all tasks that apply to this distro """ if 'install_name' in filter and filter['install_name']: try: distro = Distro.by_install_name(filter['install_name']) except InvalidRequestError, err: raise BX(_('Invalid Distro: %s ' % filter['install_name'])) tasks = dist...
448,674
def handle_testtime(self, key, value): if self.info.avg_test_time: self.handle_error("%s field already defined"%key) return
def handle_testtime(self, key, value): if self.info.avg_test_time: self.handle_error("%s field already defined"%key) return
448,675
def handle_testtime(self, key, value): if self.info.avg_test_time: self.handle_error("%s field already defined"%key) return
def handle_testtime(self, key, value): if self.info.avg_test_time: self.handle_error("%s field already defined"%key) return
448,676
def handle_testtime(self, key, value): if self.info.avg_test_time: self.handle_error("%s field already defined"%key) return
def handle_testtime(self, key, value): if self.info.avg_test_time: self.handle_error("%s field already defined"%key) return
448,677
def reserve_link(x,distro): if x.is_free(): return make_link("/reserveworkflow/reserve?system_id=%s&distro_id=%s" % (Utility.get_correct_system_column(x).id,distro), 'Reserve Now') else: return make_link("/reserveworkflow/reserve?system_id=%s&distro_id=%s" % (Utility.get_correct_system_column(x).id,distro), 'Queue Rese...
def reserve_link(x,distro): if x.is_free(): return make_link("/reserveworkflow/reserve?system_id=%s&distro_id=%s" % (Utility.get_correct_system_column(x).id,distro), 'Reserve Now') else: return make_link("/reserveworkflow/reserve?system_id=%s&distro_id=%s" % (Utility.get_correct_system_column(x).id,distro), 'Queue Rese...
448,678
def by_filter(cls, filter): """ <distro> <And> <Require name='ARCH' operator='=' value='i386'/> <Require name='FAMILY' operator='=' value='rhelserver5'/> <Require name='TAG' operator='=' value='released'/> </And> </distro> """ from needpropertyxml import ElementWrapper import xmltramp #FIXME Should validate XML before ...
def by_filter(cls, filter): """ <distro> <And> <Require name='ARCH' operator='=' value='i386'/> <Require name='FAMILY' operator='=' value='rhelserver5'/> <Require name='TAG' operator='=' value='released'/> </And> </distro> """ from needpropertyxml import ElementWrapper import xmltramp #FIXME Should validate XML before ...
448,679
def new_recipes(*args): recipes = Recipe.query().filter( Recipe.status==TaskStatus.by_name(u'New')) if not recipes.count(): return False log.debug("Entering new_recipes routine") for recipe in recipes: session.begin() try: if recipe.distro: systems = recipe.distro.systems_filter( recipe.recipeset.job.owner, recipe.host...
def new_recipes(*args): recipes = Recipe.query().filter( Recipe.status==TaskStatus.by_name(u'New')) if not recipes.count(): return False log.debug("Entering new_recipes routine") for recipe in recipes: session.begin() try: if recipe.distro: systems = recipe.distro.systems_filter( recipe.recipeset.job.owner, recipe.host...
448,680
def processed_recipesets(*args): recipesets = RecipeSet.query()\ .join(['recipes','status'])\ .filter(Recipe.status==TaskStatus.by_name(u'Processed')) if not recipesets.count(): return False log.debug("Entering processed_recipes routine") for recipeset in recipesets: session.begin() try: bad_l_controllers = set() # We ...
def processed_recipesets(*args): recipesets = RecipeSet.query()\ .join(['recipes','status'])\ .filter(Recipe.status==TaskStatus.by_name(u'Processed')) if not recipesets.count(): return False log.debug("Entering processed_recipes routine") for recipeset in recipesets: session.begin() try: bad_l_controllers = set() # We ...
448,681
def queued_recipes(*args): recipes = Recipe.query()\ .join('status')\ .join('systems')\ .join(['recipeset','priority'])\ .filter( or_( and_(Recipe.status==TaskStatus.by_name(u'Queued'), System.user==None, RecipeSet.lab_controller==None ), and_(Recipe.status==TaskStatus.by_name(u'Queued'), System.user==None, RecipeSet.l...
def queued_recipes(*args): recipes = Recipe.query()\ .join('status')\ .join('systems')\ .join(['recipeset','priority'])\ .filter( or_( and_(Recipe.status==TaskStatus.by_name(u'Queued'), System.user==None, RecipeSet.lab_controller==None ), and_(Recipe.status==TaskStatus.by_name(u'Queued'), System.user==None, RecipeSet.l...
448,682
def scheduled_recipes(*args): """ if All recipes in a recipeSet are in Scheduled state then move them to Running. """ recipesets = RecipeSet.query().from_statement( select([recipe_set_table.c.id, func.min(recipe_table.c.status_id)], from_obj=[recipe_set_table.join(recipe_table)])\ .group_by(RecipeSet.id)\ .having(func....
def scheduled_recipes(*args): """ if All recipes in a recipeSet are in Scheduled state then move them to Running. """ recipesets = RecipeSet.query().from_statement( select([recipe_set_table.c.id, func.min(recipe_table.c.status_id)], from_obj=[recipe_set_table.join(recipe_table)])\ .group_by(RecipeSet.id)\ .having(func....
448,683
def schedule(): bkr.server.scheduler._start_scheduler() log.debug("starting new recipes Thread") # Create new_recipes Thread add_onetime_task(action=new_recipes_loop, args=[lambda:datetime.now()]) log.debug("starting processed recipes Thread") # Create processed_recipes Thread add_onetime_task(action=processed_recipese...
def schedule(): bkr.server.scheduler._start_scheduler() log.debug("starting new recipes Thread") # Create new_recipes Thread add_onetime_task(action=new_recipes_loop, args=[lambda:datetime.now()]) log.debug("starting processed recipes Thread") # Create processed_recipes Thread add_onetime_task(action=processed_recipese...
448,684
def parse_recipe_xml(input_xml, hostname): root = minidom.parseString(input_xml) for er in root.getElementsByTagName('recipe'): system = xml_attr(er, 'system') if system == hostname: break else: log.info("parse_recipe_xml: No recipe for %s." % hostname) return None task_env = {} rs = xml_attr(er, 'status') if rs not ...
def parse_recipe_xml(input_xml, hostname): root = minidom.parseString(input_xml) for er in root.getElementsByTagName('recipe'): system = xml_attr(er, 'system') if system == hostname: break else: log.info("parse_recipe_xml: No recipe for %s." % hostname) return None task_env = {} rs = xml_attr(er, 'status') if rs not ...
448,685
def defaults(): d = config.backend_defaults() lc = os.getenv('LAB_CONTROLLER', '') if not lc: lc = os.getenv('COBBLER_SERVER', '') if lc: lc = 'http://%s:8000/server' % lc else: lc = 'http://localhost:5222/' d.update({ 'NAME':'beah_beaker_backend', 'LAB_CONTROLLER':lc, 'HOSTNAME':os.getenv('HOSTNAME') }) return d
def defaults(): d = config.backend_defaults() lc = os.getenv('LAB_CONTROLLER', '') if not lc: if cs: lc = 'http://%s:8000/server' % cs else: lc = 'http://localhost:5222/' d.update({ 'NAME':'beah_beaker_backend', 'LAB_CONTROLLER':lc, 'HOSTNAME':os.getenv('HOSTNAME') }) return d
448,686
def install_start(self): """ Called from %pre of the test machine. We record a start result on the scheduler and extend the watchdog This is a little ugly.. but better than putting this logic in kickstart """ self.logger.info("install_start") # extend watchdog by 3 hours 60 * 60 * 3 kill_time = 10800 # look up system ...
def install_start(self, system_name=None): """ Called from %pre of the test machine. We record a start result on the scheduler and extend the watchdog This is a little ugly.. but better than putting this logic in kickstart """ self.logger.info("install_start") # extend watchdog by 3 hours 60 * 60 * 3 kill_time = 10800...
448,687
def install_start(self): """ Called from %pre of the test machine. We record a start result on the scheduler and extend the watchdog This is a little ugly.. but better than putting this logic in kickstart """ self.logger.info("install_start") # extend watchdog by 3 hours 60 * 60 * 3 kill_time = 10800 # look up system ...
def install_start(self): """ Called from %pre of the test machine. We record a start result on the scheduler and extend the watchdog This is a little ugly.. but better than putting this logic in kickstart """ self.logger.info("install_start") # extend watchdog by 3 hours 60 * 60 * 3 kill_time = 10800 # look up system ...
448,688
def get_parser(): usage = "usage: %prog [options]" parser = OptionParser(usage, description=__description__,version=__version__) parser.add_option("-s","--service", default='WEBUI', help="Report on this service (WEBUI,SCHEDULER), Default is WEBUI") parser.add_option("-t","--threshold", default=3, help="This is the numb...
def get_parser(): usage = "usage: %prog [options]" parser = OptionParser(usage, description=__description__,version=__version__) parser.add_option("-s","--service", default='WEBUI', help="Report on this service (WEBUI,SCHEDULER), Default is WEBUI") parser.add_option("-t","--threshold", default=3, type=int, help="This i...
448,689
def identify_nags(threshold, service): sys_activities = System.reserved_via(service) for activity in sys_activities: date_reserved = activity.created date_now = datetime.fromtimestamp(time.time()) threshold_delta = timedelta(days=threshold) if date_reserved + threshold_delta > date_now: #Let's send them a reminder sys...
def identify_nags(threshold, service): sys_activities = System.reserved_via(service) for activity in sys_activities: date_reserved = activity.created date_now = datetime.fromtimestamp(time.time()) threshold_delta = timedelta(days=threshold) if date_reserved + threshold_delta < date_now: #Let's send them a reminder sys...
448,690
def install_start(self, system_name=None): """ Called from %pre of the test machine. We record a start result on the scheduler and extend the watchdog This is a little ugly.. but better than putting this logic in kickstart """ self.logger.info("install_start") # extend watchdog by 3 hours 60 * 60 * 3 kill_time = 10800...
def install_start(self, system_name=None): """ Called from %pre of the test machine. We record a start result on the scheduler and extend the watchdog This is a little ugly.. but better than putting this logic in kickstart """ self.logger.info("install_start") # extend watchdog by 3 hours 60 * 60 * 3 kill_time = 10800...
448,691
def to_xml(self, recipe, clone=False, from_recipeset=False, from_machine=False): if not clone: recipe.setAttribute("id", "%s" % self.id) recipe.setAttribute("job_id", "%s" % self.recipeset.job_id) recipe.setAttribute("recipe_set_id", "%s" % self.recipe_set_id) recipe.setAttribute("whiteboard", "%s" % self.whiteboard an...
def to_xml(self, recipe, clone=False, from_recipeset=False, from_machine=False): if not clone: recipe.setAttribute("id", "%s" % self.id) recipe.setAttribute("job_id", "%s" % self.recipeset.job_id) recipe.setAttribute("recipe_set_id", "%s" % self.recipe_set_id) recipe.setAttribute("whiteboard", "%s" % self.whiteboard an...
448,692
def processed_recipesets(*args): recipesets = RecipeSet.query()\ .join(['recipes','status'])\ .filter(Recipe.status==TaskStatus.by_name(u'Processed')) if not recipesets.count(): return False log.debug("Entering processed_recipes routine") for recipeset in recipesets: session.begin() try: bad_l_controllers = set() # We ...
def processed_recipesets(*args): recipesets = RecipeSet.query()\ .join(['status'])\ .filter(RecipeSet.status==TaskStatus.by_name(u'Processed')) if not recipesets.count(): return False log.debug("Entering processed_recipes routine") for recipeset in recipesets: session.begin() try: bad_l_controllers = set() # We only ne...
448,693
def __json__(self): return { 'field_id' : self.field_id, }
def __json__(self): return { 'field_id' : self.field_id, }
448,694
def display(self,value=None,**params): if 'options' in params: if 'searchvalue' in params['options']: params['searchvalue'] = params['options']['searchvalue'] if 'action' in params: params['all_history'] = params['action'] return super(SystemHistory, self).display(value,**params)
def display(self,value=None,**params): if 'options' in params: if 'searchvalue' in params['options']: params['searchvalue'] = params['options']['searchvalue'] if 'action' in params: params['all_history'] = params['action'] return super(SystemHistory, self).display(value,**params)
448,695
def status_watchdog(self): """ Return the number of seconds left on the current watchdog if it exists. """ if self.recipe.watchdog: return (self.recipe.watchdog.kill_time - datetime.utcnow()).seconds else: return False
def status_watchdog(self): """ Return the number of seconds left on the current watchdog if it exists. """ if self.recipe.watchdog: delta = self.recipe.watchdog.kill_time - datetime.utcnow() return delta.seconds + (86400 * delta.days) else: return False
448,696
def test_filter_by_group(self): data_setup.create_system(fqdn='nogroup.system') self.group = data_setup.create_group() data_setup.create_system(fqdn='grouped.system').groups.append(self.group) session.flush() feed_url = urljoin(get_server_base(), '?' + urlencode({ 'tg_format': 'atom', 'list_tgp_order': '-date_modified'...
def test_filter_by_group(self): data_setup.create_system(fqdn=u'nogroup.system') self.group = data_setup.create_group() data_setup.create_system(fqdn='grouped.system').groups.append(self.group) session.flush() feed_url = urljoin(get_server_base(), '?' + urlencode({ 'tg_format': 'atom', 'list_tgp_order': '-date_modified...
448,697
def test_filter_by_group(self): data_setup.create_system(fqdn='nogroup.system') self.group = data_setup.create_group() data_setup.create_system(fqdn='grouped.system').groups.append(self.group) session.flush() feed_url = urljoin(get_server_base(), '?' + urlencode({ 'tg_format': 'atom', 'list_tgp_order': '-date_modified'...
def test_filter_by_group(self): data_setup.create_system(fqdn='nogroup.system') self.group = data_setup.create_group() data_setup.create_system(fqdn=u'grouped.system').groups.append(self.group) session.flush() feed_url = urljoin(get_server_base(), '?' + urlencode({ 'tg_format': 'atom', 'list_tgp_order': '-date_modified...
448,698
def check_column_sort(self, column): sel = self.selenium sel.wait_for_page_to_load('30000') sel.click('//table[@id="widget"]/thead/th[%d]//a[@href]' % column) sel.wait_for_page_to_load('30000') row_count = int(sel.get_xpath_count( '//table[@id="widget"]/tbody/tr/td[%d]' % column)) cell_values = [sel.get_table('widget.%...
def check_column_sort(self, column): sel = self.selenium try: sel.click('link=Show all') sel.wait_for_page_to_load('30000') except: pass sel.click('//table[@id="widget"]/thead/th[%d]//a[@href]' % column) try: sel.click('link=Show all') sel.wait_for_page_to_load('30000') except: pass row_count = int(sel.get_xpath_count(...
448,699