#NEWLINE# def allowed( self , context ) : #NEWLINE# #INDENT# request = request [ 'request' ] #NEWLINE# if ( not request . user . has_perms ( self . permissions ) ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# if ( not neutron . is_service_enabled ( request , config_name = 'enable_firewall' , ext_name = 'fwaas' ) ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# #UNINDENT# except Exception : #NEWLINE# #INDENT# LOG . error ( 'Call to list enabled services failed. This is likely due to a problem communicating with the Neutron endpoint. Firewalls panel will not be displayed.' ) #NEWLINE# return False #NEWLINE# #UNINDENT# if ( not super ( Firewall , self ) . allowed ( context ) ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# return True