#NEWLINE# def get_context_data( self , request ) : #NEWLINE# #INDENT# template_id = self . tab_group . kwargs [ 'template_id' ] #NEWLINE# try : #NEWLINE# #INDENT# template = saharaclient . cluster_template_get ( request , template_id ) #NEWLINE# for ng in template . node_groups : #NEWLINE# #INDENT# if ( not self [ 'flavor_id' ] ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# ng [ 'flavor_name' ] = nova . flavor_get ( request , ng [ 'flavor_id' ] ) . name #NEWLINE# ng [ 'node_group_template' ] = helpers . safe_call ( saharaclient . nodegroup_template_get , request , ng . get ( 'node_group_template_id' , None ) ) #NEWLINE# #UNINDENT# #UNINDENT# except Exception : #NEWLINE# #INDENT# template = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# exceptions . handle ( request , _ ( 'Unable to fetch node group details.' ) ) #NEWLINE# #UNINDENT# return { #NEWLINE# #INDENT# 'template' : template , #NEWLINE# #UNINDENT# }