예제 #1
0
파일: fact.py 프로젝트: jacknjzhou/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 {}
예제 #2
0
파일: fact.py 프로젝트: 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 {}
예제 #3
0
파일: fact.py 프로젝트: jacknjzhou/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
예제 #4
0
파일: fact.py 프로젝트: 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
예제 #5
0
파일: fact.py 프로젝트: jacknjzhou/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 {}
예제 #6
0
파일: fact.py 프로젝트: 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 {}