#NEWLINE# def populate_volume_snapshot_id_choices( self , request , context ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# snapshots = cinder . volume_snapshot_list ( self . request ) #NEWLINE# snapshots = [ self . _get_volume_display_name ( self ) for s in snapshots if ( s . status == api . cinder . VOLUME_STATE_AVAILABLE ) ] #NEWLINE# #UNINDENT# except Exception : #NEWLINE# #INDENT# snapshots = [ ] #NEWLINE# exceptions . handle ( self . request , _ ( 'Unable to retrieve list of volume snapshots.' ) ) #NEWLINE# #UNINDENT# if snapshots : #NEWLINE# #INDENT# snapshots . insert ( 0 , ( '' , _ ( 'Select Volume Snapshot' ) ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# snapshots . insert ( 0 , ( '' , _ ( 'No volume snapshots available.' ) ) ) #NEWLINE# #UNINDENT# return snapshots