decisionengine_modules.htcondor package

Submodules

decisionengine_modules.htcondor.htcondor_query module

class decisionengine_modules.htcondor.htcondor_query.CondorQ(schedd_name=None, pool_name=None)[source]

Bases: decisionengine_modules.htcondor.htcondor_query.CondorQuery

Class to implement condor_q

_abc_impl = <_abc_data object>
fetch(constraint=None, format_list=None, condor_config=None)[source]

Fetch job classads

class decisionengine_modules.htcondor.htcondor_query.CondorQuery(resource_str, group_attr, pool_name=None, env=None)[source]

Bases: decisionengine_modules.htcondor.htcondor_query.Query

Fully implemented class for CondorQuery

_abc_impl = <_abc_data object>
class decisionengine_modules.htcondor.htcondor_query.CondorStatus(subsystem_name=None, pool_name=None, group_attr=None)[source]

Bases: decisionengine_modules.htcondor.htcondor_query.CondorQuery

Class to implement condor_status

_abc_impl = <_abc_data object>
fetch(constraint=None, format_list=None, condor_config=None)[source]

Fetch resource classads and return a list of evaluated classads

class decisionengine_modules.htcondor.htcondor_query.Query[source]

Bases: object

Pure virtual class to have a minimum set of methods defined

_abc_impl = <_abc_data object>
abstract fetch(constraint=None, format_list=None, condor_config=None)[source]

Fetch the classad attributes specified in the format_list matching the constraint

fetch_stored(constraint_func=None)[source]
Parameters

constraint_func – A boolean function, with only one argument (data el). If None, return all the data.

@rtype: dict @return: Same as fetch(), but limited to constraint_func(el)==True

load(constraint=None, format_list=None, condor_config=None)[source]

Fetch the data and store it in self.stored_data

exception decisionengine_modules.htcondor.htcondor_query.QueryError(err_str)[source]

Bases: RuntimeError

Thrown when there are exceptions using htcondor python bindings or commands

decisionengine_modules.htcondor.htcondor_query.apply_constraint(data, constraint_func)[source]

Return a subset of data that satisfies constraint_function If constraint_func is None, return back entire data

decisionengine_modules.htcondor.htcondor_query.bindings_friendly_attrs(format_list)[source]

Convert the format_list into attrs that can be used with python bindings Python bindings should take care of the typing

decisionengine_modules.htcondor.htcondor_query.bindings_friendly_constraint(constraint)[source]

Convert the constraint to format that can be used with python bindings

decisionengine_modules.htcondor.htcondor_query.eval_classad_expr(classads, format_list=None)[source]

Convert the classads into list of classads Guarantees any attribute in format_list to be added with default value None

decisionengine_modules.htcondor.htcondor_query.list2dict(list_data, attr_name)[source]

Convert a list to a dictionary and group the results based on attributes specified by attr_name

decisionengine_modules.htcondor.htcondor_query.resource_str_to_py_adtype(resource_str)[source]

Given the resource string return equivalent classad type

decisionengine_modules.htcondor.htcondor_query.split_collector_host(collector_host)[source]

Given the collector_host string extract primary collector_host which is the first collector host in the list and sort the secondary collectors. Return a tuple of primary collector and CSV secondary collector.

Module contents