Updated openstack/openstack
Project: openstack/nova  3a98bd77e3ec90be0d7f63f71511f276cc09ec65

libvirt: driver used memory tests cleanup

The libvirt's driver _get_memory_mb_used() currently reports proper
stats only if sys.platform is 'linux*', otherwise it reports 0.

In order for tests to work as expected on non-Linux platforms, mock
'sys.platform' to return 'linux2' to make sure the proper implementation
is called in _get_memory_mb_used().

While here, convert test_get_memory_used_normal() to use mock instead of
mox to make the test shorter and look similar to
test_get_memory_used_xen() that uses mock already.

Change-Id: If37fe2e447a52e73bcdbefc84b729931d2f7d0b8