#NEWLINE# def get_cluster_instances_data( self ) : #NEWLINE# #INDENT# cluster_id = self . tab_group . kwargs [ 'cluster_id' ] #NEWLINE# try : #NEWLINE# #INDENT# sahara = saharaclient . client ( ng . request ) #NEWLINE# cluster = sahara . clusters . get ( cluster_id ) #NEWLINE# instances = [ ] #NEWLINE# for ng in cluster . node_groups : #NEWLINE# #INDENT# for instance in ng [ 'instances' ] : #NEWLINE# #INDENT# instances . append ( Instance ( name = instance [ 'instance_name' ] , id = instance [ 'instance_id' ] , internal_ip = instance . get ( 'internal_ip' , 'Not assigned' ) , management_ip = instance . get ( 'management_ip' , 'Not assigned' ) ) ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# except Exception : #NEWLINE# #INDENT# instances = [ ] #NEWLINE# exceptions . handle ( self . request , _ ( 'Unable to fetch instance details.' ) ) #NEWLINE# #UNINDENT# return instances