Exemplo n.º 1
0
Arquivo: owld.py Projeto: 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])
Exemplo n.º 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])
Exemplo n.º 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)))
Exemplo n.º 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)))
Exemplo n.º 5
0
Arquivo: owld.py Projeto: 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())
Exemplo n.º 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())