Updated ListDomainsConfigScreen to use vmmDomain types.

This commit is contained in:
Darryl L. Pierce 2011-05-13 10:56:57 -04:00 committed by Cole Robinson
parent 78408182bf
commit fdd07b26e4

12
src/virtManagerTui/listdomains.py Normal file → Executable file
View File

@ -49,18 +49,18 @@ class ListDomainsConfigScreen(DomainListConfigScreen):
return self.get_detail_page_elements(screen)
def get_detail_page_elements(self, screen):
domain = self.get_libvirt().get_domain(self.get_selected_domain())
domain = self.get_selected_domain()
grid = Grid(2, 5)
grid.setField(Label("Name: "), 0, 0, anchorRight = 1)
grid.setField(Label(domain.name()), 1, 0, anchorLeft = 1)
grid.setField(Label(domain.get_name()), 1, 0, anchorLeft = 1)
grid.setField(Label("UUID: "), 0, 1, anchorRight = 1)
grid.setField(Label(domain.UUIDString()), 1, 1, anchorLeft = 1)
grid.setField(Label(domain.get_uuid()), 1, 1, anchorLeft = 1)
grid.setField(Label("OS Type: "), 0, 2, anchorRight = 1)
grid.setField(Label(domain.OSType()), 1, 2, anchorLeft = 1)
grid.setField(Label(domain.get_abi_type()), 1, 2, anchorLeft = 1)
grid.setField(Label("Max. Memory: "), 0, 3, anchorRight = 1)
grid.setField(Label(str(domain.maxMemory())), 1, 3, anchorLeft = 1)
grid.setField(Label(str(domain.maximum_memory())), 1, 3, anchorLeft = 1)
grid.setField(Label("Max. VCPUs: "), 0, 4, anchorRight = 1)
grid.setField(Label(str(domain.maxVcpus())), 1, 4, anchorLeft = 1)
grid.setField(Label(str(domain.vcpu_count())), 1, 4, anchorLeft = 1)
return [grid]
def ListDomains():