Example #1
0
File: owld.py Project: fpierfed/owl
    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])
Example #2
0
    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])
Example #3
0
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)))
Example #4
0
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)))
Example #5
0
File: owld.py Project: fpierfed/owl
    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())
Example #6
0
    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())