def call_fact(self,method_name): """ Sometimes we may need to get some of the facts live """ for name,method in minion_query.load_fact_methods().iteritems(): if name == method_name: return method() return {}
def call_fact(self, method_name): """ Sometimes we may need to get some of the facts live """ for name, method in minion_query.load_fact_methods().iteritems(): if name == method_name: return method() return {}
def list_fact_methods(self,abort_on_conflict=False): """ List facts that are availible in that system """ methods = minion_query.load_fact_methods(abort_on_conflict) if not methods.has_key('__conflict__'): return methods.keys() else: return methods
def list_fact_methods(self, abort_on_conflict=False): """ List facts that are availible in that system """ methods = minion_query.load_fact_methods(abort_on_conflict) if not methods.has_key('__conflict__'): return methods.keys() else: return methods
def show_fact_method(self,method_name): """ Display info about fact method """ for name,method in minion_query.load_fact_methods().iteritems(): if name == method_name: return { 'name':name, 'tag':getattr(method,"tag",""), } return {}
def show_fact_method(self, method_name): """ Display info about fact method """ for name, method in minion_query.load_fact_methods().iteritems(): if name == method_name: return { 'name': name, 'tag': getattr(method, "tag", ""), } return {}