<s> from django . core . urlresolvers import reverse <EOL> from django . utils . translation import ugettext_lazy as _ <EOL> from django . utils . translation import ungettext_lazy <EOL> from horizon import tables <EOL> from openstack_dashboard import api <EOL> class ExtraSpecDelete ( tables . DeleteAction ) : <EOL> @ staticmethod <EOL> def action_present ( count ) : <EOL> return ungettext_lazy ( <EOL> u"<STR_LIT>" , <EOL> u"<STR_LIT>" , <EOL> count <EOL> ) <EOL> @ staticmethod <EOL> def action_past ( count ) : <EOL> return ungettext_lazy ( <EOL> u"<STR_LIT>" , <EOL> u"<STR_LIT>" , <EOL> count <EOL> ) <EOL> def delete ( self , request , obj_ids ) : <EOL> api . cinder . volume_type_extra_delete ( request , <EOL> self . table . kwargs [ '<STR_LIT>' ] , <EOL> obj_ids ) <EOL> class ExtraSpecCreate ( tables . LinkAction ) : <EOL> name = "<STR_LIT>" <EOL> verbose_name = _ ( "<STR_LIT>" ) <EOL> url = "<STR_LIT>" <EOL> classes = ( "<STR_LIT>" , ) <EOL> icon = "<STR_LIT>" <EOL> def get_link_url ( self , extra_spec = None ) : <EOL> return reverse ( self . url , args = [ self . table . kwargs [ '<STR_LIT>' ] ] ) <EOL> class ExtraSpecEdit ( tables . LinkAction ) : <EOL> name = "<STR_LIT>" <EOL> verbose_name = _ ( "<STR_LIT>" ) <EOL> url = "<STR_LIT>" <EOL> classes = ( "<STR_LIT>" , "<STR_LIT>" ) <EOL> def get_link_url ( self , extra_spec ) : <EOL> return reverse ( self . url , args = [ self . table . kwargs [ '<STR_LIT>' ] , <EOL> extra_spec . key ] ) <EOL> class ExtraSpecsTable ( tables . DataTable ) : <EOL> key = tables . Column ( '<STR_LIT:key>' , verbose_name = _ ( '<STR_LIT>' ) ) <EOL> value = tables . Column ( '<STR_LIT:value>' , verbose_name = _ ( '<STR_LIT>' ) ) <EOL> class Meta ( object ) : <EOL> name = "<STR_LIT>" <EOL> verbose_name = _ ( "<STR_LIT>" ) <EOL> table_actions = ( ExtraSpecCreate , ExtraSpecDelete ) <EOL> row_actions = ( ExtraSpecEdit , ExtraSpecDelete ) <EOL> def get_object_id ( self , datum ) : <EOL> return datum . key <EOL> def get_object_display ( self , datum ) : <EOL> return datum . key </s>
