<s> from django . utils . translation import ugettext_lazy as _ <EOL> from horizon import tables <EOL> from horizon . templatetags import sizeformat <EOL> def get_memory ( hypervisor ) : <EOL> return sizeformat . mbformat ( hypervisor . memory_mb ) <EOL> def get_memory_used ( hypervisor ) : <EOL> return sizeformat . mbformat ( hypervisor . memory_mb_used ) <EOL> def get_local ( hypervisor ) : <EOL> return sizeformat . diskgbformat ( hypervisor . local_gb ) <EOL> def get_local_used ( hypervisor ) : <EOL> return sizeformat . diskgbformat ( hypervisor . local_gb_used ) <EOL> class AdminHypervisorsTable ( tables . DataTable ) : <EOL> hypervisor_hostname = tables . Column ( "<STR_LIT>" , <EOL> verbose_name = _ ( "<STR_LIT>" ) ) <EOL> hypervisor_type = tables . Column ( "<STR_LIT>" , <EOL> verbose_name = _ ( "<STR_LIT>" ) ) <EOL> vcpus = tables . Column ( "<STR_LIT>" , <EOL> verbose_name = _ ( "<STR_LIT>" ) ) <EOL> vcpus_used = tables . Column ( "<STR_LIT>" , <EOL> verbose_name = _ ( "<STR_LIT>" ) ) <EOL> memory = tables . Column ( get_memory , <EOL> verbose_name = _ ( "<STR_LIT>" ) , <EOL> attrs = { '<STR_LIT>' : '<STR_LIT:size>' } ) <EOL> memory_used = tables . Column ( get_memory_used , <EOL> verbose_name = _ ( "<STR_LIT>" ) , <EOL> attrs = { '<STR_LIT>' : '<STR_LIT:size>' } ) <EOL> local = tables . Column ( get_local , <EOL> verbose_name = _ ( "<STR_LIT>" ) , <EOL> attrs = { '<STR_LIT>' : '<STR_LIT:size>' } ) <EOL> local_used = tables . Column ( get_local_used , <EOL> verbose_name = _ ( "<STR_LIT>" ) , <EOL> attrs = { '<STR_LIT>' : '<STR_LIT:size>' } ) <EOL> running_vms = tables . Column ( "<STR_LIT>" , <EOL> verbose_name = _ ( "<STR_LIT>" ) ) <EOL> class Meta : <EOL> name = "<STR_LIT>" <EOL> verbose_name = _ ( "<STR_LIT>" ) </s>
