Exemplo n.º 1
0
 def testGetVDSMDomainsWithChannel(self, arch):
     with MonkeyPatchScope([(libvirtconnection, 'get',
                             lambda: FakeConnection(arch, 'chan')),
                            (cpuarch, 'effective', lambda: arch)]):
         self.assertEqual([(v.UUIDString(), external,)
                           for v, xml, external
                           in recovery._list_domains()],
                          self._getAllDomainIds(arch))
Exemplo n.º 2
0
 def testGetVDSMDomainsWithoutGuestfs(self, arch):
     connect = lambda: FakeConnection(arch, 'org.libguestfs.channel.0')
     with MonkeyPatchScope([(libvirtconnection, 'get', connect),
                            (cpuarch, 'effective', lambda: arch)]):
         self.assertEqual(recovery._list_domains(), [])