#NEWLINE# @ wrap_non_libcloud_exceptions #NEWLINE# def list_images( self ) : #NEWLINE# #INDENT# '\n        List available images (templates).\n        ' #NEWLINE# server = self . connection . client #NEWLINE# names = [ 'name' , 'config.uuid' , 'config.template' ] #NEWLINE# properties = server . _retrieve_properties_traversal ( property_names = names , from_node = None , obj_type = MORTypes . VirtualMachine ) #NEWLINE# images = [ ] #NEWLINE# for prop in properties : #NEWLINE# #INDENT# id = None #NEWLINE# name = None #NEWLINE# is_template = False #NEWLINE# for item in prop . PropSet : #NEWLINE# #INDENT# if ( item . Name == 'config.uuid' ) : #NEWLINE# #INDENT# id = item . Val #NEWLINE# #UNINDENT# if ( item . Name == 'name' ) : #NEWLINE# #INDENT# name = item . Val #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( item . Name == 'config.template' ) : #NEWLINE# #INDENT# is_template = item . Val #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# if is_template : #NEWLINE# #INDENT# image = NodeImage ( id = id , name = name , driver = self ) #NEWLINE# images . append ( image ) #NEWLINE# #UNINDENT# return images