Esempio n. 1
0
 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 {}
Esempio n. 2
0
File: fact.py Progetto: scibian/func
 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 {}
Esempio n. 3
0
 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
Esempio n. 4
0
File: fact.py Progetto: scibian/func
 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
Esempio n. 5
0
 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 {}
Esempio n. 6
0
File: fact.py Progetto: scibian/func
    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 {}