#NEWLINE# def pull_images( self ) : #NEWLINE# #INDENT# glance = self . glance_admin_client #NEWLINE# with transaction . atomic ( ) : #NEWLINE# #INDENT# cur_images = self . _get_current_properties ( models . Image ) #NEWLINE# for backend_image in glance . images . list ( ) : #NEWLINE# #INDENT# if ( cur_images . is_public and ( not backend_image . deleted ) ) : #NEWLINE# #INDENT# cur_images . pop ( backend_image . id , None ) #NEWLINE# models . Image . objects . update_or_create ( settings = self . settings , backend_id = backend_image . id , defaults = { #NEWLINE# #INDENT# 'name' : backend_image . name , #NEWLINE# 'min_ram' : backend_image . min_ram , #NEWLINE# 'min_disk' : self . gb2mb ( backend_image . min_disk ) , #NEWLINE# #UNINDENT# } ) #NEWLINE# #UNINDENT# #UNINDENT# models . Image . objects . filter ( backend_id__in = cur_images . keys ( ) ) . delete ( )