#NEWLINE# def _software( self , * args , **kwargs ) : #NEWLINE# #INDENT# '\n        Return installed software.\n        ' #NEWLINE# data = dict ( ) #NEWLINE# if ( 'exclude' in kwargs ) : #NEWLINE# #INDENT# excludes = kwargs [ 'exclude' ] . split ( ',' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# excludes = list ( ) #NEWLINE# #UNINDENT# os_family = __grains__ . get ( 'os_family' ) . lower ( ) #NEWLINE# if ( os_family == 'suse' ) : #NEWLINE# #INDENT# LOCKS = 'pkg.list_locks' #NEWLINE# if ( 'products' not in excludes ) : #NEWLINE# #INDENT# products = __salt__ [ 'pkg.list_products' ] ( ) #NEWLINE# if products : #NEWLINE# #INDENT# data [ 'products' ] = products #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ( os_family == 'redhat' ) : #NEWLINE# #INDENT# LOCKS = 'pkg.get_locked_packages' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# LOCKS = None #NEWLINE# #UNINDENT# #UNINDENT# if ( LOCKS and ( 'locks' not in excludes ) ) : #NEWLINE# #INDENT# locks = __salt__ [ LOCKS ] ( ) #NEWLINE# if locks : #NEWLINE# #INDENT# data [ 'locks' ] = locks #NEWLINE# #UNINDENT# #UNINDENT# if ( os_family == 'suse' ) : #NEWLINE# #INDENT# PATTERNS = 'pkg.list_installed_patterns' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( os_family == 'redhat' ) : #NEWLINE# #INDENT# PATTERNS = 'pkg.group_list' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# PATTERNS = None #NEWLINE# #UNINDENT# #UNINDENT# if ( PATTERNS and ( 'patterns' not in excludes ) ) : #NEWLINE# #INDENT# patterns = __salt__ [ PATTERNS ] ( ) #NEWLINE# if patterns : #NEWLINE# #INDENT# data [ 'patterns' ] = patterns #NEWLINE# #UNINDENT# #UNINDENT# if ( 'packages' not in excludes ) : #NEWLINE# #INDENT# data [ 'packages' ] = __salt__ [ 'pkg.list_pkgs' ] ( ) #NEWLINE# #UNINDENT# if ( 'repositories' not in excludes ) : #NEWLINE# #INDENT# repos = __salt__ [ 'pkg.list_repos' ] ( ) #NEWLINE# if repos : #NEWLINE# #INDENT# data [ 'repositories' ] = repos #NEWLINE# #UNINDENT# #UNINDENT# return data