Skip to content

Commit

Permalink
Merge "Enabled qemu memory balloon stats"
Browse files Browse the repository at this point in the history
  • Loading branch information
Jenkins authored and openstack-gerrit committed Sep 5, 2014
2 parents c0d1eb3 + 5978e62 commit 844d0ca
Show file tree
Hide file tree
Showing 4 changed files with 211 additions and 22 deletions.
16 changes: 16 additions & 0 deletions nova/tests/virt/libvirt/test_config.py
Expand Up @@ -2138,3 +2138,19 @@ def test_config_gid_map_parse(self):
self.assertEqual(2, obj.start)
self.assertEqual(20000, obj.target)
self.assertEqual(5, obj.count)


class LibvirtConfigMemoryBalloonTest(LibvirtConfigBaseTest):

def test_config_memory_balloon_period(self):
balloon = config.LibvirtConfigMemoryBalloon()
balloon.model = 'fake_virtio'
balloon.period = 11

xml = balloon.to_xml()
expected_xml = """
<memballoon model='fake_virtio'>
<stats period='11'/>
</memballoon>"""

self.assertXmlEqual(expected_xml, xml)

0 comments on commit 844d0ca

Please sign in to comment.