def owlapi_resources_get_list(self, timeout=condor.TIMEOUT): """ Return the list of the names of available compute resources. Usage resources_get_list() Return [resource name, ...] """ ads = condor.condor_status(timeout=timeout) return([ad.Name for ad in ads])
def owlapi_resources_get_list(self, timeout=condor.TIMEOUT): """ Return the list of the names of available compute resources. Usage resources_get_list() Return [resource name, ...] """ ads = condor.condor_status(timeout=timeout) return ([ad.Name for ad in ads])
def detail(request, machine_name): """ Display the machine details. """ # Load the template. t = loader.get_template('inventory/detail.html') # Call condor_status and get a info of machine_name. machines = condorutils.condor_status(machine_name) # Render the template and exit. c = Context({'machine': machines[0]}) return(HttpResponse(t.render(c)))
def index(request): """ Main entry point for the inventory web app. """ # Load the template. t = loader.get_template('inventory/index.html') # Call condor_status and get a full list of machines and their ClassAds. machines = condorutils.condor_status() # Render the template and exit. c = Context({'machines': machines}) return(HttpResponse(t.render(c)))
def owlapi_resources_get_info(self, name=None, timeout=condor.TIMEOUT): """ Return the full ClassAd for the given resource name as a dictionary. Usage resources_get_info(resource name) Return ClassAd instance as dictionary """ if(name is None): return ads = condor.condor_status(name, timeout=timeout) if(not ads): return return(ads[0].todict())
def owlapi_resources_get_info(self, name=None, timeout=condor.TIMEOUT): """ Return the full ClassAd for the given resource name as a dictionary. Usage resources_get_info(resource name) Return ClassAd instance as dictionary """ if (name is None): return ads = condor.condor_status(name, timeout=timeout) if (not ads): return return (ads[0].todict())