#NEWLINE# def _parse_string( self , string , host_state ) : #NEWLINE# #INDENT# "Strings prefixed with $ are capability lookups in the\n        form '$variable' where 'variable' is an attribute in the\n        HostState class.  If $variable is a dictionary, you may\n        use: $variable.dictkey\n        " #NEWLINE# if ( not string ) : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# if ( not string . startswith ( '$' ) ) : #NEWLINE# #INDENT# return string #NEWLINE# #UNINDENT# path = string [ 1 : ] . split ( '.' ) #NEWLINE# obj = getattr ( host_state , path [ 0 ] , None ) #NEWLINE# if ( obj is None ) : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# for item in path [ 1 : ] : #NEWLINE# #INDENT# obj = obj . get ( item , None ) #NEWLINE# if ( obj is None ) : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# #UNINDENT# return obj