#NEWLINE# def get_context_data( self , request ) : #NEWLINE# #INDENT# cluster_id = self . tab_group . kwargs [ 'cluster_id' ] #NEWLINE# try : #NEWLINE# #INDENT# sahara = saharaclient . client ( request ) #NEWLINE# cluster = sahara . clusters . get ( cluster_id ) #NEWLINE# for ng in cluster . node_groups : #NEWLINE# #INDENT# if ng [ 'flavor_id' ] : #NEWLINE# #INDENT# ng [ 'flavor_name' ] = nova . flavor_get ( request , ng [ 'flavor_id' ] ) . name #NEWLINE# #UNINDENT# if ng [ 'floating_ip_pool' ] : #NEWLINE# #INDENT# ng [ 'floating_ip_pool_name' ] = self . _get_floating_ip_pool_name ( request , ng [ 'floating_ip_pool' ] ) #NEWLINE# #UNINDENT# if ng . get ( 'node_group_template_id' , None ) : #NEWLINE# #INDENT# ng [ 'node_group_template' ] = helpers . safe_call ( sahara . node_group_templates . get , ng [ 'node_group_template_id' ] ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# except Exception : #NEWLINE# #INDENT# cluster = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# exceptions . handle ( sahara , _ ( 'Unable to get node group details.' ) ) #NEWLINE# #UNINDENT# return { #NEWLINE# #INDENT# 'cluster' : cluster , #NEWLINE# #UNINDENT# }