def test_getLiveSnapshotSupport(self): # Using any caps file to test the correctness of parsing capsData = self._readCaps("caps_libvirt_intel_i73770_nosnap.out") UNSUPPORTED_ARCHITECTURE = 'i686' result = caps._getLiveSnapshotSupport(UNSUPPORTED_ARCHITECTURE, capsData) self.assertIsNone(result) result = caps._getLiveSnapshotSupport(cpuarch.X86_64, capsData) self.assertFalse(result) capsData = self._readCaps("caps_libvirt_intel_i73770.out") result = caps._getLiveSnapshotSupport(UNSUPPORTED_ARCHITECTURE, capsData) self.assertIsNone(result) result = caps._getLiveSnapshotSupport(cpuarch.X86_64, capsData) self.assertTrue(result)
def test_getLiveSnapshotSupport(self): # Using any caps file to test the correctness of parsing capsData = self._readCaps("caps_libvirt_intel_i73770_nosnap.out") UNSUPPORTED_ARCHITECTURE = 'i686' result = caps._getLiveSnapshotSupport(UNSUPPORTED_ARCHITECTURE, capsData) self.assertIsNone(result) result = caps._getLiveSnapshotSupport(caps.Architecture.X86_64, capsData) self.assertFalse(result) capsData = self._readCaps("caps_libvirt_intel_i73770.out") result = caps._getLiveSnapshotSupport(UNSUPPORTED_ARCHITECTURE, capsData) self.assertIsNone(result) result = caps._getLiveSnapshotSupport(caps.Architecture.X86_64, capsData) self.assertTrue(result)
def testLiveSnapshotDisabledX86_64(self): capsData = self._readCaps("caps_libvirt_intel_i73770_nosnap.out") support = caps._getLiveSnapshotSupport(caps.Architecture.X86_64, capsData) self.assertEqual(support, False)
def testLiveSnapshotNoElementX86_64(self): '''old libvirt, backward compatibility''' capsData = self._readCaps("caps_libvirt_amd_6274.out") support = caps._getLiveSnapshotSupport(caps.Architecture.X86_64, capsData) self.assertTrue(support is None)
def testLiveSnapshotX86_64(self): capsData = self._readCaps("caps_libvirt_intel_i73770.out") support = caps._getLiveSnapshotSupport(cpuarch.X86_64, capsData) self.assertEqual(support, True)