#NEWLINE# def populate_instance_snapshot_id_choices( self , request , context ) : #NEWLINE# #INDENT# images = utils . get_available_images ( request , context . get ( 'project_id' ) , self . _images_cache ) #NEWLINE# choices = [ ( image . id , image . name ) for image in images if ( image . properties . get ( 'image_type' , '' ) == 'snapshot' ) ] #NEWLINE# if choices : #NEWLINE# #INDENT# choices . insert ( 0 , ( '' , _ ( 'Select Instance Snapshot' ) ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# choices . insert ( 0 , ( '' , _ ( 'No snapshots available.' ) ) ) #NEWLINE# #UNINDENT# return choices