<s> from django . core . urlresolvers import reverse <EOL> from django . utils . translation import ugettext_lazy as _ <EOL> from horizon import exceptions <EOL> from horizon import tabs <EOL> from openstack_dashboard . api import cinder <EOL> from openstack_dashboard . api import nova <EOL> class OverviewTab ( tabs . Tab ) : <EOL> name = _ ( "<STR_LIT>" ) <EOL> slug = "<STR_LIT>" <EOL> template_name = ( "<STR_LIT>" <EOL> "<STR_LIT>" ) <EOL> def get_context_data ( self , request ) : <EOL> volume_id = self . tab_group . kwargs [ '<STR_LIT>' ] <EOL> try : <EOL> volume = cinder . volume_get ( request , volume_id ) <EOL> for att in volume . attachments : <EOL> att [ '<STR_LIT>' ] = nova . server_get ( request , att [ '<STR_LIT>' ] ) <EOL> except Exception : <EOL> redirect = reverse ( '<STR_LIT>' ) <EOL> exceptions . handle ( self . request , <EOL> _ ( '<STR_LIT>' ) , <EOL> redirect = redirect ) <EOL> return { '<STR_LIT>' : volume } <EOL> class VolumeDetailTabs ( tabs . TabGroup ) : <EOL> slug = "<STR_LIT>" <EOL> tabs = ( OverviewTab , ) </s>
