#NEWLINE# def run( self , count = None , region = None , metadata = None ) : #NEWLINE# #INDENT# if region : #NEWLINE# #INDENT# cs = self . pyrax . connect_to_cloudservers ( region = region ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# cs = cs . pyrax . cloudservers #NEWLINE# #UNINDENT# servers = cs . list ( ) #NEWLINE# result = [ ] #NEWLINE# for server in servers : #NEWLINE# #INDENT# item = to_server_dict ( server = server ) #NEWLINE# if metadata : #NEWLINE# #INDENT# include = self . _metadata_intersection ( server = item , metadata = metadata ) #NEWLINE# if ( not include ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# #UNINDENT# result . append ( item [ 'id' ] ) #NEWLINE# #UNINDENT# if count : #NEWLINE# #INDENT# return result [ 0 : count ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return result