From e3b49a2167e5210f6984164d30376b4ac11fd245 Mon Sep 17 00:00:00 2001 From: Andrew Laski Date: Tue, 26 Feb 2013 13:47:03 -0500 Subject: Use min_ram of original image for snapshot, even with VHD When snapshotting an instance there seems to be no reason that min_ram can't be set based off of the original image in all cases. This relaxes the restriction that VHD backed instances set min_ram for snapshots based on the current instance. Bug 1133524 Change-Id: I3779c48d7325f3f0bde496f43a70017fe79d2835 --- nova/tests/compute/test_compute.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'nova/tests') diff --git a/nova/tests/compute/test_compute.py b/nova/tests/compute/test_compute.py index 5ad333c9e..08adb7367 100644 --- a/nova/tests/compute/test_compute.py +++ b/nova/tests/compute/test_compute.py @@ -4663,8 +4663,8 @@ class ComputeAPITestCase(BaseTestCase): def test_snapshot_minram_mindisk_VHD(self): """Ensure a snapshots min_ram and min_disk are correct. - A snapshot of a non-shrinkable VHD should have min_ram - and min_disk set to that of the original instances flavor. + A snapshot of a non-shrinkable VHD should have min_disk + set to that of the original instances flavor. """ self.fake_image.update(disk_format='vhd', @@ -4678,7 +4678,7 @@ class ComputeAPITestCase(BaseTestCase): self.assertEqual(image['name'], 'snap1') instance_type = instance['instance_type'] - self.assertEqual(image['min_ram'], instance_type['memory_mb']) + self.assertEqual(image['min_ram'], self.fake_image['min_ram']) self.assertEqual(image['min_disk'], instance_type['root_gb']) properties = image['properties'] self.assertTrue('backup_type' not in properties) -- cgit