#NEWLINE# def get_volume_snapshots_data( self ) : #NEWLINE# #INDENT# if base . is_service_enabled ( self . request , 'volume' ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# snapshots = api . cinder . volume_snapshot_list ( self . request ) #NEWLINE# volumes = api . cinder . volume_list ( self . request ) #NEWLINE# volumes = dict ( ( ( v . id , v ) for v in volumes ) ) #NEWLINE# #UNINDENT# except Exception : #NEWLINE# #INDENT# snapshots = [ ] #NEWLINE# volumes = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# exceptions . handle ( self . request , _ ( 'Unable to retrieve volume snapshots.' ) ) #NEWLINE# #UNINDENT# for snapshot in snapshots : #NEWLINE# #INDENT# volume = volumes . get ( snapshot . volume_id ) #NEWLINE# setattr ( snapshot , '_volume' , volume ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# snapshots = [ ] #NEWLINE# #UNINDENT# return snapshots