#NEWLINE# def get_context_data( self , request ) : #NEWLINE# #INDENT# template_id = self . tab_group . kwargs [ 'template_id' ] #NEWLINE# try : #NEWLINE# #INDENT# template = saharaclient . nodegroup_template_get ( request , template_id ) #NEWLINE# #UNINDENT# except Exception : #NEWLINE# #INDENT# template = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# exceptions . handle ( request , _ ( 'Unable to fetch node group template.' ) ) #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# flavor = nova . flavor_get ( request , template . flavor_id ) #NEWLINE# #UNINDENT# except Exception : #NEWLINE# #INDENT# flavor = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# exceptions . handle ( request , _ ( 'Unable to fetch flavor for template.' ) ) #NEWLINE# #UNINDENT# floating_ip_pool_name = None #NEWLINE# if template . floating_ip_pool : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# floating_ip_pool_name = self . _get_floating_ip_pool_name ( request , template . floating_ip_pool ) #NEWLINE# #UNINDENT# except Exception : #NEWLINE# #INDENT# exceptions . handle ( request , _ ( 'Unable to fetch floating ip pools.' ) ) #NEWLINE# #UNINDENT# #UNINDENT# return { #NEWLINE# #INDENT# 'template' : template , #NEWLINE# 'flavor' : flavor , #NEWLINE# 'floating_ip_pool_name' : flavor , #NEWLINE# #UNINDENT# }