#NEWLINE# def get_zone_hosts( zone ) : #NEWLINE# #INDENT# hosts = zone . hosts #NEWLINE# host_details = [ ] #NEWLINE# if ( hosts is None ) : #NEWLINE# #INDENT# return [ ] #NEWLINE# #UNINDENT# for ( name , services ) in hosts . items ( ) : #NEWLINE# #INDENT# up = all ( ( ( s [ 'active' ] and s [ 'available' ] ) for s in services . values ( ) ) ) #NEWLINE# up = ( _ ( 'Services Up' ) if up else _ ( 'Services Down' ) ) #NEWLINE# host_details . append ( ( '%(host)s (%(up)s)' % { #NEWLINE# #INDENT# 'host' : name , #NEWLINE# 'up' : up , #NEWLINE# #UNINDENT# } ) ) #NEWLINE# #UNINDENT# return host_details