<s> import logging <EOL> from django . utils . translation import ugettext_lazy as _ <EOL> import horizon <EOL> from openstack_dashboard . api import neutron <EOL> from openstack_dashboard . dashboards . project import dashboard <EOL> LOG = logging . getLogger ( __name__ ) <EOL> class VPN ( horizon . Panel ) : <EOL> name = _ ( "<STR_LIT>" ) <EOL> slug = '<STR_LIT>' <EOL> permissions = ( '<STR_LIT>' , ) <EOL> def allowed ( self , context ) : <EOL> request = context [ '<STR_LIT>' ] <EOL> if not request . user . has_perms ( self . permissions ) : <EOL> return False <EOL> try : <EOL> if not neutron . is_service_enabled ( request , <EOL> config_name = '<STR_LIT>' , <EOL> ext_name = '<STR_LIT>' ) : <EOL> return False <EOL> except Exception : <EOL> LOG . error ( "<STR_LIT>" <EOL> "<STR_LIT>" <EOL> "<STR_LIT>" ) <EOL> return False <EOL> if not super ( VPN , self ) . allowed ( context ) : <EOL> return False <EOL> return True <EOL> dashboard . Project . register ( VPN ) </s>
