<s> import logging <EOL> from django . core . urlresolvers import reverse <EOL> from django . utils . translation import ugettext_lazy as _ <EOL> from horizon import exceptions <EOL> from horizon import tables <EOL> from openstack_dashboard import api <EOL> LOG = logging . getLogger ( __name__ ) <EOL> class CreateNetworkProfile ( tables . LinkAction ) : <EOL> name = "<STR_LIT>" <EOL> verbose_name = _ ( "<STR_LIT>" ) <EOL> url = "<STR_LIT>" <EOL> classes = ( "<STR_LIT>" , "<STR_LIT>" ) <EOL> class DeleteNetworkProfile ( tables . DeleteAction ) : <EOL> data_type_singular = _ ( "<STR_LIT>" ) <EOL> data_type_plural = _ ( "<STR_LIT>" ) <EOL> def delete ( self , request , obj_id ) : <EOL> try : <EOL> api . neutron . profile_delete ( request , obj_id ) <EOL> except Exception : <EOL> msg = _ ( '<STR_LIT>' ) % obj_id <EOL> LOG . info ( msg ) <EOL> redirect = reverse ( '<STR_LIT>' ) <EOL> exceptions . handle ( request , msg , redirect = redirect ) <EOL> class EditNetworkProfile ( tables . LinkAction ) : <EOL> name = "<STR_LIT>" <EOL> verbose_name = _ ( "<STR_LIT>" ) <EOL> url = "<STR_LIT>" <EOL> classes = ( "<STR_LIT>" , "<STR_LIT>" ) <EOL> class NetworkProfile ( tables . DataTable ) : <EOL> id = tables . Column ( "<STR_LIT>" , verbose_name = _ ( "<STR_LIT>" ) , hidden = True ) <EOL> name = tables . Column ( "<STR_LIT:name>" , verbose_name = _ ( "<STR_LIT>" ) , ) <EOL> project = tables . Column ( "<STR_LIT>" , verbose_name = _ ( "<STR_LIT>" ) ) <EOL> segment_type = tables . Column ( "<STR_LIT>" , <EOL> verbose_name = _ ( "<STR_LIT>" ) ) <EOL> segment_range = tables . Column ( "<STR_LIT>" , <EOL> verbose_name = _ ( "<STR_LIT>" ) ) <EOL> multicast_ip_range = tables . Column ( "<STR_LIT>" , <EOL> verbose_name = _ ( "<STR_LIT>" ) ) <EOL> physical_network = tables . Column ( "<STR_LIT>" , <EOL> verbose_name = _ ( "<STR_LIT>" ) ) <EOL> class Meta : <EOL> name = "<STR_LIT>" <EOL> verbose_name = _ ( "<STR_LIT>" ) <EOL> table_actions = ( CreateNetworkProfile , DeleteNetworkProfile , ) <EOL> row_actions = ( EditNetworkProfile , DeleteNetworkProfile , ) <EOL> class EditPolicyProfile ( tables . LinkAction ) : <EOL> name = "<STR_LIT>" <EOL> verbose_name = _ ( "<STR_LIT>" ) <EOL> url = "<STR_LIT>" <EOL> classes = ( "<STR_LIT>" , "<STR_LIT>" ) <EOL> class PolicyProfile ( tables . DataTable ) : <EOL> id = tables . Column ( "<STR_LIT>" , verbose_name = _ ( "<STR_LIT>" ) , hidden = True ) <EOL> name = tables . Column ( "<STR_LIT:name>" , verbose_name = _ ( "<STR_LIT>" ) , ) <EOL> project_id = tables . Column ( "<STR_LIT>" , verbose_name = _ ( "<STR_LIT>" ) ) <EOL> class Meta : <EOL> name = "<STR_LIT>" <EOL> verbose_name = _ ( "<STR_LIT>" ) </s>
